summaryrefslogtreecommitdiff
path: root/addons/sale_project
diff options
context:
space:
mode:
authorFlorent de Labarre <florent.mirieu@gmail.com>2021-03-17 14:36:21 +0000
committerFlorent de Labarre <florent.mirieu@gmail.com>2021-03-17 15:17:19 +0000
commit8db6e654a50d38001c42247b33392aad90cab821 (patch)
treea05abdd8af5201c21dd669543b4532defcebda8b /addons/sale_project
parentfbdec5fe29827b88ec0d1421f68716e1febefd89 (diff)
[FIX] sale_project: clearer error message
The error message raised when linking a wrong SOline and a task used unclear/incomplete information. This commit improves the displayed message, replacing: * the SO id by the SO reference, since record ids are not really useful to end users. * the product name by its display name, to include variants details. closes odoo/odoo#64673 Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Diffstat (limited to 'addons/sale_project')
-rw-r--r--addons/sale_project/models/project.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/sale_project/models/project.py b/addons/sale_project/models/project.py
index d7a6f8a3840..db4c8f43773 100644
--- a/addons/sale_project/models/project.py
+++ b/addons/sale_project/models/project.py
@@ -66,8 +66,8 @@ class ProjectTask(models.Model):
if not task.sale_line_id.is_service or task.sale_line_id.is_expense:
raise ValidationError(_(
'You cannot link the order item %(order_id)s - %(product_id)s to this task because it is a re-invoiced expense.',
- order_id=task.sale_line_id.order_id.id,
- product_id=task.sale_line_id.product_id.name,
+ order_id=task.sale_line_id.order_id.name,
+ product_id=task.sale_line_id.product_id.display_name,
))
def unlink(self):