From 46959ed0ff04b81121bb41a1560d6796b58f7940 Mon Sep 17 00:00:00 2001 From: Andreas Osim Date: Mon, 22 Aug 2022 16:25:57 +0200 Subject: [PATCH] fix problem with return value (pid) at create_product --- ext/custom-addons/dp_custom/models/product.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/custom-addons/dp_custom/models/product.py b/ext/custom-addons/dp_custom/models/product.py index 475f575a..458aa7fd 100644 --- a/ext/custom-addons/dp_custom/models/product.py +++ b/ext/custom-addons/dp_custom/models/product.py @@ -103,7 +103,8 @@ class ProductTemplate(models.Model): pid = product_template.id else: if vals['active']: - pid = self.create(vals) + res = self.create(vals) + pid = res.id return True, pid @api.model