[FIX] stock: delivery slip address

After discussion with the Mighty Priestess, the address used in the
Delivery Slip should be the picking partner as a first priority, then
the move lines partner.

And we therefore remove the useless 'Assign Partner' button (but not the
associated method since it is public).

opw-1935039

closes odoo/odoo#31250
This commit is contained in:
Nicolas Martinelli
2019-02-19 14:48:20 +00:00
parent ef618df9e9
commit 09bf391f4d
2 changed files with 3 additions and 9 deletions
+3 -6
View File
@@ -11,12 +11,9 @@
<div>
<span><strong>Customer Address:</strong></span>
</div>
<div t-if="o.move_lines and o.move_lines[0].partner_id" name="partner_header">
<div t-field="o.move_lines[0].partner_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True}'/>
</div>
<div t-if="not (o.move_lines and o.move_lines[0].partner_id) and o.partner_id" name="partner_header">
<div t-field="o.partner_id"
<t t-set="partner" t-value="o.partner_id or (o.move_lines and o.move_lines[0].partner_id) or False"/>
<div t-if="partner" name="partner_header">
<div t-esc="partner"
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True}'/>
</div>
</div>
@@ -242,9 +242,6 @@
<group>
<group>
<field name="partner_id" attrs="{'invisible': [('picking_type_code', '=', 'internal')]}"/>
<button name="action_assign_partner" string="Assign Partner" type="object" help="Assign the partner to the Operations. Use only if the partner is manually changed!"
attrs="{'invisible': ['|', '|', ('move_line_exist', '=', False), ('state', 'not in', ('draft', 'assigned', 'confirmed')), ('picking_type_code', '=', 'internal')]}"
class="oe_link oe_edit_only"/>
<field name="location_id" groups="stock.group_stock_multi_locations" attrs="{'invisible': [('picking_type_code', '=', 'incoming')]}" domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]"/>
<field name="location_dest_id" groups="stock.group_stock_multi_locations" attrs="{'invisible': [('picking_type_code', '=', 'outgoing')]}" domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]"/>
<field name="backorder_id" readonly="1" attrs="{'invisible': [('backorder_id','=',False)]}"/>