-
-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[10.0][MIG] crm_location #157
Conversation
Travis is failing due to this module depends on base_location located in OCA/partner-contact repo. |
It shouldn't fail, because you can specify on oca_repositories.txt these kind of dependencies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And squash your commits together
crm_location/models/crm_lead.py
Outdated
res = super(CrmLead, self).on_change_partner_id(partner_id) | ||
if 'value' not in res: | ||
res['value'] = {} | ||
def _onchange_partner_id_values(self, partner_id): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This old onchange doesn't work for sure. Please use new API onchange (you can create a new method for not having to overwrite super):
@api.onchange('partner_id')
def onchange_partner_id_crm_location(self):
if self.partner_id:
self.location_id = self.partner_id.zip_id.id
location = self.location | ||
partner.zip_id = location.id | ||
lead.partner_id = partner.id | ||
lead._onchange_partner_id_values(lead.partner_id.id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call the new onchange method.
f1a9ace
to
bd87d57
Compare
Changes proposed done and own commits squashed. |
crm_location/__manifest__.py
Outdated
'depends': [ | ||
'crm', | ||
'base_location', | ||
], | ||
'data': ['views/crm_lead_view.xml'], | ||
'author': 'Antiun Ingeniería S.L., ' | ||
'author': 'Antiun Ingeniería, ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add Tecnativa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to replace, as this version is not maintained anymore by these old companies
bd87d57
to
3876317
Compare
Author replaced, new commit squashed. |
3876317
to
7461c1b
Compare
CRM location
This module introduces a better zip.
It enables zip, city, state and country auto-completion on lead.
cc @Tecnativa