|
@@ -0,0 +1,66 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<openerp>
|
|
|
+ <data>
|
|
|
+
|
|
|
+ <record id="act_res_partner_2_contract" model="ir.actions.act_window">
|
|
|
+ <field name="name">Contratos</field>
|
|
|
+ <field name="res_model">account.analytic.account</field>
|
|
|
+ <field name="view_type">form</field>
|
|
|
+ <field name="view_mode">tree,form</field>
|
|
|
+ <field name="context">{'search_default_partner_id': active_id}</field>
|
|
|
+ <field name="groups_id"/>
|
|
|
+ <field name="help" type="html">
|
|
|
+ <p class="oe_view_nocontent_create">
|
|
|
+ Click to create a quotation or sales order for this customer.
|
|
|
+ </p><p>
|
|
|
+ Odoo will help you efficiently handle the complete sale flow:
|
|
|
+ quotation, sales order, delivery, invoicing and
|
|
|
+ payment.
|
|
|
+ </p><p>
|
|
|
+ The social feature helps you organize discussions on each sales
|
|
|
+ order, and allow your customer to keep track of the evolution
|
|
|
+ of the sales order.
|
|
|
+ </p>
|
|
|
+ </field>
|
|
|
+ </record>
|
|
|
+
|
|
|
+ <!-- Partner kanban view inherte -->
|
|
|
+ <record model="ir.ui.view" id="contract_partner_kanban_view">
|
|
|
+ <field name="name">contract.kanban.saleorder.inherit</field>
|
|
|
+ <field name="model">res.partner</field>
|
|
|
+ <field name="inherit_id" ref="base.res_partner_kanban_view"/>
|
|
|
+ <field name="priority" eval="20"/>
|
|
|
+ <field name="arch" type="xml">
|
|
|
+ <field name="mobile" position="after">
|
|
|
+ <field name="contract_count"/>
|
|
|
+ </field>
|
|
|
+ <xpath expr="//div[@class='oe_kanban_partner_links']" position="inside">
|
|
|
+ <a name="%(smarticon_contract.act_res_partner_2_contract)d" type="action" t-if="record.contract_count.value>0">
|
|
|
+ <t t-esc="record.contract_count.value"/> Contratos
|
|
|
+ </a>
|
|
|
+ </xpath>
|
|
|
+ </field>
|
|
|
+ </record>
|
|
|
+
|
|
|
+ <!-- Partners inherited form -->
|
|
|
+ <record id="view_contract_partner_info_form" model="ir.ui.view">
|
|
|
+ <field name="name">res.partner.contract.buttons</field>
|
|
|
+ <field name="model">res.partner</field>
|
|
|
+ <field name="inherit_id" ref="base.view_partner_form"/>
|
|
|
+ <field name="priority" eval="50"/>
|
|
|
+ <field name="groups_id"/>
|
|
|
+ <field name="arch" type="xml">
|
|
|
+ <xpath expr="//div[@name='buttons']" position="inside">
|
|
|
+ <button class="oe_inline oe_stat_button" type="action" name="%(smarticon_contract.act_res_partner_2_contract)d"
|
|
|
+ attrs="{'invisible': [('customer', '=', False)]}"
|
|
|
+ icon="fa-paste"
|
|
|
+ context="{'search_default_partner_id': active_id}">
|
|
|
+ <field string="Contratos" name="contract_count" widget="statinfo"/>
|
|
|
+ </button>
|
|
|
+ </xpath>
|
|
|
+ </field>
|
|
|
+ </record>
|
|
|
+
|
|
|
+
|
|
|
+ </data>
|
|
|
+</openerp>
|