[FIX] website_sale: shipping address edition

- Buy on product on the eCommerce with a partner having a single address
- At address selection, edit the shipping address

The billing address is also modified.

From the Odoo PoV, this is expected since they point to the same
partner. But from a user PoV, this is totally unexpected and confusing.

Therefore, we only allow the edition of the shipping addresses which are
different from the billing address. Yet, if the user modifies the
billing address, it will change the corresponding shipping address as
well. However, the usual flow is to set the billing address, then the
shipping address. So that should cause less issues. In v12, a warning
message is added.

opw-1914185

closes odoo/odoo#29509
This commit is contained in:
Nicolas Martinelli
2018-12-13 10:42:28 +00:00
parent 0377105304
commit c90cad2b6c
+1 -1
View File
@@ -1090,7 +1090,7 @@
</t>
<input type='submit'/>
</form>
<a t-if="not actual_partner or (ship.id in actual_partner.ids + actual_partner.child_ids.ids)" class='btn btn-link pull-right fa fa-edit js_edit_address no-decoration' title="Edit this address"></a>
<a t-if="not actual_partner or (ship.id in actual_partner.child_ids.ids)" class='btn btn-link pull-right fa fa-edit js_edit_address no-decoration' title="Edit this address"></a>
<div t-att-class="'panel panel-default %s' % (selected and 'border_primary' or 'js_change_shipping')">
<div class='panel-body' style='min-height: 130px;'>
<t t-esc="contact" t-options="dict(widget='contact', fields=['name', 'address'], no_marker=True)"/>