[IMP] base: new form view of res.partner

bzr revid: qdp-launchpad@openerp.com-20120410131052-8zj77cfa2ulkhiup
This commit is contained in:
Quentin (OpenERP)
2012-04-10 15:10:52 +02:00
parent b4df7fd650
commit e485c73d15
+75 -16
View File
@@ -333,25 +333,22 @@
<field name="arch" type="xml">
<form string="Partners">
<group col="8" colspan="4">
<group col="4" colspan="4">
<field name="name" required="1"/>
<field name="title" size="0" groups="base.group_extended" domain="[('domain', '=', 'contact')]"/>
<newline/>
<field name="function" attrs="{'invisible': [('is_company', '=', True)]}" colspan="4"/>
<field name="parent_id" string="Company" colspan="4" attrs="{'invisible': [('is_company','=', True)]}"
domain="[('is_company', '=', True)]" context="{'default_is_company': True}"
on_change="onchange_address(use_parent_address, parent_id)"/>
<group col="2">
<field name="photo" widget='image' nolabel="1"/>
</group>
<group colspan="4">
<h2><field name="name" required="1" nolabel="1" colspan="4"/></h2><newline/>
<field name="function" attrs="{'invisible': [('is_company', '=', True)]}"/>
<field name="title" size="0" groups="base.group_extended" domain="[('domain', '=', 'contact')]"/>
<field name="parent_id" string="Company" attrs="{'invisible': [('is_company','=', True)]}"
domain="[('is_company', '=', True)]" context="{'default_is_company': True}"
on_change="onchange_address(use_parent_address, parent_id)"/>
</group>
<group col="2">
<field name="is_company" on_change="onchange_type(is_company)"/>
</group>
<group col="2">
<field name="customer"/>
<field name="supplier"/>
</group>
<group col="2">
<field name="photo" widget='image' nolabel="1"/>
</group>
</group>
<notebook colspan="4">
<page string="General">
@@ -372,7 +369,6 @@
</group>
<group colspan="2">
<separator string="Communication" colspan="4"/>
<field name="lang" colspan="4"/>
<field name="phone" colspan="4"/>
<field name="mobile" colspan="4"/>
<field name="fax" colspan="4"/>
@@ -381,7 +377,69 @@
<field name="ref" groups="base.group_extended" colspan="4"/>
</group>
<group colspan="4" attrs="{'invisible': [('is_company','=', False)]}">
<field name="child_ids" context="{'default_parent_id': active_id}" nolabel="1">
<field name="child_ids" context="{'default_parent_id': active_id}" nolabel="1" mode="kanban">
<kanban>
<field name="color"/>
<field name="name"/>
<field name="title"/>
<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="photo"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id"/>
<field name="mobile"/>
<field name="state_id"/>
<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' : '')">
<div class="oe_module_vignette">
<a type="edit">
<img t-att-src="kanban_image('res.partner', 'photo', record.id.value)" width="64" height="64" class="oe_module_icon"/>
</a>
<div class="oe_module_desc">
<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger oe_kanban_color_border">
<table class="oe_kanban_table">
<tr>
<td class="oe_kanban_title1" align="left" valign="middle">
<h4><a type="edit"><field name="name"/></a>
<div t-if="record.parent_id.raw_value"><field name="parent_id"/></div>
</h4>
<i>
<div t-if="record.function.raw_value">
<field name="function"/><br/></div>
<div t-if="record.email.raw_value">
<field name="email"/><br/></div>
</i>
</td>
<td t-if="record.is_company.raw_value" valign="top" align="right">
<!--img t-att-src="kanban_image('res.partner', 'photo', record.id.value)" class="oe_kanban_gravatar"/-->
</td>
</tr>
</table>
</div>
<div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
<div class="oe_kanban_left">
<a string="Edit" icon="gtk-edit" type="edit"/>
<a string="Change Color" icon="color-picker" type="color" name="color"/>
<a t-if="record.email.raw_value" title="Mail" t-att-href="'mailto:'+record.email.value" style="text-decoration: none;" >
<img src="/web/static/src/img/icons/terp-mail-message-new.png" border="0" width="16" height="16"/>
</a>
</div>
<br class="oe_kanban_clear"/>
</div>
</div>
</div>
</div>
</t>
</templates>
</kanban>
<form string="Partners">
<group col="8" colspan="4">
<group col="4" colspan="4">
@@ -404,7 +462,7 @@
<field name="photo" widget='image' nolabel="1"/>
</group>
</group>
<notebook colspan="4">
<notebook colspan="4">
<page string="General">
<group colspan="2">
<separator string="Address" colspan="4"/>
@@ -452,6 +510,7 @@
</page>
<page string="Sales &amp; Purchases" attrs="{'invisible': [('customer', '=', False), ('supplier', '=', False)]}">
<separator string="General Information" colspan="4"/>
<field name="lang" colspan="4"/>
<field name="user_id"/>
<field name="active" groups="base.group_extended"/>
<field name="date"/>