Files
test/sf_manufacturing/views/stock_lot_views.xml

49 lines
2.2 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="stock_production_lot_form_generate_qr_code" model="ir.ui.view">
<field name="name">stock.lot.form.quality</field>
<field name="model">stock.lot</field>
<field name="inherit_id" ref="stock.view_production_lot_form"/>
<field name="arch" type="xml">
<xpath expr="//form//sheet//group//group[2]" position="inside">
<field name="qr_code_image" widget="image"/>
</xpath>
<xpath expr="//sheet" position="before">
<header>
<button string="打印二维码" name="print_single_method" type="object" class="btn-primary"/>
</header>
</xpath>
<xpath expr="//field[@name='product_id']" position="before">
<field name="rfid" attrs="{'invisible': [('rfid', '=', False)]}"/>
</xpath>
<xpath expr="//field[@name='product_id']" position="after">
<field name="product_specification"/>
</xpath>
<xpath expr="//field[@name='qr_code_image']" position="after">
<button name="search_lot_put_rfid" string="Rfid补零" type="object" invisible="1"/>
</xpath>
</field>
</record>
<record id="search_product_lot_view" model="ir.ui.view">
<field name="name">stock.production.lot.view</field>
<field name="model">stock.lot</field>
<field name="inherit_id" ref="stock.search_product_lot_filter"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='product_id']" position="after">
<field name="rfid"/>
</xpath>
</field>
</record>
<record id="view_production_lot_view_tree_tree" model="ir.ui.view">
<field name="name">stock.production.lot.tree.inherit.product.expiry</field>
<field name="model">stock.lot</field>
<field name="inherit_id" ref="stock.view_production_lot_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='create_date']" position="after">
<field name="rfid" invisible="1"/>
</xpath>
</field>
</record>
</odoo>