[FIX] Hr_timesheet_invoice : Corrected order or notes and uom i18n for invoice of analytic entries
bzr revid: jvo@tinyerp.com-20100701160516-0q042murztf74dwt
This commit is contained in:
parent
2aed96496c
commit
f46f7a770b
|
@ -109,7 +109,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
|
|||
last_invoice = self.pool.get('account.invoice').create(cr, uid, curr_invoice)
|
||||
invoices.append(last_invoice)
|
||||
|
||||
context2=context.copy()
|
||||
context2 = context.copy()
|
||||
context2['lang'] = partner.lang
|
||||
cr.execute("SELECT product_id, to_invoice, sum(unit_amount) " \
|
||||
"FROM account_analytic_line as line " \
|
||||
|
@ -158,7 +158,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
|
|||
#
|
||||
# Compute for lines
|
||||
#
|
||||
cr.execute("SELECT * FROM account_analytic_line WHERE account_id = %s and id IN %s AND product_id=%s and to_invoice=%s", (account.id, tuple(data['ids']), product_id, factor_id))
|
||||
cr.execute("SELECT * FROM account_analytic_line WHERE account_id = %s and id IN %s AND product_id=%s and to_invoice=%s ORDER BY account_analytic_line.date", (account.id, tuple(data['ids']), product_id, factor_id))
|
||||
|
||||
line_ids = cr.dictfetchall()
|
||||
note = []
|
||||
|
@ -169,7 +169,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
|
|||
details.append(line['date'])
|
||||
if data['time']:
|
||||
if line['product_uom_id']:
|
||||
details.append("%s %s" % (line['unit_amount'], self.pool.get('product.uom').browse(cr, uid, [line['product_uom_id']])[0].name))
|
||||
details.append("%s %s" % (line['unit_amount'], self.pool.get('product.uom').browse(cr, uid, [line['product_uom_id']],context2)[0].name))
|
||||
else:
|
||||
details.append("%s" % (line['unit_amount'], ))
|
||||
if data['name']:
|
||||
|
|
Loading…
Reference in New Issue