mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[10.0][MIG] account_tax_analysis
Change compared to 8.0: * period_id has been replace by operations an the date field * tax_code_id has been replaced by analysis_tax, a computed fields based an the tax analysis_name, based on description and name
This commit is contained in:
@@ -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)
|
||||
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
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
|
||||
|
||||
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
{"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,
|
||||
}
|
||||
|
||||
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
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
|
||||
@@ -1,133 +0,0 @@
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_account_move_line_filter_vat_analysis" model="ir.ui.view">
|
||||
<field name="name">Journal Items Tax</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field eval="32" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Journal Items">
|
||||
<group string="Filters">
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-document-new"
|
||||
string="Unposted"
|
||||
domain="[('move_id.state','=','draft')]"
|
||||
help="Unposted Journal Items"/>
|
||||
<filter name="posted"
|
||||
icon="terp-camera_test"
|
||||
string="Posted"
|
||||
domain="[('move_id.state','=','posted')]"
|
||||
help="Posted Journal Items"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="date"/>
|
||||
<field name="account_id"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<newline/>
|
||||
<group expand="1" string="Group By...">
|
||||
<filter string="Partner" icon="terp-partner"
|
||||
name="group_by_partner"
|
||||
domain="[]"
|
||||
context="{'group_by': 'partner_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Account"
|
||||
name="group_by_account"
|
||||
icon="terp-folder-green"
|
||||
context="{'group_by': 'account_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Period"
|
||||
name="group_by_period"
|
||||
icon="terp-go-month"
|
||||
domain="[]"
|
||||
context="{'group_by': 'period_id'}"/>
|
||||
<filter string="Journal"
|
||||
name="group_by_journal"
|
||||
domain="[]"
|
||||
context="{'group_by': 'journal_id'}"/>
|
||||
<filter string="Account / Tax"
|
||||
name="group_by_account_tax"
|
||||
icon="terp-folder-green"
|
||||
domain="[]"
|
||||
context="{'group_by': ['tax_code_id', 'account_id'] }"/>
|
||||
<filter string="Tax account"
|
||||
name="group_by_tax"
|
||||
icon="terp-go-month"
|
||||
domain="[]"
|
||||
context="{'group_by': 'tax_code_id'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_line_tree_tax_analysis" model="ir.ui.view">
|
||||
<field name="name">account.move.line.tree</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field eval="16" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Journal Items" editable="top" on_write="on_create_write">
|
||||
<field name="tax_code_id" />
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field name="period_id"/>
|
||||
<field name="date"/>
|
||||
<field name="partner_id" />
|
||||
<field name="account_id" domain="[('journal_id','=',journal_id), ('company_id', '=', company_id)]"/>
|
||||
<field name="debit" sum="Total debit"/>
|
||||
<field name="credit" sum="Total credit"/>
|
||||
<field name="tax_amount" sum="Total Taxe"/>
|
||||
<field name="invoice"/>
|
||||
<field name="amount_currency" />
|
||||
<field name="currency_id" />
|
||||
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_view_tax_analysis" model="ir.actions.act_window">
|
||||
<field name="name">Taxes Analysis</field>
|
||||
<field name="res_model">account.move.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{'search_default_group_by_account_tax': 1}</field>
|
||||
<field name="search_view_id" ref="view_account_move_line_filter_vat_analysis"/>
|
||||
<field name="view_id" ref="view_move_line_tree_tax_analysis"/>
|
||||
</record>
|
||||
|
||||
<record id="view_account_vat_declaration_analysis" model="ir.ui.view">
|
||||
<field name="name">Account Vat Declaration</field>
|
||||
<field name="model">account.vat.declaration.analysis</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Taxes Report">
|
||||
<separator string="Taxes Report" colspan="4"/>
|
||||
<field name="fiscalyear_id"/>
|
||||
<separator string="Periods" colspan="4"/>
|
||||
<field name="period_list" domain="[('fiscalyear_id', '=', fiscalyear_id)]"/>
|
||||
<footer>
|
||||
<button name="show_vat" string="Show tax lines" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button special="cancel" string="Cancel" class="oe_link"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_vat_declaration_analysis" model="ir.actions.act_window">
|
||||
<field name="name">Account Vat Declaration</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.vat.declaration.analysis</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
<field name="help">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.</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Taxes Analysis"
|
||||
parent="account.menu_tax_report"
|
||||
action="action_account_vat_declaration_analysis"
|
||||
id="menu_account_vat_declaration_analysis"
|
||||
icon="STOCK_PRINT"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -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 ""
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
7
account_tax_analysis/models/__init__.py
Normal file
7
account_tax_analysis/models/__init__.py
Normal file
@@ -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
|
||||
41
account_tax_analysis/models/account_move_line.py
Normal file
41
account_tax_analysis/models/account_move_line.py
Normal file
@@ -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
|
||||
21
account_tax_analysis/models/account_tax.py
Normal file
21
account_tax_analysis/models/account_tax.py
Normal file
@@ -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
|
||||
2
account_tax_analysis/readme/CONTRIBUTORS.rst
Normal file
2
account_tax_analysis/readme/CONTRIBUTORS.rst
Normal file
@@ -0,0 +1,2 @@
|
||||
* Vincent Renaville (Camptocamp SA) <vincent.renaville@camptocamp.com>
|
||||
* Denis Robinet (ACSONE SA/NV) <denis.robinet@acsone.eu>
|
||||
8
account_tax_analysis/readme/DESCRIPTION.rst
Normal file
8
account_tax_analysis/readme/DESCRIPTION.rst
Normal file
@@ -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.
|
||||
2
account_tax_analysis/tests/__init__.py
Normal file
2
account_tax_analysis/tests/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from . import test_account_move_line
|
||||
from . import test_account_vat_declaration_analysis
|
||||
41
account_tax_analysis/tests/test_account_move_line.py
Normal file
41
account_tax_analysis/tests/test_account_move_line.py
Normal file
@@ -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")
|
||||
@@ -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})
|
||||
92
account_tax_analysis/views/account_move_line.xml
Normal file
92
account_tax_analysis/views/account_move_line.xml
Normal file
@@ -0,0 +1,92 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Author: Vincent Renaville
|
||||
Copyright 2013 Camptocamp SA
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
|
||||
<odoo>
|
||||
<record id="view_account_move_line_filter_vat_analysis" model="ir.ui.view">
|
||||
<field name="name">Journal Items Tax</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field eval="32" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<search>
|
||||
<field name="date"/>
|
||||
<field name="account_id"/>
|
||||
<group name="filters">
|
||||
<filter name="unposted"
|
||||
string="Unposted"
|
||||
domain="[('move_id.state','=','draft')]"
|
||||
help="Unposted Journal Items"/>
|
||||
<filter name="posted"
|
||||
string="Posted"
|
||||
domain="[('move_id.state','=','posted')]"
|
||||
help="Posted Journal Items"/>
|
||||
</group>
|
||||
<group name="group_by">
|
||||
<filter string="Tax / Account Type"
|
||||
name="group_by_tax_type"
|
||||
domain="[]"
|
||||
context="{'group_by': ['analysis_tax', 'account_type', 'account_id'] }"/>
|
||||
<filter string="Tax"
|
||||
name="group_by_tax"
|
||||
domain="[]"
|
||||
context="{'group_by': 'analysis_tax'}"/>
|
||||
<filter string="Account type"
|
||||
name="group_by_account_type"
|
||||
context="{'group_by': 'account_type'}"/>
|
||||
<filter string="Account"
|
||||
name="group_by_account"
|
||||
context="{'group_by': 'account_id'}"/>
|
||||
<filter string="Partner"
|
||||
name="group_by_partner"
|
||||
domain="[]"
|
||||
context="{'group_by': 'partner_id'}"/>
|
||||
<filter string="Journal"
|
||||
name="group_by_journal"
|
||||
domain="[]"
|
||||
context="{'group_by': 'journal_id'}"/>
|
||||
<filter name="group_by_month"
|
||||
string="Month"
|
||||
context="{'group_by': 'date:month'}" />
|
||||
<filter name="group_by_year"
|
||||
string="Year"
|
||||
context="{'group_by': 'date:year'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_line_tree_tax_analysis" model="ir.ui.view">
|
||||
<field name="name">account.move.line.tree</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field eval="16" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree create="0">
|
||||
<field name="analysis_tax" />
|
||||
<field name="account_type" />
|
||||
<field name="account_id" />
|
||||
<field name="partner_id" />
|
||||
<field name="debit" sum="Total debit"/>
|
||||
<field name="credit" sum="Total credit"/>
|
||||
<field name="balance" sum="Total Tax"/>
|
||||
<field name="name"/>
|
||||
<field name="journal_type" invisible="1"/>
|
||||
<button type="object" name="action_show_invoice" string="View invoice" icon="fa-search" attrs="{'invisible': [('journal_type', 'not in', ['sale', 'purchase'])]}"/>
|
||||
<field name="move_id"/>
|
||||
<field name="date"/>
|
||||
<field name="amount_currency" groups="base.group_multi_currency" />
|
||||
<field name="currency_id" groups="base.group_multi_currency" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_view_tax_analysis" model="ir.actions.act_window">
|
||||
<field name="name">Taxes Analysis</field>
|
||||
<field name="res_model">account.move.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="view_account_move_line_filter_vat_analysis"/>
|
||||
<field name="view_id" ref="view_move_line_tree_tax_analysis"/>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
6
account_tax_analysis/wizard/__init__.py
Normal file
6
account_tax_analysis/wizard/__init__.py
Normal file
@@ -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
|
||||
60
account_tax_analysis/wizard/account_tax_analysis.py
Normal file
60
account_tax_analysis/wizard/account_tax_analysis.py
Normal file
@@ -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
|
||||
50
account_tax_analysis/wizard/account_tax_analysis_view.xml
Normal file
50
account_tax_analysis/wizard/account_tax_analysis_view.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Author: Vincent Renaville
|
||||
Copyright 2013 Camptocamp SA
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
|
||||
<odoo>
|
||||
<record id="view_account_vat_declaration_analysis" model="ir.ui.view">
|
||||
<field name="name">Account Vat Declaration</field>
|
||||
<field name="model">account.vat.declaration.analysis</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Taxes Report">
|
||||
<group>
|
||||
<field name="company_id"/>
|
||||
<field name="date_range_id" domain="['|', ('company_id', '=', company_id), ('company_id', '=', False)]"/>
|
||||
<label for="start_date" string="Period"/>
|
||||
<div>
|
||||
<field name="start_date" class="oe_inline"/> - 
|
||||
<field name="end_date" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="target_move"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button name="show_vat" string="Show tax lines" type="object" class="oe_highlight"/>
|
||||
<button special="cancel" string="Cancel" class="oe_link"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_vat_declaration_analysis" model="ir.actions.act_window">
|
||||
<field name="name">Account Vat Declaration</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.vat.declaration.analysis</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Taxes Analysis"
|
||||
parent="account.menu_finance_reports"
|
||||
id="menu_account_vat_declaration_analysis"/>
|
||||
|
||||
<menuitem
|
||||
name="Taxes Analysis"
|
||||
parent="menu_account_vat_declaration_analysis"
|
||||
action="action_account_vat_declaration_analysis"
|
||||
id="menu_action_account_vat_declaration_analysis"/>
|
||||
|
||||
</odoo>
|
||||
1
setup/account_tax_analysis/odoo/__init__.py
Normal file
1
setup/account_tax_analysis/odoo/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
1
setup/account_tax_analysis/odoo/addons/__init__.py
Normal file
1
setup/account_tax_analysis/odoo/addons/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
1
setup/account_tax_analysis/odoo/addons/account_tax_analysis
Symbolic link
1
setup/account_tax_analysis/odoo/addons/account_tax_analysis
Symbolic link
@@ -0,0 +1 @@
|
||||
../../../../account_tax_analysis
|
||||
6
setup/account_tax_analysis/setup.py
Normal file
6
setup/account_tax_analysis/setup.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
||||
Reference in New Issue
Block a user