|
@ -16,6 +16,9 @@ |
|
|
<button name="action_contract_send" type="object" string="Send by Email" groups="base.group_user"/> |
|
|
<button name="action_contract_send" type="object" string="Send by Email" groups="base.group_user"/> |
|
|
</header> |
|
|
</header> |
|
|
</xpath> |
|
|
</xpath> |
|
|
|
|
|
<xpath expr='//field[@name="code"]' position='before'> |
|
|
|
|
|
<field name="contract_type" invisible="1" required="1"/> |
|
|
|
|
|
</xpath> |
|
|
<group name="main" position="after"> |
|
|
<group name="main" position="after"> |
|
|
<separator string="Recurring Invoices" |
|
|
<separator string="Recurring Invoices" |
|
|
attrs="{'invisible': [('recurring_invoices','!=',True)]}" |
|
|
attrs="{'invisible': [('recurring_invoices','!=',True)]}" |
|
@ -39,7 +42,7 @@ |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
<group col="4" attrs="{'invisible': [('recurring_invoices','!=',True)]}"> |
|
|
<group col="4" attrs="{'invisible': [('recurring_invoices','!=',True)]}"> |
|
|
<field name="contract_template_id" colspan="4"/> |
|
|
|
|
|
|
|
|
<field name="contract_template_id" colspan="4" domain="['|', ('contract_type', '=', contract_type), ('contract_type', '=', False)]" context="{'default_contract_type': contract_type}"/> |
|
|
<field name="journal_id" |
|
|
<field name="journal_id" |
|
|
attrs="{'required': [('recurring_invoices', '=', True)]}" |
|
|
attrs="{'required': [('recurring_invoices', '=', True)]}" |
|
|
/> |
|
|
/> |
|
@ -98,47 +101,44 @@ |
|
|
<record id="account_analytic_account_sale_form" model="ir.ui.view"> |
|
|
<record id="account_analytic_account_sale_form" model="ir.ui.view"> |
|
|
<field name="name">account.analytic.account.sale.form</field> |
|
|
<field name="name">account.analytic.account.sale.form</field> |
|
|
<field name="model">account.analytic.account</field> |
|
|
<field name="model">account.analytic.account</field> |
|
|
<field name="inherit_id" ref="contract.account_analytic_account_recurring_form_form"/> |
|
|
|
|
|
|
|
|
<field name="inherit_id" ref="account_analytic_account_recurring_form_form"/> |
|
|
<field name="mode">primary</field> |
|
|
<field name="mode">primary</field> |
|
|
<field name="priority" eval="20"/> |
|
|
<field name="priority" eval="20"/> |
|
|
<field name="arch" type="xml"> |
|
|
<field name="arch" type="xml"> |
|
|
<field name="partner_id" position="attributes"> |
|
|
<field name="partner_id" position="attributes"> |
|
|
<attribute name="string">Customer</attribute> |
|
|
<attribute name="string">Customer</attribute> |
|
|
<attribute name="domain">[('customer', '=', True)]</attribute> |
|
|
<attribute name="domain">[('customer', '=', True)]</attribute> |
|
|
<attribute name="context">{ |
|
|
|
|
|
'default_customer': True, |
|
|
|
|
|
'default_supplier': False |
|
|
|
|
|
}</attribute> |
|
|
|
|
|
|
|
|
<attribute name="context">{'default_customer': True, 'default_supplier': False}</attribute> |
|
|
|
|
|
</field> |
|
|
|
|
|
<field name="journal_id" position="attributes"> |
|
|
|
|
|
<attribute name="domain">[('type', '=', 'sale')]</attribute> |
|
|
</field> |
|
|
</field> |
|
|
<field name="product_id" position="attributes"> |
|
|
<field name="product_id" position="attributes"> |
|
|
<attribute name="domain">[('sale_ok', '=', True)]</attribute> |
|
|
<attribute name="domain">[('sale_ok', '=', True)]</attribute> |
|
|
</field> |
|
|
</field> |
|
|
<xpath expr='//field[@name="code"]' position='before'> |
|
|
|
|
|
<field name="contract_type">sale</field> |
|
|
|
|
|
</xpath> |
|
|
|
|
|
</field> |
|
|
</field> |
|
|
</record> |
|
|
</record> |
|
|
|
|
|
|
|
|
<record id="account_analytic_account_purchase_form" model="ir.ui.view"> |
|
|
<record id="account_analytic_account_purchase_form" model="ir.ui.view"> |
|
|
<field name="name">account.analytic.account.purchase.form</field> |
|
|
<field name="name">account.analytic.account.purchase.form</field> |
|
|
<field name="model">account.analytic.account</field> |
|
|
<field name="model">account.analytic.account</field> |
|
|
<field name="inherit_id" ref="contract.account_analytic_account_recurring_form_form"/> |
|
|
|
|
|
|
|
|
<field name="inherit_id" ref="account_analytic_account_recurring_form_form"/> |
|
|
<field name="mode">primary</field> |
|
|
<field name="mode">primary</field> |
|
|
<field name="priority" eval="20"/> |
|
|
<field name="priority" eval="20"/> |
|
|
<field name="arch" type="xml"> |
|
|
<field name="arch" type="xml"> |
|
|
<field name="partner_id" position="attributes"> |
|
|
<field name="partner_id" position="attributes"> |
|
|
<attribute name="string">Supplier</attribute> |
|
|
<attribute name="string">Supplier</attribute> |
|
|
<attribute name="domain">[('supplier', '=', True)]</attribute> |
|
|
<attribute name="domain">[('supplier', '=', True)]</attribute> |
|
|
<attribute name="context">{ |
|
|
|
|
|
'default_customer': False, |
|
|
|
|
|
'default_supplier': True |
|
|
|
|
|
}</attribute> |
|
|
|
|
|
|
|
|
<attribute name="context">{'default_customer': False, 'default_supplier': True}</attribute> |
|
|
|
|
|
</field> |
|
|
|
|
|
<field name="journal_id" position="attributes"> |
|
|
|
|
|
<attribute name="domain">[('type', '=', 'purchase')]</attribute> |
|
|
</field> |
|
|
</field> |
|
|
<field name="product_id" position="attributes"> |
|
|
<field name="product_id" position="attributes"> |
|
|
<attribute name="domain">[('purchase_ok', '=', True)]</attribute> |
|
|
<attribute name="domain">[('purchase_ok', '=', True)]</attribute> |
|
|
</field> |
|
|
</field> |
|
|
<xpath expr='//field[@name="code"]' position='before'> |
|
|
|
|
|
<field name="contract_type">purchase</field> |
|
|
|
|
|
|
|
|
<xpath expr="//field[@name='recurring_invoice_line_ids']/tree/field[@name='automatic_price']" position="attributes"> |
|
|
|
|
|
<attribute name="invisible">True</attribute> |
|
|
</xpath> |
|
|
</xpath> |
|
|
</field> |
|
|
</field> |
|
|
</record> |
|
|
</record> |
|
@ -203,13 +203,13 @@ |
|
|
|
|
|
|
|
|
<!-- Action Sales/Sales/Contracts --> |
|
|
<!-- Action Sales/Sales/Contracts --> |
|
|
<record id="action_account_analytic_sale_overdue_all" model="ir.actions.act_window"> |
|
|
<record id="action_account_analytic_sale_overdue_all" model="ir.actions.act_window"> |
|
|
<field name="name">Contracts</field> |
|
|
|
|
|
|
|
|
<field name="name">Customer Contracts</field> |
|
|
<field name="res_model">account.analytic.account</field> |
|
|
<field name="res_model">account.analytic.account</field> |
|
|
<field name="view_type">form</field> |
|
|
<field name="view_type">form</field> |
|
|
<field name="view_mode">tree,form</field> |
|
|
<field name="view_mode">tree,form</field> |
|
|
<field name="domain">[('contract_type', '=', 'sale')]</field> |
|
|
<field name="domain">[('contract_type', '=', 'sale')]</field> |
|
|
<field name="context">{'is_contract':1, 'search_default_not_finished':1, 'search_default_recurring_invoices':1, 'default_recurring_invoices': 1, 'default_type': 'sale'}</field> |
|
|
|
|
|
<field name="search_view_id" ref="analytic.view_account_analytic_account_search"/> |
|
|
|
|
|
|
|
|
<field name="context">{'is_contract':1, 'search_default_not_finished':1, 'search_default_recurring_invoices':1, 'default_recurring_invoices': 1, 'default_contract_type': 'sale'}</field> |
|
|
|
|
|
<field name="search_view_id" ref="view_account_analytic_account_contract_search"/> |
|
|
<field name="help" type="html"> |
|
|
<field name="help" type="html"> |
|
|
<p class="oe_view_nocontent_create"> |
|
|
<p class="oe_view_nocontent_create"> |
|
|
Click to create a new contract. |
|
|
Click to create a new contract. |
|
@ -239,13 +239,13 @@ |
|
|
|
|
|
|
|
|
<!-- Action Purchases/Purchases/Contracts --> |
|
|
<!-- Action Purchases/Purchases/Contracts --> |
|
|
<record id="action_account_analytic_purchase_overdue_all" model="ir.actions.act_window"> |
|
|
<record id="action_account_analytic_purchase_overdue_all" model="ir.actions.act_window"> |
|
|
<field name="name">Contracts</field> |
|
|
|
|
|
|
|
|
<field name="name">Supplier Contracts</field> |
|
|
<field name="res_model">account.analytic.account</field> |
|
|
<field name="res_model">account.analytic.account</field> |
|
|
<field name="view_type">form</field> |
|
|
<field name="view_type">form</field> |
|
|
<field name="view_mode">tree,form</field> |
|
|
<field name="view_mode">tree,form</field> |
|
|
<field name="domain">[('contract_type', '=', 'purchase')]</field> |
|
|
<field name="domain">[('contract_type', '=', 'purchase')]</field> |
|
|
<field name="context">{'is_contract':1, 'search_default_not_finished':1, 'search_default_recurring_invoices':1, 'default_recurring_invoices': 1, 'default_type': 'purchase'}</field> |
|
|
|
|
|
<field name="search_view_id" ref="analytic.view_account_analytic_account_search"/> |
|
|
|
|
|
|
|
|
<field name="context">{'is_contract':1, 'search_default_not_finished':1, 'search_default_recurring_invoices':1, 'default_recurring_invoices': 1, 'default_contract_type': 'purchase'}</field> |
|
|
|
|
|
<field name="search_view_id" ref="view_account_analytic_account_contract_search"/> |
|
|
<field name="help" type="html"> |
|
|
<field name="help" type="html"> |
|
|
<p class="oe_view_nocontent_create"> |
|
|
<p class="oe_view_nocontent_create"> |
|
|
Click to create a new contract. |
|
|
Click to create a new contract. |
|
|