From db6418f363dad285fb1dec74044d7c166503389b Mon Sep 17 00:00:00 2001 From: ced <> Date: Mon, 5 Feb 2007 20:26:41 +0000 Subject: [PATCH] Add invoice number to analytic line bzr revid: ced-648a0b3b41f85d7e1c6cf1a6f948c649c703b8ed --- addons/account/invoice.py | 2 +- addons/account/report/invoice.rml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 97b135f6782..cb43d12c535 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -273,7 +273,7 @@ class account_invoice(osv.osv): if inv['project_id']: for il in iml: il['analytic_lines'] = [(0,0, { - 'name': il['name'], + 'name': inv['number']+' - '+il['name'], 'date': time.strftime('%Y-%m-%d'), 'account_id': inv['project_id'], 'unit_amount': il['quantity'], diff --git a/addons/account/report/invoice.rml b/addons/account/report/invoice.rml index fd7330e194b..8e42966d38b 100644 --- a/addons/account/report/invoice.rml +++ b/addons/account/report/invoice.rml @@ -179,7 +179,7 @@ [[ '%.2f' % l.price_unit ]] - [[ '%.2f' % (l.discount or 0.0) ]] + [[ l.discount and '%.2f' % (l.discount) or '' ]] [[ '%.2f' %l.price_subtotal ]] [[o.currency_id.code ]]