[FIX] sale, account: propagate the sequence from the sale order line to the invoice line

bzr revid: qdp-launchpad@openerp.com-20121008121745-2s1cavfy891hbf7s
This commit is contained in:
Quentin (OpenERP) 2012-10-08 14:17:45 +02:00
parent 46c83756da
commit 5b6ae3b88e
2 changed files with 2 additions and 0 deletions

View File

@ -1360,6 +1360,7 @@ class account_invoice_line(osv.osv):
_columns = {
'name': fields.text('Description', required=True),
'origin': fields.char('Source', size=256, help="Reference of the document that produced this invoice."),
'sequence': fields.integer('Sequence', help="Gives the sequence of this line when displaying the invoice."),
'invoice_id': fields.many2one('account.invoice', 'Invoice Reference', ondelete='cascade', select=True),
'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null'),
'product_id': fields.many2one('product.product', 'Product', ondelete='set null'),

View File

@ -793,6 +793,7 @@ class sale_order_line(osv.osv):
_('There is no Fiscal Position defined or Income category account defined for default properties of Product categories.'))
res = {
'name': line.name,
'sequence': line.sequence,
'origin': line.order_id.name,
'account_id': account_id,
'price_unit': pu,