[FIX] stock: use default lang when no partner in deliveryslip
Step to reproduce: 1. create a product 2. duplicate it and change its translation (but DO NOT change the product name) 3. create a transfer for that new product without a contact 4. print delivery slip Bug: the db's product name is used instead of the translated name (i.e. "original product name (copy)") FIX: when partner id is not set in picking, then default to the user's language opw-3141202 closes odoo/odoo#116610 X-original-commit: e56b955fbd7963709b9547eb50d97cf105f9d430 Signed-off-by: Tiffany Chang <tic@odoo.com> Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<template id="report_delivery_document">
|
||||
<t t-call="web.html_container">
|
||||
<t t-call="web.external_layout">
|
||||
<t t-set="o" t-value="o.with_context(lang=o.partner_id.lang)" />
|
||||
<t t-set="o" t-value="o.with_context(lang=o.partner_id.lang or o.env.lang)" />
|
||||
<t t-set="partner" t-value="o.partner_id or (o.move_ids and o.move_ids[0].partner_id) or False"/>
|
||||
|
||||
<t t-set="address">
|
||||
@@ -273,7 +273,7 @@
|
||||
|
||||
<template id="report_deliveryslip">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="stock.report_delivery_document" t-lang="o.partner_id.lang"/>
|
||||
<t t-call="stock.report_delivery_document" t-lang="o.partner_id.lang or o.env.lang"/>
|
||||
</t>
|
||||
</template>
|
||||
</odoo>
|
||||
|
||||
Reference in New Issue
Block a user