Permalink
Browse files

[IMP] sale, base: partner form view improvement

Improved partner form consistency and clarity via following changes.
 -Changed description of the customer address
 -Re-organised contact partner form and added image of partner
 -Added new default avatar for the customer

Related Task ID: 1920447
  • Loading branch information...
jso-odoo committed Dec 31, 2018
1 parent fb693b6 commit 65ff6fc295e829fc1de63467213b757e02c508c3
@@ -173,7 +173,7 @@
<div class="o_setting_right_pane">
<label for="group_sale_delivery_address"/>
<div class="text-muted">
Set specific billing and shipping addresses
Select specific invoice and delivery addresses
</div>
</div>
</div>
@@ -149,7 +149,7 @@ def _split_street_with_params(self, street_raw, street_format):
title = fields.Many2one('res.partner.title')
parent_id = fields.Many2one('res.partner', string='Related Company', index=True)
parent_name = fields.Char(related='parent_id.name', readonly=True, string='Parent name')
child_ids = fields.One2many('res.partner', 'parent_id', string='Contacts', domain=[('active', '=', True)]) # force "active_test" domain to bypass _search() override
child_ids = fields.One2many('res.partner', 'parent_id', string='Contact', domain=[('active', '=', True)]) # force "active_test" domain to bypass _search() override
ref = fields.Char(string='Reference', index=True)
lang = fields.Selection(_lang_get, string='Language', default=lambda self: self.env.lang,
help="All the emails and documents sent to this contact will be translated in this language.")
Binary file not shown.
@@ -339,9 +339,14 @@
<field name="parent_id" invisible="1"/>
<hr/>
<group>
<group attrs="{'invisible': [('type','=', 'contact')]}">
<label for="street" string="Address"/>
<div>
<group style="width:41%">
<field name="name" string="Contact Name" attrs="{'required' : [('type', '=', 'contact')]}"/>
<field name="title" placeholder="e.g. Mr."
attrs="{'invisible': [('type','!=', 'contact')]}"/>
<field name="function" placeholder="e.g. Sales Director"
attrs="{'invisible': [('type','!=', 'contact')]}"/>
<label for="street" string="Address" attrs="{'invisible': [('type','=', 'contact')]}"/>
<div attrs="{'invisible': [('type','=', 'contact')]}">
<div class="o_address_format" name="div_address">
<field name="street" placeholder="Street..." class="o_address_street"/>
<field name="street2" placeholder="Street 2..." class="o_address_street"/>
@@ -351,17 +356,15 @@
<field name="country_id" placeholder="Country" class="o_address_country" options='{"no_open": True, "no_create": True}'/>
</div>
</div>
<field name="comment" placeholder="Internal notes..."/>
</group>
<group>
<field name="name" string="Contact Name" attrs="{'required' : [('type', '=', 'contact')]}"/>
<field name="title" placeholder="e.g. Mr."
attrs="{'invisible': [('type','!=', 'contact')]}"/>
<field name="function" placeholder="e.g. Sales Director"
attrs="{'invisible': [('type','!=', 'contact')]}"/>
<group style="width:41%">
<field name="email"/>
<field name="phone" widget="phone"/>
<field name="mobile" widget="phone"/>
<field name="comment" placeholder="internal note..."/>
</group>
<group style="width:10%">
<field name="image_medium" widget="image" class="oe_avatar" nolabel="1"/>
</group>
</group>
<field name="supplier" invisible="True"/>

0 comments on commit 65ff6fc

Please sign in to comment.