[FIX] Keep the layout between sale order and invoice
bzr revid: sle@openerp.com-20140404155148-l8btjfhp640r0gew
This commit is contained in:
@@ -135,3 +135,12 @@ class SaleOrderLine(osv.Model):
|
||||
# Store is intentionally set in order to keep the "historic" order.
|
||||
}
|
||||
_order = 'order_id, categ_sequence, sequence, id'
|
||||
|
||||
def _prepare_order_line_invoice_line(self, cr, uid, line, account_id=False, context=None):
|
||||
"""Save the layout when converting to an invoice line."""
|
||||
invoice_vals = super(SaleOrderLine, self)._prepare_order_line_invoice_line(cr, uid, line, account_id=account_id, context=context)
|
||||
if line.sale_layout_cat_id:
|
||||
invoice_vals['sale_layout_cat_id'] = line.sale_layout_cat_id.id
|
||||
if line.categ_sequence:
|
||||
invoice_vals['categ_sequence'] = line.categ_sequence
|
||||
return invoice_vals
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<!-- Category name -->
|
||||
<t t-if="p['category']">
|
||||
<tr>
|
||||
<td colspan="100" class="active" style="font-weight: bold; border-bottom: 1px solid black;">>
|
||||
<td colspan="100" class="active" style="font-weight: bold; border-bottom: 1px solid black;">&bull;
|
||||
<t t-if="p['category'].name">
|
||||
<t t-esc="p['category'].name"></t>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user