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.
 
 
 

122 lines
6.9 KiB

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="act_recurring_invoices" model="ir.actions.act_window">
<field name="context">{'search_default_contract_id':
[active_id],
'default_contract_id': active_id}
</field>
<field name="name">Invoices</field>
<field name="res_model">account.invoice</field>
<field name="view_id" ref="account.invoice_tree" />
<field name="search_view_id" ref="account.view_account_invoice_filter"/>
</record>
<record id="account_analytic_account_recurring_form_form" model="ir.ui.view">
<field name="name">account.analytic.account.invoice.recurring.form.inherit</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
<field eval="40" name="priority"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='button_box']/.." position="before">
<header>
<button name="action_contract_send" type="object" string="Send by Email" groups="base.group_user"/>
</header>
</xpath>
<notebook position="before">
<separator string="Recurring Invoices" attrs="{'invisible': [('recurring_invoices','!=',True)]}"/>
<div>
<field name="recurring_invoices" class="oe_inline"/>
<label for="recurring_invoices" />
<button name="recurring_create_invoice" type="object"
attrs="{'invisible': [('recurring_invoices','!=',True)]}"
string="Create invoices" class="oe_link"
groups="base.group_no_one"/>
<button name="%(contract.act_recurring_invoices)d" type="action"
attrs="{'invisible': [('recurring_invoices','!=',True)]}"
string="⇒ Show recurring invoices" class="oe_link"/>
</div>
<group col="4" attrs="{'invisible': [('recurring_invoices','!=',True)]}">
<field name="journal_id"/>
<field name="pricelist_id"/>
<label for="recurring_interval"/>
<div>
<field name="recurring_interval" class="oe_inline" attrs="{'required': [('recurring_invoices', '=', True)]}"/>
<field name="recurring_rule_type" class="oe_inline" attrs="{'required': [('recurring_invoices', '=', True)]}"/>
</div>
<field name="recurring_invoicing_type"/>
<field name="date_start"/>
<field name="recurring_next_date"/>
</group>
<label for="recurring_invoice_line_ids" attrs="{'invisible': [('recurring_invoices','=',False)]}"/>
<div attrs="{'invisible': [('recurring_invoices','=',False)]}">
<field name="recurring_invoice_line_ids">
<tree string="Account Analytic Lines" editable="bottom">
<field name="product_id"/>
<field name="name"/>
<field name="quantity"/>
<field name="uom_id"/>
<field name="price_unit"/>
<field name="discount" groups="sale.group_discount_per_so_line" />
<field name="price_subtotal"/>
</tree>
</field>
</div>
<group string="Legend (for the markers inside invoice lines description)"
name="group_legend" attrs="{'invisible': [('recurring_invoices','!=',True)]}">
<p colspan="2"> <strong>#START#</strong>: Start date of the invoiced period</p>
<p colspan="2"> <strong>#END#</strong>: End date of the invoiced period</p>
</group>
</notebook>
</field>
</record>
<!-- Inherited Analytic Account list for contracts -->
<record id="view_account_analytic_account_journal_tree" model="ir.ui.view">
<field name="name">account.analytic.account.journal.list</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="analytic.view_account_analytic_account_list" />
<field name="arch" type="xml">
<field name="partner_id" position="before">
<field name="journal_id" groups="account.group_account_user"/>
</field>
</field>
</record>
<!-- Analytic Account search view for contract -->
<record id="view_account_analytic_account_contract_search" model="ir.ui.view">
<field name="name">account.analytic.account.contract.search</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="analytic.view_account_analytic_account_search"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="journal_id"/>
<field name="pricelist_id"/>
<filter name="recurring_invoices" string="Recurring Invoices" domain="[('recurring_invoices','=',True)]"/>
<group expand="0" string="Group By...">
<filter string="Next Invoice" domain="[]" context="{'group_by':'recurring_next_date'}"/>
</group>
</field>
</field>
</record>
<!-- Action Sales/Sales/Contracts -->
<record id="action_account_analytic_overdue_all" model="ir.actions.act_window">
<field name="name">Contracts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain"/> <!-- This is for resetting the field when migrating from v8 -->
<field name="context">{'search_default_active':1, 'search_default_recurring_invoices':1}</field>
<field name="search_view_id" ref="analytic.view_account_analytic_account_search"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a new contract.
</p>
</field>
</record>
<menuitem action="action_account_analytic_overdue_all" id="menu_action_account_analytic_overdue_all" sequence="8" parent="base.menu_sales"/>
</data>
</openerp>