[IMP] website_sale: product.product support website_publish_button
Now when you click on a variant and have the website_publisher right, you are redirected to the correct variant. If you don't have the access, you have the same behaviour than before and it is the template that is unpublished. (strange!) closes odoo/odoo#33175 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
@@ -441,7 +441,12 @@ class Product(models.Model):
|
||||
@api.multi
|
||||
def website_publish_button(self):
|
||||
self.ensure_one()
|
||||
return self.product_tmpl_id.website_publish_button()
|
||||
res = self.product_tmpl_id.website_publish_button()
|
||||
|
||||
# res can be the result of write() if not website_publisher
|
||||
if type(res) == dict and res.get('type') == 'ir.actions.act_url':
|
||||
res['url'] = self.website_url
|
||||
return res
|
||||
|
||||
@api.multi
|
||||
def _get_images(self):
|
||||
|
||||
Reference in New Issue
Block a user