[IMP] stock: picking type view
- Only display the warehouse and location field when the user is working with multi warehouses and multi locations. - MRP defines a stock.picking.type on manufacturing order, so that you can easily set the source/destination locations and benefit from seeing a manufacturing vignette in the inventory dashboard. However, the manufacturing orders do not use every options defined on this view, specifically the return picking type, the barcode nomenclature and the packs and lots. This commit hides these options when the vignette is an MRP one (manufacturing code). A cleaner patch would have been to adds attrs with an xpath from the MRP module, but if another modules wants to add another vignette there will be a problem, so we chose the easiest way here.
This commit is contained in:
committed by
Simon Lejeune
parent
da578cb656
commit
10d5c11de3
@@ -40,21 +40,21 @@
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="sequence_id"/>
|
||||
<field name="warehouse_id"/>
|
||||
<field name="warehouse_id" groups="stock.group_stock_multi_warehouses"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="code"/>
|
||||
<field name="return_picking_type_id"/>
|
||||
<field name="barcode_nomenclature_id" groups="base.group_no_one"/>
|
||||
<field attrs='{"invisible": [("code", "not in", ["incoming", "outgoing", "internal"])]}' name="return_picking_type_id"/>
|
||||
<field attrs='{"invisible": [("code", "not in", ["incoming", "outgoing", "internal"])]}' name="barcode_nomenclature_id" groups="base.group_no_one"/>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Packs and Lots" groups="stock.group_tracking_lot,stock.group_production_lot">
|
||||
<group attrs='{"invisible": [("code", "not in", ["incoming", "outgoing", "internal"])]}' string="Packs and Lots" groups="stock.group_tracking_lot,stock.group_production_lot">
|
||||
<field name="show_entire_packs" groups="stock.group_tracking_lot"/>
|
||||
<field name="use_create_lots" groups="stock.group_production_lot"/>
|
||||
<field name="use_existing_lots" groups="stock.group_production_lot"/>
|
||||
</group>
|
||||
<group string="Locations">
|
||||
<group string="Locations" groups="stock.group_stock_multi_locations">
|
||||
<field name="default_location_src_id" attrs="{'required': [('code', '=', 'internal')]}"/>
|
||||
<field name="default_location_dest_id" attrs="{'required': [('code', 'in', ('internal', 'incoming'))]}"/>
|
||||
</group>
|
||||
|
||||
Reference in New Issue
Block a user