[IMP] sale, base: partner form view improvement

Improved partner form consistency and clarity via following changes:
- Renamed string and tooltip from Shipping address to Delivery address
- Changed description of the customer address
- Re-organised contact partner form and added image of partner
- Changed default avatar to a simpler one that is not Stephane Bern
- Test case improvement

Task ID: 192044

closes odoo/odoo#29917
This commit is contained in:
Juhil Somaiya
2019-02-08 06:37:35 +00:00
committed by Martin Trigaux
parent e67b22946d
commit 5c13831dc5
5 changed files with 19 additions and 16 deletions
@@ -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>
+3 -3
View File
@@ -149,7 +149,7 @@ class Partner(models.Model):
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.")
@@ -179,12 +179,12 @@ class Partner(models.Model):
type = fields.Selection(
[('contact', 'Contact'),
('invoice', 'Invoice Address'),
('delivery', 'Shipping Address'),
('delivery', 'Delivery Address'),
('other', 'Other Address'),
("private", "Private Address"),
], string='Address Type',
default='contact',
help="Invoice & Shipping addresses are used in sales orders. Private addresses are only visible by authorized users.")
help="Invoice & Delivery addresses are used in sales orders. Private addresses are only visible by authorized users.")
street = fields.Char()
street2 = fields.Char()
zip = fields.Char(change_default=True)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

+14 -11
View File
@@ -338,10 +338,15 @@
<field name="type" required="1" widget="radio" options="{'horizontal': true}"/>
<field name="parent_id" invisible="1"/>
<hr/>
<group>
<group attrs="{'invisible': [('type','=', 'contact')]}">
<label for="street" string="Address"/>
<div>
<group col="12">
<group colspan="5">
<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 colspan="5">
<field name="email"/>
<field name="phone" widget="phone"/>
<field name="mobile" widget="phone"/>
<field name="comment" placeholder="internal note..."/>
</group>
<group colspan="1">
<field name="image_medium" widget="image" class="oe_avatar" nolabel="1"/>
</group>
</group>
<field name="supplier" invisible="True"/>
+1 -1
View File
@@ -1 +1 @@
[["Wood y Wood Pecker", "", "Snow Street, 25", "Kainuu", "Finland", "Vendor", "1", "0", "1", ""], ["Roger Pecker", "Contact", "Snow Street, 27", "Kainuu", "Finland", "Vendor", "1", "0", "0", "Wood y Wood Pecker"], ["Sharon Pecker", "Shipping Address", "Snow Street, 28", "Kainuu", "Finland", "Vendor", "1", "0", "0", "Wood y Wood Pecker"], ["Thomas Pecker", "Contact", "Snow Street, 27", "Kainuu", "Finland", "Vendor", "1", "0", "0", "Wood y Wood Pecker"], ["Norseman Roundabout", "", "Atonium Street, 45a", "Brussels", "Belgium", "Vendor", "1", "0", "1", ""], ["Yvan Holiday", "Invoice Address", "Atonium Street, 45b", "Brussels", "Belgium", "Vendor", "1", "0", "0", "Norseman Roundabout"], ["Jack Unsworth", "Contact", "Atonium Street, 45a", "Brussels", "Belgium", "Vendor", "1", "0", "0", "Norseman Roundabout"]]
[["Wood y Wood Pecker", "", "Snow Street, 25", "Kainuu", "Finland", "Vendor", "1", "0", "1", ""], ["Roger Pecker", "Contact", "Snow Street, 27", "Kainuu", "Finland", "Vendor", "1", "0", "0", "Wood y Wood Pecker"], ["Sharon Pecker", "Delivery Address", "Snow Street, 28", "Kainuu", "Finland", "Vendor", "1", "0", "0", "Wood y Wood Pecker"], ["Thomas Pecker", "Contact", "Snow Street, 27", "Kainuu", "Finland", "Vendor", "1", "0", "0", "Wood y Wood Pecker"], ["Norseman Roundabout", "", "Atonium Street, 45a", "Brussels", "Belgium", "Vendor", "1", "0", "1", ""], ["Yvan Holiday", "Invoice Address", "Atonium Street, 45b", "Brussels", "Belgium", "Vendor", "1", "0", "0", "Norseman Roundabout"], ["Jack Unsworth", "Contact", "Atonium Street, 45a", "Brussels", "Belgium", "Vendor", "1", "0", "0", "Norseman Roundabout"]]