|
@@ -0,0 +1,55 @@
|
|
|
|
+<?xml version="1.0"?>
|
|
|
|
+<openerp>
|
|
|
|
+ <data>
|
|
|
|
+ <act_window
|
|
|
|
+ id="action_open_cars"
|
|
|
|
+ name="Vehiculos"
|
|
|
|
+ res_model="product.service"
|
|
|
|
+ view_type="form"
|
|
|
|
+ view_mode="tree,form"
|
|
|
|
+ domain="[('partner_id', '=', active_id)]"/>
|
|
|
|
+
|
|
|
|
+ <act_window
|
|
|
|
+ id="action_open_secure_cars"
|
|
|
|
+ name="Vehiculos Asegurados"
|
|
|
|
+ res_model="product.service"
|
|
|
|
+ view_type="form"
|
|
|
|
+ view_mode="tree,form"
|
|
|
|
+ domain="[('secure_id', '=', active_id)]"/>
|
|
|
|
+
|
|
|
|
+ <record id="res_partner_secure_form_view" model="ir.ui.view">
|
|
|
|
+ <field name="name">partner.secure.form.view</field>
|
|
|
|
+ <field name="model">res.partner</field>
|
|
|
|
+ <field name="inherit_id" ref="base.view_partner_form"/>
|
|
|
|
+ <field name="arch" type="xml">
|
|
|
|
+ <field name="category_id" position="after">
|
|
|
|
+ <field name="is_insurer" class="oe_inline" attrs="{'invisible': [('is_company','=', False)]}"/><label for="is_insurer" string="¿Es un Aseguradora?" attrs="{'invisible': [('is_company','=', False)]}"/>
|
|
|
|
+ <field name="is_agent" class="oe_inline" attrs="{'invisible': [('is_company','!=', False)]}"/><label for="is_agent" string="¿Es un Agente?" attrs="{'invisible': [('is_company','!=', False)]}"/>
|
|
|
|
+ </field>
|
|
|
|
+ <field name="parent_id" position="replace">
|
|
|
|
+ <field name="parent_id" placeholder="Company" domain="[('is_company', '=', True),('is_insurer', '=', True)]" context="{'default_is_company': True, 'default_supplier': supplier, 'default_customer': customer}" attrs="{'invisible': [('is_company','=', True),('parent_id', '=', False)],'required': [('is_agent','=', True)]}" on_change="onchange_address(use_parent_address, parent_id)"/>
|
|
|
|
+ </field>
|
|
|
|
+ <div name="buttons" position="after">
|
|
|
|
+ <div class="oe_right oe_button_box">
|
|
|
|
+ <button
|
|
|
|
+ class="oe_inline oe_stat_button"
|
|
|
|
+ type="action"
|
|
|
|
+ name="%(action_open_cars)d"
|
|
|
|
+ icon="fa fa-car"
|
|
|
|
+ attrs="{'invisible': [('customer', '=', False)]}">
|
|
|
|
+ <field name="car_count" string="Vehiculos" widget="statinfo" />
|
|
|
|
+ </button>
|
|
|
|
+ <button
|
|
|
|
+ class="oe_inline oe_stat_button"
|
|
|
|
+ type="action"
|
|
|
|
+ name="%(action_open_secure_cars)d"
|
|
|
|
+ icon="fa fa-folder-open"
|
|
|
|
+ attrs="{'invisible': [('is_insurer', '=', False)]}">
|
|
|
|
+ <field name="car_secure_count" string="Asegurados" widget="statinfo" />
|
|
|
|
+ </button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </field>
|
|
|
|
+ </record>
|
|
|
|
+ </data>
|
|
|
|
+</openerp>
|