feat: Move Warehouse Management group to purchase_custom_stock module

- Remove Warehouse Management group from purchase_requisition_custom
- Add Warehouse Management group in purchase_custom_stock via inheritance
- Position group after 'Other Details' group as requested
- Maintain all field attributes and conditions
- Fix proper module separation for warehouse-related fields
This commit is contained in:
maltayyar2 2025-11-20 23:14:26 +03:00
parent 1300f1a6c3
commit 3ca4ac317c
2 changed files with 17 additions and 17 deletions

View File

@ -54,21 +54,23 @@
<xpath expr="//field[@name='use_analytic']" position="attributes">
<attribute name="attrs">{'readonly':[('state','!=','draft')]}</attribute>
</xpath>
<xpath expr="//group[@string='Warehouse Management']" position="inside">
<field name="view_location_id" invisible="1"/>
<field name="edit_locations" invisible="1"/>
<field name="show_emp_button" invisible="1"/>
<field name="show_approve_warehouse" invisible="0"/>
<field name="has_asset_product_line" invisible="1"/>
<field name="show_asset_release_button" invisible="1"/>
<field name="all_assets_released" invisible="1"/>
<field name="asset_custody_complete" invisible="1"/>
<field name="warehouse_id"
attrs="{'readonly':['|',('edit_locations' , '=' , False),('state' , '!=' , 'warehouse')]}"
groups="stock.group_stock_user,stock.group_stock_manager"/>
<field name="location_id"
attrs="{'readonly':['|',('edit_locations' , '=' , False),('state' , '!=' , 'warehouse')]}"
groups="stock.group_stock_user,stock.group_stock_manager"/>
<xpath expr="//group[@string='Other Details']" position="after">
<group string="Warehouse Management" name="warehouse_management_group">
<field name="view_location_id" invisible="1"/>
<field name="edit_locations" invisible="1"/>
<field name="show_emp_button" invisible="1"/>
<field name="show_approve_warehouse" invisible="0"/>
<field name="has_asset_product_line" invisible="1"/>
<field name="show_asset_release_button" invisible="1"/>
<field name="all_assets_released" invisible="1"/>
<field name="asset_custody_complete" invisible="1"/>
<field name="warehouse_id"
attrs="{'readonly':['|',('edit_locations' , '=' , False),('state' , '!=' , 'warehouse')]}"
groups="stock.group_stock_user,stock.group_stock_manager"/>
<field name="location_id"
attrs="{'readonly':['|',('edit_locations' , '=' , False),('state' , '!=' , 'warehouse')]}"
groups="stock.group_stock_user,stock.group_stock_manager"/>
</group>
</xpath>
<xpath expr="//button[@name='open_requisition']" position="after">
<field name="picking_id" invisible="1"/>

View File

@ -96,8 +96,6 @@
attrs="{'invisible':[('use_analytic' , '=' , False)],'required':[('use_analytic' , '=' , True)],'readonly':[('state' , '!=' , 'draft')]}"
help="Analytic account for budget tracking"/>
</group>
<group string="Warehouse Management">
</group>
<field name="picking_type_id" invisible="1"/>
<field name="purchase_create" invisible="1"/>
<field name="company_id" invisible="1"/>