[FIX] website_sale: display the line name in my cart

bzr revid: chm@openerp.com-20140129095900-iux7i0flrtg1qj2t
This commit is contained in:
Christophe Matthieu 2014-01-29 10:59:00 +01:00
parent 1486e52927
commit 911d95eabd
2 changed files with 4 additions and 2 deletions

View File

@ -112,6 +112,9 @@ class Website(orm.Model):
values['product_id'] = product_id
values['order_id'] = order.id
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
values['name'] = "%s: %s" % (product.name, product.variants) if product.variants else product.name
if order_line_id:
order_line_obj.write(cr, SUPERUSER_ID, order_line_ids, values, context=context)
else:

View File

@ -487,8 +487,7 @@
<td t-if="line.product_id.product_tmpl_id">
<div>
<a t-attf-href="/shop/product/#{ slug(line.product_id.product_tmpl_id) }/">
<strong t-field="line.product_id.name"/>
<t t-if="line.product_id.variants">(<t t-esc="line.product_id.variants"/>)</t>
<strong t-field="line.name"/>
</a>
</div>
<div class="text-muted" t-field="line.product_id.description_sale"/>