Skip to content
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

Merged
merged 2 commits into from
Jun 18, 2017
Merged

Conversation

luismontalba
Copy link
Member

CRM location

This module introduces a better zip.
It enables zip, city, state and country auto-completion on lead.

cc @Tecnativa

@rafaelbn rafaelbn added this to the 10.0 milestone Jun 8, 2017
@luismontalba
Copy link
Member Author

Travis is failing due to this module depends on base_location located in OCA/partner-contact repo.

@pedrobaeza
Copy link
Member

It shouldn't fail, because you can specify on oca_repositories.txt these kind of dependencies.

Copy link
Member

@pedrobaeza pedrobaeza left a 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

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):
Copy link
Member

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)
Copy link
Member

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.

@luismontalba luismontalba force-pushed the 10.0-mig-crm_location branch from f1a9ace to bd87d57 Compare June 9, 2017 15:24
@luismontalba
Copy link
Member Author

Changes proposed done and own commits squashed.

'depends': [
'crm',
'base_location',
],
'data': ['views/crm_lead_view.xml'],
'author': 'Antiun Ingeniería S.L., '
'author': 'Antiun Ingeniería, '
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Tecnativa

Copy link
Member

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

@luismontalba luismontalba force-pushed the 10.0-mig-crm_location branch from bd87d57 to 3876317 Compare June 12, 2017 08:05
@luismontalba
Copy link
Member Author

Author replaced, new commit squashed.

@pedrobaeza pedrobaeza force-pushed the 10.0-mig-crm_location branch from 3876317 to 7461c1b Compare June 18, 2017 15:56
@pedrobaeza pedrobaeza merged commit 72b2938 into OCA:10.0 Jun 18, 2017
@pedrobaeza pedrobaeza deleted the 10.0-mig-crm_location branch June 18, 2017 16:04
@pedrobaeza pedrobaeza mentioned this pull request Jun 18, 2017
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants