summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorYann Papouin <y.papouin@dec-industrie.com>2021-03-09 12:32:55 +0000
committerYann Papouin <y.papouin@dec-industrie.com>2021-03-09 19:03:26 +0000
commit9c7bb7637f9210a2bf373878ea03a0ee885c4702 (patch)
treeca2708fc37023f0bb3c56dd10ca4869bded4c628 /addons
parent412c6021ffa513a77cace807a41bffa7909e9179 (diff)
[FIX] sale_purchase: Invalid context mapping
When canceling a purchase order generated from a SO, a warning activity is generated on the SO to warn the salesman that the PO was cancelled. But the activity message was incomplete, because the cancelled PO lines were given as 'purchase_lines' to the rendering context, but expected as 'purchase_order_lines' in the qweb template. This commit ensures that the correct key is used and that the activity message is clear and complete. Fixes #67508 closes odoo/odoo#67568 X-original-commit: ba7336a9d696e8506943edca2f3871f78fac3e99 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Diffstat (limited to 'addons')
-rw-r--r--addons/sale_purchase/models/purchase_order.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/sale_purchase/models/purchase_order.py b/addons/sale_purchase/models/purchase_order.py
index a190130c5ce..e4bd496b973 100644
--- a/addons/sale_purchase/models/purchase_order.py
+++ b/addons/sale_purchase/models/purchase_order.py
@@ -63,7 +63,7 @@ class PurchaseOrder(models.Model):
views_or_xmlid='sale_purchase.exception_sale_on_purchase_cancellation',
render_context={
'purchase_orders': purchase_order_lines.mapped('order_id'),
- 'purchase_lines': purchase_order_lines,
+ 'purchase_order_lines': purchase_order_lines,
})