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

[MIG] partner_contact_lang: Migration to 11.0 #636

Merged
merged 6 commits into from
Oct 10, 2018

Conversation

cristinamartinrod
Copy link
Member

@cristinamartinrod cristinamartinrod commented Oct 4, 2018

Odoo by default propagate language field to the created contacts from their form, but it doesn't allow to change it once created. This module fills this gap, and also provides other facilities for the
contact language management:

  • Put the language of the parent company when the contact doesn't have a language and this parent company is assigned.
  • When the company changes the language, it fills with the same language all the contacts that don't have any.

cc @Tecnativa

Copy link
Member

@nikul-serpentcs nikul-serpentcs left a comment

Choose a reason for hiding this comment

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

Improve Code

@pedrobaeza
Copy link
Member

@cristinamartinrod please make the agreed changes

Copy link
Member

@nikul-serpentcs nikul-serpentcs left a comment

Choose a reason for hiding this comment

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

Code Review LGTM

Copy link

@christophe-hanon christophe-hanon left a comment

Choose a reason for hiding this comment

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

Just did a small functionnal review

Readme describes correctly the module
Language is propagated to children - only if the language is not set.
Checked with two languages.
Please merge.

self.partner.lang = 'en_US'
self.assertEqual(self.contact.lang, 'en_US')
self.assertEqual(self.partner.lang, 'en_US')
Copy link
Member

@tafaRU tafaRU Oct 9, 2018

Choose a reason for hiding this comment

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

why did you change the unit test?

Copy link
Member

Choose a reason for hiding this comment

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

@tafaRU Because here two times checked contact, so changed partner.

assertion checked one for partner and one for contact.

Copy link
Member

Choose a reason for hiding this comment

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

This one is incorrect right now and it's not testing what the module does. I'll change it.

@pedrobaeza pedrobaeza added this to the 11.0 milestone Oct 10, 2018
pedrobaeza and others added 6 commits October 10, 2018 18:25
===========================
Manage language in contacts
===========================

Odoo by default propagate language field to the created contacts from their
form, but it doesn't allow to change it once created.

This module fills this gap, and also provides other facilities for the
contact language management:

* Put the language of the parent company when the contact doesn't have a
  language and this parent company is assigned.
* When the company changes the language, it fills with the same language all
  the contacts that don't have any.

Usage
=====

Go to any partner that is a company and has contacts. Click on one contact
and you will be able to edit the language.
@pedrobaeza pedrobaeza force-pushed the 11.0-mig-partner_contact_lang branch from d88f195 to 2881438 Compare October 10, 2018 16:50
@pedrobaeza pedrobaeza merged commit 2450346 into OCA:11.0 Oct 10, 2018
@pedrobaeza pedrobaeza deleted the 11.0-mig-partner_contact_lang branch October 10, 2018 17:30
@emagdalenaC2i emagdalenaC2i mentioned this pull request Dec 28, 2018
53 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.

8 participants