You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

96 lines
5.1 KiB

<?xml version="1.0"?>
<odoo>
<!-- view for sale order Form Inherit-->
<record id="sale_order_form_inherit" model="ir.ui.view">
<field name="name">sale.order.form.view.inherit</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='partner_id']" position='after'>
<field name="tender_id"
attrs="{'readonly': [('state','!=','draft')]}"
domain="[('state', 'in', ('in_progress', 'open', 'ongoing')), ('customer_id', 'in', (partner_id,
False)), ('company_id', '=', company_id)]"
options="{'no_create': True}"/>
</xpath>
<xpath expr="//page[@name='customer_signature']"
position="after">
<page string="Alternatives" name="alternative_so">
<group>
<group>
<p colspan="2">Create alternatives.
</p>
</group>
<group>
<p colspan="2">
<button name="action_create_alternative"
type="object"
class="btn-link d-block"
string="Create Alternative"
icon="fa-copy"/>
<button name="action_compare_alternative_lines"
type="object"
class="btn-link d-block"
string="Compare Product Lines"
icon="fa-bar-chart"
attrs="{'invisible': [('alternative_so_ids', '=', [])]}"/>
</p>
</group>
</group>
<field name="alternative_so_ids"
attrs="{'readonly': [('id', '=', False)]}"
widget="many2many_alt_sos"
context="{}"
domain="[('state', 'in', ('draft', 'sent'))]">
<tree string="Alternative Quotation Order"
decoration-muted="state in ['cancel', 'sale', 'done']"
decoration-bf="id == parent.id">
<control>
<create string="Link to Existing Quotations"/>
</control>
<field name="partner_id"/>
<field name="name" string="Reference"/>
<field name="amount_total"/>
<field name="state"/>
</tree>
</field>
</page>
</xpath>
</data>
</field>
</record>
<!-- view for sale order line compare-->
<record id="sale_order_line_compare_tree" model="ir.ui.view">
<field name="name">sale.order.line.compare.tree</field>
<field name="model">sale.order.line</field>
<field name="priority">1000</field>
<field name="arch" type="xml">
<tree string="Sale Order Lines"
decoration-muted="state in ['cancel', 'purchase', 'done']"
create="0" delete="0" edit="0" expand="1" js_class="sale_order_line_compare">
<header>
<button name="action_clear_quantities"
string="Clear Selected" type="object"
class="o_clear_qty_buttons"/>
</header>
<field name="product_id" readonly="1"/>
<field name="order_id" string="Reference" readonly="1"/>
<field name="state"/>
<field name="name" readonly="1"/>
<field name="product_uom_qty"/>
<field name="product_uom" groups="uom.group_uom"/>
<field name="price_unit"/>
<field name="price_subtotal" string="Total"/>
<field name="currency_id"/>
<button name="action_choose" string="Choose" type="object"
class="o_clear_qty_buttons" icon="fa-bullseye"
attrs="{'invisible': [('product_uom_qty', '&lt;=', 0.0)]}"/>
<button name="action_clear_quantities" string="Clear"
type="object" class="o_clear_qty_buttons"
icon="fa-times"
attrs="{'invisible': ['|', ('product_uom_qty', '&lt;=', 0.0), ('state', 'in', ['cancel', 'sale', 'done'])]}"/>
</tree>
</field>
</record>
</odoo>