Use case to reproduce the bug: - Enable multi company and create a second one. - Add both company to another user and give him stock manager rights - Login on the second user and select as active the created company - Go to product and create one -> access right error on stock.location.route message. It happens because the routes 'buy' is selected by default. However the route buy when created use the default company although it's generic for all companies. This commit change the data in order to remove the company on routes buy, mto, manufacture and drop_shipping. Since this commit was released after v11 release, it could happens that already created database still have the problem thus the solution is to remove manually the company on the routes quoted above. opw-777718
41 lines
1.8 KiB
XML
41 lines
1.8 KiB
XML
<?xml version="1.0"?>
|
|
<odoo>
|
|
<data noupdate="1">
|
|
<record id="seq_picking_type_dropship" model="ir.sequence">
|
|
<field name="name">Dropship</field>
|
|
<field name="prefix">DS</field>
|
|
<field name="padding">5</field>
|
|
<field name="company_id" eval="False"/>
|
|
</record>
|
|
|
|
<record id="picking_type_dropship" model="stock.picking.type">
|
|
<field name="name">Dropship</field>
|
|
<field name="sequence_id" ref="seq_picking_type_dropship"/>
|
|
<field name="code">incoming</field>
|
|
<field name="warehouse_id" eval="False"/>
|
|
<field name="default_location_src_id" ref="stock.stock_location_suppliers"/>
|
|
<field name="default_location_dest_id" ref="stock.stock_location_customers"/>
|
|
</record>
|
|
|
|
<!-- Drop Shipping-->
|
|
<record id="route_drop_shipping" model='stock.location.route'>
|
|
<field name="name">Drop Shipping</field>
|
|
<field name="sequence">3</field>
|
|
<field name="company_id"></field>
|
|
<field name="sale_selectable" eval="True"/>
|
|
<field name="product_selectable" eval="True"/>
|
|
<field name="product_categ_selectable" eval="True"/>
|
|
</record>
|
|
|
|
<record id="procurement_rule_drop_shipping" model="procurement.rule">
|
|
<field name="name">Vendor → Customer</field>
|
|
<field name="action">buy</field>
|
|
<field name="location_id" ref="stock.stock_location_customers"/>
|
|
<field name="location_src_id" ref="stock.stock_location_suppliers"/>
|
|
<field name="procure_method">make_to_stock</field>
|
|
<field name="route_id" ref="route_drop_shipping"/>
|
|
<field name="picking_type_id" ref="picking_type_dropship"/>
|
|
</record>
|
|
</data>
|
|
</odoo>
|