Odoo Help

Welcome!

This community 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.

1

Selecting multiple companies instead of one in v7?

By
Test User
on 4/1/14, 8:00 PM 652 views

Example:

I have companies A, B, and C under parent #1. I have companies D, E, and F under parent #2.

Product A is sellable to company A and B only. When creating the product I am only able to select a single company. Selecting A will never let B sell that product. Selecting #1 makes the product sellable to A and B, but also to C, which isn't the case.

Scenario 2:

Same setup, but Product B is sellable by company A and D only.

Same question for customers. Customer A is for companies A and B but not C.

Is there any possible way to do this in OpenERP v7?

To do that, you should bypass the ir rule set for company. Have control on form which will say sellable to this. And perform the search / read as admin user not as current user.

silvi
on 4/1/14, 8:32 PM

Thanks. Can you post some more details about how to do something like that? I don't know how to do any of what you said. Thanks.

Test User
on 4/1/14, 11:17 PM

On your form have some flag kind field. If that is true means it should be accessible to another company. When you view the values, it must be calling search or read method. Overirde search/read method and use the uid=1 (as admin), set the args such as ['sellable_flag' '=' , 'True']. You should be able to get the records from multi companies.

silvi
on 4/2/14, 1:27 AM

Your Answer

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 4/1/14, 8:00 PM
Seen: 652 times
Last updated: 3/16/15, 8:10 AM