diff options
| author | fja-odoo <fja@odoo.com> | 2019-06-26 11:44:25 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2019-06-28 09:36:55 +0000 |
| commit | e102ca85466da2cfccdabf53f1109c451691440f (patch) | |
| tree | 093fdc8c08851fa22ab7406bdd43fbcb4fff7c3e | |
| parent | 2337d4115bc53fd8be574480dcf432283432bd78 (diff) | |
[FIX] website_sale: fix open_website_url for product
open_website_url was targeting product_template website_url instead of
product_product.
Related to https://github.com/odoo/odoo/pull/33175
closes odoo/odoo#34383
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
| -rw-r--r-- | addons/website_sale/models/product.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/website_sale/models/product.py b/addons/website_sale/models/product.py index e5bf6ca82f4..a0909186eec 100644 --- a/addons/website_sale/models/product.py +++ b/addons/website_sale/models/product.py @@ -449,6 +449,13 @@ class Product(models.Model): return res @api.multi + def open_website_url(self): + self.ensure_one() + res = self.product_tmpl_id.open_website_url() + res['url'] = self.website_url + return res + + @api.multi def _get_images(self): """Return a list of records implementing `image.mixin` to display on the carousel on the website for this variant. |
