Skip to content

Commit

Permalink
[UPD] osi_quote_downpayment: fix syntax errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeddies committed Nov 12, 2024
1 parent 6ac9b14 commit 6c3716e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions osi_quote_downpayment/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion osi_quote_downpayment/views/sale_order_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<xpath expr="//button[@id='create_invoice']" position="attributes">
<attribute name="invisible">invoice_status != 'to invoice' or state in ['draft', 'sent']</attibute>
<attribute name="invisible">invoice_status != 'to invoice' and state not in ['draft', 'sent']</attribute>
</xpath>
</field>
</record>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<field name="inherit_id" ref="sale.view_sale_advance_payment_inv" />
<field name="arch" type="xml">
<xpath expr="//field[@name='advance_payment_method']" position="after">
<field name="deduct_down_payments" invisible="advance_payment_method != 'delivered'"/>
<field name="deduct_down_payments" invisible="advance_payment_method == 'delivered'"/>
</xpath>
</field>
</record>
Expand Down

0 comments on commit 6c3716e

Please sign in to comment.