Skip to content

Commit

Permalink
[MIG] account_banking_mandate_sale: 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ferran-S73 authored and Raul-S73 committed May 5, 2023
1 parent 5187181 commit 0a24a07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions account_banking_mandate_sale/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Account Banking Mandate Sale",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Banking addons",
"license": "AGPL-3",
"summary": "Adds mandates on sale orders",
Expand All @@ -14,8 +14,6 @@
"account_payment_sale",
"account_banking_mandate",
],
"data": [
"views/sale_order.xml",
],
"data": ["views/sale_order.xml"],
"installable": True,
}
4 changes: 2 additions & 2 deletions account_banking_mandate_sale/views/sale_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
<field name="model">sale.order</field>
<field name="inherit_id" ref="account_payment_sale.view_order_form" />
<field name="arch" type="xml">
<field name="fiscal_position_id" position="after">
<xpath expr="//field[@name='fiscal_position_id']/parent::div" position="after">
<field
name="mandate_id"
attrs="{'invisible': [('mandate_required', '=', False)]}"
/>
<field name="mandate_required" invisible="1" />
<field name="commercial_invoice_partner_id" invisible="1" />
</field>
</xpath>
</field>
</record>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
class SaleAdvancePaymentInv(models.TransientModel):
_inherit = "sale.advance.payment.inv"

def _prepare_invoice_values(self, order, name, amount, so_line):
def _prepare_invoice_values(self, order, so_line):
"""Copy mandate from sale order to invoice"""
vals = super()._prepare_invoice_values(order, name, amount, so_line)
vals = super()._prepare_invoice_values(order, so_line)
if order.mandate_id:
vals["mandate_id"] = order.mandate_id.id
return vals

0 comments on commit 0a24a07

Please sign in to comment.