123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- <?xml version="1.0" encoding="utf-8"?>
- <openerp>
- <data>
- <record id="view_purchase_contract_form" model="ir.ui.view">
- <field name="name">purchase.contract.form</field>
- <field name="model">account.analytic.account</field>
- <field name="arch" type="xml">
- <form string="Analytic Account">
- <header>
- <button name="set_pending" string="To Renew" type="object" states="open"/>
- <button name="set_close" string="Close Contract" type="object" states="open,pending"/>
- <button name="set_open" string="Set In Progress" type="object" states="pending,close,cancelled,draft"/>
- <button name="set_cancel" string="Cancel Contract" type="object" states="open,pending"/>
- <field name="state" readonly="1" widget="statusbar" statusbar_visible="open,pending,close" statusbar_colors="{'pending':'red', 'template':'blue'}"/>
- </header>
- <sheet string="Analytic Account">
- <div class="oe_right oe_button_box" name="buttons">
- </div>
- <div class="oe_title">
- <label for="name" class="oe_edit_only"/>
- <h1>
- <field name="name" class="oe_inline"/>
- </h1>
- <div name="project"/>
- </div>
- <group name="main">
- <group>
- <field name="partner_id" on_change="on_change_partner_id(partner_id, name)" string="Supplier" domain="[('supplier','=',True)]" required="1"/>
- <field name="manager_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_manager']}"/>
- <field name="currency_id" attrs="{'invisible': ['|',('type', '<>', 'view'), ('company_id', '<>', False)]}"/>
- </group>
- <group>
- <field name="type" invisible="context.get('default_type', False)"/>
- <field name="template_id" on_change="on_change_template(template_id, date_start)" domain="[('type','=','template')]" attrs="{'invisible': [('type','in',['view', 'normal','template'])]}" context="{'default_type' : 'template'}" invisible="1"/>
- <field name="code"/>
- <field name="parent_id" on_change="on_change_parent(parent_id)" attrs="{'invisible': [('type','in',['contract'])]}" invisible="1"/>
- <field name="company_id" on_change="on_change_company(company_id)" widget="selection" groups="base.group_multi_company" attrs="{'required': [('type','<>','view')]}"/>
- </group>
- </group>
- <notebook>
- <page string="Contract Information" name="contract_page" attrs="{'invisible':[('type','not in',['contract', 'template', 'purchase_contract'])]}">
- <group string="Renewal" name="contract">
- <!-- <p colspan="2" class="oe_grey oe_edit_only">
- Once the end date of the contract is
- passed or the maximum number of service
- units (e.g. support contract) is
- reached, the account manager is notified
- by email to renew the contract with the
- customer.
- </p> -->
- <field name="date_start"/>
- <label for="date" string="End Date"/>
- <div name="duration">
- <field name="date" class="oe_inline"/>
- </div>
- </group>
- <separator string="Recurring Invoices" attrs="{'invisible': [('recurring_invoices','!=',True)]}"/>
- <div>
- <div attrs="{'invisible': [('type','!=', 'purchase_contract')]}">
- <field name="recurring_invoices" on_change="onchange_recurring_invoices(recurring_invoices, date_start)" class="oe_inline"/>
- <label for="recurring_invoices"/>
- </div>
- <button class="oe_link" name="recurring_create_invoice" attrs="{'invisible': [('recurring_invoices','!=',True)]}" string="⇒ create invoices" type="object"/>
- </div>
- <group attrs="{'invisible': [('recurring_invoices','!=',True)]}">
- <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_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" on_change="product_id_change(product_id, uom_id, quantity, False, parent.partner_id, False, parent.pricelist_id, parent.company_id, {'purchase': True})"/>
- <field name="name"/>
- <field name="quantity"/>
- <field name="uom_id"/>
- <field name="price_unit"/>
- <field name="price_subtotal"/>
- </tree>
- </field>
- </div>
- <separator string="Terms and Conditions" name="description"/>
- <field name="description"/>
- </page>
- </notebook>
- </sheet>
- <div class="oe_chatter">
- <field name="message_follower_ids" widget="mail_followers"/>
- <field name="message_ids" widget="mail_thread"/>
- </div>
- </form>
- </field>
- </record>
- <record id="view_purchase_contract_tree" model="ir.ui.view">
- <field name="name">purchase_contract.tree</field>
- <field name="model">account.analytic.account</field>
- <field name="inherit_id" ref="account.view_account_analytic_account_list"/>
- <field name="arch" type="xml">
- <field name="partner_id" position="attributes">
- <attribute name="invisible">'recurring_invoices' in context</attribute>
- </field>
- <field name="partner_id" position="after" >
- <field name="partner_id" string="Supplier" invisible="'recurring_invoices' not in context"/>
- </field>
- </field>
- </record>
- </data>
- </openerp>
|