mirror of
https://gitlab.com/flectra-community/partner-contact.git
synced 2024-11-15 02:32:04 +00:00
79 lines
4.9 KiB
XML
79 lines
4.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<flectra>
|
|
|
|
<!-- Show always parent_id plus add affiliates -->
|
|
<record id="view_partner_form_add_affiliate" model="ir.ui.view">
|
|
<field name="name">res.partner.form</field>
|
|
<field name="model">res.partner</field>
|
|
<field eval="1" name="priority"/>
|
|
<field name="inherit_id" ref="base.view_partner_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="/form/sheet//div[hasclass('o_row')]/field[@name='parent_id']" position="attributes">
|
|
<attribute name="attrs"></attribute>
|
|
</xpath>
|
|
<xpath expr='//page[@name="internal_notes"]' position="before">
|
|
<page string="Affiliates" attrs="{'invisible': [('is_company','=',False)]}">
|
|
<field name="affiliate_ids"
|
|
context="{'default_parent_id': active_id, 'default_is_company': True, 'default_type':'other'}" mode="kanban">
|
|
<kanban>
|
|
<field name="color"/>
|
|
<field name="name"/>
|
|
<field name="title"/>
|
|
<field name="type"/>
|
|
<field name="email"/>
|
|
<field name="parent_id"/>
|
|
<field name="is_company"/>
|
|
<field name="function"/>
|
|
<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="image"/>
|
|
<field name="lang"/>
|
|
<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' : '') + ' oe_kanban_global_click'">
|
|
<a t-if="!read_only_mode" type="delete" class="fa fa-times pull-right"/>
|
|
<div class="o_kanban_image">
|
|
<img t-if="record.image.raw_value" t-att-src="'data:image/png;base64,'+record.image.raw_value"/>
|
|
<t t-if="!record.image.raw_value">
|
|
<img t-if="record.type.raw_value === 'delivery'" t-att-src='_s + "/base/static/src/img/truck.png"'/>
|
|
<img t-if="record.type.raw_value === 'invoice'" t-att-src='_s + "/base/static/src/img/money.png"'/>
|
|
<t t-if="record.type.raw_value !== 'invoice' && record.type.raw_value !== 'delivery'">
|
|
<img t-if="record.is_company.raw_value === true" t-att-src='_s + "/base/static/src/img/company_image.png"'/>
|
|
<img t-if="record.is_company.raw_value === false" t-att-src='_s + "/base/static/src/img/avatar.png"'/>
|
|
</t>
|
|
</t>
|
|
</div>
|
|
<div class="oe_kanban_details">
|
|
<field name="name"/>
|
|
<div t-if="record.function.raw_value"><field name="function"/></div>
|
|
<div t-if="record.email.raw_value"><field name="email"/></div>
|
|
<div t-if="record.type.raw_value != 'contact'">
|
|
<div>
|
|
<field name="zip"/>
|
|
<field name="city"/>
|
|
</div>
|
|
<field t-if="record.state_id.raw_value" name="state_id"/>
|
|
<field name="country_id"/>
|
|
</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>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</page>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</flectra>
|