mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
77 lines
3.4 KiB
XML
77 lines
3.4 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
|
|
<record id="view_repair_order_form" model="ir.ui.view">
|
|
<field name="name">repair.order.form.view</field>
|
|
<field name="model">repair.order</field>
|
|
<field name="inherit_id" ref="repair.view_repair_order_form" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//button[@name='action_created_invoice']" position="before">
|
|
<button
|
|
name="action_show_sales_order"
|
|
type="object"
|
|
class="oe_stat_button"
|
|
icon="fa-pencil-square-o"
|
|
attrs="{'invisible': [('sale_order_count', '=', 0.0)]}"
|
|
groups="sales_team.group_sale_salesman"
|
|
>
|
|
<field
|
|
name="sale_order_count"
|
|
widget="statinfo"
|
|
string="Sale Order(s)"
|
|
/>
|
|
</button>
|
|
</xpath>
|
|
<xpath expr="//field[@name='invoice_state']" position="after">
|
|
<field name="create_sale_order" invisible="1" />
|
|
</xpath>
|
|
<xpath expr="//button[@name='action_repair_start']" position="attributes">
|
|
<attribute
|
|
name="attrs"
|
|
>{'invisible': ['|', ('create_sale_order', '=', True), '&', ('state','!=','confirmed'), '!', '&', ('state','=','ready'), ('invoice_method','=','b4repair')]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//button[@name='action_repair_start']" position="after">
|
|
<button
|
|
name="action_create_sale_order"
|
|
type="object"
|
|
string="Create Sales Order"
|
|
attrs="{'invisible': ['|', '|', ('create_sale_order', '=', False), ('sale_order_count', '>', 0), ('state','!=','confirmed')]}"
|
|
class="oe_highlight"
|
|
/>
|
|
</xpath>
|
|
<xpath expr="//field[@name='invoice_method']" position="attributes">
|
|
<attribute
|
|
name="attrs"
|
|
>{'invisible': [('create_sale_order', '=', True)]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='location_id']" position="attributes">
|
|
<attribute
|
|
name="attrs"
|
|
>{'invisible': [('create_sale_order', '=', True)]}</attribute>
|
|
</xpath>
|
|
<xpath
|
|
expr="//field[@name='operations']//tree//field[@name='type']"
|
|
position="attributes"
|
|
>
|
|
<attribute
|
|
name="attrs"
|
|
>{'column_invisible': [('parent.create_sale_order', '=', True)]}</attribute>
|
|
</xpath>
|
|
<xpath
|
|
expr="//field[@name='operations']//tree//field[@name='lot_id']"
|
|
position="attributes"
|
|
>
|
|
<attribute
|
|
name="attrs"
|
|
>{'column_invisible': [('parent.create_sale_order', '=', True)]}</attribute>
|
|
</xpath>
|
|
<xpath expr="//field[@name='partner_id']" position="attributes">
|
|
<attribute
|
|
name="attrs"
|
|
>{'required': ['|', ('create_sale_order', '=', True), ('invoice_method','!=','none')]}</attribute>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|