[FIX] stock: reserve on transit location
Usecase to reproduce - Create company A and company B with one warehouse each - Warehouse from A resupply warehouse in company B - Create a product and check the route MTO and resupply from warehouse A - Connect as Demo User that only have access to company B - Do a delivery order in company B for this product -> it creates a receipt from warehouse A - Deliver in warehouse A to company transit - Try to reserve the receipt in company B -> It does nothing. It happens because the receipt move is in company A and the delivery order is in company B. The move is tagged as make_to_order so the reservation is based on move_orig_ids. However the move_orig_ids is empty due to record rule that hide since it's in the other company. In order to fix it, allow to see move from other companies that goes to transit location. opw-2033066 closes odoo/odoo#35223 Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
This commit is contained in:
@@ -89,7 +89,7 @@
|
||||
<field name="name">stock_move multi-company</field>
|
||||
<field name="model_id" search="[('model','=','stock.move')]" model="ir.model"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
|
||||
<field name="domain_force">['|','|',('company_id','=',False),('company_id','child_of',[user.company_id.id]),('location_dest_id.company_id', '=', False)]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.rule" id="stock_quant_rule">
|
||||
|
||||
Reference in New Issue
Block a user