Files
tra_backend/MKS_Tradex_Backend_2/views/stock_picking.xml
2020-09-04 18:25:47 +00:00

37 lines
2.0 KiB
XML
Executable File

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_stock_picking_inherit_form" model="ir.ui.view">
<field name="name">view.stock.picking.inherit.form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='button_validate']" position="replace">
<button name="button_validate" attrs="{'invisible': [('state', '!=', ('qa_approval'))]}" string="Validate" type="object" class="oe_highlight" groups="stock.group_stock_user"/>
</xpath>
<xpath expr="//button[@name='button_scrap']" position="after">
<button name="button_validate_qa_approval" states="assigned" string="QA Validatation" type="object" class="oe_highlight" groups="stock.group_stock_user"/>
</xpath>
<xpath expr="//field[@name='state']" position="replace">
<field name="state" widget="statusbar" statusbar_visible="draft,confirmed,partially_available,assigned,qa_approval,done"/>
</xpath>
<xpath expr="//button[@name='do_print_picking']" position="replace">
<button name="do_print_picking" string="Print" groups="stock.group_stock_user" type="object" attrs="{'invisible': ['|', ('state', 'not in', ('qa_approval', 'partially_available')), ('is_locked', '=', False)]}"/>
</xpath>
<xpath expr="//button[@name='action_cancel']" position="replace">
<button name="action_cancel" attrs="{'invisible': ['|', ('state', 'not in', ('qa_approval', 'confirmed', 'partially_available', 'draft', 'waiting')), ('is_locked', '=', False)]}" string="Cancel" groups="base.group_user" type="object"/>
</xpath>
</field>
</record>
</odoo>