30 lines
2.0 KiB
XML
30 lines
2.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="product_template_form_view_invoice_policy_inherit_sale_project" model="ir.ui.view">
|
|
<field name="name">product.template.inherit.sale.projectform</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id" ref="sale.product_template_form_view"/>
|
|
<field name="arch" type="xml">
|
|
<field name="invoice_policy" position="attributes">
|
|
<attribute name="invisible">type == 'service' and sale_ok == True</attribute>
|
|
</field>
|
|
<field name="invoice_policy" position="after">
|
|
<field name="service_policy" string="Invoicing Policy" invisible="type != 'service' or sale_ok == False" required="type == 'service' and sale_ok == True"/>
|
|
<field name="service_tracking" required="1" invisible="type != 'service' or not sale_ok"/>
|
|
<div class="o_td_label d-inline-flex" invisible="service_tracking != 'task_global_project'">
|
|
<label for='project_id'/>
|
|
<span class='fa fa-lg fa-building-o fa-fw' title="Values set here are company-specific." groups="base.group_multi_company"/>
|
|
</div>
|
|
<field name="project_id" context="{'default_allow_billable': True}" invisible="service_tracking != 'task_global_project'" required="service_tracking == 'task_global_project'" nolabel="1"/>
|
|
<div class="o_td_label d-inline-flex" invisible="service_tracking not in ['task_in_project', 'project_only']">
|
|
<label for='project_template_id'/>
|
|
<span class='fa fa-lg fa-building-o fa-fw' title="Values set here are company-specific." groups="base.group_multi_company"/>
|
|
</div>
|
|
<field name="project_template_id" context="{'active_test': False, 'default_allow_billable': True}" invisible="service_tracking not in ['task_in_project', 'project_only']" nolabel="1"/>
|
|
</field>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|