[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
This commit is contained in:
Denis Ledoux
2015-08-17 10:49:50 +02:00
parent ea3bfe1bd5
commit 3fe707d72e
+5 -1
View File
@@ -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"