41 lines
2.2 KiB
XML
41 lines
2.2 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<data>
|
|
<record model="ir.ui.view" id="view_purchase_order_line_form_inherit_sf1">
|
|
<field name="name">purchase.order.form.inherit.sf</field>
|
|
<field name="model">purchase.order</field>
|
|
<field name="inherit_id" ref="purchase_order_approved.purchase_order_form"/>
|
|
<field name="arch" type="xml">
|
|
<field name="order_line" position="attributes">
|
|
<attribute
|
|
name="attrs"
|
|
>{'readonly': [('state', '!=', 'draft')]}
|
|
</attribute>
|
|
</field>
|
|
<xpath expr="//field[@name='order_line']/tree/field[@name='name']" position="after">
|
|
<field name="related_product" optional="show"/>
|
|
<field name="part_number" optional="show"/>
|
|
</xpath>
|
|
<xpath expr="//sheet//div[@class='oe_button_box']" position="inside">
|
|
<button class="oe_stat_button" name="action_view_production" type="object" icon="fa-wrench"
|
|
attrs="{'invisible': [('production_count', '=', 0)]}"
|
|
>
|
|
<div class="o_field_widget o_stat_info">
|
|
<span class="o_stat_value">
|
|
<field name="production_count"/>
|
|
</span>
|
|
<span class="o_stat_text">制造订单</span>
|
|
</div>
|
|
</button>
|
|
</xpath>
|
|
<!-- 添加销售订单号字段-->
|
|
<xpath expr="//sheet/group/group[2]/div[@name='date_approve']" position="after">
|
|
<field name="origin_sale_id" readonly="1" string="参考销售订单"
|
|
attrs="{'invisible': [('origin_sale_ids' , '!=', False)]}"/>
|
|
<field name="origin_sale_ids" readonly="1" string="参考销售订单" widget="many2many_tags"
|
|
attrs="{'invisible': [('origin_sale_ids' , '=', False)]}"/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</data>
|
|
</odoo> |