Merge lp://qastaging/~akretion-team/partner-contact-management/add-partner_relation into lp://qastaging/~partner-contact-core-editors/partner-contact-management/7.0

Proposed by Alexis de Lattre
Status: Needs review
Proposed branch: lp://qastaging/~akretion-team/partner-contact-management/add-partner_relation
Merge into: lp://qastaging/~partner-contact-core-editors/partner-contact-management/7.0
Diff against target: 914 lines (+866/-0)
8 files modified
partner_relation/__init__.py (+23/-0)
partner_relation/__openerp__.py (+57/-0)
partner_relation/i18n/fr.po (+171/-0)
partner_relation/i18n/partner_relation.pot (+171/-0)
partner_relation/partner_relation.py (+217/-0)
partner_relation/partner_relation_demo.xml (+104/-0)
partner_relation/partner_relation_view.xml (+118/-0)
partner_relation/security/ir.model.access.csv (+5/-0)
To merge this branch: bzr merge lp://qastaging/~akretion-team/partner-contact-management/add-partner_relation
Reviewer Review Type Date Requested Status
Lorenzo Battistini (community) Needs Resubmitting
Frère Bernard (community) functionnal tests Approve
Partner and Contact Core Editors Pending
Review via email: mp+220726@code.qastaging.launchpad.net

Description of the change

This merge proposal adds a new module partner_relation. Here is the description :

===========
This module adds relations between partners. The type of relation is configurable ; it supports symetric and asymetric relations.

For example, you will be able to define on the form view of partner A that :

* Partner A is a competitor of Partner B (symetric relation : B is a competitor of A),

* Partner A has been recommended by Partner C (asymetric relation : C recommands A),

* Partner A is the editor of Partner D (asymetric relation : D is the integrator of A).

The relations that you define on Partner A towards Partner B will automatically be visible on the form view of Partner B.
============

Technically, it is not easy to implement in OpenERP. This implementation inherit the create() of the relation object to automatically generate a reverse relation (src_partner_id and dest_partner_id are swapped and the type of relation is the reverse if the relation is asymetric).

I have tried other implementations that would avoid to create a double entry for each relation, but all the other implementations were not good enough because I wanted relations to be simple and easy-to-use inside the partner form view.

This module is flake8 compliant, has demo data, ACLs, POT file and even an icon ! :)

To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

as we discussed before, here my take to the same problem: https://code.launchpad.net/~hbrunn/+junk/partner_relations

maybe we can throw that together

Revision history for this message
Stéphane Bidoul (Acsone) (sbi) wrote :

My colleague Olivier Laurent has also done something similar on an ongoing project (not yet public code but will be).

Maybe we can chat over this at the OpenDays

Revision history for this message
Alexis de Lattre (alexis-via) wrote :

No problem ; I'm in Louvain la neuve until Friday afternoon.

Revision history for this message
Alexis de Lattre (alexis-via) wrote :

@Holger

I had a quick look at your code. Let's try to look at it together tomorrow or Friday to see what's common, what's different, and see if we can enhance the partner_relation module with some ideas from your module.

Revision history for this message
Frère Bernard (brother-bernard) wrote :

Relation types : import OK.
Relations between partners : import OK.
Module is fully functionnal.

review: Approve (functionnal tests)
41. By Alexis de Lattre

Sort relation types by alphabetical order.

Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

Sorry Alexis for my late reply! Meanwhile, we added quite a bit to our approach to partner relations, so I made an alternative MP: https://code.launchpad.net/~therp-nl/partner-contact-management/7.0_partner_relations/+merge/223734

The differences are: We use views to duplicate data instead of code, I personally like this approach more. Then we also enable restrictions on the operands of a relation, and some data (validity date, active) on the relation itself.

Further, I took some care that it is simple to search for partners using relations they have among each other.

Revision history for this message
Lorenzo Battistini (elbati) wrote :

This project is now hosted on https://github.com/OCA/partner-contact. Please move your proposal there. This guide may help you https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub

review: Needs Resubmitting

Unmerged revisions

41. By Alexis de Lattre

Sort relation types by alphabetical order.

40. By Alexis de Lattre

Initial check-in of the module partner_relation.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.