123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- <?xml version="1.0"?>
- <openerp>
- <data>
- <record id="res_partner_extra_data_affiliate" model="ir.ui.view">
- <field name="name">res.partner.extra.data.affiliate</field>
- <field name="model">res.partner</field>
- <field name="inherit_id" ref="base.view_partner_form"/>
- <field name="arch" type="xml">
- <page string="Internal Notes" position="before">
- <page name="credito" string="Informacion de Credito" attrs="{'invisible':[('is_company','=',True)]}">
- <group name="Domicilio">
- <group name="Informa">
- <group name="datos_referencia" string="Tipo de Referencia">
- <field name="is_affiliate_reference" string="Es una referencia Beneficiario"/>
- <!-- <field name="is_commercial_reference" string="Es una referencia Comercial"/> -->
- </group>
- </group>
- </group>
- <group name="affiliates" string="Referencias Beneficiarios">
- <field name="ref_affiliate_ids" nolabel="1" mode="kanban" context="{'default_parent_id': active_id, 'default_customer': False,'default_supplier': False,'default_is_affiliate_reference': True}">
- <kanban>
- <field name="color"/>
- <field name="name"/>
- <field name="title"/>
- <field name="email"/>
- <field name="parent_id"/>
- <field name="is_company"/>
- <field name="is_affiliate_reference"/>
- <field name="phone"/>
- <field name="street"/>
- <field name="street2"/>
- <field name="zip"/>
- <field name="city"/>
- <field name="country_id"/>
- <field name="mobile"/>
- <field name="state_id"/>
- <field name="has_image"/>
- <templates>
- <t t-name="kanban-box">
- <t t-set="color" t-value="kanban_color(record.color.raw_value)"/>
- <div t-att-class="color + (record.title.raw_value == 1 ? ' oe_kanban_color_alert' : '')" style="position: relative">
- <a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
- <div class="oe_module_vignette">
- <a type="open">
- <t t-if="record.has_image.raw_value === true">
- <img t-att-src="kanban_image('res.partner', 'image', record.id.value, {'preview_image': 'image_small'})" class="oe_avatar oe_kanban_avatar_smallbox"/>
- </t>
- <t t-if="record.image and record.image.raw_value !== false">
- <img t-att-src="'data:image/png;base64,'+record.image.raw_value" class="oe_avatar oe_kanban_avatar_smallbox"/>
- </t>
- <t t-if="record.has_image.raw_value === false and (!record.image or record.image.raw_value === false)">
- <t t-if="record.is_company.raw_value === true">
- <img t-att-src='_s + "/base/static/src/img/company_image.png"' class="oe_kanban_image oe_kanban_avatar_smallbox"/>
- </t>
- <t t-if="record.is_company.raw_value === false">
- <img t-att-src='_s + "/base/static/src/img/avatar.png"' class="oe_kanban_image oe_kanban_avatar_smallbox"/>
- </t>
- </t>
- </a>
- <div class="oe_module_desc">
- <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_color_border">
- <table class="oe_kanban_table">
- <tr>
- <td class="oe_kanban_title1" align="left" valign="middle">
- <h4><a type="open"><field name="name"/></a></h4>
- <div>Referencia Beneficiario</div>
- <i><div t-if="record.function.raw_value">
- <field name="function"/></div></i>
- <div><a t-if="record.email.raw_value" title="Mail" t-att-href="'mailto:'+record.email.value">
- <field name="email"/>
- </a></div>
- <div t-if="record.phone.raw_value">Phone: <field name="phone"/></div>
- <div t-if="record.mobile.raw_value">Mobile: <field name="mobile"/></div>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- </t>
- </templates>
- </kanban>
- <form string="Contact">
- <sheet>
- <field name="image" widget='image' class="oe_avatar oe_left" options='{"preview_image": "image_medium"}'/>
- <div class="oe_title">
- <label for="name" class="oe_edit_only"/>
- <h1><field name="name" style="width: 100%%"/></h1>
- </div>
- <group>
- <field name="email"/>
- <field name="phone" required="True"/>
- <field name="mobile"/>
- </group>
- <group>
- <label for="street" string="Address"/>
- <div name="div_address">
- <field name="street" placeholder="Street..."/>
- <field name="street2"/>
- <div class="address_format">
- <field name="city" placeholder="City" style="width: 50%%"/>
- <field name="state_id" class="oe_no_button" placeholder="State" style="width: 50%%" options="{'no_open': True,'no_create':True}" on_change="onchange_state(state_id)"/>
- </div>
- <field name="country_id" placeholder="Country" class="oe_no_button" options="{'no_open': True,'no_create':True}"/>
- </div>
- </group>
- <field name="supplier" invisible="True"/>
- <field name="customer" invisible="True"/>
- <field name="is_affiliate_reference" invisible="True"/>
- </sheet>
- </form>
- </field>
- </group>
- <!-- <group name="personales" string="Referencias Comerciales">
- <field name="ref_comercial_ids" nolabel="1" mode="tree" context="{'default_is_company': True,'default_customer': False, 'default_is_commercial_reference':True}">
- <tree string="Referencias" editable="bottom">
- <field name="name"/>
- <field name="phone"/>
- <field name="mobile"/>
- </tree>
- </field>
- </group> -->
- </page>
- </page>
- <!-- <field name="phone" position="before">
- <field name="estado_civil" attrs="{'invisible':[('is_company','=',True)]}"/>
- </field>
- <field name="function" position="replace">
- <field name="function" invisible="1"/>
- </field>
- <field name="title" position="replace">
- <field name="title" invisible="1"/>
- </field>
- <field name="user_id" position="after">
- <field name="create_uid" readonly="1"/>
- </field> -->
- </field>
- </record>
- <record id="res_partner_extra_data_search_affiliate" model="ir.ui.view">
- <field name="name">res.partner.extra.data.affiliate.search</field>
- <field name="model">res.partner</field>
- <field name="inherit_id" ref="base.view_res_partner_filter"/>
- <field name="arch" type="xml">
- <!-- <field name="name" position="before">
- <field name="ruc" filter_domain="['|','|','|',('ruc','ilike',self),('name','ilike',self),('mobile','ilike',self),('phone','ilike',self)]" string="general"/>
- </field> -->
- <filter name="supplier" position="after">
- <filter string="Referencias Beneficiarios" name="type_personal_reference" domain="[('is_affiliate_reference','=',1)]"/>
- </filter>
- </field>
- </record>
- </data>
- </openerp>
|