diff --git a/account_tax_analysis/README.rst b/account_tax_analysis/README.rst
deleted file mode 100644
index c0a8941c6..000000000
--- a/account_tax_analysis/README.rst
+++ /dev/null
@@ -1,16 +0,0 @@
-Tax analysis view
-=================
-
-This add-on is a must if you want to be able to validate your VAT form.
-
-Thanks to a new menu 'Invoicing / Reporting / Generic Reporting / Taxes / Taxes Analysis'
-you are able to group accounting entries by Taxes (VAT codes)
-and/or financial accounts.
-
-This way you will find easily differences you may see between
-the OpenERP tax report and what you see in your books.
-
-Contributors
-============
-
- * Vincent Renaville (Camptocamp SA)
diff --git a/account_tax_analysis/__init__.py b/account_tax_analysis/__init__.py
index 0fe7493b0..51ec7a361 100644
--- a/account_tax_analysis/__init__.py
+++ b/account_tax_analysis/__init__.py
@@ -1,21 +1,7 @@
# -*- coding: utf-8 -*-
-##############################################################################
-#
-# Author Vincent Renaville. Copyright 2013 Camptocamp 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 .
-#
-##############################################################################
-from . import account_tax_analysis
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+# Author: Vincent Renaville
+# Copyright 2013 Camptocamp SA
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from . import models
+from . import wizard
diff --git a/account_tax_analysis/__manifest__.py b/account_tax_analysis/__manifest__.py
index c8cfafd85..640116dd1 100644
--- a/account_tax_analysis/__manifest__.py
+++ b/account_tax_analysis/__manifest__.py
@@ -1,30 +1,23 @@
# -*- coding: utf-8 -*-
-##############################################################################
-#
-# Author Vincent Renaville. Copyright 2013 Camptocamp 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 .
-#
-##############################################################################
-{"name": "Tax analysis",
- "version": "8.0.1.0.0",
- "depends": ["base", "account"],
- "author": "Camptocamp SA,Odoo Community Association (OCA)",
- "category": 'Accounting & Finance',
- "website": "http://www.camptocamp.com",
- "license": "AGPL-3",
- "data": ["account_tax_analysis_view.xml"],
- 'installable': False,
- "active": False,
- }
+# Author: Vincent Renaville
+# Copyright 2013 Camptocamp SA
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+{
+ "name": "Tax analysis",
+ "version": "10.0.1.0.0",
+ "description": """
+ Add a report on tax (Invoicing / Reports / Taxes Analysis)""",
+ "depends": [
+ "base",
+ "account",
+ ],
+ "author": "Camptocamp SA, ACSONE SA/NV, Odoo Community Association (OCA)",
+ "category": 'Accounting & Finance',
+ "website": "http://www.camptocamp.com",
+ "license": "AGPL-3",
+ "data": [
+ "wizard/account_tax_analysis_view.xml",
+ "views/account_move_line.xml",
+ ],
+ "installable": True,
+}
diff --git a/account_tax_analysis/account_tax_analysis.py b/account_tax_analysis/account_tax_analysis.py
deleted file mode 100644
index 0bcc26b2a..000000000
--- a/account_tax_analysis/account_tax_analysis.py
+++ /dev/null
@@ -1,53 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# Author Vincent Renaville. Copyright 2013-2014 Camptocamp 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 .
-#
-##############################################################################
-from openerp import models, fields, api
-
-
-class AccountTaxDeclarationAnalysis(models.TransientModel):
- _name = 'account.vat.declaration.analysis'
- _description = 'Account Vat Declaration'
-
- fiscalyear_id = fields.Many2one(
- comodel_name='account.fiscalyear',
- string='Fiscalyear',
- help='Fiscalyear to look on',
- required=True,
- )
-
- period_list = fields.Many2many(
- comodel_name='account.period',
- relation='account_tax_period_rel',
- column1='tax_analysis',
- column2='period_id',
- string='Periods',
- help="If no period is selected, all the periods of the "
- "fiscal year will be used",
- )
-
- @api.multi
- def show_vat(self):
- periods = self.period_list
- if not periods:
- periods = self.fiscalyear_id.period_ids
- domain = [('period_id', 'in', periods.ids)]
- action = self.env.ref('account_tax_analysis.action_view_tax_analysis')
- action_fields = action.read()[0]
- action_fields['domain'] = domain
- return action_fields
diff --git a/account_tax_analysis/account_tax_analysis_view.xml b/account_tax_analysis/account_tax_analysis_view.xml
deleted file mode 100644
index 555cdd090..000000000
--- a/account_tax_analysis/account_tax_analysis_view.xml
+++ /dev/null
@@ -1,133 +0,0 @@
-
-
-
- Journal Items Tax
- account.move.line
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- account.move.line.tree
- account.move.line
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Taxes Analysis
- account.move.line
- form
- tree,form
- {'search_default_group_by_account_tax': 1}
-
-
-
-
-
- Account Vat Declaration
- account.vat.declaration.analysis
-
-
-
-
-
-
- Account Vat Declaration
- ir.actions.act_window
- account.vat.declaration.analysis
- form
- form
- new
- This menu print a VAT declaration based on invoices or payments. You can select one or several periods of the fiscal year. 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.
-
-
-
-
-
-
diff --git a/account_tax_analysis/i18n/account_tax_analysis.pot b/account_tax_analysis/i18n/account_tax_analysis.pot
index 8d84a489e..5fe02fda2 100644
--- a/account_tax_analysis/i18n/account_tax_analysis.pot
+++ b/account_tax_analysis/i18n/account_tax_analysis.pot
@@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 8.0\n"
+"Project-Id-Version: Odoo Server 10.0+e\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-11-19 09:13+0000\n"
-"PO-Revision-Date: 2014-11-19 09:13+0000\n"
+"POT-Creation-Date: 2018-06-12 11:22+0000\n"
+"PO-Revision-Date: 2018-06-12 11:22+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -16,13 +16,13 @@ msgstr ""
"Plural-Forms: \n"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
msgid "Account"
msgstr ""
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
-msgid "Account / Tax"
+#: model:ir.model.fields,help:account_tax_analysis.field_account_move_line_account_type
+msgid "Account Type is used for information purpose, to generate country-specific legal reports, and set the rules to close a fiscal year and generate opening entries."
msgstr ""
#. module: account_tax_analysis
@@ -32,109 +32,140 @@ msgid "Account Vat Declaration"
msgstr ""
#. module: account_tax_analysis
-#: view:account.vat.declaration.analysis:account_tax_analysis.view_account_vat_declaration_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
+msgid "Account type"
+msgstr ""
+
+#. module: account_tax_analysis
+#: selection:account.vat.declaration.analysis,target_move:0
+msgid "All Entries"
+msgstr ""
+
+#. module: account_tax_analysis
+#: selection:account.vat.declaration.analysis,target_move:0
+msgid "All Posted Entries"
+msgstr ""
+
+#. module: account_tax_analysis
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_tax_analysis_name
+msgid "Analysis name"
+msgstr ""
+
+#. module: account_tax_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_vat_declaration_analysis
msgid "Cancel"
msgstr ""
#. module: account_tax_analysis
-#: field:account.vat.declaration.analysis,create_uid:0
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_company_id
+msgid "Company"
+msgstr ""
+
+#. module: account_tax_analysis
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_create_uid
msgid "Created by"
msgstr ""
#. module: account_tax_analysis
-#: field:account.vat.declaration.analysis,create_date:0
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_create_date
msgid "Created on"
msgstr ""
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
-msgid "Filters"
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_date_range_id
+msgid "Date Range"
msgstr ""
#. module: account_tax_analysis
-#: field:account.vat.declaration.analysis,fiscalyear_id:0
-msgid "Fiscalyear"
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_display_name
+msgid "Display Name"
msgstr ""
#. module: account_tax_analysis
-#: help:account.vat.declaration.analysis,fiscalyear_id:0
-msgid "Fiscalyear to look on"
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_end_date
+msgid "End date"
msgstr ""
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
-msgid "Group By..."
-msgstr ""
-
-#. module: account_tax_analysis
-#: field:account.vat.declaration.analysis,id:0
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_id
msgid "ID"
msgstr ""
#. module: account_tax_analysis
-#: help:account.vat.declaration.analysis,period_list:0
-msgid "If no period is selected, all the periods of the fiscal year will be used"
-msgstr ""
-
-#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
msgid "Journal"
msgstr ""
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_move_line_tree_tax_analysis
-msgid "Journal Items"
+#: model:ir.model,name:account_tax_analysis.model_account_move_line
+msgid "Journal Item"
msgstr ""
#. module: account_tax_analysis
-#: field:account.vat.declaration.analysis,write_uid:0
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis___last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: account_tax_analysis
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_write_uid
msgid "Last Updated by"
msgstr ""
#. module: account_tax_analysis
-#: field:account.vat.declaration.analysis,write_date:0
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_write_date
msgid "Last Updated on"
msgstr ""
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
+msgid "Month"
+msgstr ""
+
+#. module: account_tax_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
msgid "Partner"
msgstr ""
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_vat_declaration_analysis
msgid "Period"
msgstr ""
#. module: account_tax_analysis
-#: view:account.vat.declaration.analysis:account_tax_analysis.view_account_vat_declaration_analysis
-#: field:account.vat.declaration.analysis,period_list:0
-msgid "Periods"
-msgstr ""
-
-#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
msgid "Posted"
msgstr ""
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
msgid "Posted Journal Items"
msgstr ""
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
-msgid "Search Journal Items"
-msgstr ""
-
-#. module: account_tax_analysis
-#: view:account.vat.declaration.analysis:account_tax_analysis.view_account_vat_declaration_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_vat_declaration_analysis
msgid "Show tax lines"
msgstr ""
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
-msgid "Tax account"
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_start_date
+msgid "Start date"
+msgstr ""
+
+#. module: account_tax_analysis
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_target_move
+msgid "Target Moves"
+msgstr ""
+
+#. module: account_tax_analysis
+#: model:ir.model,name:account_tax_analysis.model_account_tax
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_move_line_analysis_tax
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
+msgid "Tax"
+msgstr ""
+
+#. module: account_tax_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
+msgid "Tax / Account Type"
msgstr ""
#. module: account_tax_analysis
@@ -144,42 +175,42 @@ msgid "Taxes Analysis"
msgstr ""
#. module: account_tax_analysis
-#: view:account.vat.declaration.analysis:account_tax_analysis.view_account_vat_declaration_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_vat_declaration_analysis
msgid "Taxes Report"
msgstr ""
#. module: account_tax_analysis
-#: model:ir.actions.act_window,help:account_tax_analysis.action_account_vat_declaration_analysis
-msgid "This menu print a VAT declaration based on invoices or payments. You can select one or several periods of the fiscal year. 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."
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_move_line_tree_tax_analysis
+msgid "Total Tax"
msgstr ""
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_move_line_tree_tax_analysis
-msgid "Total Taxe"
-msgstr ""
-
-#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_move_line_tree_tax_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_move_line_tree_tax_analysis
msgid "Total credit"
msgstr ""
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_move_line_tree_tax_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_move_line_tree_tax_analysis
msgid "Total debit"
msgstr ""
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_move_line_account_type
+msgid "Type"
+msgstr ""
+
+#. module: account_tax_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
msgid "Unposted"
msgstr ""
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
msgid "Unposted Journal Items"
msgstr ""
#. module: account_tax_analysis
-#: view:account.vat.declaration.analysis:account_tax_analysis.view_account_vat_declaration_analysis
-msgid "or"
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
+msgid "Year"
msgstr ""
diff --git a/account_tax_analysis/i18n/fr.po b/account_tax_analysis/i18n/fr.po
index 8c019c15c..359ab9985 100644
--- a/account_tax_analysis/i18n/fr.po
+++ b/account_tax_analysis/i18n/fr.po
@@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 8.0\n"
+"Project-Id-Version: Odoo Server 10.0+e\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2014-11-19 09:13+0000\n"
-"PO-Revision-Date: 2014-11-19 09:13+0000\n"
+"POT-Creation-Date: 2018-06-12 11:17+0000\n"
+"PO-Revision-Date: 2018-06-12 11:17+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -16,14 +16,14 @@ msgstr ""
"Plural-Forms: \n"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
msgid "Account"
msgstr "Compte"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
-msgid "Account / Tax"
-msgstr "Compte / Taxe"
+#: model:ir.model.fields,help:account_tax_analysis.field_account_move_line_account_type
+msgid "Account Type is used for information purpose, to generate country-specific legal reports, and set the rules to close a fiscal year and generate opening entries."
+msgstr "Le type de compte est utilisé comme indication pour l'utilisateur, ainsi que pour créer des rapports comptables spécifiques à certains pays, et enfin pour gérer les clôtures d'exercices (et établir les écritures correspondantes)"
#. module: account_tax_analysis
#: model:ir.actions.act_window,name:account_tax_analysis.action_account_vat_declaration_analysis
@@ -32,110 +32,141 @@ msgid "Account Vat Declaration"
msgstr "Déclaration de TVA"
#. module: account_tax_analysis
-#: view:account.vat.declaration.analysis:account_tax_analysis.view_account_vat_declaration_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
+msgid "Account type"
+msgstr "Type de compte"
+
+#. module: account_tax_analysis
+#: selection:account.vat.declaration.analysis,target_move:0
+msgid "All Entries"
+msgstr "Toutes les écritures"
+
+#. module: account_tax_analysis
+#: selection:account.vat.declaration.analysis,target_move:0
+msgid "All Posted Entries"
+msgstr "Toutes les écritures comptabilisées"
+
+#. module: account_tax_analysis
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_tax_analysis_name
+msgid "Analysis name"
+msgstr "Non analyse"
+
+#. module: account_tax_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_vat_declaration_analysis
msgid "Cancel"
msgstr "Annuler"
#. module: account_tax_analysis
-#: field:account.vat.declaration.analysis,create_uid:0
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_company_id
+msgid "Company"
+msgstr "Société"
+
+#. module: account_tax_analysis
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_create_uid
msgid "Created by"
-msgstr "Créer par"
+msgstr "Créé par"
#. module: account_tax_analysis
-#: field:account.vat.declaration.analysis,create_date:0
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_create_date
msgid "Created on"
-msgstr "Créer le"
+msgstr "Créé le"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
-msgid "Filters"
-msgstr "Filtres"
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_date_range_id
+msgid "Date Range"
+msgstr "Plage de date"
#. module: account_tax_analysis
-#: field:account.vat.declaration.analysis,fiscalyear_id:0
-msgid "Fiscalyear"
-msgstr "Année fiscale"
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_display_name
+msgid "Display Name"
+msgstr "Nom affiché"
#. module: account_tax_analysis
-#: help:account.vat.declaration.analysis,fiscalyear_id:0
-msgid "Fiscalyear to look on"
-msgstr "Année fiscale a analyser"
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_end_date
+msgid "End date"
+msgstr "Date de fin"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
-msgid "Group By..."
-msgstr "Grouper par"
-
-#. module: account_tax_analysis
-#: field:account.vat.declaration.analysis,id:0
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_id
msgid "ID"
msgstr "ID"
#. module: account_tax_analysis
-#: help:account.vat.declaration.analysis,period_list:0
-msgid "If no period is selected, all the periods of the fiscal year will be used"
-msgstr "Si aucune période n'est sélectionnée toutes les périodes seront prises en compte"
-
-#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
msgid "Journal"
msgstr "Journal"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_move_line_tree_tax_analysis
-msgid "Journal Items"
-msgstr "Lignes comptables"
+#: model:ir.model,name:account_tax_analysis.model_account_move_line
+msgid "Journal Item"
+msgstr "Écriture comptable"
#. module: account_tax_analysis
-#: field:account.vat.declaration.analysis,write_uid:0
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis___last_update
+msgid "Last Modified on"
+msgstr "Dernière Modification le"
+
+#. module: account_tax_analysis
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_write_uid
msgid "Last Updated by"
-msgstr "Mis à jour par"
+msgstr "Dernière mise à jour par"
#. module: account_tax_analysis
-#: field:account.vat.declaration.analysis,write_date:0
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_write_date
msgid "Last Updated on"
-msgstr "Mis à jour le"
+msgstr "Dernière mise à jour le"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
+msgid "Month"
+msgstr "Mois"
+
+#. module: account_tax_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
msgid "Partner"
msgstr "Partenaire"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_vat_declaration_analysis
msgid "Period"
-msgstr "Période"
-
-#. module: account_tax_analysis
-#: view:account.vat.declaration.analysis:account_tax_analysis.view_account_vat_declaration_analysis
-#: field:account.vat.declaration.analysis,period_list:0
-msgid "Periods"
msgstr "Périodes"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
msgid "Posted"
-msgstr "Postée"
+msgstr "Comptabilisée"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
msgid "Posted Journal Items"
-msgstr "Ecritures postées"
+msgstr "Ecritures comptabilisée"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
-msgid "Search Journal Items"
-msgstr ""
-
-#. module: account_tax_analysis
-#: view:account.vat.declaration.analysis:account_tax_analysis.view_account_vat_declaration_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_vat_declaration_analysis
msgid "Show tax lines"
msgstr "Afficher les lignes de taxes"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
-msgid "Tax account"
-msgstr "Compte de tax"
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_start_date
+msgid "Start date"
+msgstr "Date de début"
+
+#. module: account_tax_analysis
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_vat_declaration_analysis_target_move
+msgid "Target Moves"
+msgstr "Mouvements cibles"
+
+#. module: account_tax_analysis
+#: model:ir.model,name:account_tax_analysis.model_account_tax
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_move_line_analysis_tax
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
+msgid "Tax"
+msgstr "Taxe"
+
+#. module: account_tax_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
+msgid "Tax / Account Type"
+msgstr "Taxe / Type de compte"
#. module: account_tax_analysis
#: model:ir.actions.act_window,name:account_tax_analysis.action_view_tax_analysis
@@ -144,42 +175,42 @@ msgid "Taxes Analysis"
msgstr "Analyses des taxes"
#. module: account_tax_analysis
-#: view:account.vat.declaration.analysis:account_tax_analysis.view_account_vat_declaration_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_vat_declaration_analysis
msgid "Taxes Report"
msgstr "Rapport de taxe"
#. module: account_tax_analysis
-#: model:ir.actions.act_window,help:account_tax_analysis.action_account_vat_declaration_analysis
-msgid "This menu print a VAT declaration based on invoices or payments. You can select one or several periods of the fiscal year. 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 "Ce menu affiche une déclaration d'impôts basée sur des factures ou des paiements. Sélectionnez une ou plusieurs périodes de l'exercice fiscal. Les informations requises pour une déclaration de taxes sont générées automatiquement par Odoo à partir des factures (ou des paiements, dans certains pays). Ces données sont mises à jour en temps réel. Ceci est très utile car il vous permet de prévisualiser à tout moment l'impôt que vous devez au début et à la fin du mois ou du trimestre."
-
-#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_move_line_tree_tax_analysis
-msgid "Total Taxe"
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_move_line_tree_tax_analysis
+msgid "Total Tax"
msgstr "Total Taxe"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_move_line_tree_tax_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_move_line_tree_tax_analysis
msgid "Total credit"
-msgstr "Total credit"
+msgstr "Total crédit"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_move_line_tree_tax_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_move_line_tree_tax_analysis
msgid "Total debit"
-msgstr "Total debit"
+msgstr "Total débit"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.model.fields,field_description:account_tax_analysis.field_account_move_line_account_type
+msgid "Type"
+msgstr "Type"
+
+#. module: account_tax_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
msgid "Unposted"
-msgstr "Non posté"
+msgstr "Non comptabilisée"
#. module: account_tax_analysis
-#: view:account.move.line:account_tax_analysis.view_account_move_line_filter_vat_analysis
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
msgid "Unposted Journal Items"
-msgstr "Lignes comptables non postées"
+msgstr "Lignes comptables non-comptabilisée"
#. module: account_tax_analysis
-#: view:account.vat.declaration.analysis:account_tax_analysis.view_account_vat_declaration_analysis
-msgid "or"
-msgstr "ou"
+#: model:ir.ui.view,arch_db:account_tax_analysis.view_account_move_line_filter_vat_analysis
+msgid "Year"
+msgstr "Année"
diff --git a/account_tax_analysis/models/__init__.py b/account_tax_analysis/models/__init__.py
new file mode 100644
index 000000000..54468ca7f
--- /dev/null
+++ b/account_tax_analysis/models/__init__.py
@@ -0,0 +1,7 @@
+# -*- coding: utf-8 -*-
+# Author: Vincent Renaville
+# Copyright 2013 Camptocamp SA
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from . import account_move_line
+from . import account_tax
diff --git a/account_tax_analysis/models/account_move_line.py b/account_tax_analysis/models/account_move_line.py
new file mode 100644
index 000000000..9a7871fbd
--- /dev/null
+++ b/account_tax_analysis/models/account_move_line.py
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+# Copyright 2018 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo import api, fields, models
+
+
+class AccountMoveLine(models.Model):
+
+ _inherit = 'account.move.line'
+
+ analysis_tax = fields.Char(
+ string="Tax", compute="_compute_analysis_tax", store=True)
+ account_type = fields.Many2one(
+ related='account_id.user_type_id', store=True)
+ journal_type = fields.Selection(related="journal_id.type")
+
+ @api.multi
+ @api.depends("tax_line_id", "tax_ids", "company_id")
+ def _compute_analysis_tax(self):
+ companies = self.mapped("company_id")
+ for company in companies:
+ lines = self.filtered(lambda s: s.company_id == company)
+ lang_lines = lines
+ if (company.partner_id.lang and
+ company.partner_id.lang != self.env.user.partner_id.lang):
+ lang_lines = lines.with_context(lang=company.partner_id.lang)
+ for line, lang_line in zip(lines, lang_lines):
+ line.analysis_tax = (
+ lang_line.tax_line_id.analysis_name or
+ ', '.join(sorted(
+ lang_line.tax_ids.mapped('analysis_name'))))
+
+ def action_show_invoice(self):
+ self.ensure_one()
+ invoices = self.env["account.invoice"].search(
+ [("move_id", "=", self.move_id.id)])
+ action = self.env.ref("account.action_invoice_tree")
+ action_fields = action.read()[0]
+ action_fields["domain"] = [("id", "in", invoices.ids)]
+ return action_fields
diff --git a/account_tax_analysis/models/account_tax.py b/account_tax_analysis/models/account_tax.py
new file mode 100644
index 000000000..d7230ab96
--- /dev/null
+++ b/account_tax_analysis/models/account_tax.py
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+# Copyright 2018 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo import api, fields, models
+
+
+class AccountTax(models.Model):
+
+ _inherit = 'account.tax'
+
+ analysis_name = fields.Char(compute="_compute_analysis_name")
+
+ @api.multi
+ @api.depends("name", "description")
+ def _compute_analysis_name(self):
+ for tax in self:
+ if tax.description:
+ tax.analysis_name = "%s - %s" % (tax.description, tax.name)
+ else:
+ tax.analysis_name = tax.name
diff --git a/account_tax_analysis/readme/CONTRIBUTORS.rst b/account_tax_analysis/readme/CONTRIBUTORS.rst
new file mode 100644
index 000000000..d046a31b6
--- /dev/null
+++ b/account_tax_analysis/readme/CONTRIBUTORS.rst
@@ -0,0 +1,2 @@
+* Vincent Renaville (Camptocamp SA)
+* Denis Robinet (ACSONE SA/NV)
diff --git a/account_tax_analysis/readme/DESCRIPTION.rst b/account_tax_analysis/readme/DESCRIPTION.rst
new file mode 100644
index 000000000..2d5c9add8
--- /dev/null
+++ b/account_tax_analysis/readme/DESCRIPTION.rst
@@ -0,0 +1,8 @@
+This add-on is a must if you want to be able to validate your VAT form.
+
+Thanks to a new menu 'Invoicing / Reports / Taxes Analysis'
+you are able to group accounting entries by Taxes (VAT codes)
+and/or financial accounts.
+
+This way you will find easily differences you may see between
+the Odoo tax report and what you see in your books.
diff --git a/account_tax_analysis/tests/__init__.py b/account_tax_analysis/tests/__init__.py
new file mode 100644
index 000000000..d0089e076
--- /dev/null
+++ b/account_tax_analysis/tests/__init__.py
@@ -0,0 +1,2 @@
+from . import test_account_move_line
+from . import test_account_vat_declaration_analysis
diff --git a/account_tax_analysis/tests/test_account_move_line.py b/account_tax_analysis/tests/test_account_move_line.py
new file mode 100644
index 000000000..70aba01b3
--- /dev/null
+++ b/account_tax_analysis/tests/test_account_move_line.py
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+# Copyright 2018 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo.tests.common import TransactionCase
+
+
+class TestAccountMoveLine(TransactionCase):
+
+ def setUp(self):
+ super(TestAccountMoveLine, self).setUp()
+
+ acc_tax = self.env["account.tax"]
+ self.tax1 = acc_tax.create({
+ "name": "tax1",
+ "amount": 1,
+ })
+
+ self.move_line_tax_line_id = self.env["account.move.line"].search(
+ [("tax_line_id", "!=", False)], limit=1)
+ self.move_line_tax_ids = self.env["account.move.line"].search(
+ [("tax_ids", "!=", False)], limit=1)
+
+ def test_analysis_tax(self):
+
+ self.assertEqual(self.move_line_tax_line_id.analysis_tax,
+ self.move_line_tax_line_id.tax_line_id.analysis_name)
+
+ current_tax = self.move_line_tax_ids.tax_ids
+ self.assertEqual(self.move_line_tax_ids.analysis_tax,
+ current_tax.analysis_name)
+
+ self.move_line_tax_ids.tax_ids += self.tax1
+ self.assertEqual(self.move_line_tax_ids.analysis_tax,
+ "%s, tax1" % current_tax.analysis_name)
+
+ def test_analysis_name(self):
+ self.assertEqual(self.tax1.analysis_name, "tax1")
+
+ self.tax1.description = "tax1_d"
+ self.assertEqual(self.tax1.analysis_name, "tax1_d - tax1")
diff --git a/account_tax_analysis/tests/test_account_vat_declaration_analysis.py b/account_tax_analysis/tests/test_account_vat_declaration_analysis.py
new file mode 100644
index 000000000..19c123326
--- /dev/null
+++ b/account_tax_analysis/tests/test_account_vat_declaration_analysis.py
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+# Copyright 2018 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo.tests.common import TransactionCase
+
+
+class TestAccountVatDeclarationAnalysis(TransactionCase):
+
+ def setUp(self):
+ super(TestAccountVatDeclarationAnalysis, self).setUp()
+
+ def test_1(self):
+ wiz = self.env["account.vat.declaration.analysis"].new()
+
+ wiz.start_date = "2017-01-01"
+ wiz.end_date = "2017-01-30"
+
+ self.assertEqual(
+ wiz.show_vat()["domain"],
+ [('date', '>=', '2017-01-01'), ('date', '<=', '2017-01-30')])
+
+ company = self.env.user.company_id
+ wiz.company_id = company
+
+ self.assertEqual(
+ wiz.show_vat()["domain"],
+ [('date', '>=', '2017-01-01'), ('date', '<=', '2017-01-30'),
+ ("company_id", "=", company.id)])
+
+ wiz.target_move = "all"
+ self.assertEqual(
+ wiz.show_vat()["context"],
+ {'search_default_group_by_tax_type': 1})
+
+ wiz.target_move = "posted"
+ self.assertEqual(
+ wiz.show_vat()["context"],
+ {'search_default_group_by_tax_type': 1,
+ 'search_default_posted': 1})
diff --git a/account_tax_analysis/views/account_move_line.xml b/account_tax_analysis/views/account_move_line.xml
new file mode 100644
index 000000000..c510fa2a4
--- /dev/null
+++ b/account_tax_analysis/views/account_move_line.xml
@@ -0,0 +1,92 @@
+
+
+
+
+
+ Journal Items Tax
+ account.move.line
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ account.move.line.tree
+ account.move.line
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Taxes Analysis
+ account.move.line
+ form
+ tree,form
+
+
+
+
+
diff --git a/account_tax_analysis/wizard/__init__.py b/account_tax_analysis/wizard/__init__.py
new file mode 100644
index 000000000..ae2406a15
--- /dev/null
+++ b/account_tax_analysis/wizard/__init__.py
@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+# Author: Vincent Renaville
+# Copyright 2013 Camptocamp SA
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from . import account_tax_analysis
diff --git a/account_tax_analysis/wizard/account_tax_analysis.py b/account_tax_analysis/wizard/account_tax_analysis.py
new file mode 100644
index 000000000..86d8d8ec2
--- /dev/null
+++ b/account_tax_analysis/wizard/account_tax_analysis.py
@@ -0,0 +1,60 @@
+# -*- coding: utf-8 -*-
+# Author: Vincent Renaville
+# Copyright 2013 Camptocamp SA
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from odoo import models, fields, api
+
+
+class AccountTaxDeclarationAnalysis(models.TransientModel):
+ _name = 'account.vat.declaration.analysis'
+ _description = 'Account Vat Declaration'
+
+ start_date = fields.Date(required=True)
+ end_date = fields.Date(required=True)
+ date_range_id = fields.Many2one(
+ comodel_name='date.range', string='Date Range', ondelete="cascade")
+ target_move = fields.Selection([
+ ('posted', 'All Posted Entries'),
+ ('all', 'All Entries'),
+ ], 'Target Moves', required=True, default='posted')
+ company_id = fields.Many2one(
+ comodel_name="res.company", string="Company", ondelete="cascade",
+ default=lambda s: s._default_company_id())
+
+ @api.model
+ def _default_company_id(self):
+ return self.env["res.company"]._company_default_get()
+
+ @api.multi
+ def show_vat(self):
+ self.ensure_one()
+
+ action = self.env.ref('account_tax_analysis.action_view_tax_analysis')
+ action_fields = action.read()[0]
+
+ domain = [('date', '>=', self.start_date),
+ ('date', '<=', self.end_date)]
+ if self.company_id:
+ domain.append(("company_id", "=", self.company_id.id))
+ action_fields['domain'] = domain
+
+ context = {'search_default_group_by_tax_type': 1}
+ if self.target_move == 'posted':
+ context['search_default_posted'] = 1
+ action_fields['context'] = context
+
+ return action_fields
+
+ @api.onchange('date_range_id')
+ def _onchange_date_range(self):
+ if self.date_range_id:
+ self.start_date = self.date_range_id.date_start
+ self.end_date = self.date_range_id.date_end
+
+ @api.onchange('start_date', 'end_date')
+ def _onchange_dates(self):
+ if self.date_range_id:
+ if self.start_date != self.date_range_id.date_start or \
+ self.end_date != self.date_range_id.date_end:
+ self.date_range_id = False
diff --git a/account_tax_analysis/wizard/account_tax_analysis_view.xml b/account_tax_analysis/wizard/account_tax_analysis_view.xml
new file mode 100644
index 000000000..6eb84ecb1
--- /dev/null
+++ b/account_tax_analysis/wizard/account_tax_analysis_view.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+ Account Vat Declaration
+ account.vat.declaration.analysis
+
+
+
+
+
+
+ Account Vat Declaration
+ ir.actions.act_window
+ account.vat.declaration.analysis
+ form
+ form
+ new
+
+
+
+
+
+
+
diff --git a/setup/account_tax_analysis/odoo/__init__.py b/setup/account_tax_analysis/odoo/__init__.py
new file mode 100644
index 000000000..de40ea7ca
--- /dev/null
+++ b/setup/account_tax_analysis/odoo/__init__.py
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
diff --git a/setup/account_tax_analysis/odoo/addons/__init__.py b/setup/account_tax_analysis/odoo/addons/__init__.py
new file mode 100644
index 000000000..de40ea7ca
--- /dev/null
+++ b/setup/account_tax_analysis/odoo/addons/__init__.py
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
diff --git a/setup/account_tax_analysis/odoo/addons/account_tax_analysis b/setup/account_tax_analysis/odoo/addons/account_tax_analysis
new file mode 120000
index 000000000..538e4d18a
--- /dev/null
+++ b/setup/account_tax_analysis/odoo/addons/account_tax_analysis
@@ -0,0 +1 @@
+../../../../account_tax_analysis
\ No newline at end of file
diff --git a/setup/account_tax_analysis/setup.py b/setup/account_tax_analysis/setup.py
new file mode 100644
index 000000000..28c57bb64
--- /dev/null
+++ b/setup/account_tax_analysis/setup.py
@@ -0,0 +1,6 @@
+import setuptools
+
+setuptools.setup(
+ setup_requires=['setuptools-odoo'],
+ odoo_addon=True,
+)