Hello,
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,
Piotrek
Pawan, sorry for answering here, but my karma... well You are right! Actually I`ve tried this or something similar before, but somehow it does not worked. Maybe I wrote domain incorrectly, anyway working solution is below: <xpath expr="//tree[@string='Sales Order Lines']/field[@name='product_id']" position="attributes"> [('company_id', '=', parent.company_id)] Thanks for help :)