[FIX] crm : Individual contact address auto population
Steps to reproduce: 1- Install CRM app 2- Go to pipeline and create a new lead 3- Write a name for contact and click on 'Create and edit...' 4- Choose 'individual' as contact type and select the company related to this individual 5- the address will remain empty and will not be auto populated Current behavior before PR: The address is not auto populating when creating a new individual contact through a new lead. This happens because when you choose the contact type to individual the address type is not chosen so it is not populating any of the addresses Desired behavior after PR is merged: The address is now auto populating as I am passing to the form a default value for the contact type which is 'Contact' which is the default value when you create a contact from Contacts app opw-3569833 closes odoo/odoo#143408 X-original-commit: ae51afafc606e5ca568864fdf04a0ea618bf242d Signed-off-by: Jérémy Hennecart (jeh) <jeh@odoo.com>
This commit is contained in:
@@ -461,6 +461,7 @@
|
||||
'default_name': contact_name or partner_name,
|
||||
'default_is_company': type == 'opportunity' and contact_name == False,
|
||||
'default_company_name': type == 'opportunity' and partner_name,
|
||||
'default_type': 'contact',
|
||||
'default_phone': phone,
|
||||
'default_email': email_from,
|
||||
'default_user_id': user_id,
|
||||
|
||||
Reference in New Issue
Block a user