From 7c43290ff4af3dfd427102ddb0aef7cf1a41f22d Mon Sep 17 00:00:00 2001 From: "Tiffany Chang (tic)" Date: Tue, 9 Nov 2021 14:15:20 +0000 Subject: [PATCH] [FIX] stock: safely reference move source in reception report labels Commit d6abfbade9fb7f6dd6b3253551c559b1c7e6ece5 made it so we directly reference a move's source origin via _get_source_document(). Normally this is fine when the labels are created because labels would never be created for a move without a source document, but this isn't safe when the label is accessed via another way (e.g. test_reports). Therefore, let's add in a check to prevent a error from trying to access False.name. closes odoo/odoo#79585 X-original-commit: 8abba9c3c0c48241e017e87045f392dc403a28e9 Signed-off-by: Arnold Moyaux Signed-off-by: Tiffany Chang --- addons/stock/report/report_stock_reception.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/stock/report/report_stock_reception.xml b/addons/stock/report/report_stock_reception.xml index 82d5d9ab4df..7000b459dbe 100644 --- a/addons/stock/report/report_stock_reception.xml +++ b/addons/stock/report/report_stock_reception.xml @@ -10,10 +10,11 @@ +
-
+