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][IMP] partner_identification: Add field computation and inverses #419

Merged
merged 2 commits into from
May 30, 2017

Conversation

lasley
Copy link
Contributor

@lasley lasley commented May 17, 2017

This PR add methods to allow for computation and inverse of an ID field of a specific category type, such as in the following example:

social_security_id = fields.Char(
    string='Social Security',
    compute=lambda s: s._compute_identification(
        'social_security_id', 'SSN',
    ),
    inverse=lambda s: s._inverse_identification(
        'social_security_id', 'SSN',
    ),
)

In the above example, the first Identification found in the SSN category code for the partner will be used for computation. The inverse blocks write when there is more than one active ID for the same type and partner in order to avoid accidental mutation of an incorrect record.

This has been working in Vertical Medical core for a while now, I'd just like to move it here for more abstract usage.

@lasley lasley force-pushed the feature/10.0/partner_identification_1.1.0 branch 6 times, most recently from e832264 to d5d6265 Compare May 17, 2017 16:44
* Add methods to allow for computation and inverse of an ID field of a specific category type
@lasley lasley force-pushed the feature/10.0/partner_identification_1.1.0 branch from d5d6265 to 81c8544 Compare May 17, 2017 17:12
@lasley
Copy link
Contributor Author

lasley commented May 17, 2017

cc @jbeficent - this was moved from OCA/vertical-medical#174

@lmignon
Copy link
Contributor

lmignon commented May 19, 2017

@lasley Thank you for this new feature. The code LGTM. It would be nice to also provide search method to be complete. Nevertheless 👍 (Code review only)

@lasley lasley force-pushed the feature/10.0/partner_identification_1.1.0 branch 3 times, most recently from 5cf80aa to df34e43 Compare May 22, 2017 22:13
@lasley lasley force-pushed the feature/10.0/partner_identification_1.1.0 branch from df34e43 to b41812f Compare May 26, 2017 18:03
@rafaelbn rafaelbn added this to the 10.0 milestone May 29, 2017
Copy link
Member

@luismontalba luismontalba left a comment

Choose a reason for hiding this comment

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

Functionality tested on runbot

@rafaelbn
Copy link
Member

Please @lasley could you review travis errors? Thanks!

Copy link
Member

@cubells cubells left a comment

Choose a reason for hiding this comment

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

👍
LGTM

@cubells
Copy link
Member

cubells commented May 29, 2017

Travis error not related to module.

@pedrobaeza
Copy link
Member

@lasley do you know why the branch is red?

Copy link

@AaronHForgeFlow AaronHForgeFlow left a comment

Choose a reason for hiding this comment

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

It works good, pending to figure it out what is causing travis to fail

@rafaelbn
Copy link
Member

Well, @lasley it could be nice to discover why the branch is red, in any case I don't think we must block merging this PR in any case

@rafaelbn
Copy link
Member

Well, one doubt, in you first commit it was no error, in the second it appears.

2017-05-30_10-48-50

Copy link
Member

@rafaelbn rafaelbn left a comment

Choose a reason for hiding this comment

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

Travis says red but there is no error in https://travis-ci.org/OCA/partner-contact/jobs/236469721 so is 👍

@rafaelbn rafaelbn merged commit 19c5fb6 into OCA:10.0 May 30, 2017
@lasley lasley deleted the feature/10.0/partner_identification_1.1.0 branch May 30, 2017 16:46
pankk pushed a commit to pankk/partner-contact that referenced this pull request Aug 10, 2018
(cherry picked from commit eadcae2)

Conflicts:
	partner_identification/__openerp__.py
	Set version to 8.0.1.0.0.
	Remove dependency on sales_team, as the relevant change is not
in 8.0.

Change emails to the new ones
(cherry picked from commit 3455ae6)

Update new name
(cherry picked from commit 5b592d7)

[FIX] try me on runbot link

(cherry picked from commit bd587b6)

Conflicts:
	partner_identification/README.rst
	Changed runbot to 8.0

[IMP] partner_identification: Add context override (OCA#373)

Allow for context override of validations using ``id_no_validate``
(cherry picked from commit 76c2e7b)

[10.0][IMP] partner_identification: Add field computation and inverses (OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option

(cherry picked from commit 19c5fb6)

[FIX] partner_identification: Infinite loop in search (OCA#436)

(cherry picked from commit fa9b390)

[FIX] partner-contact CI interactions

(cherry picked from commit bc93e7b)

[ADD][8.0] Backport of the 9.0 module.

(cherry picked from commit a425403)

[8.0][MIG] partner_identification backport
andhit-r pushed a commit to open-synergy/partner-contact that referenced this pull request Sep 1, 2018
(cherry picked from commit eadcae2)

Conflicts:
	partner_identification/__openerp__.py
	Set version to 8.0.1.0.0.
	Remove dependency on sales_team, as the relevant change is not
in 8.0.

Change emails to the new ones
(cherry picked from commit 3455ae6)

Update new name
(cherry picked from commit 5b592d7)

[FIX] try me on runbot link

(cherry picked from commit bd587b6)

Conflicts:
	partner_identification/README.rst
	Changed runbot to 8.0

[IMP] partner_identification: Add context override (OCA#373)

Allow for context override of validations using ``id_no_validate``
(cherry picked from commit 76c2e7b)

[10.0][IMP] partner_identification: Add field computation and inverses (OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option

(cherry picked from commit 19c5fb6)

[FIX] partner_identification: Infinite loop in search (OCA#436)

(cherry picked from commit fa9b390)

[FIX] partner-contact CI interactions

(cherry picked from commit bc93e7b)

[ADD][8.0] Backport of the 9.0 module.

(cherry picked from commit a425403)

[8.0][MIG] partner_identification backport
andhit-r pushed a commit to open-synergy/partner-contact that referenced this pull request Sep 1, 2018
(cherry picked from commit eadcae2)

Conflicts:
	partner_identification/__openerp__.py
	Set version to 8.0.1.0.0.
	Remove dependency on sales_team, as the relevant change is not
in 8.0.

Change emails to the new ones
(cherry picked from commit 3455ae6)

Update new name
(cherry picked from commit 5b592d7)

[FIX] try me on runbot link

(cherry picked from commit bd587b6)

Conflicts:
	partner_identification/README.rst
	Changed runbot to 8.0

[IMP] partner_identification: Add context override (OCA#373)

Allow for context override of validations using ``id_no_validate``
(cherry picked from commit 76c2e7b)

[10.0][IMP] partner_identification: Add field computation and inverses (OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option

(cherry picked from commit 19c5fb6)

[FIX] partner_identification: Infinite loop in search (OCA#436)

(cherry picked from commit fa9b390)

[FIX] partner-contact CI interactions

(cherry picked from commit bc93e7b)

[ADD][8.0] Backport of the 9.0 module.

(cherry picked from commit a425403)

[8.0][MIG] partner_identification backport
tarteo pushed a commit to tarteo/partner-contact that referenced this pull request Oct 24, 2018
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
NL66278 pushed a commit to NL66278/partner-contact that referenced this pull request Feb 22, 2019
(cherry picked from commit eadcae2)

Conflicts:
	partner_identification/__openerp__.py
	Set version to 8.0.1.0.0.
	Remove dependency on sales_team, as the relevant change is not
in 8.0.

Change emails to the new ones
(cherry picked from commit 3455ae6)

Update new name
(cherry picked from commit 5b592d7)

[FIX] try me on runbot link

(cherry picked from commit bd587b6)

Conflicts:
	partner_identification/README.rst
	Changed runbot to 8.0

[IMP] partner_identification: Add context override (OCA#373)

Allow for context override of validations using ``id_no_validate``
(cherry picked from commit 76c2e7b)

[10.0][IMP] partner_identification: Add field computation and inverses (OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option

(cherry picked from commit 19c5fb6)

[FIX] partner_identification: Infinite loop in search (OCA#436)

(cherry picked from commit fa9b390)

[FIX] partner-contact CI interactions

(cherry picked from commit bc93e7b)

[ADD][8.0] Backport of the 9.0 module.

(cherry picked from commit a425403)

[8.0][MIG] partner_identification backport
victormmtorres pushed a commit to Tecnativa/partner-contact that referenced this pull request Mar 25, 2019
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
Laurent-Corron pushed a commit to acsone/partner-contact that referenced this pull request Nov 26, 2019
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
ntsirintanis pushed a commit to ntsirintanis/partner-contact that referenced this pull request Feb 11, 2020
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
ntsirintanis pushed a commit to ntsirintanis/partner-contact that referenced this pull request Feb 19, 2020
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
manuelcalerosolis pushed a commit to Tecnativa/partner-contact that referenced this pull request Mar 24, 2020
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
phuctranfxvn pushed a commit to phuctranfxvn/partner-contact that referenced this pull request Feb 12, 2021
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
Freni-OSI pushed a commit to ursais/partner-contact that referenced this pull request May 9, 2022
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
Olageibol pushed a commit to BDO-ES/partner-contact that referenced this pull request Jun 6, 2022
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
marielejeune pushed a commit to acsone/partner-contact that referenced this pull request Nov 9, 2022
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
victor-champonnois pushed a commit to coopiteasy/partner-contact that referenced this pull request Nov 28, 2022
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
victor-champonnois pushed a commit to coopiteasy/partner-contact that referenced this pull request Nov 28, 2022
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
jdidderen-noviat pushed a commit to jdidderen-noviat/partner-contact that referenced this pull request Dec 26, 2022
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
njeudy pushed a commit to Alusage/partner-contact that referenced this pull request Jan 19, 2023
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
victor-champonnois pushed a commit to coopiteasy/partner-contact that referenced this pull request Feb 3, 2023
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
jdidderen-noviat pushed a commit to jdidderen-noviat/partner-contact that referenced this pull request Feb 5, 2023
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
AungKoKoLin1997 pushed a commit to qrtl/partner-contact that referenced this pull request Aug 10, 2023
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
NICO-SOLUTIONS pushed a commit to NICO-SOLUTIONS/partner-contact that referenced this pull request Dec 5, 2023
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
NICO-SOLUTIONS pushed a commit to NICO-SOLUTIONS/partner-contact that referenced this pull request Dec 5, 2023
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
edlopen pushed a commit to moduon/partner-contact that referenced this pull request Mar 1, 2024
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
edlopen pushed a commit to moduon/partner-contact that referenced this pull request Mar 1, 2024
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
bizzappdev pushed a commit to BizzAppDev-Systems/partner-contact that referenced this pull request Mar 19, 2024
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
chaule97 pushed a commit to chaule97/partner-contact that referenced this pull request Oct 2, 2024
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
chaule97 pushed a commit to chaule97/partner-contact that referenced this pull request Oct 9, 2024
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
chaule97 pushed a commit to chaule97/partner-contact that referenced this pull request Oct 9, 2024
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
chaule97 pushed a commit to chaule97/partner-contact that referenced this pull request Oct 25, 2024
OCA#419)

* [IMP] partner_identification: Add field computation and inverses
* Add methods to allow for computation and inverse of an ID field of a specific category type

* [IMP] partner_identification: Add search option
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