Odoo / Model / Value change Events in UI
Value Change Events
-
Step 1:
1. model
customer_id = fields.Many2one('res.partner', string='Customer', required=True) customer_email = fields.Char() customer_mobile = fields.Char() @api.onchange('customer_id') def onchange_customer_id(self): self.customer_email=self.customer_id.email self.customer_mobile=self.customer_id.mobile