Permalink
Browse files

[IMP] sale, base: partner form view improvement

Improved partner form consistency and clarity via following changes.
 -Renamed field from Shipping to Delivery address
 -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 authored and mba-odoo committed Dec 31, 2018
1 parent d7c5bc0 commit a1047b0426289f1e66589e100b754bb9b6adfced
@@ -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.")
@@ -180,7 +180,7 @@ def _split_street_with_params(self, street_raw, street_format):
type = fields.Selection(
[('contact', 'Contact'),
('invoice', 'Invoice Address'),
('delivery', 'Shipping Address'),
('delivery', 'Delivery Address'),
('other', 'Other Address'),
("private", "Private Address"),
], string='Address Type',
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"/>
@@ -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"]]

0 comments on commit a1047b0

Please sign in to comment.