Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] agreement_rebate: Migration to 18.0 #56

Merged
merged 17 commits into from
Feb 3, 2025
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[FIX] agreement_rebate: Settlement lines already invoiced are invoice…
…d twice when process the settlement in tow steps

TT52964
sergio-teruel authored and CarlosRoca13 committed Jan 29, 2025
commit fc7209987b48f23a9d76f5a4f4e9444e52b2da41
4 changes: 3 additions & 1 deletion agreement_rebate/models/agreement_rebate_settlement.py
Original file line number Diff line number Diff line change
@@ -68,7 +68,9 @@ def _reverse_type_map(self, inv_type):

def create_invoice(self):
invoice_dic = {}
for line in self.mapped("line_ids"):
for line in self.mapped("line_ids").filtered(
lambda ln: ln.invoice_status == "to_invoice"
):
key = line._get_invoice_key()
if key not in invoice_dic:
invoice_dic[key] = line._prepare_invoice()