[FIX] website_sale: wrong line details in pdf invoice, the invoice line name does not contains the product name
This commit is contained in:
parent
8da53f9dec
commit
72c418e6dd
|
@ -42,6 +42,6 @@ class sale_order(osv.Model):
|
||||||
values['event_id'] = ticket.event_id.id
|
values['event_id'] = ticket.event_id.id
|
||||||
values['event_ticket_id'] = ticket.id
|
values['event_ticket_id'] = ticket.id
|
||||||
values['price_unit'] = ticket.price
|
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
|
return values
|
||||||
|
|
|
@ -59,7 +59,7 @@ class sale_order(osv.Model):
|
||||||
values['name'] = line.name
|
values['name'] = line.name
|
||||||
else:
|
else:
|
||||||
product = self.pool.get('product.product').browse(cr, uid, product_id, context=context)
|
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['product_id'] = product_id
|
||||||
values['order_id'] = order_id
|
values['order_id'] = order_id
|
||||||
|
|
|
@ -677,10 +677,10 @@
|
||||||
<td t-if="line.product_id.product_tmpl_id">
|
<td t-if="line.product_id.product_tmpl_id">
|
||||||
<div>
|
<div>
|
||||||
<a t-attf-href="/shop/product/#{ slug(line.product_id.product_tmpl_id) }">
|
<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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-muted" t-field="line.name"/>
|
<div class="text-muted" t-esc="'\n'.join(line.name.splitlines()[1:])"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center" name="price">
|
<td class="text-center" name="price">
|
||||||
<t t-if="(compute_currency(line.product_id.lst_price) - line.price_unit) > 1">
|
<t t-if="(compute_currency(line.product_id.lst_price) - line.price_unit) > 1">
|
||||||
|
|
Loading…
Reference in New Issue