mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
@@ -21,10 +21,8 @@ class AccountInvoice(models.Model):
|
||||
@api.onchange('partner_id', 'company_id')
|
||||
def _onchange_partner_id(self):
|
||||
res = super(AccountInvoice, self)._onchange_partner_id()
|
||||
if self.partner_id:
|
||||
company_id = (self.company_id.id or
|
||||
self.env.context.get('force_company') or
|
||||
self.env.user.company_id.id)
|
||||
company_id = self.company_id.id or self.env.context.get('force_company')
|
||||
if self.partner_id and company_id:
|
||||
if self.type == 'in_invoice':
|
||||
pay_mode = self.with_context(
|
||||
force_company=company_id
|
||||
|
||||
@@ -146,6 +146,7 @@ class TestAccountPaymentPartner(common.SavepointCase):
|
||||
'partner_id': cls.supplier.id,
|
||||
'type': 'in_invoice',
|
||||
'journal_id': cls.journal_c1.id,
|
||||
'company_id': cls.company.id,
|
||||
})
|
||||
|
||||
def _create_invoice(self):
|
||||
|
||||
Reference in New Issue
Block a user