From 66f64b30d9ea26001ee6e4a00ab0353a772b177a Mon Sep 17 00:00:00 2001 From: cbeddies Date: Tue, 12 Nov 2024 16:32:02 -0500 Subject: [PATCH] [UPD] osi_quote_downpayment: fix syntax errors --- osi_quote_downpayment/models/account_move.py | 4 ++-- osi_quote_downpayment/views/sale_order_views.xml | 2 +- .../wizards/sale_make_invoice_advance_views.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osi_quote_downpayment/models/account_move.py b/osi_quote_downpayment/models/account_move.py index 4c2e40eae..bd6a87543 100644 --- a/osi_quote_downpayment/models/account_move.py +++ b/osi_quote_downpayment/models/account_move.py @@ -10,13 +10,13 @@ class AccountMove(models.Model): #Prevents price of downpayment from being reset on draft sale orders def action_post(self): downpayment_lines = {} - for rec in records: + for rec in self: downpayment_lines[rec.id] = {} for line in rec.invoice_line_ids: if "Down payment" in line.name: downpayment_lines[rec.id][line.id] = line.price_unit res = super().action_post() - for rec in records: + for rec in self: for line in rec.invoice_line_ids: if "Down payment" in line.name: downpayment_lines[rec.id][line.id] = line.price_unit diff --git a/osi_quote_downpayment/views/sale_order_views.xml b/osi_quote_downpayment/views/sale_order_views.xml index 32137e07c..17acb8d6e 100644 --- a/osi_quote_downpayment/views/sale_order_views.xml +++ b/osi_quote_downpayment/views/sale_order_views.xml @@ -7,7 +7,7 @@ - invoice_status != 'to invoice' or state in ['draft', 'sent'] + invoice_status != 'to invoice' and state not in ['draft', 'sent'] diff --git a/osi_quote_downpayment/wizards/sale_make_invoice_advance_views.xml b/osi_quote_downpayment/wizards/sale_make_invoice_advance_views.xml index da9dc9dfa..d5c3ebd76 100644 --- a/osi_quote_downpayment/wizards/sale_make_invoice_advance_views.xml +++ b/osi_quote_downpayment/wizards/sale_make_invoice_advance_views.xml @@ -8,7 +8,7 @@ - +