[FIX] various: update res.partner template

Update to new design (kanban and form view)
This commit is contained in:
Géry Debongnie
2015-06-15 16:30:35 +02:00
parent b1557efa9e
commit 05adb7f235
9 changed files with 113 additions and 127 deletions
+22 -19
View File
@@ -77,7 +77,7 @@
<field name="priority" eval="20"/> <field name="priority" eval="20"/>
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/> <field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//div[@name='buttons']" position="inside"> <div name="button_box" position="inside">
<button type="action" <button type="action"
class="oe_stat_button" class="oe_stat_button"
id="invoice_button" id="invoice_button"
@@ -85,10 +85,13 @@
name="%(account.action_invoice_refund_out_tree)d" name="%(account.action_invoice_refund_out_tree)d"
attrs="{'invisible': [('customer', '=', False)]}" attrs="{'invisible': [('customer', '=', False)]}"
context="{'search_default_partner_id': active_id,'default_partner_id': active_id}"> context="{'search_default_partner_id': active_id,'default_partner_id': active_id}">
<div><strong><field name="total_invoiced"/></strong><br/>Invoiced</div> <div class="o_form_field o_stat_info">
<span class="o_stat_value"><field name="total_invoiced"/></span>
<span class="o_stat_text">Invoiced</span>
</div>
</button> </button>
<field name="currency_id" invisible="1"/> <field name="currency_id" invisible="1"/>
</xpath> </div>
</field> </field>
</record> </record>
@@ -99,12 +102,12 @@
<field name="priority" eval="22"/> <field name="priority" eval="22"/>
<field name="groups_id" eval="[(4, ref('analytic.group_analytic_accounting'))]"/> <field name="groups_id" eval="[(4, ref('analytic.group_analytic_accounting'))]"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//div[@name='buttons']" position="inside"> <div name="button_box" position="inside">
<button class="oe_inline oe_stat_button" type="action" name="%(account.action_open_partner_analytic_accounts)d" <button class="oe_stat_button" type="action" name="%(account.action_open_partner_analytic_accounts)d"
icon="fa-book"> icon="fa-book">
<field string="Contracts" name="contracts_count" widget="statinfo"/> <field string="Contracts" name="contracts_count" widget="statinfo"/>
</button> </button>
</xpath> </div>
</field> </field>
</record> </record>
@@ -132,10 +135,10 @@
<field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/> <field name="groups_id" eval="[(4, ref('account.group_account_invoice'))]"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<page name="sales_purchases" position="after"> <page name="sales_purchases" position="after">
<page string="Accounting" col="4" name="accounting" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}"> <page string="Accounting" name="accounting" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}">
<group> <group>
<group string="Sale" name="acc_sale"> <group string="Sale" name="acc_sale">
<button name="%(action_account_partner_followup_note)d" type="action" string="Log a followup note"/><br /> <button name="%(action_account_partner_followup_note)d" class="oe_link" type="action" string="Log a followup note" colspan="2"/>
<field name="property_payment_term" widget="selection"/> <field name="property_payment_term" widget="selection"/>
<field name="credit"/> <field name="credit"/>
<field name="credit_limit"/> <field name="credit_limit"/>
@@ -154,16 +157,16 @@
</group> </group>
</group> </group>
<group string="Bank Accounts" name="bank_accounts"> <group string="Bank Accounts" name="bank_accounts">
<field name="bank_ids" context="{'default_partner_id': active_id, 'form_view_ref': 'base.view_partner_bank_form'}" nolabel="1"> <field name="bank_ids" context="{'default_partner_id': active_id, 'form_view_ref': 'base.view_partner_bank_form'}" nolabel="1">
<tree string="Bank Details"> <tree string="Bank Details">
<field name="state" invisible="1"/> <field name="state" invisible="1"/>
<field name="sequence" invisible="1"/> <field name="sequence" invisible="1"/>
<field name="acc_number"/> <field name="acc_number"/>
<field name="bank_name"/> <field name="bank_name"/>
<field name="owner_name"/> <field name="owner_name"/>
</tree> </tree>
</field> </field>
</group> </group>
</page> </page>
<page string="Accounting" name="accounting_disabled" attrs="{'invisible': ['|',('is_company','=',True),('parent_id','=',False)]}"> <page string="Accounting" name="accounting_disabled" attrs="{'invisible': ['|',('is_company','=',True),('parent_id','=',False)]}">
<div> <div>
@@ -174,4 +177,4 @@
</field> </field>
</record> </record>
</data> </data>
</openerp> </openerp>
+1 -1
View File
@@ -8,7 +8,7 @@
<field name="model">res.partner</field> <field name="model">res.partner</field>
<field name="inherit_id" ref="base.res_partner_kanban_view"/> <field name="inherit_id" ref="base.res_partner_kanban_view"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//div[@class='oe_kanban_partner_categories']" position="inside"> <xpath expr="//div[contains(@class, 'oe_kanban_partner_categories')]" position="inside">
<span class="oe_kanban_list_many2many"> <span class="oe_kanban_list_many2many">
<field name="category_id"/> <field name="category_id"/>
</span> </span>
+7 -12
View File
@@ -68,12 +68,8 @@
<field name="meeting_count"/> <field name="meeting_count"/>
</field> </field>
<xpath expr="//div[@class='oe_kanban_partner_links']" position="inside"> <xpath expr="//div[@class='oe_kanban_partner_links']" position="inside">
<a name="%(relate_partner_opportunities)d" type="action" t-if="record.opportunity_count.value>0"> <span class="badge" t-if="record.opportunity_count.value>0"><i class="fa fa-fw fa-star"/><t t-esc="record.opportunity_count.value"/></span>
<t t-esc="record.opportunity_count.value"/> Opportunities <span class="badge" t-if="record.meeting_count.value>0"><i class="fa fa-fw fa-calendar"/><t t-esc="record.meeting_count.value"/></span>
</a>
<a name="%(calendar_event_partner)d" type="action" t-if="record.meeting_count.value>0">
<t t-esc="record.meeting_count.value"/> Meetings
</a>
</xpath> </xpath>
</field> </field>
</record> </record>
@@ -89,31 +85,30 @@
<field name="user_id" position="after"> <field name="user_id" position="after">
<field name="team_id" completion="1" groups="base.group_multi_salesteams"/> <field name="team_id" completion="1" groups="base.group_multi_salesteams"/>
</field> </field>
<xpath expr="//div[@name='buttons']" position="inside"> <div name="button_box" position="inside">
<button class="oe_inline oe_stat_button o_res_partner_tip_opp" type="action" <button class="oe_stat_button o_res_partner_tip_opp" type="action"
attrs="{'invisible': [('customer', '=', False)]}" attrs="{'invisible': [('customer', '=', False)]}"
name="%(crm.crm_lead_opportunities)d" name="%(crm.crm_lead_opportunities)d"
icon="fa-star" icon="fa-star"
context="{'search_default_partner_id': active_id}"> context="{'search_default_partner_id': active_id}">
<field string="Opportunities" name="opportunity_count" widget="statinfo"/> <field string="Opportunities" name="opportunity_count" widget="statinfo"/>
</button> </button>
<button class="oe_inline oe_stat_button" type="object" <button class="oe_stat_button" type="object"
name="schedule_meeting" name="schedule_meeting"
icon="fa-calendar" icon="fa-calendar"
context="{'partner_id': active_id}"> context="{'partner_id': active_id}">
<field string="Meetings" name="meeting_count" widget="statinfo"/> <field string="Meetings" name="meeting_count" widget="statinfo"/>
</button> </button>
<button class="oe_inline oe_stat_button" type="action" <button class="oe_stat_button" type="action"
name="%(crm.crm_phonecall_category_phone_incoming0)d" name="%(crm.crm_phonecall_category_phone_incoming0)d"
icon="fa-phone" icon="fa-phone"
context="{'search_default_partner_id': active_id, 'default_duration': 1.0}"> context="{'search_default_partner_id': active_id, 'default_duration': 1.0}">
<field string="Calls" name="phonecall_count" widget="statinfo"/> <field string="Calls" name="phonecall_count" widget="statinfo"/>
</button> </button>
</xpath> </div>
</data> </data>
</field> </field>
</record> </record>
</data> </data>
</openerp> </openerp>
+4 -4
View File
@@ -8,14 +8,14 @@
<field name="inherit_id" ref="base.view_partner_form"/> <field name="inherit_id" ref="base.view_partner_form"/>
<field name="priority" eval="50"/> <field name="priority" eval="50"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//div[@name='buttons']" position="inside"> <div name="button_box" position="inside">
<button class="oe_inline oe_stat_button" type="action" <button class="oe_stat_button" type="action"
context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}" context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}"
name="%(crm_claim_category_claim0)d" icon="fa-comments" groups="base.group_sale_salesman"> name="%(crm_claim_category_claim0)d" icon="fa-comments" groups="base.group_sale_salesman">
<field string="Claims" name="claim_count" widget="statinfo"/> <field string="Claims" name="claim_count" widget="statinfo"/>
</button> </button>
</xpath> </div>
</field> </field>
</record> </record>
</data> </data>
</openerp> </openerp>
+5 -7
View File
@@ -10,17 +10,15 @@
<field name="priority" eval="50"/> <field name="priority" eval="50"/>
<field name="groups_id" eval="[(4, ref('project.group_project_user'))]"/> <field name="groups_id" eval="[(4, ref('project.group_project_user'))]"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//div[@name='buttons']" position="inside"> <div name="button_box" position="inside">
<button class="oe_inline oe_stat_button" type="action" name="%(action_view_task)d" <button class="oe_stat_button" type="action" name="%(action_view_task)d"
context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}" context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}"
icon="fa-tasks"> icon="fa-tasks">
<field string="Tasks" name="task_count" widget="statinfo"/> <field string="Tasks" name="task_count" widget="statinfo"/>
</button> </button>
</div>
</xpath>
</field> </field>
</record> </record>
</data> </data>
</openerp> </openerp>
+8 -10
View File
@@ -36,7 +36,7 @@
<div name="project"> <div name="project">
<field name="project_id" on_change="on_change_project(project_id)" class="oe_inline" context="{'default_use_issues':1}"/> <field name="project_id" on_change="on_change_project(project_id)" class="oe_inline" context="{'default_use_issues':1}"/>
<field name="can_escalate" invisible="1"/> <field name="can_escalate" invisible="1"/>
<button name="case_escalate" string="Escalate" type="object" class="oe_link" attrs="{'invisible':[('can_escalate','=',False)]}" groups="base.group_user"/> <button name="case_escalate" string="Escalate" type="object" class="btn-default" attrs="{'invisible':[('can_escalate','=',False)]}" groups="base.group_user"/>
</div> </div>
</group> </group>
<group> <group>
@@ -278,12 +278,12 @@
<field name="label_issues" class="oe_inline oe_input_align" attrs="{'invisible': [('use_issues', '=', False)]}"/> <field name="label_issues" class="oe_inline oe_input_align" attrs="{'invisible': [('use_issues', '=', False)]}"/>
</div> </div>
</xpath> </xpath>
<xpath expr='//div[@name="buttons"]' position='inside'> <div name="button_box" position="inside">
<button class="oe_inline oe_stat_button" type="action" attrs="{'invisible':[('use_issues','=', False)]}" <button class="oe_stat_button" type="action" attrs="{'invisible':[('use_issues','=', False)]}"
name="%(act_project_project_2_project_issue_all)d" icon="fa-bug"> name="%(act_project_project_2_project_issue_all)d" icon="fa-bug">
<field string="Issues" name="issue_count" widget="statinfo" options="{'label_field': 'label_issues'}"/> <field string="Issues" name="issue_count" widget="statinfo" options="{'label_field': 'label_issues'}"/>
</button> </button>
</xpath> </div>
<xpath expr='//page[@name="project_stages"]' position="attributes"> <xpath expr='//page[@name="project_stages"]' position="attributes">
<attribute name="attrs">{'invisible': [('use_tasks', '=', False),('use_issues','=',False)]}</attribute> <attribute name="attrs">{'invisible': [('use_tasks', '=', False),('use_issues','=',False)]}</attribute>
</xpath> </xpath>
@@ -331,18 +331,16 @@
<field name="priority" eval="50"/> <field name="priority" eval="50"/>
<field name="groups_id" eval="[(4, ref('project.group_project_user'))]"/> <field name="groups_id" eval="[(4, ref('project.group_project_user'))]"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//div[@name='buttons']" position="inside"> <div name="button_box" position="inside">
<button class="oe_inline oe_stat_button" type="action" name="%(action_view_issues)d" <button class="oe_stat_button" type="action" name="%(action_view_issues)d"
context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}" context="{'search_default_partner_id': active_id, 'default_partner_id': active_id}"
attrs="{'invisible': [('customer', '=', False)]}" attrs="{'invisible': [('customer', '=', False)]}"
icon="fa-bug"> icon="fa-bug">
<field string="Issues" name="issue_count" widget="statinfo"/> <field string="Issues" name="issue_count" widget="statinfo"/>
</button> </button>
</div>
</xpath>
</field> </field>
</record> </record>
</data> </data>
</openerp> </openerp>
+4 -7
View File
@@ -34,9 +34,7 @@
<field name="sale_order_count"/> <field name="sale_order_count"/>
</field> </field>
<xpath expr="//div[@class='oe_kanban_partner_links']" position="inside"> <xpath expr="//div[@class='oe_kanban_partner_links']" position="inside">
<a name="%(sale.act_res_partner_2_sale_order)d" type="action" t-if="record.sale_order_count.value>0"> <span t-if="record.sale_order_count.value>0" class="badge"><i class="fa fa-fw fa-strikethrough"/><t t-esc="record.sale_order_count.value"/></span>
<t t-esc="record.sale_order_count.value"/> Sales
</a>
</xpath> </xpath>
</field> </field>
</record> </record>
@@ -48,16 +46,15 @@
<field name="priority" eval="20"/> <field name="priority" eval="20"/>
<field name="groups_id" eval="[(4, ref('base.group_sale_salesman'))]"/> <field name="groups_id" eval="[(4, ref('base.group_sale_salesman'))]"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//div[@name='buttons']" position="inside"> <div name="button_box" position="inside">
<button class="oe_inline oe_stat_button" type="action" name="%(sale.act_res_partner_2_sale_order)d" <button class="oe_stat_button" type="action" name="%(sale.act_res_partner_2_sale_order)d"
attrs="{'invisible': [('customer', '=', False)]}" attrs="{'invisible': [('customer', '=', False)]}"
icon="fa-strikethrough"> icon="fa-strikethrough">
<field string="Sales" name="sale_order_count" widget="statinfo"/> <field string="Sales" name="sale_order_count" widget="statinfo"/>
</button> </button>
</xpath> </div>
</field> </field>
</record> </record>
</data> </data>
</openerp> </openerp>
@@ -10,15 +10,15 @@
<field eval="18" name="priority"/> <field eval="18" name="priority"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<data> <data>
<xpath expr="//div[@name='buttons']" position="inside"> <div name="button_box" position="inside">
<button class="oe_inline oe_stat_button" name="open_website_url" <button class="oe_stat_button" name="open_website_url"
type="object" icon="fa-globe"> type="object" icon="fa-globe">
<field name="website_published" widget="website_button"/> <field name="website_published" widget="website_button"/>
</button> </button>
</xpath> </div>
</data> </data>
</field> </field>
</record> </record>
</data> </data>
</openerp> </openerp>
+58 -63
View File
@@ -114,8 +114,8 @@
<field name="function" placeholder="e.g. Sales Director"/> <field name="function" placeholder="e.g. Sales Director"/>
<field name="user_ids" invisible="1"/> <field name="user_ids" invisible="1"/>
<field name="email" widget="email" required="context.get('force_email', False)" attrs="{'required': [('user_ids','!=', [])]}"/> <field name="email" widget="email" required="context.get('force_email', False)" attrs="{'required': [('user_ids','!=', [])]}"/>
<field name="phone"/> <field name="phone" widget="phone"/>
<field name="mobile"/> <field name="mobile" widget="phone"/>
</group> </group>
</form> </form>
</field> </field>
@@ -128,23 +128,25 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Partners"> <form string="Partners">
<sheet> <sheet>
<field name="image" widget='image' class="oe_left oe_avatar" options='{"preview_image": "image_medium", "size": [90, 90]}'/> <div class="oe_button_box" name="button_box"/>
<div class="oe_title oe_left"> <field name="image" widget='image' class="oe_avatar" options='{"preview_image": "image_medium", "size": [90, 90]}'/>
<div class="oe_title">
<div class="oe_edit_only"> <div class="oe_edit_only">
<label for="name"/> ( <label for="name"/>
<field name="is_company" on_change="onchange_type(is_company)" class="oe_inline"/> <label for="is_company" string="Is a Company?"/>) <field name="is_company" on_change="onchange_type(is_company)" class="oe_inline"/><label for="is_company" string="Is a Company?"/>
</div> </div>
<h1> <h1>
<field name="name" default_focus="1" placeholder="Name" /> <field name="name" default_focus="1" placeholder="Name" />
</h1> </h1>
<field name="parent_id" <div class="o_row">
placeholder="Company" <field name="parent_id"
domain="[('is_company', '=', True)]" context="{'default_is_company': True, 'default_supplier': supplier, 'default_customer': customer}" placeholder="Company"
attrs="{'invisible': [('is_company','=', True),('parent_id', '=', False)]}" domain="[('is_company', '=', True)]" context="{'default_is_company': True, 'default_supplier': supplier, 'default_customer': customer}"
on_change="onchange_address(use_parent_address, parent_id)"/> attrs="{'invisible': [('is_company','=', True),('parent_id', '=', False)]}"
<field name="category_id" widget="many2many_tags" placeholder="Tags..."/> on_change="onchange_address(use_parent_address, parent_id)"/>
<field name="category_id" widget="many2many_tags" placeholder="Tags..."/>
</div>
</div> </div>
<div class="oe_right oe_button_box" name="buttons"> </div>
<group> <group>
<group> <group>
@@ -155,31 +157,30 @@
</div> </div>
<label for="street" string="Address"/> <label for="street" string="Address"/>
<div> <div class="o_address_format">
<div class="oe_edit_only"> <div class="oe_edit_only">
<field name="use_parent_address" class="oe_inline" <field name="use_parent_address" class="oe_inline"
on_change="onchange_address(use_parent_address, parent_id)" on_change="onchange_address(use_parent_address, parent_id)"
attrs="{'invisible': ['|', ('is_company', '=', True),('parent_id', '=', False)]}"/> attrs="{'invisible': ['|', ('is_company', '=', True),('parent_id', '=', False)]}"/>
<label for="use_parent_address" attrs="{'invisible': ['|', ('is_company', '=', True), ('parent_id', '=', False)]}"/> <label for="use_parent_address" attrs="{'invisible': ['|', ('is_company', '=', True), ('parent_id', '=', False)]}"/>
</div> <button name="open_parent" type="object" string="(edit)" class="oe_link"
<button name="open_parent" type="object" string="(edit company address)" class="oe_link oe_edit_only"
attrs="{'invisible': ['|',('parent_id','=', False),('use_parent_address','=',False)]}"/> attrs="{'invisible': ['|',('parent_id','=', False),('use_parent_address','=',False)]}"/>
<field name="street" placeholder="Street..." attrs="{'readonly': [('use_parent_address','=',True)]}"/>
<field name="street2" attrs="{'readonly': [('use_parent_address','=',True)]}"/>
<div class="address_format">
<field name="city" placeholder="City" style="width: 40%%" attrs="{'readonly': [('use_parent_address','=',True)]}"/>
<field name="state_id" class="oe_no_button" placeholder="State" style="width: 37%%" options='{"no_open": True}' on_change="onchange_state(state_id)" attrs="{'readonly': [('use_parent_address','=',True)]}"/>
<field name="zip" placeholder="ZIP" style="width: 20%%" attrs="{'readonly': [('use_parent_address','=',True)]}"/>
</div> </div>
<field name="country_id" placeholder="Country" class="oe_no_button" options='{"no_open": True, "no_create": True}' attrs="{'readonly': [('use_parent_address','=',True)]}"/>
<field name="street" placeholder="Street..." class="o_address_street" attrs="{'readonly': [('use_parent_address','=',True)]}"/>
<field name="street2" placeholder="Street 2..." class="o_address_street" attrs="{'readonly': [('use_parent_address','=',True)]}"/>
<field name="city" placeholder="City" class="o_address_city" attrs="{'readonly': [('use_parent_address','=',True)]}"/>
<field name="state_id" class="o_address_state" placeholder="State" options='{"no_open": True}' on_change="onchange_state(state_id)" attrs="{'readonly': [('use_parent_address','=',True)]}"/>
<field name="zip" placeholder="ZIP" class="o_address_zip" attrs="{'readonly': [('use_parent_address','=',True)]}"/>
<field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}' attrs="{'readonly': [('use_parent_address','=',True)]}"/>
</div> </div>
<field name="website" widget="url" placeholder="e.g. www.odoo.com"/> <field name="website" widget="url" placeholder="e.g. www.odoo.com"/>
</group> </group>
<group> <group>
<field name="function" placeholder="e.g. Sales Director" <field name="function" placeholder="e.g. Sales Director"
attrs="{'invisible': [('is_company','=', True)]}"/> attrs="{'invisible': [('is_company','=', True)]}"/>
<field name="phone" placeholder="e.g. +32.81.81.37.00"/> <field name="phone" widget="phone" placeholder="e.g. +32.81.81.37.00"/>
<field name="mobile"/> <field name="mobile" widget="phone"/>
<field name="fax"/> <field name="fax"/>
<field name="user_ids" invisible="1"/> <field name="user_ids" invisible="1"/>
<field name="email" widget="email" attrs="{'required': [('user_ids','!=', [])]}"/> <field name="email" widget="email" attrs="{'required': [('user_ids','!=', [])]}"/>
@@ -229,19 +230,15 @@
</a> </a>
<div class="oe_module_desc"> <div class="oe_module_desc">
<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_color_border"> <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_color_border">
<div class="col-md-12"> <h4><a type="open"><field name="name"/></a></h4>
<div> <i><div t-if="record.function.raw_value">
<h4><a type="open"><field name="name"/></a></h4> <field name="function"/></div></i>
<i><div t-if="record.function.raw_value"> <div><a t-if="record.email.raw_value" title="Mail" t-att-href="'mailto:'+record.email.value">
<field name="function"/></div></i> <field name="email"/>
<div><a t-if="record.email.raw_value" title="Mail" t-att-href="'mailto:'+record.email.value"> </a></div>
<field name="email"/> <div t-if="record.phone.raw_value">Phone: <field name="phone"/></div>
</a></div> <div t-if="record.mobile.raw_value">Mobile: <field name="mobile"/></div>
<div t-if="record.phone.raw_value">Phone: <field name="phone"/></div> <div t-if="record.fax.raw_value">Fax: <field name="fax"/></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>
</div> </div>
</div> </div>
</div> </div>
@@ -260,8 +257,8 @@
<group> <group>
<field name="function" placeholder="e.g. Sales Director"/> <field name="function" placeholder="e.g. Sales Director"/>
<field name="email"/> <field name="email"/>
<field name="phone"/> <field name="phone" widget="phone"/>
<field name="mobile"/> <field name="mobile" widget="phone"/>
<field name="title"/> <field name="title"/>
</group> </group>
<div> <div>
@@ -273,15 +270,13 @@
<field class="oe_inline" name="type"/> <field class="oe_inline" name="type"/>
</div> </div>
<label for="street" string="Address" attrs="{'invisible': [('use_parent_address','=', True)]}"/> <label for="street" string="Address" attrs="{'invisible': [('use_parent_address','=', True)]}"/>
<div attrs="{'invisible': [('use_parent_address','=', True)]}" name="div_address"> <div class="o_address_format" attrs="{'invisible': [('use_parent_address','=', True)]}" name="div_address">
<field name="street" placeholder="Street..."/> <field name="street" placeholder="Street..." class="o_address_street"/>
<field name="street2"/> <field name="street2" placeholder="Street 2..." class="o_address_street"/>
<div class="address_format"> <field name="city" placeholder="City" class="o_address_city"/>
<field name="city" placeholder="City" style="width: 40%%"/> <field name="state_id" class="o_address_state" placeholder="State" options='{"no_open": True}' on_change="onchange_state(state_id)"/>
<field name="state_id" class="oe_no_button" placeholder="State" style="width: 37%%" options='{"no_open": True}' on_change="onchange_state(state_id)"/> <field name="zip" placeholder="ZIP" class="o_address_zip"/>
<field name="zip" placeholder="ZIP" style="width: 20%%"/> <field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'/>
</div>
<field name="country_id" placeholder="Country" class="oe_no_button" options='{"no_open": True, "no_create": True}'/>
</div> </div>
</group> </group>
<field name="supplier" invisible="True"/> <field name="supplier" invisible="True"/>
@@ -343,8 +338,8 @@
<field name="category_id" string="Tag" filter_domain="[('category_id','ilike', self)]"/> <field name="category_id" string="Tag" filter_domain="[('category_id','ilike', self)]"/>
<field name="user_id"/> <field name="user_id"/>
<field name="parent_id" domain="[('is_company','=',1)]" operator="child_of"/> <field name="parent_id" domain="[('is_company','=',1)]" operator="child_of"/>
<group expand="0" string="Group By"> <group expand="0" name="group_by" string="Group By">
<filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by' : 'user_id'}" /> <filter name="salesperson" string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by' : 'user_id'}" />
<filter string="Company" context="{'group_by': 'parent_id'}"/> <filter string="Company" context="{'group_by': 'parent_id'}"/>
<filter string="Country" context="{'group_by': 'country_id'}"/> <filter string="Country" context="{'group_by': 'country_id'}"/>
</group> </group>
@@ -357,7 +352,7 @@
<field name="name">res.partner.kanban</field> <field name="name">res.partner.kanban</field>
<field name="model">res.partner</field> <field name="model">res.partner</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<kanban> <kanban class="o_res_partner_kanban">
<field name="color"/> <field name="color"/>
<field name="display_name"/> <field name="display_name"/>
<field name="title"/> <field name="title"/>
@@ -377,24 +372,23 @@
<field name="image"/> <field name="image"/>
<templates> <templates>
<t t-name="kanban-box"> <t t-name="kanban-box">
<div class="oe_kanban_vignette oe_semantic_html_override"> <div class="o_kanban_two_column_tags oe_kanban_global_click o_res_partner_kanban">
<a type="open"> <div class="o_kanban_tags_section oe_kanban_partner_categories"/>
<div class="o_kanban_image">
<t t-if="record.image.raw_value"> <t t-if="record.image.raw_value">
<img t-att-src="kanban_image('res.partner', 'image_small', record.id.value)" class="oe_kanban_image"/> <img t-att-src="kanban_image('res.partner', 'image_small', record.id.value)"/>
</t> </t>
<t t-if="!record.image.raw_value"> <t t-if="!record.image.raw_value">
<t t-if="record.is_company.raw_value === true"> <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"/> <img t-att-src='_s + "/base/static/src/img/company_image.png"'/>
</t> </t>
<t t-if="record.is_company.raw_value === false"> <t t-if="record.is_company.raw_value === false">
<img t-att-src='_s + "/base/static/src/img/avatar.png"' class="oe_kanban_image"/> <img t-att-src='_s + "/base/static/src/img/avatar.png"'/>
</t> </t>
</t> </t>
</a> </div>
<div class="oe_kanban_details"> <div class="oe_kanban_details">
<h4 class="oe_partner_heading"><a type="open"><field name="display_name"/></a></h4> <strong class="oe_partner_heading"><field name="display_name"/></strong>
<div class="oe_kanban_partner_categories"/>
<div class="oe_kanban_partner_links"/>
<ul> <ul>
<li t-if="record.parent_id.raw_value and !record.function.raw_value"><field name="parent_id"/></li> <li t-if="record.parent_id.raw_value and !record.function.raw_value"><field name="parent_id"/></li>
<li t-if="!record.parent_id.raw_value and record.function.raw_value"><field name="function"/></li> <li t-if="!record.parent_id.raw_value and record.function.raw_value"><field name="function"/></li>
@@ -402,8 +396,9 @@
<li t-if="record.city.raw_value and !record.country_id.raw_value"><field name="city"/></li> <li t-if="record.city.raw_value and !record.country_id.raw_value"><field name="city"/></li>
<li t-if="!record.city.raw_value and record.country_id.raw_value"><field name="country_id"/></li> <li t-if="!record.city.raw_value and record.country_id.raw_value"><field name="country_id"/></li>
<li t-if="record.city.raw_value and record.country_id.raw_value"><field name="city"/>, <field name="country_id"/></li> <li t-if="record.city.raw_value and record.country_id.raw_value"><field name="city"/>, <field name="country_id"/></li>
<li t-if="record.email.raw_value"><a t-attf-href="mailto:#{record.email.raw_value}"><field name="email"/></a></li> <li t-if="record.email.raw_value" class="o_text_overflow"><field name="email"/></li>
</ul> </ul>
<div class="oe_kanban_partner_links"/>
</div> </div>
</div> </div>
@@ -594,4 +589,4 @@
<menuitem action="action_partner_category_form" id="menu_partner_category_form" name="Categories" sequence="1" parent="menu_config_address_book" groups="base.group_no_one"/> <menuitem action="action_partner_category_form" id="menu_partner_category_form" name="Categories" sequence="1" parent="menu_config_address_book" groups="base.group_no_one"/>
</data> </data>
</openerp> </openerp>