Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I've made a workflow that automatically assigns a partner to a corresponding company through the partner's ZIP.
My companies are something like these:
---- Company 1
---- Company 2
When I create a new partner with an user from Company 1 but that has to be assigned to Company 2, it gives me an error because user from Company 1 has no permissions with Company 2... I still wanna keep that user from Company 1 can't see Company 2 partners, but I want this automatic assigment working...
Is it possible that a record rule can be applied globally but not to some groups?
Answer 1: I wouldn't do it using workflow. What you can do is to inherit the create and/or write method of res.partner, capture the change of zip there, and assign company_id based on your rule. You can use SUPERUSER_ID (from openerp import SUPERUSER_ID and used it very sparingly) to overcome all record rules.
Answer 2: Yes, if you leave the group blank in a record rule, it will apply globally.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 1/21/15, 5:13 AM|
|Seen: 316 times|
|Last updated: 3/16/15, 8:10 AM|