[REM] account_tax_chart_interval: The feature has dissapeared in core

This commit is contained in:
Pedro M. Baeza
2017-05-06 22:13:50 +02:00
parent 7ec5a9b506
commit 693ec25682
13 changed files with 0 additions and 365 deletions

View File

@@ -1,40 +0,0 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3
Tax chart for a period interval
===============================
Regular tax chart wizard lets you select only one period. With this module,
you can select an initial and ending period, and you will get taxes data
for that interval.
Known issues / Roadmap
======================
* sum_period compute logic has been completely overwritten when coming from
tax chart wizard because there is no provided hook or facility, so changes
in the computation upstream (unlikely, but possible) will not be reflected
with this module.
Credits
=======
Contributors
------------
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit http://odoo-community.org.

View File

@@ -1,7 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from . import models
from . import wizard

View File

@@ -1,40 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# (c) 2015 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com)
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
#
# 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 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 chart for a period interval",
"version": "8.0.1.0.0",
"depends": [
"account",
],
"author": "Serv. Tecnol. Avanzados - Pedro M. Baeza, "
'Antiun Ingeniería S.L., '
'Odoo Community Association (OCA)',
"website": "http://www.antiun.com",
"contributors": [
"Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>",
],
"category": "Accounting & Finance",
"data": [
'wizard/account_tax_chart_view.xml',
],
'installable': False,
}

View File

@@ -1,32 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_tax_chart_interval
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-05-22 10:52+0000\n"
"PO-Revision-Date: 2015-05-22 10:52+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_tax_chart_interval
#: field:account.tax.chart,period_to:0
msgid "End period"
msgstr ""
#. module: account_tax_chart_interval
#: field:account.tax.chart,fiscalyear_id:0
msgid "Fiscal year"
msgstr ""
#. module: account_tax_chart_interval
#: field:account.tax.chart,period_from:0
msgid "Start period"
msgstr ""

View File

@@ -1,43 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_tax_chart_interval
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: account-financial-tools (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-03 22:27+0000\n"
"PO-Revision-Date: 2015-09-29 09:08+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>\n"
"Language-Team: Spanish (http://www.transifex.com/oca/OCA-account-financial-tools-8-0/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_tax_chart_interval
#: model:ir.model,name:account_tax_chart_interval.model_account_tax_chart
msgid "Account tax chart"
msgstr ""
#. module: account_tax_chart_interval
#: field:account.tax.chart,period_to:0
msgid "End period"
msgstr "Periodo final"
#. module: account_tax_chart_interval
#: field:account.tax.chart,fiscalyear_id:0
msgid "Fiscal year"
msgstr "Ejercicio fiscal"
#. module: account_tax_chart_interval
#: field:account.tax.chart,period_from:0
msgid "Start period"
msgstr "Periodo inicial"
#. module: account_tax_chart_interval
#: model:ir.model,name:account_tax_chart_interval.model_account_tax_code
msgid "Tax Code"
msgstr "Código de impuesto"

View File

@@ -1,43 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_tax_chart_interval
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: account-financial-tools (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-03 22:27+0000\n"
"PO-Revision-Date: 2015-09-29 09:03+0000\n"
"Last-Translator: <>\n"
"Language-Team: Spanish (Spain) (http://www.transifex.com/oca/OCA-account-financial-tools-8-0/language/es_ES/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: es_ES\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: account_tax_chart_interval
#: model:ir.model,name:account_tax_chart_interval.model_account_tax_chart
msgid "Account tax chart"
msgstr ""
#. module: account_tax_chart_interval
#: field:account.tax.chart,period_to:0
msgid "End period"
msgstr ""
#. module: account_tax_chart_interval
#: field:account.tax.chart,fiscalyear_id:0
msgid "Fiscal year"
msgstr ""
#. module: account_tax_chart_interval
#: field:account.tax.chart,period_from:0
msgid "Start period"
msgstr ""
#. module: account_tax_chart_interval
#: model:ir.model,name:account_tax_chart_interval.model_account_tax_code
msgid "Tax Code"
msgstr "Código de impuesto"

View File

@@ -1,44 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_tax_chart_interval
#
# Translators:
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2015
msgid ""
msgstr ""
"Project-Id-Version: account-financial-tools (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-03 22:27+0000\n"
"PO-Revision-Date: 2015-09-30 11:30+0000\n"
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>\n"
"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-account-financial-tools-8-0/language/sl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: sl\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
#. module: account_tax_chart_interval
#: model:ir.model,name:account_tax_chart_interval.model_account_tax_chart
msgid "Account tax chart"
msgstr "Davčni kontni plan"
#. module: account_tax_chart_interval
#: field:account.tax.chart,period_to:0
msgid "End period"
msgstr "Končno obdobje"
#. module: account_tax_chart_interval
#: field:account.tax.chart,fiscalyear_id:0
msgid "Fiscal year"
msgstr "Fiskalno leto"
#. module: account_tax_chart_interval
#: field:account.tax.chart,period_from:0
msgid "Start period"
msgstr "Začetno obdobje"
#. module: account_tax_chart_interval
#: model:ir.model,name:account_tax_chart_interval.model_account_tax_code
msgid "Tax Code"
msgstr "Koda davka"

View File

@@ -1,6 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from . import account_tax_code

View File

@@ -1,29 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
class AccountTaxCode(models.Model):
_inherit = 'account.tax.code'
sum_period = fields.Float(compute="_sum_period")
@api.one
def _sum_period(self):
context = self.env.context
if context.get('period_ids'):
move_state = ('posted', )
if context.get('state', False) == 'all':
move_state = ('draft', 'posted', )
self.sum_period = self._sum(
'sum_period', [],
where=' AND line.period_id IN %s AND move.state IN %s',
where_params=(tuple(context['period_ids']),
move_state))[self.id]
else:
self.sum_period = super(AccountTaxCode,
self)._sum_period('sum_period',
[])[self.id]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

View File

@@ -1,6 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from . import account_tax_chart

View File

@@ -1,49 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
from openerp.tools.safe_eval import safe_eval
class AccountTaxChart(models.TransientModel):
_inherit = 'account.tax.chart'
def default_fiscalyear(self):
return self.env['account.fiscalyear'].find()
fiscalyear_id = fields.Many2one(
comodel_name='account.fiscalyear', string='Fiscal year',
default=default_fiscalyear)
period_from = fields.Many2one(
comodel_name='account.period', string='Start period',
domain="[('fiscalyear_id', '=', fiscalyear_id)]")
period_to = fields.Many2one(
comodel_name='account.period', string='End period',
domain="[('fiscalyear_id', '=', fiscalyear_id)]")
@api.one
@api.onchange('fiscalyear_id')
def onchange_fiscalyear(self):
self.period_from = (self.fiscalyear_id.period_ids and
self.fiscalyear_id.period_ids[0] or False)
self.period_to = (self.fiscalyear_id.period_ids and
self.fiscalyear_id.period_ids[-1] or False)
@api.multi
def account_tax_chart_open_window(self):
res = super(AccountTaxChart, self).account_tax_chart_open_window()
res['context'] = safe_eval(res['context'])
if self.fiscalyear_id:
res['context']['fiscalyear_id'] = self.fiscalyear_id.id
if self.period_from and self.period_to:
res['context']['period_ids'] = (
self.env['account.period'].build_ctx_periods(
self.period_from.id, self.period_to.id))
name = res['name']
if name.find(':'):
name = name[:name.find(':')]
name += ":%s-%s" % (self.period_from.code, self.period_to.code)
res['name'] = name
return res

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_account_tax_chart_interval" model="ir.ui.view">
<field name="name">account.tax.chart.form.interval</field>
<field name="model">account.tax.chart</field>
<field name="inherit_id" ref="account.view_account_tax_chart"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='period_id']/../.." position="attributes">
<attribute name="invisible">1</attribute>
</xpath>
<xpath expr="//field[@name='period_id']/../.." position="after">
<group>
<field name="fiscalyear_id"/>
</group>
<group colspan="4" col="4">
<field name="period_from"/>
<field name="period_to"/>
</group>
</xpath>
</field>
</record>
</data>
</openerp>