+ ${inv.partner_bank_id and inv.partner_bank_id.print_bank and inv.partner_bank_id.bank and inv.partner_bank_id.bank.name or ''} | ${inv.partner_bank_id and inv.partner_bank_id.print_bank and inv.partner_bank_id.bank and inv.partner_bank_id.bank.name or ''} | |
+ ${user.company_id.partner_id.name} | ${user.company_id.partner_id.name} | |
+ ${user.company_id.partner_id.address[0].street} ${user.company_id.partner_id.address[0].zip} ${user.company_id.partner_id.address[0].city} | ${inv.partner_bank_id.print_account and inv.partner_bank_id.bvr_number or ''} |
| ${user.company_id.partner_id.address[0].street} ${user.company_id.partner_id.address[0].zip} ${user.company_id.partner_id.address[0].city} | ${inv.partner_bank_id.print_account and inv.partner_bank_id.bvr_number or ''} |
| ${_space(_get_ref(inv))} |
+ | ${_space(('%.2f' % inv.amount_total)[:-3], 1)} | | ${ _space(('%.2f' % inv.amount_total)[-2:], 1)} | |
| | ${_space(('%.2f' % inv.amount_total)[:-3], 1)} | | ${ _space(('%.2f' % inv.amount_total)[-2:], 1)} | |
| |
+ | | |
+ | | |
+ | ${mod10r('01'+str('%.2f' % inv.amount_total).replace('.','').rjust(10,'0'))}>${_get_ref(inv)}+${inv.partner_bank_id.bvr_number.split('-')[0]+(str(inv.partner_bank_id.bvr_number.split('-')[1])).rjust(6,'0')+inv.partner_bank_id.bvr_number.split('-')[2]}> |
+
+ %endfor
+
+
\ No newline at end of file
diff --git a/addons/l10n_ch/report/bvr1.jpg b/addons/l10n_ch/report/bvr1.jpg
new file mode 100644
index 00000000000..3882f86776a
Binary files /dev/null and b/addons/l10n_ch/report/bvr1.jpg differ
diff --git a/addons/l10n_ch/report/bvr_invoice_report.rml b/addons/l10n_ch/report/bvr_invoice_report.rml
deleted file mode 100644
index ee69eedee2e..00000000000
--- a/addons/l10n_ch/report/bvr_invoice_report.rml
+++ /dev/null
@@ -1,381 +0,0 @@
-
-
+
+ | ${inv.partner_id.title or ''|entity} ${inv.partner_id.name |entity} |
+ | ${inv.address_invoice_id.street or ''|entity} |
+ | ${inv.address_invoice_id.street2 or ''|entity} |
+ | ${inv.address_invoice_id.zip or ''|entity} ${inv.address_invoice_id.city or ''|entity} |
+ %if inv.address_invoice_id.country_id :
+ | ${inv.address_invoice_id.country_id.name or ''|entity} |
+ %endif
+ %if inv.address_invoice_id.phone :
+ | ${_("Tel")}: ${inv.address_invoice_id.phone|entity} |
+ %endif
+ %if inv.address_invoice_id.fax :
+ | ${_("Fax")}: ${inv.address_invoice_id.fax|entity} |
+ %endif
+ %if inv.address_invoice_id.email :
+ | ${_("E-mail")}: ${inv.address_invoice_id.email|entity} |
+ %endif
+ %if inv.partner_id.vat :
+ | ${_("VAT")}: ${inv.partner_id.vat|entity} |
+ %endif
+
+
+ %if inv.type == 'out_invoice' :
+
${_("Invoice")} ${inv.number or ''|entity}
+ %elif inv.type == 'in_invoice' :
+
${_("Supplier Invoice")} ${inv.number or ''|entity}
+ %elif inv.type == 'out_refund' :
+
${_("Refund")} ${inv.number or ''|entity}
+ %elif inv.type == 'in_refund' :
+
${_("Supplier Refund")} ${inv.number or ''|entity}
+ %endif
+
+
+
+ | ${_("Document")} | ${_("Invoice Date")} | ${_("Partner Ref.")} |
+ | ${inv.name} | ${formatLang(inv.date_invoice, date=True)|entity} | |
+
+
+
+ | ${_("Description")} | ${_("Taxes")} | ${_("QTY")} | ${_("Unit Price")} | ${_("Disc.(%)")} | ${_("Price")} |
+ %for line in inv.invoice_line :
+
+ | ${line.name|entity} | ${ ', '.join([ tax.name or '' for tax in line.invoice_line_tax_id ])|entity} | ${line.quantity} | ${formatLang(line.price_unit)} | ${line.discount or 0.00} | ${formatLang(line.price_subtotal)} |
+ %if line.note :
+ ${line.note |entity} |
+ %endif
+ %endfor
+ | | | | Net Total: | ${formatLang(inv.amount_untaxed)} |
+ | | | | Taxes: | ${formatLang(inv.amount_tax)} |
+ | | | | Total: | ${formatLang(inv.amount_total)} |
+
+
+
+
+ | Tax | ${_("Base")} | ${_("Amount")} |
+ %if inv.tax_line :
+ %for t in inv.tax_line :
+
+ | ${ t.name|entity } |
+ ${ t.base|entity} |
+ ${ formatLang(t.amount) } |
+
+ %endfor
+ %endif
+
+ |
+ ${_("Total")} |
+ ${ formatLang(inv.amount_tax) } |
+
+
+
+ %endfor
+
+
\ No newline at end of file
diff --git a/addons/l10n_ch/report/report_webkit_html.py b/addons/l10n_ch/report/report_webkit_html.py
new file mode 100644
index 00000000000..ed7d4bbf60c
--- /dev/null
+++ b/addons/l10n_ch/report/report_webkit_html.py
@@ -0,0 +1,265 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# Author: Nicolas Bessi. Copyright Camptocamp SA
+# Donors: Hasa Sàrl, Open Net Sàrl and Prisme Solutions Informatique SA
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see