[IMP]removed unnecessary code.

bzr revid: dka@tinyerp.com-20140117082647-6aoiouidtl06r3vk
This commit is contained in:
Darshan Kalola (OpenERP) 2014-01-17 13:56:47 +05:30
parent effa6b282e
commit 86ec8bd39a
3 changed files with 10 additions and 13 deletions

View File

@ -897,8 +897,6 @@ class product_product(osv.osv):
context = {}
if context.get('search_default_categ_id'):
args.append((('categ_id', 'child_of', context['search_default_categ_id'])))
if context.get('search_variants'):
args.append(('variants', '!=', ''))
return super(product_product, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)

View File

@ -70,7 +70,7 @@
</div>
<h1>
<field name="name" class="oe_inline"/>
<field name="product_tmpl_id" groups="product.group_product_variant" on_change="onchange_product_tmpl_id(product_tmpl_id,lst_price,price_margin,price_extra)" class="oe_inline" context="{'search_variants':1}"/>
<field name="product_tmpl_id" groups="product.group_product_variant" on_change="onchange_product_tmpl_id(product_tmpl_id,lst_price,price_margin,price_extra)" class="oe_inline"/>
<span attrs="{'invisible':[('variants','=',False)]}" groups="product.group_product_variant"> - </span>
<field name="variants" placeholder="Variant Name" groups="product.group_product_variant" class="oe_inline" readonly="0"/>
</h1>
@ -721,7 +721,7 @@
<field name="arch" type="xml">
<form string="Product Variant" version="7.0">
<group col="4">
<field name="product_tmpl_id" context="{'search_variants': 1}"/>
<field name="product_tmpl_id"/>
<field name="active"/>
<field name="variants" required="1"/>
<field name="default_code"/>
@ -959,7 +959,6 @@
<field name="res_model">product.template</field>
<field name="view_mode">kanban,tree,form</field>
<field name="view_type">form</field>
<field name="context">{'search_variants': 1}</field>
<field name="view_id" ref="product_template_kanban_view"/>
</record>

View File

@ -329,15 +329,15 @@
</label>
</t>
<div class="product_price mt16" t-if="product.product_variant_ids">
<t t-if="len(product.product_variant_ids) &lt; 2 and product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
<span class="text-danger" style="text-decoration: line-through;"
t-field="product.product_variant_ids[0].lst_price"
t-field-options='{
"widget": "monetary",
"display_currency": "website.pricelist_id.currency_id"
}'/><br/>
</t>
<h4>
<t t-if="len(product.product_variant_ids) &lt; 2 and product.product_variant_ids[0].lst_price != product.product_variant_ids[0].price">
<span class="text-danger" style="text-decoration: line-through;"
t-field="product.product_variant_ids[0].lst_price"
t-field-options='{
"widget": "monetary",
"display_currency": "website.pricelist_id.currency_id"
}'/><br/>
</t>
<b class="oe_price"
t-field="product.product_variant_ids[0].price"
t-field-options='{