Files
test/sf_manufacturing/views/stock_picking_view.xml

103 lines
5.5 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<!-- <record id="view_stock_move_operations_inherit_sf" model="ir.ui.view">-->
<!-- <field name="name">stock.move.operations.form.inherit.sf</field>-->
<!-- <field name="model">stock.move</field>-->
<!-- <field name="inherit_id" ref="stock.view_stock_move_operations"/>-->
<!-- <field name="arch" type="xml">-->
<!-- <xpath expr="//button[@name='action_assign_serial_show_details']" position="after">-->
<!-- <button name="print_serial_numbers" string="序列号打印" type="object"/>-->
<!-- </xpath>-->
<!-- </field>-->
<!-- </record>-->
<record model="ir.ui.view" id="view_picking_form_inherit_sf_1">
<field name="name">stock.picking.form.inherit.sf</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='backorder_id']" position="after">
<field name="retrospect_ref"/>
</xpath>
<xpath expr="//field[@name='origin']" position="after">
<field name="sale_order_id"/>
</xpath>
<xpath expr="//field[@name='user_id']" position="after">
<field name="picking_type_sequence_code" invisible="1"/>
<field name="retrospect_ref"
attrs="{'invisible':[('picking_type_sequence_code','not in',['DL', 'INT', 'PC'])]}"/>
<field name="person_of_delivery" attrs="{'invisible':[('picking_type_sequence_code','!=','DL')]}"/>
<field name="telephone_of_delivery"
attrs="{'invisible':[('picking_type_sequence_code','!=','DL')]}"/>
<field name="address_of_delivery" attrs="{'invisible':[('picking_type_sequence_code','!=','DL')]}"/>
</xpath>
<xpath expr="//field[@name='product_id']" position="after">
<field name="part_number" optional="show"/>
<field name="part_name" optional="show"/>
</xpath>
</field>
</record>
<record id="sf_vpicktree_1" model="ir.ui.view">
<field name="name">sf.vpicktree.1</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.vpicktree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='origin']" position="before">
<field name="sale_order_id" string="销售单号"/>
</xpath>
<xpath expr="//field[@name='origin']" position="after">
<field name="retrospect_ref"/>
</xpath>
</field>
</record>
<record id="view_picking_internal_search_sf" model="ir.ui.view">
<field name="name">stock.picking.search</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_internal_search"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='name']" position="replace">
<field name="name"/>
<field name="retrospect_ref"/>
<field name="sale_order_id" string="销售单号"/>
</xpath>
<xpath expr="//filter[@name='picking_type']" position="after">
<filter string="追溯参考" name="retrospect" domain="[]"
context="{'group_by': 'retrospect_ref'}"/>
</xpath>
</field>
</record>
<record id="stock.action_picking_tree_all" model="ir.actions.act_window">
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('stock.vpicktree')})]"/>
</record>
<record id="sf_view_stock_move_operations" model="ir.ui.view">
<field name="name">sf.stock.move.operations.form</field>
<field name="model">stock.move</field>
<field name="inherit_id" ref="stock.view_stock_move_operations"/>
<field name="arch" type="xml">
<xpath expr="//form//field[@name='next_serial']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<xpath expr="//form//field[@name='next_serial_count']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<xpath expr="//form//button[@name='action_assign_serial_show_details']" position="after">
<button name="button_update_the_sequence_number" type="object" class="btn-link" data-hotkey="k" title="Assign Serial Numbers">
<span>更新序列号</span>
</button>
</xpath>
<xpath expr="//form//button[@name='action_assign_serial_show_details']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<xpath expr="//form//button[@name='action_clear_lines_show_details']" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
</field>
</record>
</data>
</odoo>