[FIX] sale: propagate bank account infos to invoice

Fill bank account information for the current company
Create an Invoice by hand, under "Other info" tab the Bank Account
section is filled.
Now create a Sale order, confirm it and create the invoice.

The invoice created from the sale order is missing the Bank Account
section, this in turn disable the QR code generation. Adding th
erequired information when creating the invoice from the sale
order fix the issue

opw-2181580

closes odoo/odoo#44353

X-original-commit: bea0ee1f484bd25fab1ed4170d88629c4fb2709c
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
Andrea Grazioso (agr-odoo)
2020-01-31 08:23:36 +00:00
parent aed6510add
commit 6dc3386c34
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -534,6 +534,7 @@ class SaleOrder(models.Model):
'partner_id': self.partner_invoice_id.id,
'partner_shipping_id': self.partner_shipping_id.id,
'fiscal_position_id': (self.fiscal_position_id or self.fiscal_position_id.get_fiscal_position(self.partner_invoice_id.id)).id,
'invoice_partner_bank_id': self.company_id.partner_id.bank_ids[:1].id,
'invoice_origin': self.name,
'invoice_payment_term_id': self.payment_term_id.id,
'invoice_payment_ref': self.reference,
@@ -81,7 +81,7 @@ class SaleAdvancePaymentInv(models.TransientModel):
'currency_id': order.pricelist_id.currency_id.id,
'invoice_payment_ref': order.client_order_ref,
'invoice_payment_term_id': order.payment_term_id.id,
'invoice_partner_bank_id': order.company_id.partner_id.bank_ids[:1],
'invoice_partner_bank_id': order.company_id.partner_id.bank_ids[:1].id,
'team_id': order.team_id.id,
'campaign_id': order.campaign_id.id,
'medium_id': order.medium_id.id,