I have a field called crm (selection from table crm.lead)
I need to find away that when I select a crm name return the partner name of this stage in put it
in many2one field called partner_name
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I have a field called crm (selection from table crm.lead)
I need to find away that when I select a crm name return the partner name of this stage in put it
in many2one field called partner_name
Is this what you are asking?
@api.onchange('crm')
def _onchange_crm_name(self):
if self.crm.parent_id:
self.partner_name = self.crm.partner_id.id
Hi,
Either you can define an on change function for the crm field or created a related field to achive this.
Thanks
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký