summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorLucas Perais (lpe) <lpe@odoo.com>2018-07-18 17:10:19 +0200
committerLucas Perais (lpe) <lpe@odoo.com>2018-07-19 09:25:33 +0200
commitee746b52cd3f05b74b908eda77b5f7356b2ec3e9 (patch)
tree2252403c3e7ef25586768fad8d3f91b0d188ac27 /addons
parent633a65d23145fdbe6f2e4b4876f6263634927a29 (diff)
[FIX] product: fallback onto name for product.partner_ref
Have a product with a partner A as a seller, without any description whatsoever Do a vendor bill with partner A as the partner. Add the product onto the lines Before this commit, the description on the line was "False" After this commit, we fallback onto the product name if no other reference is set OPW 1865969 closes #25857
Diffstat (limited to 'addons')
-rw-r--r--addons/product/models/product.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/product/models/product.py b/addons/product/models/product.py
index 02afaf34810..419bc705c24 100644
--- a/addons/product/models/product.py
+++ b/addons/product/models/product.py
@@ -249,7 +249,7 @@ class ProductProduct(models.Model):
def _compute_partner_ref(self):
for supplier_info in self.seller_ids:
if supplier_info.name.id == self._context.get('partner_id'):
- product_name = supplier_info.product_name or self.default_code
+ product_name = supplier_info.product_name or self.default_code or self.name
break
else:
product_name = self.name