[FIX] warning: onchange_partner_id
The function _onchange_partner_id must be triggered when the field 'company_id' is modified like with function _onchange_partner_id in addons/account/models/account_invoice.py In this way, the account_id is set in 'account.invoice when the 'company_id' is changed. opw:652918
This commit is contained in:
@@ -108,7 +108,7 @@ class purchase_order(osv.Model):
|
||||
class account_invoice(osv.osv):
|
||||
_inherit = 'account.invoice'
|
||||
|
||||
@api.onchange('partner_id')
|
||||
@api.onchange('partner_id', 'company_id')
|
||||
def _onchange_partner_id(self):
|
||||
result = super(account_invoice, self)._onchange_partner_id()
|
||||
partner = self.partner_id
|
||||
|
||||
Reference in New Issue
Block a user