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

Partner lastname 2 #153

Merged
merged 2 commits into from Oct 29, 2015
Merged

Partner lastname 2 #153

merged 2 commits into from Oct 29, 2015

Conversation

yajo
Copy link
Member

@yajo yajo commented Aug 11, 2015

Aiming for OCA/l10n-spain#174, this is an alternative for #141.

It adds a second lastname to contacts.

@yajo
Copy link
Member Author

yajo commented Aug 12, 2015

After last commits, I think it's production-ready.

This is the 2nd try of #105, FTR.

@rafaelbn
Copy link
Member

@yajo @antespi @eLBati please review.

We have two PR for two modules with different name and same functionality.

#105
#141

@yajo I think we must change name. Better partner_second_lastname, as is how it is known for this field internationally.

After @antespi and @eLBati review we will close PR 141 and go ahead with this one and the new name.

I would not want to add more modules to this project until we discover the problem of issue #154. It's a general issue, no body can deleted res.partner.

@yajo
Copy link
Member Author

yajo commented Aug 13, 2015

We have two PR for two modules with different name and same functionality.

I know, but #105 was closed, and #141 depends on #140 (and both lack ✅).

I think we must change name. Better partner_second_lastname

No problem.

I would not want to add more modules to this project until we discover the problem of issue #154. It's a general issue, no body can deleted res.partner.

Let's keep that discussion in #154's thread. BTW you did not answer there to last comments.

This module was written to extend the functionality of ``partner_firstname`` to
support having a second lastname for contact partners.

In some countries, it"s important to have a second last name for contacts.
Copy link
Member

Choose a reason for hiding this comment

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

it"s -> it's

@rafaelbn
Copy link
Member

@yajo as you see in #154 even though you get a ✅ Bugs exists.

Please add test for:

  • deleting res.partner
  • Automatic merge res.partner (this is also deduplicate contacts function)

partner_firstname and partner_second_lastname addons are critical, this affect to the full functionality of Odoo. It could be more easy if core assume that anyone in the worldwide has name and family name at least!

Thanks

@antespi
Copy link
Contributor

antespi commented Aug 19, 2015

@yajo, you have preference because you committed your contribution (#105) before me (#141).

Merge this and then I can review my improvements and propuse in a separate PR.

Thanks for your contribution.

@rafaelbn
Copy link
Member

👍

@rafaelbn
Copy link
Member

@eLBati @pedrobaeza could you review this PR please?


@api.one
@api.depends("firstname", "lastname", "lastname2")
def _compute_name(self):
Copy link
Member

Choose a reason for hiding this comment

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

This should use new hooks functions to modify the behaviour instead of overwriting the original method.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually I need to modify it because it depends in lastname2 now. BTW, #159 complicated more than helped. I'll update and fix it here too ASAP.

@antespi
Copy link
Contributor

antespi commented Aug 20, 2015

👍 code review and functional review.

Some comments:

  • Deleting partner issue ([8.0] partner_relations - Error when deleting a res.partner #154) is still failing, but it's not related with this addon.
  • When creating another position (partner_contact_in_several_companies addon) appears a form with only a name field (no firstname, lastname, lastname2 fields), when filled and save then change name introducing a coma character. This addon is independent to partner_contact_in_several_companies addon, so there's no a clear solution for this, and this issue appears also with partner_firstname addon (except coma character). What do you think?

@rafaelbn
Copy link
Member

rafaelbn commented Sep 2, 2015

@yajo @pedrobaeza @eLBati anything yo say of

When creating another position (partner_contact_in_several_companies addon) appears a form with only a name field (no firstname, lastname, lastname2 fields), when filled and save then change name introducing a coma character. This addon is independent to partner_contact_in_several_companies addon, so there's no a clear solution for this, and this issue appears also with partner_firstname addon (except coma character). What do you think?

@rafaelbn
Copy link
Member

rafaelbn commented Sep 3, 2015

Please, one more review here? already review by @antespi and me. Thanks

@yajo
Copy link
Member Author

yajo commented Sep 8, 2015

All will be easier if you merge #170 before. 😉

@yajo
Copy link
Member Author

yajo commented Sep 8, 2015

I'm pinging @adrienpeiffer @antespi because the last commits will break #159. I need a dict in _get_inverse_name instead of a list. It's more versatile after all.

Deleting partner issue (#154) is still failing, but it's not related with this addon.

It should be tested after merging #170 (and it would be related with this one too if merged, but I already fixed it in the last commits).

It could be more easy if core assume that anyone in the worldwide has name and family name at least!

You read my mind! 😆

And about partner_contact_in_several_companies, I had no idea. It would be nice to have opinions from somebody using that module. I'll look at it.

I'd appreciate some help about the coveralls' 🚫.

@yajo
Copy link
Member Author

yajo commented Sep 14, 2015

Last commit removed the workaround of #154 assuming that #171 was fixing it, but at the end it does not. However the bug is not in this package nor in partner_firstname, so I'll keep this PR without the workaround in the hope the bug gets fixed soon.

I'd still like @adrienpeiffer, @antespi or somebody else to check if something is broken related to #159 because I don't know what project relies on that PR.

@rafaelbn
Copy link
Member

@antespi please review. I thinks this PR is ready to merge.

@rafaelbn rafaelbn added this to the 8.0 milestone Oct 23, 2015
@rafaelbn rafaelbn added the 8.0 label Oct 23, 2015
@moylop260
Copy link

Are the 23 commits really necessary?
(Could execute a rebase -i --autosquash oca/8.0 and fixup many ones)

@moylop260
Copy link

Please, check pylint-odoo beta messages:
https://travis-ci.org/OCA/partner-contact/jobs/84057611#L177-L186

************* Module partner_firstname.__openerp__
partner_firstname/__openerp__.py:21: [C8102(manifest-required-key), ] Missing required key "license" in manifest file
************* Module partner_firstname.exceptions
partner_firstname/exceptions.py:1: [C8201(no-utf8-coding-comment), ] No UTF-8 coding comment found: Use `# coding: utf-8` or `# -*- coding: utf-8 -*-`
************* Module partner_firstname.tests.test_empty
partner_firstname/tests/test_empty.py:1: [C8201(no-utf8-coding-comment), ] No UTF-8 coding comment found: Use `# coding: utf-8` or `# -*- coding: utf-8 -*-`
************* Module partner_second_lastname.__openerp__
partner_second_lastname/__openerp__.py:5: [C8101(manifest-required-author), ] Missing author required "Odoo Community Association (OCA)" in manifest file
partner_second_lastname/__openerp__.py:5: [C8102(manifest-required-key), ] Missing required key "license" in manifest file

@yajo
Copy link
Member Author

yajo commented Oct 26, 2015

Rebased, squashed, fixed.

@janetrp
Copy link

janetrp commented Oct 28, 2015

Tested 👍 Latin people will be very happy including their mother's lastname ;)

@rafaelbn
Copy link
Member

Teste in runbot 👍

@rafaelbn
Copy link
Member

I think this module is ready to be merged, any opinions/comments please? Thanks

For further information, please visit:

* https://www.odoo.com/forum/help-1

Choose a reason for hiding this comment

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

@moylop260
Copy link

Then 👍

A little comment: Add try-me-on-runbot button in readme, please

@antoniocanovas
Copy link

👍

@yajo
Copy link
Member Author

yajo commented Oct 29, 2015

Done.

rafaelbn added a commit that referenced this pull request Oct 29, 2015
@rafaelbn rafaelbn merged commit 3124dd4 into OCA:8.0 Oct 29, 2015
@yajo yajo deleted the partner_lastname2 branch October 30, 2015 11:17
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.

9 participants