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

[8.0][crm_lead_firstname] Link crm and partner_firstname modules. #75

Merged
merged 7 commits into from
Feb 29, 2016
Merged

[8.0][crm_lead_firstname] Link crm and partner_firstname modules. #75

merged 7 commits into from
Feb 29, 2016

Conversation

yajo
Copy link
Member

@yajo yajo commented Feb 15, 2016

This module adds the lastname field to leads and converts current contact name into contact firstname.

Allows to transfer that from and to res.partner objects.

@rafaelbn

@rafaelbn
Copy link
Member

Travis fails, runbot fails, I cannot test it.

@yajo
Copy link
Member Author

yajo commented Feb 22, 2016

It should work now.

This module adds the lastname field to leads and converts current contact name into contact firstname.

Allows to transfer that from and to res.partner objects.
Without respecting the order, the user could get to a situation where
you are updating a field without lastname to set `firstname=False,
lastname="something"` and fail because Odoo started by `firstname` and
that lead to a temporary situation where no names are set and
`EmptyNamesError` gets raised.

With this patch, you force Odoo to write first the field with value,
whith avoids that situation and always works.
@yajo
Copy link
Member Author

yajo commented Feb 24, 2016

I rebased to make runbot rebuild, let's see if today it works.

@rafaelbn
Copy link
Member

Runbot says:

2016-02-24 15:39:10     WARNING     server  openerp.addons.base_contact.deprecated:32 <module> This module is DEPRECATED. See /srv/openerp/instances/openerp-oca-runbot/parts/odoo-extra/runbot/static/build/3142515-75-2ae3a2/openerp/addons/base_contact/README.rst

@rafaelbn
Copy link
Member

I tested functionality and it's OK! Thanks 👍

@yajo
Copy link
Member Author

yajo commented Feb 25, 2016

#75 (comment) fixed in OCA/partner-contact#250

if not is_company and partner_id:
partner = self.env["res.partner"].browse(partner_id)
partner.update(
OrderedDict(
Copy link
Member

Choose a reason for hiding this comment

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

Why do you use this strange construction?

Copy link
Member Author

Choose a reason for hiding this comment

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

See 2ae3a2c

Copy link
Member

Choose a reason for hiding this comment

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

You should write the same commit text as comment for clarifying it to the next code reader

@yajo
Copy link
Member Author

yajo commented Feb 26, 2016

All fixed.

@pedrobaeza
Copy link
Member

👍

1 similar comment
@carlosdauden
Copy link

👍

rafaelbn added a commit that referenced this pull request Feb 29, 2016
[8.0][crm_lead_firstname] Link crm and partner_firstname modules.
@rafaelbn rafaelbn merged commit 7ac7cef into OCA:8.0 Feb 29, 2016
@yajo yajo deleted the crm_firstname branch March 1, 2016 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants