Files
test/sf_warehouse/wizard/wizard_view.xml

67 lines
3.5 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="sf_shelf_location_wizard_form" model="ir.ui.view">
<field name="name">货位变更</field>
<field name="model">sf.shelf.location.wizard</field>
<field name="arch" type="xml">
<form string="货位变更">
<sheet>
<group col="1">
<group string="初始货位">
<group>
<field name="current_location_id"/>
<field name="current_shelf_id" string="货架"/>
<field name="current_name" string="名称"/>
</group>
<group>
<field name="current_barcode_id" string="编码"/>
<field name="lot_id" attrs="{'invisible': [('lot_id', '=', False)]}"/>
</group>
<field name="current_product_sn_ids"
attrs="{'invisible': [('current_product_sn_ids', '=', [])]}">
<tree edit="1" create="0" delete="0" editable="bottom">
<field name="lot_id" readonly="1"/>
<field name="qty" readonly="1"/>
</tree>
</field>
</group>
<group string="目标货位">
<group>
<field name="destination_location_id"/>
<field name="destination_shelf_id" string="货架" options="{'no_create': True}"/>
<field name="destination_name" string="名称"/>
<field name="current_product_id" invisible="1"/>
</group>
<group>
<field name="destination_barcode_id" string="编码" options="{'no_create': True}"
placeholder="请选择目标货位"/>
<field name="lot_id" attrs="{'invisible': [('lot_id', '=', False)]}"/>
</group>
</group>
<field name="destination_product_sn_ids"
attrs="{'invisible': [('current_product_sn_ids', '=', [])]}">
<tree edit="1" create="0" delete="1" editable="bottom">
<field name="lot_id" readonly="1"/>
<field name="qty_num"/>
</tree>
</field>
</group>
</sheet>
<footer>
<button string="确定" name="confirm_the_change" type="object" class="btn-primary"
confirm="是否确认变更货位"/>
<button string="取消" class="btn-secondary" special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="sf_shelf_location_wizard_act" model="ir.actions.act_window">
<field name="name">货位变更</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">sf.shelf.location.wizard</field>
<field name="view_mode">form</field>
<field name="view_id" ref="sf_shelf_location_wizard_form"/>
<field name="target">new</field>
</record>
</odoo>