mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
Add check_company=True in field definition and
[('company_id', '=', company_id)] in the domain (in view or in field definition)
140 lines
6.4 KiB
XML
140 lines
6.4 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
<!--FORM view-->
|
|
<record id="contract_abstract_contract_line_form_view" model="ir.ui.view">
|
|
<field
|
|
name="name"
|
|
>contract.abstract.contract.line form view (in contract)</field>
|
|
<field name="model">contract.abstract.contract.line</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<field name="display_type" invisible="1" />
|
|
<header attrs="{'invisible': [('display_type', '!=', False)]}" />
|
|
<sheet>
|
|
<field name="specific_price" invisible="1" />
|
|
<field name="company_id" invisible="1" />
|
|
<group
|
|
col="4"
|
|
attrs="{'invisible': [('display_type', '!=', False)]}"
|
|
>
|
|
<field
|
|
colspan="4"
|
|
name="product_id"
|
|
attrs="{'required': [('display_type', '=', False)]}"
|
|
/>
|
|
<label for="quantity" />
|
|
<div class="o_row">
|
|
<field name="quantity" class="oe_inline" />
|
|
<field name="allowed_uom_categ_id" invisible="1" />
|
|
<field
|
|
name="uom_id"
|
|
class="oe_inline"
|
|
groups="uom.group_uom"
|
|
attrs="{'required': [('display_type', '=', False)]}"
|
|
/>
|
|
</div>
|
|
<field colspan="2" name="automatic_price" />
|
|
<field
|
|
colspan="2"
|
|
name="price_unit"
|
|
attrs="{'readonly': [('automatic_price', '=', True)]}"
|
|
/>
|
|
<field colspan="2" name="discount" groups="base.group_no_one" />
|
|
</group>
|
|
<label
|
|
for="name"
|
|
string="Description"
|
|
attrs="{'invisible': [('display_type', '!=', False)]}"
|
|
/>
|
|
<label
|
|
for="name"
|
|
string="Section"
|
|
attrs="{'invisible': [('display_type', '!=', 'line_section')]}"
|
|
/>
|
|
<label
|
|
for="name"
|
|
string="Note"
|
|
attrs="{'invisible': [('display_type', '!=', 'line_note')]}"
|
|
/>
|
|
<field name="name" nolabel="1" />
|
|
<group
|
|
name="note_invoicing_mode"
|
|
attrs="{'invisible': [('display_type', '!=', 'line_note')]}"
|
|
>
|
|
<field name="note_invoicing_mode" widget="radio" />
|
|
</group>
|
|
<group
|
|
col="4"
|
|
attrs="{'invisible': [('display_type', '!=', False)]}"
|
|
>
|
|
<field colspan="2" name="is_auto_renew" />
|
|
<field colspan="2" name="is_canceled" invisible="1" />
|
|
</group>
|
|
<group
|
|
attrs="{'invisible':['|', ('is_auto_renew', '=', False), ('display_type', '!=', False)]}"
|
|
>
|
|
<group>
|
|
<label for="auto_renew_interval" />
|
|
<div>
|
|
<field
|
|
name="auto_renew_interval"
|
|
class="oe_inline"
|
|
nolabel="1"
|
|
attrs="{'required':[('is_auto_renew', '=', True)]}"
|
|
/>
|
|
<field
|
|
name="auto_renew_rule_type"
|
|
class="oe_inline"
|
|
nolabel="1"
|
|
attrs="{'required':[('is_auto_renew', '=', True)]}"
|
|
/>
|
|
</div>
|
|
</group>
|
|
<group>
|
|
<label for="termination_notice_interval" />
|
|
<div>
|
|
<field
|
|
name="termination_notice_interval"
|
|
class="oe_inline"
|
|
nolabel="1"
|
|
attrs="{'required':[('is_auto_renew', '=', True)]}"
|
|
/>
|
|
<field
|
|
name="termination_notice_rule_type"
|
|
class="oe_inline"
|
|
nolabel="1"
|
|
attrs="{'required':[('is_auto_renew', '=', True)]}"
|
|
/>
|
|
</div>
|
|
</group>
|
|
</group>
|
|
<group
|
|
name="recurrence_info"
|
|
attrs="{'invisible': ['|', ('display_type', '=', 'line_section'), '&', ('display_type', '=', 'line_note'), ('note_invoicing_mode', '!=', 'custom')]}"
|
|
>
|
|
<group>
|
|
<label for="recurring_interval" />
|
|
<div class="o_row">
|
|
<field
|
|
name="recurring_interval"
|
|
class="oe_inline"
|
|
nolabel="1"
|
|
/>
|
|
<field
|
|
name="recurring_rule_type"
|
|
class="oe_inline"
|
|
nolabel="1"
|
|
/>
|
|
</div>
|
|
</group>
|
|
<group>
|
|
<field name="recurring_invoicing_type" />
|
|
<field name="recurring_invoicing_offset" />
|
|
</group>
|
|
</group>
|
|
</sheet>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
</odoo>
|