[FIX] stock: multi-company rule for `stock.quant`.

`stock.move` & `stock.product` have multi-company rules.
There is therefore no reason why `stock.quant` could not have one.

Besides, this could lead to access rights issues,
when a user went to the `Quants` list,
in Warehouse > Traceability > Quants,
while there were quants for products in a company different
than the user company.

opw-653188
This commit is contained in:
Denis Ledoux 2015-11-25 14:29:50 +01:00
parent 8e1a5add38
commit 2fd14db574
1 changed files with 7 additions and 0 deletions

View File

@ -80,6 +80,13 @@
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="stock_quant_rule">
<field name="name">stock_quant multi-company</field>
<field name="model_id" ref="model_stock_quant"/>
<field name="global" eval="True"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record model="ir.rule" id="stock_inventory_line_comp_rule">
<field name="name">Inventory Line multi-company</field>
<field name="model_id" ref="model_stock_inventory_line"/>