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 just lost my hope, that I will solve this problem alone and I cannot find any solution or even suggestion how to do this.
So the problem:
I have multicompany env with 3 companys:
COM_1, COM_2, COM_3
Every company has it`s own products. When I create SALE.ORDER and I add SALE.ORDER.LINE I can select ALL products that belongs to companys, to which my current RES.USER has access. But this cause later a lot of problems, so I would like to limit selection list to products, that belongs to company selected on SALE.ORDER form.
I hope this is more or less understandable ;)
So what I would like to achieve is:
- on sale.order form I select company, let`s say COM_1
- on sale.order.line I add products and I see ONLY products that belongs to COM_1
Could someone please help me with this task?
Thanks in advance,
You achieve acheive this simply by adding domain to your product field in sale.order.line object both its tree and form view for Sale order (by overriding the form view of sale.order)
and at product_id field do this
<xpath expr="//YOUR_PATH_TO_product_id" position="attributes">
<attribute name="domain">[('company_id', '=', parent.company_id.id)]</attribute>
Hope it helps
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: 9/22/15, 5:36 AM|
|Seen: 1813 times|
|Last updated: 3/13/16, 5:18 AM|