mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[IMP] contract_payment_mode: Onchange payment mode vals
This commit is contained in:
committed by
Palkesh Aktiv
parent
8fc8d6af92
commit
7885886930
@@ -21,5 +21,7 @@ class AccountAnalyticAccount(models.Model):
|
||||
invoice_vals = super(AccountAnalyticAccount, self)._prepare_invoice()
|
||||
if self.payment_mode_id:
|
||||
invoice_vals['payment_mode_id'] = self.payment_mode_id.id
|
||||
invoice_vals['partner_bank_id'] = self.partner_id.bank_ids[:1].id
|
||||
invoice = self.env['account.invoice'].new(invoice_vals)
|
||||
invoice.payment_mode_id_change()
|
||||
invoice_vals = invoice._convert_to_write(invoice._cache)
|
||||
return invoice_vals
|
||||
|
||||
Reference in New Issue
Block a user