[FIX] website_sale: wrong line details in pdf invoice, the invoice line name does not contains the product name

This commit is contained in:
Christophe Matthieu 2015-02-13 14:11:40 +01:00
parent 8da53f9dec
commit 72c418e6dd
3 changed files with 4 additions and 4 deletions

View File

@ -42,6 +42,6 @@ class sale_order(osv.Model):
values['event_id'] = ticket.event_id.id
values['event_ticket_id'] = ticket.id
values['price_unit'] = ticket.price
values['name'] = "%s: %s" % (ticket.event_id.name, ticket.name)
values['name'] = "%s\n%s" % (ticket.event_id.display_name, ticket.name)
return values

View File

@ -59,7 +59,7 @@ class sale_order(osv.Model):
values['name'] = line.name
else:
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
values['name'] = product.description_sale or product.name
values['name'] = "%s\n%s" % (product.display_name, product.description_sale)
values['product_id'] = product_id
values['order_id'] = order_id

View File

@ -677,10 +677,10 @@
<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-esc="line.product_id.name_get()[0][1]"/>
<strong t-esc="line.product_id.display_name"/>
</a>
</div>
<div class="text-muted" t-field="line.name"/>
<div class="text-muted" t-esc="'\n'.join(line.name.splitlines()[1:])"/>
</td>
<td class="text-center" name="price">
<t t-if="(compute_currency(line.product_id.lst_price) - line.price_unit) &gt; 1">