Reputation: 489
I have written a onchange method on the many2one field using new api for v9. my code is
branch_id = fields.Many2one('branch.branch', 'Branch')
@api.onchange('branch_id')
def onchange_branch(self):
if self.branch_id:
self.shop_ids = self.branch_id.shop_ids
I have not added the on change on the xml also. when i do the change the many2one field the on change method is not getting called.
Also On developer mode tooltip i can not see the onchange while on other filed i can see.
Does anyone have idea what I am missing?
Upvotes: 1
Views: 1010
Reputation: 16743
I faced this kind of issue while migrating code from v7 to v9. where I was changing the methods from old api to odoo new api. that time i forgot to comment the old api method.
May be this can be your issue.
kindly check your for the method onchange_branch
, if you have two method with same name or not. if yes then remove the extra method.
Upvotes: 2