Browse Source
[MIG] res_partner_affiliate: To v10
[MIG] res_partner_affiliate: To v10
* Bump versions * Openerp to Odoo * Fix tab level in viewpull/438/head
Dave Lasley
8 years ago
No known key found for this signature in database
GPG Key ID: 7DDBA4BA81B934CF
4 changed files with 75 additions and 74 deletions
-
3res_partner_affiliate/README.rst
-
4res_partner_affiliate/__manifest__.py
-
2res_partner_affiliate/models/res_partner.py
-
140res_partner_affiliate/views/res_partner_view.xml
@ -1,79 +1,79 @@ |
|||||
<?xml version="1.0" encoding="utf-8"?> |
<?xml version="1.0" encoding="utf-8"?> |
||||
<odoo> |
<odoo> |
||||
|
|
||||
<!-- 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[@class='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}" 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="fax"/> |
|
||||
<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> |
|
||||
|
<!-- 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[@class='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}" 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="fax"/> |
||||
|
<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"/> |
|
||||
|
</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> |
</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 t-if="record.fax.raw_value">Fax: <field name="fax"/></div> |
|
||||
|
<field t-if="record.state_id.raw_value" name="state_id"/> |
||||
|
<field name="country_id"/> |
||||
</div> |
</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 t-if="record.fax.raw_value">Fax: <field name="fax"/></div> |
||||
</div> |
</div> |
||||
</t> |
|
||||
</templates> |
|
||||
</kanban> |
|
||||
</field> |
|
||||
</page> |
|
||||
</xpath> |
|
||||
</field> |
|
||||
</record> |
|
||||
|
</div> |
||||
|
</t> |
||||
|
</templates> |
||||
|
</kanban> |
||||
|
</field> |
||||
|
</page> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
</odoo> |
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue