approval_wh_prep_move/views/approval_request_views.xml
2026-02-10 14:53:13 +07:00

27 lines
1.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="approval_wh_prep_move_request_view_form_inherit" model="ir.ui.view">
<field name="name">approval.wh.prep.move.request.view.form.inherit</field>
<field name="model">approval.request</field>
<field name="inherit_id" ref="approvals.approval_request_view_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_get_attachment_view']" position="after">
<button name="action_open_wh_prep_move" type="object"
groups="stock.group_stock_user"
class="oe_stat_button" icon="fa-truck"
invisible="picking_count == 0">
<field name="picking_count" string="Transfers"
groups="stock.group_stock_user" widget="statinfo"/>
</button>
</xpath>
<xpath expr="//button[@name='action_confirm']" position="after">
<button name="action_create_wh_prep_move" type="object"
groups="stock.group_stock_user"
string="Create WH to Prep Move" class="btn-primary"
data-hotkey="g"
invisible="approval_type != 'wh_prep_move' or request_status != 'approved' or picking_count &gt; 0"/>
</xpath>
</field>
</record>
</odoo>