From 47dab5031ed30952745db2b2a15be7faf0425f14 Mon Sep 17 00:00:00 2001 From: Naresh Choksy Date: Fri, 22 May 2009 14:20:01 +0530 Subject: [PATCH] bugfixes:invoice reports ref(gpa) bzr revid: nch@tinyerp.com-20090522085001-somn2q42sb1ea4m4 --- addons/account/report/invoice.rml | 8 +-- addons/account_invoice_layout/i18n/de_DE.po | 26 +++++++++ .../report/report_account_invoice_layout.rml | 54 +++++++++++-------- .../report/special_message_invoice.py | 14 ++--- .../report/special_message_invoice.rml | 34 ++++++------ 5 files changed, 87 insertions(+), 49 deletions(-) diff --git a/addons/account/report/invoice.rml b/addons/account/report/invoice.rml index 19a02969dc7..f3acb1c3a54 100644 --- a/addons/account/report/invoice.rml +++ b/addons/account/report/invoice.rml @@ -296,7 +296,7 @@ - + Description @@ -465,7 +465,7 @@ - + Tax @@ -486,10 +486,10 @@ [[ repeatIn(o.tax_line,'t') ]] - + - [[ lt.description and lt.description + ' - ' + t.name or t.name ]] + [[ t.name ]] [[ formatLang(t.base) ]] diff --git a/addons/account_invoice_layout/i18n/de_DE.po b/addons/account_invoice_layout/i18n/de_DE.po index c7bac898f73..72f960dfa32 100644 --- a/addons/account_invoice_layout/i18n/de_DE.po +++ b/addons/account_invoice_layout/i18n/de_DE.po @@ -22,6 +22,7 @@ msgstr "Zwischensumme" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Invoice Date:" msgstr "Rechnungsdatum:" @@ -43,6 +44,7 @@ msgstr "Rechungen mit Layout und Nachricht" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Disc. (%)" msgstr "Rabatt (%)" @@ -63,6 +65,7 @@ msgstr "Diese Mitteilung wird am Ende des Rechnungsformulars angezeigt." #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Unit Price" msgstr "Preis pro Einheit" @@ -78,6 +81,7 @@ msgstr "Zeige alle Meldungen an" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "PRO-FORMA" msgstr "PRO-FORMA" @@ -98,11 +102,13 @@ msgstr "Sende Nachricht" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Customer Ref:" msgstr "Kundenreferenz:" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Description" msgstr "Beschreibung" @@ -118,16 +124,19 @@ msgstr "Typ" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Price" msgstr "Preis" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Canceled Invoice" msgstr "Abgebrochene Rechnung" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Taxes:" msgstr "Steuern:" @@ -143,11 +152,13 @@ msgstr "Speichere Nachricht" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Base" msgstr "Basis" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Fax :" msgstr "Fax :" @@ -163,6 +174,7 @@ msgstr "Schreibe eine Benachrichtigung." #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Tel. :" msgstr "Tel. :" @@ -178,6 +190,7 @@ msgstr "Seitenwechsel" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Document:" msgstr "" @@ -203,21 +216,25 @@ msgstr "Rechungen mit Layout" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Amount" msgstr "Betrag" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Total (excl. taxes):" msgstr "Gesamtsumme (excl. Steuern):" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Taxes" msgstr "Steuern" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Draft Invoice" msgstr "Rechnung Entwurf" @@ -228,16 +245,19 @@ msgstr "Sequenz Nummer" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Quantity" msgstr "Menge" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Refund" msgstr "Gutschrift" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "VAT :" msgstr "MWSt :" @@ -248,21 +268,25 @@ msgstr "Trennlinie" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Supplier Invoice" msgstr "Lieferantenrechnung" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Tax" msgstr "Steuer" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "(incl. taxes):" msgstr "(inkl. Steuer)" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Invoice" msgstr "Rechnung" @@ -273,6 +297,7 @@ msgstr "Abbruch" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Supplier Refund" msgstr "Lieferanten Gutschrift" @@ -283,6 +308,7 @@ msgstr "Nachricht" #. module: account_invoice_layout #: rml:account.invoice.layout:0 +#: rml:notify_account.invoice:0 msgid "Total" msgstr "Gesamt" diff --git a/addons/account_invoice_layout/report/report_account_invoice_layout.rml b/addons/account_invoice_layout/report/report_account_invoice_layout.rml index 1c020b6e862..f9166f00104 100644 --- a/addons/account_invoice_layout/report/report_account_invoice_layout.rml +++ b/addons/account_invoice_layout/report/report_account_invoice_layout.rml @@ -17,7 +17,6 @@ - @@ -46,6 +45,7 @@ + @@ -61,10 +61,12 @@ - + + + @@ -73,14 +75,15 @@ - + - + + @@ -130,19 +133,20 @@ -Document: -[[o.name]] +Document:[[ o.name ]] -Invoice Date: -[[o.date_invoice]] +Invoice Date: [[ formatLang(o.date_invoice,date=True) ]] Customer Ref: [[ o.address_invoice_id.partner_id.ref or '/' ]] - + + + + Description @@ -166,19 +170,22 @@
[[ repeatIn(invoice_lines(o), 'a') ]] - + [[ a['type']=='text' and removeParentNode('blockTable')]] - [[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['name'] ]] + [[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['name'] ]] - [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['tax_types'] ]] + [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['tax_types'] ]] - [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['quantity'] ]][[ a['uos'] ]] + [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['quantity'] ]] + + + [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['uos'] ]] @@ -187,10 +194,13 @@ [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_unit'] ]] - [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['discount'] ]] + [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['discount'] ]] - [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_subtotal'] ]][[ a['currency'] ]] + [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_subtotal'] ]] + + + [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['currency'] ]] @@ -239,10 +249,10 @@
- + - + Tax @@ -256,8 +266,7 @@ - -[[ repeatIn(o.tax_line,'t') ]] [[ t.name ]] +[[ repeatIn(o.tax_line,'t') ]] [[ t.name ]] [[ '%.2f' % t.base ]] @@ -272,7 +281,7 @@ -Total (excl. taxes): +Total (excl. taxes): [[ '%.2f' % o.amount_untaxed ]] [[o.currency_id.code ]] @@ -280,7 +289,7 @@ -Taxes: +Taxes: [[ '%.2f' % o.amount_tax ]] [[o.currency_id.code ]] @@ -303,5 +312,4 @@ [[ format(o.comment) or '' ]] [[ format(o.payment_term and o.payment_term.note) or '' ]] - - + \ No newline at end of file diff --git a/addons/account_invoice_layout/report/special_message_invoice.py b/addons/account_invoice_layout/report/special_message_invoice.py index b408c20b309..38fe8739142 100644 --- a/addons/account_invoice_layout/report/special_message_invoice.py +++ b/addons/account_invoice_layout/report/special_message_invoice.py @@ -90,7 +90,7 @@ class account_invoice_with_message(report_sxw.rml_parse): if entry.uos_id.id==False: res['uos']='' else: - uos_name = self.pool.get('product.uom').read(self.cr,self.uid,entry.uos_id.id,['name']) + uos_name = self.pool.get('product.uom').read(self.cr,self.uid,entry.uos_id.id,['name'],self.context.copy()) res['uos']=uos_name['name'] else: @@ -132,13 +132,13 @@ class account_invoice_with_message(report_sxw.rml_parse): res['price_subtotal']='' res['currency']='' elif entry.state=='line': - res['quantity']='____________' - res['price_unit']='______________' - res['discount']='____________' - res['tax_types']='_________________' + res['quantity']='___________________' + res['price_unit']='______________________' + res['discount']='____________________________________' + res['tax_types']='_____________________' res['uos']='_____' - res['name']='_____________________________________________' - res['price_subtotal']='_____________________' + res['name']='______________________________________' + res['price_subtotal']='___________' res['currency']='_' elif entry.state=='break': res['type']=entry.state diff --git a/addons/account_invoice_layout/report/special_message_invoice.rml b/addons/account_invoice_layout/report/special_message_invoice.rml index 3e0c75b68b7..4878163a1b8 100644 --- a/addons/account_invoice_layout/report/special_message_invoice.rml +++ b/addons/account_invoice_layout/report/special_message_invoice.rml @@ -17,7 +17,6 @@ - @@ -72,6 +71,8 @@ + + @@ -81,6 +82,7 @@ + @@ -130,19 +132,17 @@ -Document: -[[o.name]] +Document:[[o.name]] -Invoice Date: -[[o.date_invoice]] +Invoice Date: [[ formatLang(o.date_invoice,date=True) ]] Customer Ref: [[ o.address_invoice_id.partner_id.ref or '/' ]] - + Description @@ -166,19 +166,22 @@
[[ repeatIn(invoice_lines(o), 'a') ]] - + [[ a['type']=='text' and removeParentNode('blockTable')]] - [[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['name'] ]] + [[ (a['type']=='title' or a['type']=='subtotal') and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['name'] ]] - [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['tax_types'] ]] + [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['tax_types'] ]] - [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['quantity'] ]][[ a['uos'] ]] + [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['quantity'] ]] + + + [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['uos'] ]] @@ -187,10 +190,13 @@ [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_unit'] ]] - [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['discount'] ]] + [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['discount'] ]] - [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_subtotal'] ]][[ a['currency'] ]] + [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['price_subtotal'] ]] + + + [[ a['type']=='subtotal' and ( setTag('para','para',{'fontName':'Times-bold'})) ]][[ a['currency'] ]] @@ -256,8 +262,7 @@ - -[[ repeatIn(o.tax_line,'t') ]] [[ t.name ]] +[[ repeatIn(o.tax_line,'t') ]] [[ t.name ]] [[ '%.2f' % t.base ]] @@ -308,4 +313,3 @@
-