[REF] product, template: remove unused is_product_variant computed field, probably from old implementation

This commit is contained in:
Thibault Delavallée
2016-08-01 15:05:33 +02:00
parent 77c9e76e82
commit b747b05fa6
5 changed files with 0 additions and 14 deletions
@@ -285,7 +285,6 @@
<field name="arch" type="xml">
<form string="Expense Products">
<sheet>
<field name="is_product_variant" invisible="1"/>
<field name='product_variant_count' invisible='1'/>
<field name="id" invisible="True"/>
<div class="oe_button_box" name="button_box">
-4
View File
@@ -238,9 +238,6 @@ class product_product(osv.osv):
res[p.id] = (data['code'] and ('['+data['code']+'] ') or '') + (data['name'] or '')
return res
def _is_product_variant_impl(self, cr, uid, ids, name, arg, context=None):
return dict.fromkeys(ids, True)
def _get_image_variant(self, cr, uid, ids, name, args, context=None):
result = dict.fromkeys(ids, False)
for obj in self.browse(cr, uid, ids, context=context):
@@ -317,7 +314,6 @@ class product_product(osv.osv):
'product_tmpl_id': fields.many2one('product.template', 'Product Template', required=True, ondelete="cascade", select=True, auto_join=True),
'barcode': fields.char('Barcode', help="International Article Number used for product identification.", oldname='ean13', copy=False),
'attribute_value_ids': fields.many2many('product.attribute.value', id1='prod_id', id2='att_id', string='Attributes', ondelete='restrict'),
'is_product_variant': fields.function( _is_product_variant_impl, type='boolean', string='Is a product variant'),
# image: all image fields are base64 encoded and PIL-supported
'image_variant': fields.binary("Variant Image", attachment=True,
help="This field holds the image used as image for the product variant, limited to 1024x1024px."),
@@ -23,12 +23,6 @@ class product_template(osv.osv):
_description = "Product Template"
_order = "name"
def _is_product_variant(self, cr, uid, ids, name, arg, context=None):
return self._is_product_variant_impl(cr, uid, ids, name, arg, context=context)
def _is_product_variant_impl(self, cr, uid, ids, name, arg, context=None):
return dict.fromkeys(ids, False)
def _product_template_price(self, cr, uid, ids, name, arg, context=None):
plobj = self.pool.get('product.pricelist')
res = {}
@@ -164,7 +158,6 @@ class product_template(osv.osv):
'active': fields.boolean('Active', help="If unchecked, it will allow you to hide the product without removing it."),
'color': fields.integer('Color Index'),
'is_product_variant': fields.function(_is_product_variant, type='boolean', string='Is a product variant'),
'attribute_line_ids': fields.one2many('product.attribute.line', 'product_tmpl_id', 'Product Attributes'),
'product_variant_ids': fields.one2many('product.product', 'product_tmpl_id', 'Products', required=True),
@@ -66,7 +66,6 @@
<kanban>
<field name="image_small"/>
<field name="lst_price"/>
<field name="is_product_variant"/>
<field name="product_variant_count"/>
<field name="product_variant_ids"/>
<field name="currency_id"/>
-1
View File
@@ -15,7 +15,6 @@
groups="product.group_product_variant"/>
</header>
<sheet>
<field name="is_product_variant" invisible="1"/>
<field name='product_variant_count' invisible='1'/>
<field name="id" invisible="True"/>
<div class="oe_button_box" name="button_box">