feat: conditionally show Generate Asset Codes button based on has_asset_moves field
This commit is contained in:
parent
47e67b8c10
commit
ecb49a7a32
@ -6,11 +6,12 @@
|
||||
<field name="inherit_id" ref="stock.view_picking_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//button[@name='button_validate']" position="before">
|
||||
<field name="has_asset_moves" invisible="1"/>
|
||||
<button name="action_generate_asset_codes"
|
||||
string="Generate Asset Codes"
|
||||
type="object"
|
||||
class="oe_highlight"
|
||||
invisible="state != 'assigned'"
|
||||
invisible="state != 'assigned' or not has_asset_moves"
|
||||
groups="ga_asset_management.group_ga_asset_user"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='move_ids']/list/field[@name='product_id']" position="after">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user