From 8e5b8112d63d63957ba35fe589ce73276d5b4348 Mon Sep 17 00:00:00 2001 From: Kevin Graveman Date: Thu, 27 Nov 2014 16:22:29 +0100 Subject: [PATCH 1/7] [ADD]Initial commit, including workaround for sum_period field not writing in v8 --- l10n_nl_tax_declaration_reporting/__init__.py | 25 ++ .../__openerp__.py | 53 +++ .../i18n/en_US.po | 314 ++++++++++++++ .../i18n/l10n_nl_addon.pot | 314 ++++++++++++++ l10n_nl_tax_declaration_reporting/i18n/nl.po | 314 ++++++++++++++ .../i18n/sr@latin.po | 28 ++ .../l10n_nl_report.xml | 16 + .../report/__init__.py | 25 ++ .../report/account_tax_report.py | 395 ++++++++++++++++++ .../report/account_tax_report.rml | 261 ++++++++++++ .../report/account_tax_report.sxw | Bin 0 -> 15966 bytes .../report/common_report_header.py | 157 +++++++ .../wizard/__init__.py | 25 ++ .../wizard/account_vat.py | 78 ++++ .../wizard/account_vat_view_nl.xml | 48 +++ 15 files changed, 2053 insertions(+) create mode 100644 l10n_nl_tax_declaration_reporting/__init__.py create mode 100644 l10n_nl_tax_declaration_reporting/__openerp__.py create mode 100644 l10n_nl_tax_declaration_reporting/i18n/en_US.po create mode 100644 l10n_nl_tax_declaration_reporting/i18n/l10n_nl_addon.pot create mode 100644 l10n_nl_tax_declaration_reporting/i18n/nl.po create mode 100644 l10n_nl_tax_declaration_reporting/i18n/sr@latin.po create mode 100644 l10n_nl_tax_declaration_reporting/l10n_nl_report.xml create mode 100644 l10n_nl_tax_declaration_reporting/report/__init__.py create mode 100644 l10n_nl_tax_declaration_reporting/report/account_tax_report.py create mode 100644 l10n_nl_tax_declaration_reporting/report/account_tax_report.rml create mode 100644 l10n_nl_tax_declaration_reporting/report/account_tax_report.sxw create mode 100644 l10n_nl_tax_declaration_reporting/report/common_report_header.py create mode 100644 l10n_nl_tax_declaration_reporting/wizard/__init__.py create mode 100644 l10n_nl_tax_declaration_reporting/wizard/account_vat.py create mode 100644 l10n_nl_tax_declaration_reporting/wizard/account_vat_view_nl.xml diff --git a/l10n_nl_tax_declaration_reporting/__init__.py b/l10n_nl_tax_declaration_reporting/__init__.py new file mode 100644 index 000000000..8f9e97653 --- /dev/null +++ b/l10n_nl_tax_declaration_reporting/__init__.py @@ -0,0 +1,25 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Dutch accounting taxes addon +# Copyright (C) 2014 ONESTEiN BV (). +# +# 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 . +# +############################################################################## + +import report +import wizard + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/l10n_nl_tax_declaration_reporting/__openerp__.py b/l10n_nl_tax_declaration_reporting/__openerp__.py new file mode 100644 index 000000000..449b4e373 --- /dev/null +++ b/l10n_nl_tax_declaration_reporting/__openerp__.py @@ -0,0 +1,53 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Dutch accounting taxes addon +# Copyright (C) 2014 ONESTEiN BV (). +# +# 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 . +# +############################################################################## + +{ + 'name': 'Netherlands - Accounting taxes addon', + 'version': '1.0', + 'category': 'Localization/Account Charts', + 'sequence': 1, + 'description': """ +This module provides you with the Tax Statement in the Dutch format. In the report you will find the taxes charged to customers and taxes that suppliers charge to you. The layout this module provides will seem very familiar to everyone wanting to declare taxes in The Netherlands. + +The standard Tax Declaration report is not replaced by this module, a new report with the Dutch layout is added to the menu Reporting > Generic Reporting > Taxes. +For more information, please contact ONESTEiN at: Support@onestein.nl + +Deze module biedt u de BTW aangifte in Nederlands formaat. In het rapport staat de BTW berekend aan klanten, en de btw die leveranciers aan u berekenen. Het rapport is met deze indeling zeer herkenbaar voor iedereen die een belasting aangifte wilt doen. + +Dit rapport verwijdert niet de standaard, maar wordt toegevoegd in het menu Rapportages > Algemene rapporten > Belastingen. +Voor informatie neem contact op met ONESTEiN: Support@onestein.nl + """, + 'author': 'ONESTEiN BV', + 'website': 'http://www.onestein.nl', + 'depends': ['account', + 'base_vat', + 'base_iban', + 'account_chart', + 'l10n_nl', + ], + 'data': [ + "l10n_nl_report.xml", + "wizard/account_vat_view_nl.xml", + ], + 'demo': [], + 'installable': True, +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/l10n_nl_tax_declaration_reporting/i18n/en_US.po b/l10n_nl_tax_declaration_reporting/i18n/en_US.po new file mode 100644 index 000000000..950f2ccba --- /dev/null +++ b/l10n_nl_tax_declaration_reporting/i18n/en_US.po @@ -0,0 +1,314 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * l10n_nl_tax_declaration_reporting +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-11-10 10:41+0000\n" +"PO-Revision-Date: 2014-11-10 10:41+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,chart_tax_id:0 +#: report:account.vat.declaration.nl:0 +msgid "Chart of Tax" +msgstr "Chart of Tax" + +#. module: l10n_nl_tax_declaration_reporting +#: model:ir.model,name:l10n_nl_tax_declaration_reporting.model_account_vat_declaration_nl +msgid "Account Vat Declaration" +msgstr "Account Vat Declaration" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "1b Deliveries/services taxed with 6%" +msgstr "1b Deliveries/services taxed with 6%" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "VAT declaration" +msgstr "VAT declaration" + +#. module: l10n_nl_tax_declaration_reporting +#: model:ir.ui.menu,name:l10n_nl_tax_declaration_reporting.menu_account_vat_declaration_nl +msgid "NL VAT Declaration" +msgstr "NL VAT Declaration" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "€" +msgstr "€" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "3b Deliveries to/services in countries in the EU" +msgstr "3b Deliveries to/services in countries in the EU" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Realignment scheme (domestic)" +msgstr "Realignment scheme (domestic)" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Performance abroad" +msgstr "Performance abroad" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Domestic Performance" +msgstr "Domestic Performance" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Turnover tax" +msgstr "Turnover tax" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,display_detail:0 +msgid "Display Detail" +msgstr "Display Detail" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,company_id:0 +msgid "Company" +msgstr "Company" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "4a Deliveries/services from countries outside the EU" +msgstr "4a Deliveries/services from countries outside the EU" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "2a Deliveries/services where the turnover tax has been transferred to you" +msgstr "2a Deliveries/services where the turnover tax has been transferred to you" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "5b Pre-tax" +msgstr "5b Pre-tax" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "3c Installation/distance sales within the EU" +msgstr "3c Installation/distance sales within the EU" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +msgid "Taxes Report" +msgstr "Taxes Report" + +#. module: l10n_nl_tax_declaration_reporting +#: help:account.vat.declaration.nl,fiscalyear_id:0 +msgid "Keep empty for all open fiscal year" +msgstr "Keep empty for all open fiscal year" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,filter:0 +msgid "Date" +msgstr "Date" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,chart_account_id:0 +msgid "Chart of Account" +msgstr "Chart of Account" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,journal_ids:0 +msgid "Journals" +msgstr "Journals" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "1d Private use" +msgstr "1d Private use" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +msgid "Print Tax Statement" +msgstr "Print Tax Statement" + +#. module: l10n_nl_tax_declaration_reporting +#: help:account.vat.declaration.nl,chart_account_id:0 +msgid "Select Charts of Accounts" +msgstr "Select Charts of Accounts" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,date_to:0 +msgid "End Date" +msgstr "End Date" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,period_from:0 +#: report:account.vat.declaration.nl:0 +msgid "Start Period" +msgstr "Start Period" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,target_move:0 +#: code:addons/l10n_nl_tax_declaration_reporting/report/common_report_header.py:68 +#, python-format +msgid "All Posted Entries" +msgstr "All Posted Entries" + +#. module: l10n_nl_tax_declaration_reporting +#: model:ir.actions.act_window,name:l10n_nl_tax_declaration_reporting.action_account_vat_declaration_nl +msgid "Account Tax Declaration" +msgstr "Account Tax Declaration" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "1c Deliveries/services taxed with other rates, except 0%" +msgstr "1c Deliveries/services taxed with other rates, except 0%" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,period_to:0 +#: report:account.vat.declaration.nl:0 +msgid "End Period" +msgstr "End Period" + +#. module: l10n_nl_tax_declaration_reporting +#: code:addons/l10n_nl_tax_declaration_reporting/report/common_report_header.py:92 +#, python-format +msgid "Error!" +msgstr "Error!" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Amount" +msgstr "Amount" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Performance from abroad directed to you" +msgstr "Performance from abroad directed to you" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "3a Deliveries to countries outside the EU (export)" +msgstr "3a Deliveries to countries outside the EU (export)" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,filter:0 +msgid "No Filters" +msgstr "No Filters" + +#. module: l10n_nl_tax_declaration_reporting +#: code:addons/l10n_nl_tax_declaration_reporting/report/common_report_header.py:92 +#, python-format +msgid "Not implemented." +msgstr "Not implemented." + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "5a turnover tax due (sum of 1a up to and including 4b)" +msgstr "5a turnover tax due (sum of 1a up to and including 4b)" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +msgid "This menu prints a tax declaration based on invoices or payments. Select one or several periods of the fiscal year. The information required for a tax declaration is automatically generated by OpenERP from invoices (or payments, in some countries). This data is updated in real time. That’s very useful because it enables you to preview at any time the tax that you owe at the start and end of the month or quarter." +msgstr "This menu prints a tax declaration based on invoices or payments. Select one or several periods of the fiscal year. The information required for a tax declaration is automatically generated by OpenERP from invoices (or payments, in some countries). This data is updated in real time. That’s very useful because it enables you to preview at any time the tax that you owe at the start and end of the month or quarter." + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Pre-tax" +msgstr "Pre-tax" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "4b Deliveries/services of countries in the EU" +msgstr "4b Deliveries/services of countries in the EU" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "1a Deliveries/services taxed with 21%" +msgstr "1a Deliveries/services taxed with 21%" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,based_on:0 +msgid "Invoices" +msgstr "Invoices" + +#. module: l10n_nl_tax_declaration_reporting +#: model:ir.actions.report.xml,name:l10n_nl_tax_declaration_reporting.report_account_vat_declaration_nl +msgid "VAT Report NL" +msgstr "VAT Report NL" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,fiscalyear_id:0 +#: report:account.vat.declaration.nl:0 +msgid "Fiscal Year" +msgstr "Fiscal Year" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,target_move:0 +msgid "Target Moves" +msgstr "Target Moves" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "5c Subtotal to pay (+) or to reclaim (-)" +msgstr "5c Subtotal to pay (+) or to reclaim (-)" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,based_on:0 +msgid "Based on" +msgstr "Based on" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +#: selection:account.vat.declaration.nl,filter:0 +#: report:account.vat.declaration.nl:0 +msgid "Periods" +msgstr "Periods" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +msgid "Cancel" +msgstr "Cancel" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Based On" +msgstr "Based On" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,date_from:0 +msgid "Start Date" +msgstr "Start Date" + +#. module: l10n_nl_tax_declaration_reporting +#: help:account.vat.declaration.nl,chart_tax_id:0 +msgid "Select Charts of Taxes" +msgstr "Select Charts of Taxes" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,filter:0 +msgid "Filter by" +msgstr "Filter by" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +msgid "or" +msgstr "or" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,target_move:0 +#: code:addons/l10n_nl_tax_declaration_reporting/report/common_report_header.py:67 +#, python-format +msgid "All Entries" +msgstr "All Entries" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,based_on:0 +msgid "Payments" +msgstr "Payments" + diff --git a/l10n_nl_tax_declaration_reporting/i18n/l10n_nl_addon.pot b/l10n_nl_tax_declaration_reporting/i18n/l10n_nl_addon.pot new file mode 100644 index 000000000..957cf0f36 --- /dev/null +++ b/l10n_nl_tax_declaration_reporting/i18n/l10n_nl_addon.pot @@ -0,0 +1,314 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * l10n_nl_tax_declaration_reporting +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-11-10 10:37+0000\n" +"PO-Revision-Date: 2014-11-10 10:37+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,chart_tax_id:0 +#: report:report.account.vat.declaration.nl:0 +msgid "Chart of Tax" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: model:ir.model,name:l10n_nl_tax_declaration_reporting.model_account_vat_declaration_nl +msgid "Account Vat Declaration" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "1b Deliveries/services taxed with 6%" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "VAT declaration" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: model:ir.ui.menu,name:l10n_nl_tax_declaration_reporting.menu_account_vat_declaration_nl +msgid "NL VAT Declaration" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "€" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "3b Deliveries to/services in countries in the EU" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "Realignment scheme (domestic)" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "Performance abroad" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "Domestic Performance" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "Turnover tax" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,display_detail:0 +msgid "Display Detail" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,company_id:0 +msgid "Company" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "4a Deliveries/services from countries outside the EU" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "2a Deliveries/services where the turnover tax has been transferred to you" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "5b Pre-tax" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "3c Installation/distance sales within the EU" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +msgid "Taxes Report" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: help:account.vat.declaration.nl,fiscalyear_id:0 +msgid "Keep empty for all open fiscal year" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,filter:0 +msgid "Date" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,chart_account_id:0 +msgid "Chart of Account" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,journal_ids:0 +msgid "Journals" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "1d Private use" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +msgid "Print Tax Statement" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: help:account.vat.declaration.nl,chart_account_id:0 +msgid "Select Charts of Accounts" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,date_to:0 +msgid "End Date" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,period_from:0 +#: report:report.account.vat.declaration.nl:0 +msgid "Start Period" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,target_move:0 +#: code:addons/l10n_nl_tax_declaration_reporting/report/common_report_header.py:68 +#, python-format +msgid "All Posted Entries" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: model:ir.actions.act_window,name:l10n_nl_tax_declaration_reporting.action_account_vat_declaration_nl +msgid "Account Tax Declaration" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "1c Deliveries/services taxed with other rates, except 0%" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,period_to:0 +#: report:report.account.vat.declaration.nl:0 +msgid "End Period" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: code:addons/l10n_nl_tax_declaration_reporting/report/common_report_header.py:92 +#, python-format +msgid "Error!" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "Amount" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "Performance from abroad directed to you" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "3a Deliveries to countries outside the EU (export)" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,filter:0 +msgid "No Filters" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: code:addons/l10n_nl_tax_declaration_reporting/report/common_report_header.py:92 +#, python-format +msgid "Not implemented." +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "5a turnover tax due (sum of 1a up to and including 4b)" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +msgid "This menu prints a tax declaration based on invoices or payments. Select one or several periods of the fiscal year. The information required for a tax declaration is automatically generated by OpenERP from invoices (or payments, in some countries). This data is updated in real time. That’s very useful because it enables you to preview at any time the tax that you owe at the start and end of the month or quarter." +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "Pre-tax" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "4b Deliveries/services of countries in the EU" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "1a Deliveries/services taxed with 21%" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,based_on:0 +msgid "Invoices" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: model:ir.actions.report.xml,name:l10n_nl_tax_declaration_reporting.report_account_vat_declaration_nl +msgid "VAT Report NL" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,fiscalyear_id:0 +#: report:report.account.vat.declaration.nl:0 +msgid "Fiscal Year" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,target_move:0 +msgid "Target Moves" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "5c Subtotal to pay (+) or to reclaim (-)" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,based_on:0 +msgid "Based on" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +#: selection:account.vat.declaration.nl,filter:0 +#: report:report.account.vat.declaration.nl:0 +msgid "Periods" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +msgid "Cancel" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: report:report.account.vat.declaration.nl:0 +msgid "Based On" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,date_from:0 +msgid "Start Date" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: help:account.vat.declaration.nl,chart_tax_id:0 +msgid "Select Charts of Taxes" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,filter:0 +msgid "Filter by" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +msgid "or" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,target_move:0 +#: code:addons/l10n_nl_tax_declaration_reporting/report/common_report_header.py:67 +#, python-format +msgid "All Entries" +msgstr "" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,based_on:0 +msgid "Payments" +msgstr "" + diff --git a/l10n_nl_tax_declaration_reporting/i18n/nl.po b/l10n_nl_tax_declaration_reporting/i18n/nl.po new file mode 100644 index 000000000..b2af707e4 --- /dev/null +++ b/l10n_nl_tax_declaration_reporting/i18n/nl.po @@ -0,0 +1,314 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * l10n_nl_tax_declaration_reporting +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-11-10 09:48+0000\n" +"PO-Revision-Date: 2014-11-10 11:10+0100\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: \n" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,chart_tax_id:0 +#: report:account.vat.declaration.nl:0 +msgid "Chart of Tax" +msgstr "Belastingweergave" + +#. module: l10n_nl_tax_declaration_reporting +#: model:ir.model,name:l10n_nl_tax_declaration_reporting.model_account_vat_declaration_nl +msgid "Account Vat Declaration" +msgstr "Rekening belasting aangifte" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "1b Deliveries/services taxed with 6%" +msgstr "1b Leveringen/diensten belast met 6%" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "VAT declaration" +msgstr "BTW Aangifte" + +#. module: l10n_nl_tax_declaration_reporting +#: model:ir.ui.menu,name:l10n_nl_tax_declaration_reporting.menu_account_vat_declaration_nl +msgid "NL VAT Declaration" +msgstr "NL BTW Aangifte" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "€" +msgstr "€" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "3b Deliveries to/services in countries in the EU" +msgstr "3b Leveringen naar/diensten in landen binnen de EU" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Realignment scheme (domestic)" +msgstr "Verleggingsregelingen binnenland" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Performance abroad" +msgstr "Prestaties naar/in het buitenland" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Domestic Performance" +msgstr "Prestaties binnenland" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Turnover tax" +msgstr "Omzetbelasting" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,display_detail:0 +msgid "Display Detail" +msgstr "Details weergeven" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,company_id:0 +msgid "Company" +msgstr "Bedrijf" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "4a Deliveries/services from countries outside the EU" +msgstr "4a Leveringen/diensten uit landen buiten de EU" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "2a Deliveries/services where the turnover tax has been transferred to you" +msgstr "2a Leveringen/diensten waarbij de heffing van omzetbelasting naar u is verlegd" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "5b Pre-tax" +msgstr "5b Voorbelasting" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "3c Installation/distance sales within the EU" +msgstr "3c Installatie/afstandsverkopen binnen de EU" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +msgid "Taxes Report" +msgstr "BTW aangifte" + +#. module: l10n_nl_tax_declaration_reporting +#: help:account.vat.declaration.nl,fiscalyear_id:0 +msgid "Keep empty for all open fiscal year" +msgstr "Houd open voor alle fiscale jaren" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,filter:0 +msgid "Date" +msgstr "Datum" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,chart_account_id:0 +msgid "Chart of Account" +msgstr "Rekeningschema" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,journal_ids:0 +msgid "Journals" +msgstr "Dagboeken" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "1d Private use" +msgstr "1d Privé-gebruik" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +msgid "Print Tax Statement" +msgstr "Afdrukken belastingaangifte" + +#. module: l10n_nl_tax_declaration_reporting +#: help:account.vat.declaration.nl,chart_account_id:0 +msgid "Select Charts of Accounts" +msgstr "Rekeningschema kiezen" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,date_to:0 +msgid "End Date" +msgstr "Einddatum" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,period_from:0 +#: report:account.vat.declaration.nl:0 +msgid "Start Period" +msgstr "Beginperiode" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,target_move:0 +#: code:addons/l10n_nl_tax_declaration_reporting/report/common_report_header.py:68 +#, python-format +msgid "All Posted Entries" +msgstr "Alle mutaties" + +#. module: l10n_nl_tax_declaration_reporting +#: model:ir.actions.act_window,name:l10n_nl_tax_declaration_reporting.action_account_vat_declaration_nl +msgid "Account Tax Declaration" +msgstr "Belastingaangifte" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "1c Deliveries/services taxed with other rates, except 0%" +msgstr "1c Leveringen/diensten belast met overige tarieven behalve 0%" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,period_to:0 +#: report:account.vat.declaration.nl:0 +msgid "End Period" +msgstr "Eind periode" + +#. module: l10n_nl_tax_declaration_reporting +#: code:addons/l10n_nl_tax_declaration_reporting/report/common_report_header.py:92 +#, python-format +msgid "Error!" +msgstr "Onbekende fout!" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Amount" +msgstr "Bedrag" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Performance from abroad directed to you" +msgstr "Prestaties uit het buitenland aan u verricht" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "3a Deliveries to countries outside the EU (export)" +msgstr "3a Leveringen naar landen buiten de EU (uitvoer)" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,filter:0 +msgid "No Filters" +msgstr "Geen filters" + +#. module: l10n_nl_tax_declaration_reporting +#: code:addons/l10n_nl_tax_declaration_reporting/report/common_report_header.py:92 +#, python-format +msgid "Not implemented." +msgstr "Niet geïmplementeerd." + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "5a turnover tax due (sum of 1a up to and including 4b)" +msgstr "5a Verschuldigde omzetbelasting (som rubrieken 1a t/m 4b)" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +msgid "This menu prints a tax declaration based on invoices or payments. Select one or several periods of the fiscal year. The information required for a tax declaration is automatically generated by OpenERP from invoices (or payments, in some countries). This data is updated in real time. That’s very useful because it enables you to preview at any time the tax that you owe at the start and end of the month or quarter." +msgstr "Dit menu drukt een BTW-aangifte af. Selecteer één of meer periodes uit het fiscale jaar. De benodigde informatie voor de BTW-aangifte wordt door OpenERP automatisch verzameld op basis van de facturen of betalingen (dit verschilt per land). De rapportage geeft de actuele stand van zaken, zodat u op elk moment kunt zien hoeveel belasting u schuldig bent aan het begin en eind van een periode." + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Pre-tax" +msgstr "5b Voorbelasting" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "4b Deliveries/services of countries in the EU" +msgstr "4b Leveringen/diensten uit landen binnen de EU" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "1a Deliveries/services taxed with 21%" +msgstr "1a Leveringen/diensten belast met 21%" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,based_on:0 +msgid "Invoices" +msgstr "Facturen" + +#. module: l10n_nl_tax_declaration_reporting +#: model:ir.actions.report.xml,name:l10n_nl_tax_declaration_reporting.report_account_vat_declaration_nl +msgid "VAT Report NL" +msgstr "BTW Rapport NL" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,fiscalyear_id:0 +#: report:account.vat.declaration.nl:0 +msgid "Fiscal Year" +msgstr "Boekjaar" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,target_move:0 +msgid "Target Moves" +msgstr "Doelrekening" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "5c Subtotal to pay (+) or to reclaim (-)" +msgstr "5c Subtotaal te betalen (+) of terug te vragen (-)" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,based_on:0 +msgid "Based on" +msgstr "Gebaseerd op" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +#: selection:account.vat.declaration.nl,filter:0 +#: report:account.vat.declaration.nl:0 +msgid "Periods" +msgstr "Periodes" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +msgid "Cancel" +msgstr "Annuleer" + +#. module: l10n_nl_tax_declaration_reporting +#: report:account.vat.declaration.nl:0 +msgid "Based On" +msgstr "Gebaseerd op" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,date_from:0 +msgid "Start Date" +msgstr "Startdatum" + +#. module: l10n_nl_tax_declaration_reporting +#: help:account.vat.declaration.nl,chart_tax_id:0 +msgid "Select Charts of Taxes" +msgstr "Kies Taksstructuur" + +#. module: l10n_nl_tax_declaration_reporting +#: field:account.vat.declaration.nl,filter:0 +msgid "Filter by" +msgstr "Filter op" + +#. module: l10n_nl_tax_declaration_reporting +#: view:account.vat.declaration.nl:0 +msgid "or" +msgstr "of" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,target_move:0 +#: code:addons/l10n_nl_tax_declaration_reporting/report/common_report_header.py:67 +#, python-format +msgid "All Entries" +msgstr "Alle boekingen" + +#. module: l10n_nl_tax_declaration_reporting +#: selection:account.vat.declaration.nl,based_on:0 +msgid "Payments" +msgstr "Betalingen" + diff --git a/l10n_nl_tax_declaration_reporting/i18n/sr@latin.po b/l10n_nl_tax_declaration_reporting/i18n/sr@latin.po new file mode 100644 index 000000000..9cd72df78 --- /dev/null +++ b/l10n_nl_tax_declaration_reporting/i18n/sr@latin.po @@ -0,0 +1,28 @@ +# Serbian Latin translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-11-24 02:53+0000\n" +"PO-Revision-Date: 2012-12-21 23:00+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Serbian Latin \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-07-11 06:07+0000\n" +"X-Generator: Launchpad (build 16696)\n" + +#. module: l10n_nl +#: model:account.account.type,name:l10n_nl.user_type_equity +msgid "Eigen Vermogen" +msgstr "" + +#. module: l10n_nl +#: model:account.account.type,name:l10n_nl.user_type_tax +msgid "BTW" +msgstr "" diff --git a/l10n_nl_tax_declaration_reporting/l10n_nl_report.xml b/l10n_nl_tax_declaration_reporting/l10n_nl_report.xml new file mode 100644 index 000000000..b5cf95eb9 --- /dev/null +++ b/l10n_nl_tax_declaration_reporting/l10n_nl_report.xml @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/l10n_nl_tax_declaration_reporting/report/__init__.py b/l10n_nl_tax_declaration_reporting/report/__init__.py new file mode 100644 index 000000000..1eee9c8e8 --- /dev/null +++ b/l10n_nl_tax_declaration_reporting/report/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Dutch accounting taxes addon +# Copyright (C) 2014 ONESTEiN BV (). +# +# 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 . +# +############################################################################## + + +import account_tax_report + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/l10n_nl_tax_declaration_reporting/report/account_tax_report.py b/l10n_nl_tax_declaration_reporting/report/account_tax_report.py new file mode 100644 index 000000000..61c3d2780 --- /dev/null +++ b/l10n_nl_tax_declaration_reporting/report/account_tax_report.py @@ -0,0 +1,395 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Dutch accounting taxes addon +# Copyright (C) 2014 ONESTEiN BV (). +# +# 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 . +# +############################################################################## + +import time + +from common_report_header import common_report_header +from openerp.report import report_sxw +from os import path +module_path = path.dirname(__file__) + +class tax_report(report_sxw.rml_parse, common_report_header): + _name = 'report.account.vat.declaration.nl' + + def set_context(self, objects, data, ids, report_type=None): + new_ids = ids + res = {} + self.period_ids = [] + period_obj = self.pool.get('account.period') + self.display_detail = data['form']['display_detail'] + res['periods'] = '' + res['fiscalyear'] = data['form'].get('fiscalyear_id', False) + + if data['form'].get('period_from', False) and data['form'].get('period_to', False): + self.period_ids = period_obj.build_ctx_periods(self.cr, self.uid, data['form']['period_from'], + data['form']['period_to']) + periods_l = period_obj.read(self.cr, self.uid, self.period_ids, ['name']) + for period in periods_l: + if res['periods'] == '': + res['periods'] = period['name'] + else: + res['periods'] += ", " + period['name'] + return super(tax_report, self).set_context(objects, data, new_ids, report_type=report_type) + + def __init__(self, cr, uid, name, context=None): + super(tax_report, self).__init__(cr, uid, name, context=context) + self._1AO = 0 + self._1AB = 0 + self._1BB = 0 + self._1BO = 0 + self._1CB = 0 + self._1CO = 0 + self._1DB = 0 + self._1DO = 0 + self._1EB = 0 + self._1EO = 0 + self._2AB = 0 + self._2AO = 0 + self._3AB = 0 + self._3AO = 0 + self._3BB = 0 + self._3BO = 0 + self._3CB = 0 + self._3CO = 0 + self._4AB = 0 + self._4AO = 0 + self._4BB = 0 + self._4BO = 0 + self._5AB = 0 + self._5AO = 0 + self._5BB = 0 + self._5BO = 0 + self.localcontext.update({ + 'time': time, + 'get_codes': self._get_codes, + 'get_general': self._get_general, + 'get_currency': self._get_currency, + 'get_lines': self._get_lines, + 'get_fiscalyear': self._get_fiscalyear, + 'get_account': self._get_account, + 'get_start_period': self.get_start_period, + 'get_end_period': self.get_end_period, + 'get_basedon': self._get_basedon, + '_1AO': self._1AO, + '_1AB': self._1AB, + '_1BO': self._1BO, + '_1BB': self._1BB, + '_1CO': self._1CO, + '_1CB': self._1CB, + '_1DO': self._1DO, + '_1DB': self._1DB, + '_1EO': self._1EO, + '_1EB': self._1EB, + '_2AO': self._2AO, + '_2AB': self._2AB, + '_3AO': self._3AO, + '_3AB': self._3AB, + '_3BO': self._3BO, + '_3BB': self._3BB, + '_3CO': self._3CO, + '_3CB': self._3CB, + '_4AO': self._4AO, + '_4AB': self._4AB, + '_4BO': self._4BO, + '_4BB': self._4BB, + '_5AO': self._5AO, + '_5AB': self._5AB, + '_5BO': self._5BO, + '_5BB': self._5BB, + + + }) + + def _get_basedon(self, form): + return form['form']['based_on'] + + def _get_lines(self, based_on, company_id=False, parent=False, level=0, context=None): + period_list = self.period_ids + res = self._get_codes(based_on, company_id, parent, level, period_list, context=context) + if period_list: + res = self._add_codes(based_on, res, period_list, context=context) + else: + self.cr.execute("select id from account_fiscalyear") + fy = self.cr.fetchall() + self.cr.execute("select id from account_period where fiscalyear_id = %s", (fy[0][0],)) + periods = self.cr.fetchall() + for p in periods: + period_list.append(p[0]) + res = self._add_codes(based_on, res, period_list, context=context) + + i = 0 + top_result = [] + + while i < len(res): + + res_dict = {'code': res[i][1].code, + 'name': res[i][1].name, + 'debit': 0, + 'credit': 0, + 'tax_amount': res[i][2], + 'type': 1, + 'level': res[i][0], + 'pos': 0 + } + + + if res[i][1].code == '1a' and '(omzet)' in res[i][1].name: + self._1AO = res[i][2] + if res[i][1].code == '1a' and '(BTW)' in res[i][1].name: + self._1AB = abs(round(res[i][2], 0)) + if res[i][1].code == '1b' and '(omzet)' in res[i][1].name: + self._1BO = res[i][2] + if res[i][1].code == '1b' and '(BTW)' in res[i][1].name: + self._1BB = abs(round(res[i][2], 0)) + if res[i][1].code == '1c' and '(omzet)' in res[i][1].name: + self._1CO = res[i][2] + if res[i][1].code == '1c' and '(BTW)' in res[i][1].name: + self._1CB = abs(round(res[i][2], 0)) + if res[i][1].code == '1d' and '(omzet)' in res[i][1].name: + self._1DO = res[i][2] + if res[i][1].code == '1d' and '(BTW)' in res[i][1].name: + self._1DB = abs(round(res[i][1].sum, 0)) + if res[i][1].code == '1e' and '(omzet)' in res[i][1].name: + self._1EO = res[i][2] + if res[i][1].code == '1e' and '(BTW)' in res[i][1].name: + self._1EB = abs(round(res[i][2], 0)) + + if res[i][1].code == '2a' and '(omzet)' in res[i][1].name: + self._2AO = res[i][2] + if res[i][1].code == '2a' and '(BTW)' in res[i][1].name: + self._2AB = abs(round(res[i][2], 0)) + + if res[i][1].code == '3a' and '(omzet)' in res[i][1].name: + self._3AO = res[i][2] + if res[i][1].code == '3a' and '(BTW)' in res[i][1].name: + self._3AB = abs(round(res[i][2], 0)) + if res[i][1].code == '3b' and '(omzet)' in res[i][1].name: + self._3BO = res[i][2] + if res[i][1].code == '3b' and '(BTW)' in res[i][1].name: + self._3BB = abs(round(res[i][2], 0)) + if res[i][1].code == '3c' and '(omzet)' in res[i][1].name: + self._3CO = res[i][2] + if res[i][1].code == '3c' and '(BTW)' in res[i][1].name: + self._3CB = abs(round(res[i][2], 0)) + + if res[i][1].code == '4a' and '(omzet)' in res[i][1].name: + self._4AO = res[i][2] + if res[i][1].code == '4a' and '(BTW)' in res[i][1].name: + self._4AB = abs(round(res[i][2], 0)) + if res[i][1].code == '4b' and '(omzet)' in res[i][1].name: + self._4BO = res[i][2] + if res[i][1].code == '4b' and '(BTW)' in res[i][1].name: + self._4BB = abs(round(res[i][2], 0)) + + if res[i][1].code == '5a' and '(BTW)' in res[i][1].name: + self._5AB = res[i][2] + if res[i][1].code == '5b' and '(BTW)' in res[i][1].name: + self._5BB = res[i][2] + + top_result.append(res_dict) + res_general = self._get_general(res[i][1].id, period_list, company_id, based_on, context=context) + ind_general = 0 + while ind_general < len(res_general): + res_general[ind_general]['type'] = 2 + res_general[ind_general]['pos'] = 0 + res_general[ind_general]['level'] = res_dict['level'] + top_result.append(res_general[ind_general]) + ind_general += 1 + i += 1 + + self.localcontext.update({ + '_1AO': self._1AO, + '_1AB': self._1AB, + '_1BO': self._1BO, + '_1BB': self._1BB, + '_1CO': self._1CO, + '_1CB': self._1CB, + '_1DO': self._1DO, + '_1DB': self._1DB, + '_1EO': self._1EO, + '_1EB': self._1EB, + '_2AO': self._2AO, + '_2AB': self._2AB, + '_3AO': self._3AO, + '_3AB': self._3AB, + '_3BO': self._3BO, + '_3BB': self._3BB, + '_3CO': self._3CO, + '_3CB': self._3CB, + '_4AO': self._4AO, + '_4AB': self._4AB, + '_4BO': self._4BO, + '_4BB': self._4BB, + '_5AO': self._5AO, + '_5AB': self._5AB, + '_5BO': self._5BO, + '_5BB': self._5BB, + }) + + return '' + + def _get_general(self, tax_code_id, period_list, company_id, based_on, context=None): + if not self.display_detail: + return [] + res = [] + obj_account = self.pool.get('account.account') + periods_ids = tuple(period_list) + if based_on == 'payments': + self.cr.execute('SELECT SUM(line.tax_amount) AS tax_amount, \ + SUM(line.debit) AS debit, \ + SUM(line.credit) AS credit, \ + COUNT(*) AS count, \ + account.id AS account_id, \ + account.name AS name, \ + account.code AS code \ + FROM account_move_line AS line, \ + account_account AS account, \ + account_move AS move \ + LEFT JOIN account_invoice invoice ON \ + (invoice.move_id = move.id) \ + WHERE line.state<>%s \ + AND line.tax_code_id = %s \ + AND line.account_id = account.id \ + AND account.company_id = %s \ + AND move.id = line.move_id \ + AND line.period_id IN %s \ + AND ((invoice.state = %s) \ + OR (invoice.id IS NULL)) \ + GROUP BY account.id,account.name,account.code', ('draft', tax_code_id, + company_id, periods_ids, 'paid',)) + + else: + self.cr.execute('SELECT SUM(line.tax_amount) AS tax_amount, \ + SUM(line.debit) AS debit, \ + SUM(line.credit) AS credit, \ + COUNT(*) AS count, \ + account.id AS account_id, \ + account.name AS name, \ + account.code AS code \ + FROM account_move_line AS line, \ + account_account AS account \ + WHERE line.state <> %s \ + AND line.tax_code_id = %s \ + AND line.account_id = account.id \ + AND account.company_id = %s \ + AND line.period_id IN %s\ + AND account.active \ + GROUP BY account.id,account.name,account.code', ('draft', tax_code_id, + company_id, periods_ids,)) + res = self.cr.dictfetchall() + + i = 0 + while i < len(res): + res[i]['account'] = obj_account.browse(self.cr, self.uid, res[i]['account_id'], context=context) + i += 1 + return res + + def _get_codes(self, based_on, company_id, parent=False, level=0, period_list=None, context=None): + obj_tc = self.pool.get('account.tax.code') + ids = obj_tc.search(self.cr, + self.uid, + [('parent_id', '=', parent), + ('company_id', '=', company_id)], + order='sequence', context=context) + + res = [] + for code in obj_tc.browse(self.cr, self.uid, ids, {'based_on': based_on}): + res.append(('.'*2*level, code)) + + res += self._get_codes(based_on, company_id, code.id, level+1, context=context) + return res + + def _add_codes(self, based_on, account_list=None, period_list=None, context=None): + if context is None: + context = {} + if account_list is None: + account_list = [] + if period_list is None: + period_list = [] + res = [] + obj_tc = self.pool.get('account.tax.code') + for account in account_list: + ids = obj_tc.search(self.cr, self.uid, [('id', '=', account[1].id)], context=context) + sum_tax_add = 0 + for period_ind in period_list: + context2 = dict(context, period_id=period_ind, based_on=based_on) + for code in obj_tc.browse(self.cr, self.uid, ids, context=context2): + sum_tax_add = sum_tax_add + code.sum_period + + code.sum_period = sum_tax_add + + res.append((account[0], code, sum_tax_add)) + return res + + def _get_currency(self, form, context=None): + return self.pool.get('res.company').browse(self.cr, + self.uid, + form['company_id'], + context=context).currency_id.name + + def sort_result(self, accounts, context=None): + # On boucle sur notre rapport + result_accounts = [] + ind = 0 + old_level = 0 + while ind < len(accounts): + # + account_elem = accounts[ind] + # + + # + # we will now check if the level is lower than the previous level, in this case we will make a subtotal + if (account_elem['level'] < old_level): + bcl_current_level = old_level + bcl_rup_ind = ind - 1 + + while (bcl_current_level >= int(accounts[bcl_rup_ind]['level']) and bcl_rup_ind >= 0): + res_tot = {'code': accounts[bcl_rup_ind]['code'], + 'name': '', + 'debit': 0, + 'credit': 0, + 'tax_amount': accounts[bcl_rup_ind]['tax_amount'], + 'type': accounts[bcl_rup_ind]['type'], + 'level': 0, + 'pos': 0 + } + + if res_tot['type'] == 1: + # on change le type pour afficher le total + res_tot['type'] = 2 + result_accounts.append(res_tot) + bcl_current_level = accounts[bcl_rup_ind]['level'] + bcl_rup_ind -= 1 + + old_level = account_elem['level'] + result_accounts.append(account_elem) + ind += 1 + + return result_accounts + +report_sxw.report_sxw('report.account.vat.declaration.nl', + 'account.tax.code', + "{}/account_tax_report.rml".format(module_path), + parser=tax_report, + header="internal") + + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/l10n_nl_tax_declaration_reporting/report/account_tax_report.rml b/l10n_nl_tax_declaration_reporting/report/account_tax_report.rml new file mode 100644 index 000000000..69be7dcc9 --- /dev/null +++ b/l10n_nl_tax_declaration_reporting/report/account_tax_report.rml @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [[ setLang(user.partner_id.lang) ]] + + + VAT declaration + + + + Chart of Tax + Fiscal Year + Periods + Based On + + + [[ get_account(data) or removeParentNode('para') ]] + [[ get_fiscalyear(data) or '' ]] + + + + Start Period + End Period + + + [[ get_start_period(data) or '' ]] + [[ get_end_period(data) or '' ]] + + + + [[ get_basedon(data) or '' ]][[ get_lines(data['form']['based_on'], data['form']['company_id']) or '']] + + + + + + Domestic Performance + Amount + Turnover tax + + + 1a Deliveries/services taxed with 21% + € [[formatLang(_1AO,digits=0)]] + € [[formatLang(_1AB,digits=0)]] + + + 1b Deliveries/services taxed with 6% + € [[formatLang(_1BO,digits=0)]] + € [[formatLang(_1BB,digits=0)]] + + + 1c Deliveries/services taxed with other rates, except 0% + € [[formatLang(_1CO,digits=0)]] + € [[formatLang(_1CB,digits=0)]] + + + 1d Private use + € [[formatLang(_1DO,digits=0)]] + € [[formatLang(_1DB,digits=0)]] + + + + + + + Realignment scheme (domestic) + Amount + Turnover tax + + + 2a Deliveries/services where the turnover tax has been transferred to you + € [[formatLang(_2AO,digits=0)]] + € [[formatLang(_2AB,digits=0)]] + + + + + + + Performance abroad + Amount + + + + 3a Deliveries to countries outside the EU (export) + € [[formatLang(_3AO,digits=0)]] + + + + 3b Deliveries to/services in countries in the EU + € [[formatLang(_3BO,digits=0)]] + + + + 3c Installation/distance sales within the EU + € [[formatLang(_3CO,digits=0)]] + + + + + + + + Performance from abroad directed to you + Amount + Turnover tax + + + 4a Deliveries/services from countries outside the EU + € [[formatLang(_4AO,digits=0)]] + € [[formatLang(_4AB,digits=0)]] + + + 4b Deliveries/services of countries in the EU + € [[formatLang(_4BO,digits=0)]] + € [[formatLang(_4BB,digits=0)]] + + + + + + + Pre-tax + + Amount + + + 5a turnover tax due (sum of 1a up to and including 4b) + + € [[formatLang(round(_1AB + _1BB +_1CB + _1DB + _2AB + _3AB + _3BB +_3CB + _4AB + _4BB,0),digits=0)]] + + + 5b Pre-tax + + € [[formatLang(round(_5BB,0),digits=0)]] + + + 5c Subtotal to pay (+) or to reclaim (-) + + € [[formatLang(round(_1AB + _1BB +_1CB + _1DB + _2AB + _3AB + _3BB +_3CB + _4AB + _4BB - _5BB,0),digits=0)]] + + + + + + diff --git a/l10n_nl_tax_declaration_reporting/report/account_tax_report.sxw b/l10n_nl_tax_declaration_reporting/report/account_tax_report.sxw new file mode 100644 index 0000000000000000000000000000000000000000..2153eec7ef1d3777e0d73656afc21c8739b7e94d GIT binary patch literal 15966 zcmbVz1ymhL6D}GcxVr{-4GzKG-QDHl4#C~sgFC@31b26L4<6j%k?dye?f&PT*W5d2 zrn~Cvs_ve?MRk>|1Sl8^5D+8~(6o^<_eMSgJ01`a(2wtH6_Aygm63z1jgg*>jis4^ zo`V^{n$F4Ekk;POn%2e2lGfSI%)!V`_HP)kY=0E2*E<1#wXvCrquoz#dqz5Y2R#Qz zdwo4Sy5IO9At8VE{Rh+Q4cWi&=@}RpSsJ~<0PN@t9PR9ktQ~&H016~40r5jtAdnxI z*Ye-uV7#{eQygPUfZnSPzYFtgAbtY+Xc8QK3u z{eSE6-{kz!*`I^<|H|b609gKSF8qIy(#%TF#K@kG-^{^E&&K|L%oFr0vjM=`;rF>X z*02CJYm45UGU|OVl$(a*pbg?$>G<*7L=oX@G(HC6a42#}<+7tAstB?nqQy za$Bm|#e&2Eb1}HOy1Ja~5K>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Fsrna` zKQmST8|6o?>YrurUr_$9%+=q(eyxJPCTaZ0UH!8Vzb+1gKQmc>&GawEzsB|b$l>_2 zD81tRnbGl!@4uq{{^Zkm-LZbe!Tg8;{KfUFx4)Xte;?hpGK% t(P#X-;r&m}zrMylHr7AOXSV;?W@RP7U-xJrAo$n66Hp)^b&elT{|D7Fp^E?j literal 0 HcmV?d00001 diff --git a/l10n_nl_tax_declaration_reporting/report/common_report_header.py b/l10n_nl_tax_declaration_reporting/report/common_report_header.py new file mode 100644 index 000000000..636eea967 --- /dev/null +++ b/l10n_nl_tax_declaration_reporting/report/common_report_header.py @@ -0,0 +1,157 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 . +# +############################################################################## + +from openerp import pooler +from openerp.tools.translate import _ + + +class common_report_header(object): + + def _sum_debit(self, period_id=False, journal_id=False): + if journal_id and isinstance(journal_id, int): + journal_id = [journal_id] + if period_id and isinstance(period_id, int): + period_id = [period_id] + if not journal_id: + journal_id = self.journal_ids + if not period_id: + period_id = self.period_ids + if not (period_id and journal_id): + return 0.0 + self.cr.execute('SELECT SUM(debit) FROM account_move_line l ' + 'WHERE period_id IN %s AND journal_id IN %s ' + self.query_get_clause + ' ', + (tuple(period_id), tuple(journal_id))) + return self.cr.fetchone()[0] or 0.0 + + def _sum_credit(self, period_id=False, journal_id=False): + if journal_id and isinstance(journal_id, int): + journal_id = [journal_id] + if period_id and isinstance(period_id, int): + period_id = [period_id] + if not journal_id: + journal_id = self.journal_ids + if not period_id: + period_id = self.period_ids + if not (period_id and journal_id): + return 0.0 + self.cr.execute('SELECT SUM(credit) FROM account_move_line l ' + 'WHERE period_id IN %s AND journal_id IN %s ' + self.query_get_clause + '', + (tuple(period_id), tuple(journal_id))) + return self.cr.fetchone()[0] or 0.0 + + def _get_start_date(self, data): + if data.get('form', False) and data['form'].get('date_from', False): + return data['form']['date_from'] + return '' + + def _get_target_move(self, data): + if data.get('form', False) and data['form'].get('target_move', False): + if data['form']['target_move'] == 'all': + return _('All Entries') + return _('All Posted Entries') + return '' + + def _get_end_date(self, data): + if data.get('form', False) and data['form'].get('date_to', False): + return data['form']['date_to'] + return '' + + def get_start_period(self, data): + if data.get('form', False) and data['form'].get('period_from', False): + return pooler.get_pool(self.cr.dbname).get('account.period').browse( + self.cr, + self.uid, + data['form']['period_from']).name + return '' + + def get_end_period(self, data): + if data.get('form', False) and data['form'].get('period_to', False): + return pooler.get_pool(self.cr.dbname).get('account.period').browse( + self.cr, + self.uid, + data['form']['period_to']).name + return '' + + def _get_account(self, data): + if data.get('form', False) and data['form'].get('chart_account_id', False): + return pooler.get_pool(self.cr.dbname).get('account.account').browse( + self.cr, + self.uid, + data['form']['chart_account_id']).name + return '' + + def _get_sortby(self, data): + raise (_('Error!'), _('Not implemented.')) + + def _get_filter(self, data): + if data.get('form', False) and data['form'].get('filter', False): + if data['form']['filter'] == 'filter_date': + return self._translate('Date') + elif data['form']['filter'] == 'filter_period': + return self._translate('Periods') + return self._translate('No Filters') + + def _sum_debit_period(self, period_id, journal_id=None): + journals = journal_id or self.journal_ids + if not journals: + return 0.0 + self.cr.execute('SELECT SUM(debit) FROM account_move_line l WHERE period_id=%s AND journal_id IN %s ' + + self.query_get_clause + '', + (period_id, tuple(journals))) + + return self.cr.fetchone()[0] or 0.0 + + def _sum_credit_period(self, period_id, journal_id=None): + journals = journal_id or self.journal_ids + if not journals: + return 0.0 + self.cr.execute('SELECT SUM(credit) FROM account_move_line l ' + 'WHERE period_id=%s AND journal_id IN %s ' + self.query_get_clause + ' ', + (period_id, tuple(journals))) + return self.cr.fetchone()[0] or 0.0 + + def _get_fiscalyear(self, data): + if data.get('form', False) and data['form'].get('fiscalyear_id', False): + return pooler.get_pool(self.cr.dbname).get('account.fiscalyear').browse( + self.cr, self.uid, data['form']['fiscalyear_id']).name + return '' + + def _get_company(self, data): + if data.get('form', False) and data['form'].get('chart_account_id', False): + return pooler.get_pool(self.cr.dbname).get('account.account').browse( + self.cr, self.uid, data['form']['chart_account_id']).company_id.name + return '' + + def _get_journal(self, data): + codes = [] + if data.get('form', False) and data['form'].get('journal_ids', False): + self.cr.execute('select code from account_journal where id IN %s', (tuple(data['form']['journal_ids']), )) + codes = [x for x, in self.cr.fetchall()] + return codes + + def _get_currency(self, data): + if data.get('form', False) and data['form'].get('chart_account_id', False): + return pooler.get_pool(self.cr.dbname).get('account.account').browse( + self.cr, self.uid, data['form']['chart_account_id']).company_id.currency_id.symbol + return '' + + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/l10n_nl_tax_declaration_reporting/wizard/__init__.py b/l10n_nl_tax_declaration_reporting/wizard/__init__.py new file mode 100644 index 000000000..7d74d9c7f --- /dev/null +++ b/l10n_nl_tax_declaration_reporting/wizard/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 . +# +############################################################################## + +import account_vat + + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/l10n_nl_tax_declaration_reporting/wizard/account_vat.py b/l10n_nl_tax_declaration_reporting/wizard/account_vat.py new file mode 100644 index 000000000..5c5d1eadb --- /dev/null +++ b/l10n_nl_tax_declaration_reporting/wizard/account_vat.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Dutch accounting taxes addon +# Copyright (C) 2014 ONESTEiN BV (). +# +# 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 . +# +############################################################################## + +from openerp.osv import fields, osv + + +class account_vat_declaration(osv.osv_memory): + _name = 'account.vat.declaration.nl' + _description = 'Account Vat Declaration' + _inherit = "account.common.report" + _columns = { + 'based_on': fields.selection([('invoices', 'Invoices'), + ('payments', 'Payments'), + ], + 'Based on', required=True), + 'chart_tax_id': fields.many2one( + 'account.tax.code', + 'Chart of Tax', + help='Select Charts of Taxes', + required=True, + domain=[('parent_id', '=', False)]), + 'display_detail': fields.boolean('Display Detail'), + } + + def _get_tax(self, cr, uid, context=None): + user = self.pool.get('res.users').browse(cr, uid, uid, context=context) + taxes = self.pool.get('account.tax.code').search(cr, + uid, + [('parent_id', '=', False), + ('company_id', '=', user.company_id.id)], + limit=1) + return taxes and taxes[0] or False + + _defaults = { + 'based_on': 'invoices', + 'chart_tax_id': _get_tax + } + + def create_vat(self, cr, uid, ids, context=None): + if context is None: + context = {} + datas = {'ids': context.get('active_ids', [])} + datas['model'] = 'account.tax.code' + datas['form'] = self.read(cr, uid, ids, context=context)[0] + for field in datas['form'].keys(): + if isinstance(datas['form'][field], tuple): + datas['form'][field] = datas['form'][field][0] + datas['form']['company_id'] = self.pool.get('account.tax.code').browse(cr, + uid, + [datas['form']['chart_tax_id']], + context=context)[0].company_id.id + return { + 'type': 'ir.actions.report.xml', + 'report_name': 'account.vat.declaration.nl', + 'datas': datas, + } + +account_vat_declaration() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/l10n_nl_tax_declaration_reporting/wizard/account_vat_view_nl.xml b/l10n_nl_tax_declaration_reporting/wizard/account_vat_view_nl.xml new file mode 100644 index 000000000..7547295ce --- /dev/null +++ b/l10n_nl_tax_declaration_reporting/wizard/account_vat_view_nl.xml @@ -0,0 +1,48 @@ + + + + + + Account Tax Declaration + account.vat.declaration.nl + +

+