under accounting->invoice I'm trying to trigger the onchange uppon selecting a customer(field: partner_id: many2one) from the list , but it fails, whereas adding the onchange decorator on the field "origin" (type: char) works normally. can anybody help?
NB: in Odoo debugging mode the help message shown upon dragging the mouse on customer field that it's binded to an onchange function called: onchange_partner_id(type,...), I wonder if this is the cause of the issue
Here is the code: I inherit from the original invoice model than adding the onchange functions
class stock_picking(models.Model):
_inherit = "account.invoice"
#NOT triggered
@api.onchange('partner_id')
def _onchange_customer(self):
print("debug:y_account_invoice: _onchange_customer:selected")
#triggered successfully
@api.onchange('origin')
def _onchange_origin(self):
print("debug:y_account_invoice: _onchange_origin")