From 3fe707d72e4d86d00e2f5e8dc34f8d2403b1f71e Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 17 Aug 2015 10:46:37 +0200 Subject: [PATCH] [FIX] website_sale: Publish button on the product variant form. The method `website_publish_button` was available on the `product.template` (through the inherit from `website.published.mixin`) but it wasn't on `product.product`, because this model is an `inherits` of `product.template`, and not a simple `inherit`, and the method is simply not available directly through the `inherits`. opw-647419 --- addons/website_sale/models/product.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/website_sale/models/product.py b/addons/website_sale/models/product.py index 2278be959a5..7b3bc026ae2 100644 --- a/addons/website_sale/models/product.py +++ b/addons/website_sale/models/product.py @@ -179,11 +179,15 @@ class product_template(osv.Model): class product_product(osv.Model): _inherit = "product.product" - # Wrapper for call_kw with inherits + # Wrappers for call_kw with inherits def open_website_url(self, cr, uid, ids, context=None): template_id = self.browse(cr, uid, ids, context=context).product_tmpl_id.id return self.pool['product.template'].open_website_url(cr, uid, [template_id], context=context) + def website_publish_button(self, cr, uid, ids, context=None): + template_id = self.browse(cr, uid, ids, context=context).product_tmpl_id.id + return self.pool['product.template'].website_publish_button(cr, uid, [template_id], context=context) + class product_attribute(osv.Model): _inherit = "product.attribute"