Merge lp://qastaging/~akretion-team/multi-company/multi-company-action-user into lp://qastaging/multi-company

Proposed by Benoit Guillot - http://www.akretion.com
Status: Needs review
Proposed branch: lp://qastaging/~akretion-team/multi-company/multi-company-action-user
Merge into: lp://qastaging/multi-company
Diff against target: 156 lines (+136/-0)
4 files modified
multi_company_action_user/__init__.py (+23/-0)
multi_company_action_user/__openerp__.py (+41/-0)
multi_company_action_user/res_company.py (+43/-0)
multi_company_action_user/res_company_view.xml (+29/-0)
To merge this branch: bzr merge lp://qastaging/~akretion-team/multi-company/multi-company-action-user
Reviewer Review Type Date Requested Status
Alexandre Fayolle - camptocamp Needs Resubmitting
Ana Juaristi Olalde (community) Approve
Pedro Manuel Baeza Needs Information
Joël Grand-Guillaume @ camptocamp code review, no tests Approve
Stefan Rijnhart (Opener) Approve
Review via email: mp+179179@code.qastaging.launchpad.net

Description of the change

Hello,

I propose a new module in this branch : multi_company_action_user

This module is a generic module. It adds a field on the company : automatic_action_user_id.

This field defines a user for a company that will be used in the code for intercompany automatic actions. For instance, automatic intercompany invoices, sales ...

Best regards.

Benoît

To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

I expect that the use of this module will become clear in future modules, so I only have a couple of nits:

- better to remove the empty lines at the end of __init__.py
- l.114..119 will probably look more elegant if you break the line after the parenthesis and align with the 'o' in 'automatic'.
- l. 127 you can use orm.except_orm instead, so that you do not have to import osv at all

review: Needs Fixing
6. By Benoit Guillot - http://www.akretion.com

[FIX] clean code

Revision history for this message
Benoit Guillot - http://www.akretion.com (benoit-guillot-z) wrote :

Thanks Stefan for the review.

Indeed, the field is used in other modules that I will propose for merging too.

I made the changes ask in your comment.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Thanks for the changes!

review: Approve
Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

LGTM, The same as Stefan, I do not see the use of that field and I'm curious about the rest of modules here.

review: Approve (code review, no tests)
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Eric Caudal has said that Elico is working on some modules for providing multi-company documents automations, so I would like to know if this module has something to do with that or is another work in progress for the same purpose. If it's so, I would recommend to talk each other to shyncronize you to avoid duplicating efforts.

Regards.

review: Needs Information
Revision history for this message
Sylvain LE GAL (GRAP) (sylvain-legal) wrote :

Hi,

There wasn't any answer to Pedro's question. Does this MP need review ?

Regards.

Revision history for this message
Ana Juaristi Olalde (ajuaristio) wrote :

If this could help... Joël's questions help try:

When it's necesary creating an automated document from one company to another one and user working on origin company has not permission on the destiny document, any creation action produces an error so I think the field is to avoid using hardcode user_id = 1 to be passed as parameter between functions.

Just my 2 cents.

I just aprove the idea and code. Not tested code.

If you find it usefull we have got several multi-company processes created for 6.1. They have been made especifically for a customer with a very specific proccesses but maybe some code/ideas/functional aproach could be reused to build generic Odoo's full multicompany requirements. Just an idea.

I published several screencast about requirements and solution we have built (it's in spanish, sorry for that):
http://www.aula-openerp.com/soluciones-específicas-61-3/procesos-intercompañía-entre-3-empresas/
Our modules are published and available, but please contact me if you need more information about them.

review: Approve
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

Could you update the description of the module to make it clear that there is no magic done in the module.

Suggestion:

'description': """Defines a user to be used for automatic action

This module adds a field 'automatic_action_user_id'
on the company to define a specific user to be used for the automatic actions. This field can
then be used by other modules defining such actions."""

Even then, the concept of "automatic action" is not clear to me. An example would be welcome.

review: Needs Information (code review, no tests)
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

Hello,

The management of the project has moved to Github: https://github.com/OCA/multi-company

Please migrate your merge proposal to Github. You may want to check https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub for an explanation on how to proceed.

Thanks for contributing to the project

review: Needs Resubmitting

Unmerged revisions

6. By Benoit Guillot - http://www.akretion.com

[FIX] clean code

5. By Benoit Guillot - http://www.akretion.com

[ADD] new module to add a specific user to the company to make actions on this company

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.

Subscribers

People subscribed via source and target branches