From cef39f5053b10699dc8df7f4a9c4abe4c873dfc8 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 21 Nov 2012 09:56:48 +0100 Subject: [PATCH 01/69] Move my module account_analytic_required from extra-addons to account-analytic --- account_analytic_required/__init__.py | 24 ++++ account_analytic_required/__openerp__.py | 44 +++++++ account_analytic_required/account.py | 67 ++++++++++ account_analytic_required/account_view.xml | 24 ++++ .../i18n/account_analytic_required.pot | 94 ++++++++++++++ account_analytic_required/i18n/ar.po | 120 +++++++++++++++++ account_analytic_required/i18n/ca.po | 120 +++++++++++++++++ account_analytic_required/i18n/es.po | 122 ++++++++++++++++++ account_analytic_required/i18n/fr.po | 121 +++++++++++++++++ 9 files changed, 736 insertions(+) create mode 100644 account_analytic_required/__init__.py create mode 100644 account_analytic_required/__openerp__.py create mode 100644 account_analytic_required/account.py create mode 100644 account_analytic_required/account_view.xml create mode 100644 account_analytic_required/i18n/account_analytic_required.pot create mode 100644 account_analytic_required/i18n/ar.po create mode 100644 account_analytic_required/i18n/ca.po create mode 100644 account_analytic_required/i18n/es.po create mode 100644 account_analytic_required/i18n/fr.po diff --git a/account_analytic_required/__init__.py b/account_analytic_required/__init__.py new file mode 100644 index 000000000..71b2d9b73 --- /dev/null +++ b/account_analytic_required/__init__.py @@ -0,0 +1,24 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account analytic required module for OpenERP +# Copyright (C) 2011 Akretion (http://www.akretion.com). All Rights Reserved +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + + +import account diff --git a/account_analytic_required/__openerp__.py b/account_analytic_required/__openerp__.py new file mode 100644 index 000000000..b7a9b7c54 --- /dev/null +++ b/account_analytic_required/__openerp__.py @@ -0,0 +1,44 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account analytic required module for OpenERP +# Copyright (C) 2011 Akretion (http://www.akretion.com). All Rights Reserved +# @author Alexis de Lattre +# +# 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': 'Account analytic required', + 'version': '0.1', + 'category': 'Generic Modules/Accounting', + 'license': 'AGPL-3', + 'description': """This module adds an option "analytic policy" on account types. You have the choice between 3 policies : always, never and optional. + +For example, if you want to have an analytic account on all your expenses, set the policy to "always" for the account type "expense" ; then, if you try to save an account move line with an account of type "expense" without analytic account, you will get an error message. + +Module developped by Alexis de Lattre during the Akretion-Camptocamp code sprint of June 2011. +""", + 'author': 'Akretion', + 'website': 'http://www.akretion.com/', + 'depends': ['account'], + 'init_xml': [], + 'update_xml': ['account_view.xml'], + 'demo_xml': [], + 'installable': True, + 'active': False, +} + diff --git a/account_analytic_required/account.py b/account_analytic_required/account.py new file mode 100644 index 000000000..6e47fddba --- /dev/null +++ b/account_analytic_required/account.py @@ -0,0 +1,67 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account analytic required module for OpenERP +# Copyright (C) 2011 Akretion (http://www.akretion.com). All Rights Reserved +# @author Alexis de Lattre +# Developped during the Akretion-Camptocamp code sprint of June 2011 +# +# 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 osv import fields, osv +from tools.translate import _ + + +class account_account_type(osv.osv): + _inherit = "account.account.type" + + _columns = { + 'analytic_policy' : fields.selection([ + ('optional', 'Optional'), + ('always', 'Always'), + ('never', 'Never') + ], 'Policy for analytic account', help="Set the policy for analytic accounts : if you select 'Optional', the accountant is free to put an analytic account on an account move line with this type of account ; if you select 'Always', the accountant will get an error message if there is no analytic account ; if you select 'Never', the accountant will get an error message if an analytic account is present."), + } + + _defaults = { + 'analytic_policy': lambda *a: 'optional', + } + +account_account_type() + + +class account_move_line(osv.osv): + _inherit = "account.move.line" + + def check_analytic_required(self, cr, uid, vals, context=None): + if vals.has_key('account_id'): + account = self.pool.get('account.account').browse(cr, uid, vals['account_id'], context=context) + if account.user_type.analytic_policy == 'always' and not vals.get('analytic_account_id', False): + raise osv.except_osv(_('Error :'), _("Analytic policy is set to 'Always' with account %s '%s' but the analytic account is missing in the account move line with label '%s'." % (account.code, account.name, vals.get('name', False)))) + elif account.user_type.analytic_policy == 'never' and vals.get('analytic_account_id', False): + cur_analytic_account = self.pool.get('account.analytic.account').read(cr, uid, vals['analytic_account_id'], ['name', 'code'], context=context) + raise osv.except_osv(_('Error :'), _("Analytic policy is set to 'Never' with account %s '%s' but the account move line with label '%s' has an analytic account %s '%s'." % (account.code, account.name, vals.get('name', False), cur_analytic_account['code'], cur_analytic_account['name']))) + return True + + def create(self, cr, uid, vals, context=None, check=True): + self.check_analytic_required(cr, uid, vals, context=context) + return super(account_move_line, self).create(cr, uid, vals, context=context, check=check) + + def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): + self.check_analytic_required(cr, uid, vals, context=context) + return super(account_move_line, self).write(cr, uid, ids, vals, context=context, check=check, update_check=update_check) + +account_move_line() diff --git a/account_analytic_required/account_view.xml b/account_analytic_required/account_view.xml new file mode 100644 index 000000000..def05a1e8 --- /dev/null +++ b/account_analytic_required/account_view.xml @@ -0,0 +1,24 @@ + + + + + + + + account_analytic_required.account_type_form + account.account.type + + + + + + + + + + diff --git a/account_analytic_required/i18n/account_analytic_required.pot b/account_analytic_required/i18n/account_analytic_required.pot new file mode 100644 index 000000000..6724a8fcd --- /dev/null +++ b/account_analytic_required/i18n/account_analytic_required.pot @@ -0,0 +1,94 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * account_analytic_required +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 6.0.2\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2011-06-10 07:49+0000\n" +"PO-Revision-Date: 2011-06-10 07:49+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_analytic_required +#: field:account.account.type,analytic_policy:0 +msgid "Policy for analytic account" +msgstr "" + +#. module: account_analytic_required +#: help:account.account.type,analytic_policy:0 +msgid "Set the policy for analytic accounts : if you select 'Optional', the accountant is free to put an analytic account on an account move line with this type of account ; if you select 'Always', the accountant will get an error message if there is no analytic account ; if you select 'Never', the accountant will get an error message if an analytic account is present." +msgstr "" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "" + +#. module: account_analytic_required +#: model:ir.module.module,description:account_analytic_required.module_meta_information +msgid "This module adds an option \"analytic policy\" on account types. You have the choice between 3 policies : always, never and optional.\n" +"\n" +"For example, if you want to have an analytic account on all your expenses, set the policy to \"always\" for the account type \"expense\" ; then, if you try to save an account move line with an account of type \"expense\" without analytic account, you will get an error message.\n" +"\n" +"Module developped by Alexis de Lattre during the Akretion-Camptocamp code sprint of June 2011.\n" +"" +msgstr "" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on closed account." +msgstr "" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "" + +#. module: account_analytic_required +#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information +msgid "Account analytic required" +msgstr "" + +#. module: account_analytic_required +#: sql_constraint:account.move.line:0 +msgid "Wrong credit or debit value in accounting entry !" +msgstr "" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on view account." +msgstr "" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Items" +msgstr "" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "Company must be same for its related account and period." +msgstr "" + +#. module: account_analytic_required +#: code:addons/account_analytic_required/account.py:53 +#: code:addons/account_analytic_required/account.py:56 +#, python-format +msgid "Error :" +msgstr "" + diff --git a/account_analytic_required/i18n/ar.po b/account_analytic_required/i18n/ar.po new file mode 100644 index 000000000..9452af052 --- /dev/null +++ b/account_analytic_required/i18n/ar.po @@ -0,0 +1,120 @@ +# Arabic translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-06-10 07:49+0000\n" +"PO-Revision-Date: 2012-02-08 07:01+0000\n" +"Last-Translator: husam \n" +"Language-Team: Arabic \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-09-25 05:07+0000\n" +"X-Generator: Launchpad (build 16019)\n" + +#. module: account_analytic_required +#: field:account.account.type,analytic_policy:0 +msgid "Policy for analytic account" +msgstr "سياسة للحسابات التحليلية" + +#. module: account_analytic_required +#: help:account.account.type,analytic_policy:0 +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Never', the " +"accountant will get an error message if an analytic account is present." +msgstr "" +"ضع سياسة للحسابات التحليلية: إذا قمت بتحديد \"الاختياري\"، فان المحاسب حر في " +"وضع حساب تحليلي على حساب خط التحرك مع هذا النوع من الحساب، وإذا قمت بتحديد " +"\"دائما\"، فان المحاسب سوف يحصل على رسالة خطأ إذا كان هناك لا يوجد حساب " +"تحليلي، وإذا قمت بتحديد \"أبدا\"، فان المحاسب سوف يحصل على رسالة خطأ إذا كان " +"هناك حساب تحليلي موجود" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "إختياري" + +#. module: account_analytic_required +#: model:ir.module.module,description:account_analytic_required.module_meta_information +msgid "" +"This module adds an option \"analytic policy\" on account types. You have " +"the choice between 3 policies : always, never and optional.\n" +"\n" +"For example, if you want to have an analytic account on all your expenses, " +"set the policy to \"always\" for the account type \"expense\" ; then, if you " +"try to save an account move line with an account of type \"expense\" without " +"analytic account, you will get an error message.\n" +"\n" +"Module developped by Alexis de Lattre during " +"the Akretion-Camptocamp code sprint of June 2011.\n" +msgstr "" +"هذه الوحدة تضيف خيار \"السياسة التحليلية\" على أنواع الحسابات. لديك خيار بين " +"3 سياسات: دائما، أبدا، واختياري.\n" +"\n" +"على سبيل المثال، إذا كنت تريد أن يكون لديك حساب تحليلي عن جميع النفقات " +"الخاصة بك، اختار النهج \"دائما\" من أجل نوع الحساب\"مصروف\"، ثم، إذا حاولت " +"حفظ الحركة في حساب مع حساب \"مصروف\" من دون حساب تحليلي، وسوف تحصل على " +"رسالة خطأ.\n" +"\n" +"طورت الوحدة بواسطة اتر أليكسيس دي alexis.delattre@akretion.com> Akretion-" +"Camptocamp من يونيو 2011\n" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on closed account." +msgstr "لا يمكنك انشاء حركة على الحساب" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "دائماً" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "أبدًا" + +#. module: account_analytic_required +#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information +msgid "Account analytic required" +msgstr "مطلوب حساب تحليلي" + +#. module: account_analytic_required +#: sql_constraint:account.move.line:0 +msgid "Wrong credit or debit value in accounting entry !" +msgstr "قيمة دائنة أو مدينة خاطئة في القيد المحاسبي !" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on view account." +msgstr "لا يمكنك عمل حركة على هذا الحساب" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Items" +msgstr "عناصر دفتر اليومية" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "نوع الحساب" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "Company must be same for its related account and period." +msgstr "يجب ان تكون الشركة نفس فترتها وحسابها المتعلق بها." + +#. module: account_analytic_required +#: code:addons/account_analytic_required/account.py:53 +#: code:addons/account_analytic_required/account.py:56 +#, python-format +msgid "Error :" +msgstr "خطأ :" diff --git a/account_analytic_required/i18n/ca.po b/account_analytic_required/i18n/ca.po new file mode 100644 index 000000000..f812bd33e --- /dev/null +++ b/account_analytic_required/i18n/ca.po @@ -0,0 +1,120 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * account_analytic_required +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 6.0.2\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2011-06-10 07:49+0000\n" +"PO-Revision-Date: 2011-06-24 10:26+0000\n" +"Last-Translator: jmartin (Zikzakmedia) \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-09-25 05:07+0000\n" +"X-Generator: Launchpad (build 16019)\n" + +#. module: account_analytic_required +#: field:account.account.type,analytic_policy:0 +msgid "Policy for analytic account" +msgstr "Política per als comptes analítics" + +#. module: account_analytic_required +#: help:account.account.type,analytic_policy:0 +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Never', the " +"accountant will get an error message if an analytic account is present." +msgstr "" +"Configura la política per als comptes analítics: Si seleccioneu 'Opcional', " +"el comptable és lliure de posar un compte analític en un apunt comptable amb " +"aquest tipus de compte; si seleccioneu 'Sempre', el comptable rebrà un " +"missatge d'error si l'apunt no té compte analític; si seleccioneu 'Mai', el " +"comptable rebrà un missatge d'error si l'apunt té un compte analític." + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "Opcional" + +#. module: account_analytic_required +#: model:ir.module.module,description:account_analytic_required.module_meta_information +msgid "" +"This module adds an option \"analytic policy\" on account types. You have " +"the choice between 3 policies : always, never and optional.\n" +"\n" +"For example, if you want to have an analytic account on all your expenses, " +"set the policy to \"always\" for the account type \"expense\" ; then, if you " +"try to save an account move line with an account of type \"expense\" without " +"analytic account, you will get an error message.\n" +"\n" +"Module developped by Alexis de Lattre during " +"the Akretion-Camptocamp code sprint of June 2011.\n" +msgstr "" +"Aquest mòdul afegeix una opció \"política analítica\" als tipus comptables. " +"Podeu escollir entre 3 polítiques: 'Sempre', 'Mai' i 'Opcional'.\n" +"\n" +"Per exemple, si voleu tenir un compte analític de totes les vostres " +"despeses, seleccioneu la política \"Sempre\" per al tipus comptable " +"\"Despesa\"; llavors, si intenteu desar un apunt comptable de tipus " +"comptable \"Despesa\" sense compte analític, obtindreu un missatge d'error.\n" +"\n" +"Mòdul desenvolupat per Alexis de Lattre " +"durant la cursa de codi Akretion-Camptocamp de juny de 2011.\n" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on closed account." +msgstr "No podeu crear un apunt en un compte tancat." + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "Sempre" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "Mai" + +#. module: account_analytic_required +#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information +msgid "Account analytic required" +msgstr "El compte analític és requerit." + +#. module: account_analytic_required +#: sql_constraint:account.move.line:0 +msgid "Wrong credit or debit value in accounting entry !" +msgstr "Valor erroni al deure o a l'haver de l'assentament comptable!" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on view account." +msgstr "No podeu crear un apunt en un compte de tipus \"Vista\"." + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Items" +msgstr "Apunts comptables" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "Tipus de compte" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "Company must be same for its related account and period." +msgstr "" +"La companyia ha de ser la mateixa que la dels comptes i períodes relacionats." + +#. module: account_analytic_required +#: code:addons/account_analytic_required/account.py:53 +#: code:addons/account_analytic_required/account.py:56 +#, python-format +msgid "Error :" +msgstr "Error:" diff --git a/account_analytic_required/i18n/es.po b/account_analytic_required/i18n/es.po new file mode 100644 index 000000000..38626e05e --- /dev/null +++ b/account_analytic_required/i18n/es.po @@ -0,0 +1,122 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * account_analytic_required +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 6.0.2\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2011-06-10 07:49+0000\n" +"PO-Revision-Date: 2011-06-24 10:25+0000\n" +"Last-Translator: jmartin (Zikzakmedia) \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-09-25 05:07+0000\n" +"X-Generator: Launchpad (build 16019)\n" + +#. module: account_analytic_required +#: field:account.account.type,analytic_policy:0 +msgid "Policy for analytic account" +msgstr "Política para las cuentas analíticas" + +#. module: account_analytic_required +#: help:account.account.type,analytic_policy:0 +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Never', the " +"accountant will get an error message if an analytic account is present." +msgstr "" +"Configura la política para las cuentas analíticas: Si selecciona 'Opcional', " +"el contable es libre de poner una cuenta analítica en un apunte contable de " +"este tipo de cuenta; si selecciona 'Siempre', el contable recibirá un " +"mensaje de error si el apunte no tiene cuenta analítica; si selecciona " +"'Nunca', el contable recibirá un mensaje de error si el apunte tiene una " +"cuenta analítica." + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "Opcional" + +#. module: account_analytic_required +#: model:ir.module.module,description:account_analytic_required.module_meta_information +msgid "" +"This module adds an option \"analytic policy\" on account types. You have " +"the choice between 3 policies : always, never and optional.\n" +"\n" +"For example, if you want to have an analytic account on all your expenses, " +"set the policy to \"always\" for the account type \"expense\" ; then, if you " +"try to save an account move line with an account of type \"expense\" without " +"analytic account, you will get an error message.\n" +"\n" +"Module developped by Alexis de Lattre during " +"the Akretion-Camptocamp code sprint of June 2011.\n" +msgstr "" +"Este módulo añade una opción \"política analítica\" a los tipos contables. " +"Puede escoger entre 3 políticas: 'Siempre', 'Nunca' y 'Opcional'.\n" +"\n" +"Por ejemplo, si quiere tener una cuenta analítica de todos sus gastos, " +"seleccione la política \"Siempre\" para el tipo contable \"Gasto\"; " +"entonces, si intenta guardar un apunte contable de tipo contable \"Gasto\" " +"sin cuenta analítica, obtendrá un mensaje de error.\n" +"\n" +"Módulo desarrollado por Alexis de Lattre " +"durante la carrera de código Akretion-Camptocamp de junio de 2011.\n" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on closed account." +msgstr "No puede crear un apunte en una cuenta cerrada." + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "Siempre" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "Nunca" + +#. module: account_analytic_required +#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information +msgid "Account analytic required" +msgstr "La cuenta analítica es requerida." + +#. module: account_analytic_required +#: sql_constraint:account.move.line:0 +msgid "Wrong credit or debit value in accounting entry !" +msgstr "¡Valor erróneo en el debe o en el haber del asiento contable!" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on view account." +msgstr "No puede crear un apunte en una cuenta de tipo \"Vista\"." + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Items" +msgstr "Apuntes contables" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "Tipo de cuenta" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "Company must be same for its related account and period." +msgstr "" +"La compañía debe ser la misma que la de las cuentas y los periodos " +"relacionados." + +#. module: account_analytic_required +#: code:addons/account_analytic_required/account.py:53 +#: code:addons/account_analytic_required/account.py:56 +#, python-format +msgid "Error :" +msgstr "Error:" diff --git a/account_analytic_required/i18n/fr.po b/account_analytic_required/i18n/fr.po new file mode 100644 index 000000000..cbfecc6fe --- /dev/null +++ b/account_analytic_required/i18n/fr.po @@ -0,0 +1,121 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * account_analytic_required +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 6.0.2\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2011-06-10 07:49+0000\n" +"PO-Revision-Date: 2011-06-14 15:19+0000\n" +"Last-Translator: Alexis de Lattre \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-09-25 05:07+0000\n" +"X-Generator: Launchpad (build 16019)\n" + +#. module: account_analytic_required +#: field:account.account.type,analytic_policy:0 +msgid "Policy for analytic account" +msgstr "Politique pour les comptes analytiques" + +#. module: account_analytic_required +#: help:account.account.type,analytic_policy:0 +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Never', the " +"accountant will get an error message if an analytic account is present." +msgstr "" +"Configurez la politique pour les comptes analytiques : si vous sélectionnez " +"'Optionnel', le comptable est libre de saisir ou non un compte analytique " +"sur une ligne comptable avec ce type de compte de comptabilité générale ; si " +"vous sélectionnez 'Toujours', le comptable aura un message d'erreur si il " +"n'y a pas de compte analytique ; si vous sélectionnez 'Jamais', le comptable " +"aura un message d'erreur si un compte analytique est présent." + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "Optionnel" + +#. module: account_analytic_required +#: model:ir.module.module,description:account_analytic_required.module_meta_information +msgid "" +"This module adds an option \"analytic policy\" on account types. You have " +"the choice between 3 policies : always, never and optional.\n" +"\n" +"For example, if you want to have an analytic account on all your expenses, " +"set the policy to \"always\" for the account type \"expense\" ; then, if you " +"try to save an account move line with an account of type \"expense\" without " +"analytic account, you will get an error message.\n" +"\n" +"Module developped by Alexis de Lattre during " +"the Akretion-Camptocamp code sprint of June 2011.\n" +msgstr "" +"This module adds an option \"analytic policy\" on account types. You have " +"the choice between 3 policies : always, never and optional.\n" +"\n" +"For example, if you want to have an analytic account on all your expenses, " +"set the policy to \"always\" for the account type \"expense\" ; then, if you " +"try to save an account move line with an account of type \"expense\" without " +"analytic account, you will get an error message.\n" +"\n" +"Module developped by Alexis de Lattre during " +"the Akretion-Camptocamp code sprint of June 2011.\n" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on closed account." +msgstr "Impossible de créer une ligne d'écriture sur un compte clôturé" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "Toujours" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "Jamais" + +#. module: account_analytic_required +#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information +msgid "Account analytic required" +msgstr "Account analytic required" + +#. module: account_analytic_required +#: sql_constraint:account.move.line:0 +msgid "Wrong credit or debit value in accounting entry !" +msgstr "Valeur erronée au crédit ou au débit de la pièce comptable !" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on view account." +msgstr "" +"Vous ne pouvez pas créer de ligne d'écriture sur un compte de type \"Vue\"." + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Items" +msgstr "Écritures comptables" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "Type de compte" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "Company must be same for its related account and period." +msgstr "La société doit être la même pour les comptes et périodes liées." + +#. module: account_analytic_required +#: code:addons/account_analytic_required/account.py:53 +#: code:addons/account_analytic_required/account.py:56 +#, python-format +msgid "Error :" +msgstr "Erreur :" From f290fc2aae2170383bed577a7ffcda4d8d73a904 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Mon, 17 Dec 2012 14:22:09 +0100 Subject: [PATCH 02/69] [IMP] account_analytic_required: do not enforce policy when credit=debit=0.0 This is useful in some situations where the tax generates move lines with credit=debit=0.0 with a non-zero tax amount (for instance with tax code VAT-IN-V82-21-EU-S in l10n_be). Without this patch the transaction would be rejected when analytic policy is 'required', since analytic accounts are not propagated through taxes in 6.1. --- account_analytic_required/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_analytic_required/account.py b/account_analytic_required/account.py index 6e47fddba..65a856664 100644 --- a/account_analytic_required/account.py +++ b/account_analytic_required/account.py @@ -47,7 +47,7 @@ class account_move_line(osv.osv): _inherit = "account.move.line" def check_analytic_required(self, cr, uid, vals, context=None): - if vals.has_key('account_id'): + if vals.has_key('account_id') and (vals.get('debit',0.0) != 0.0 or vals.get('credit',0.0) != 0.0): account = self.pool.get('account.account').browse(cr, uid, vals['account_id'], context=context) if account.user_type.analytic_policy == 'always' and not vals.get('analytic_account_id', False): raise osv.except_osv(_('Error :'), _("Analytic policy is set to 'Always' with account %s '%s' but the analytic account is missing in the account move line with label '%s'." % (account.code, account.name, vals.get('name', False)))) From f1fc91967410199cfac33210a50997419ec86f0b Mon Sep 17 00:00:00 2001 From: Joel Grand-Guillaume Date: Wed, 3 Apr 2013 16:39:30 +0200 Subject: [PATCH 03/69] [MIGR] Set installable = False in modules to setup the 7.0 series --- account_analytic_required/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_analytic_required/__openerp__.py b/account_analytic_required/__openerp__.py index b7a9b7c54..5b88ded0b 100644 --- a/account_analytic_required/__openerp__.py +++ b/account_analytic_required/__openerp__.py @@ -38,7 +38,7 @@ 'init_xml': [], 'update_xml': ['account_view.xml'], 'demo_xml': [], - 'installable': True, + 'installable': False, 'active': False, } From bedb9e77d9e6b67ac02fd78ea89f3a31aea7ec91 Mon Sep 17 00:00:00 2001 From: Laetitia Gangloff Date: Thu, 4 Apr 2013 18:26:47 +0200 Subject: [PATCH 04/69] account_analytic_required: migration V7 --- account_analytic_required/__openerp__.py | 4 ++-- account_analytic_required/account.py | 14 +++++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/account_analytic_required/__openerp__.py b/account_analytic_required/__openerp__.py index 5b88ded0b..a193c8ddd 100644 --- a/account_analytic_required/__openerp__.py +++ b/account_analytic_required/__openerp__.py @@ -23,7 +23,7 @@ { 'name': 'Account analytic required', - 'version': '0.1', + 'version': '0.2', 'category': 'Generic Modules/Accounting', 'license': 'AGPL-3', 'description': """This module adds an option "analytic policy" on account types. You have the choice between 3 policies : always, never and optional. @@ -38,7 +38,7 @@ 'init_xml': [], 'update_xml': ['account_view.xml'], 'demo_xml': [], - 'installable': False, + 'installable': True, 'active': False, } diff --git a/account_analytic_required/account.py b/account_analytic_required/account.py index 65a856664..47d56b769 100644 --- a/account_analytic_required/account.py +++ b/account_analytic_required/account.py @@ -21,11 +21,11 @@ # ############################################################################## -from osv import fields, osv +from openerp.osv import orm, fields from tools.translate import _ -class account_account_type(osv.osv): +class account_account_type(orm.Model): _inherit = "account.account.type" _columns = { @@ -40,20 +40,17 @@ class account_account_type(osv.osv): 'analytic_policy': lambda *a: 'optional', } -account_account_type() - - -class account_move_line(osv.osv): +class account_move_line(orm.Model): _inherit = "account.move.line" def check_analytic_required(self, cr, uid, vals, context=None): if vals.has_key('account_id') and (vals.get('debit',0.0) != 0.0 or vals.get('credit',0.0) != 0.0): account = self.pool.get('account.account').browse(cr, uid, vals['account_id'], context=context) if account.user_type.analytic_policy == 'always' and not vals.get('analytic_account_id', False): - raise osv.except_osv(_('Error :'), _("Analytic policy is set to 'Always' with account %s '%s' but the analytic account is missing in the account move line with label '%s'." % (account.code, account.name, vals.get('name', False)))) + raise orm.except_orm(_('Error :'), _("Analytic policy is set to 'Always' with account %s '%s' but the analytic account is missing in the account move line with label '%s'." % (account.code, account.name, vals.get('name', False)))) elif account.user_type.analytic_policy == 'never' and vals.get('analytic_account_id', False): cur_analytic_account = self.pool.get('account.analytic.account').read(cr, uid, vals['analytic_account_id'], ['name', 'code'], context=context) - raise osv.except_osv(_('Error :'), _("Analytic policy is set to 'Never' with account %s '%s' but the account move line with label '%s' has an analytic account %s '%s'." % (account.code, account.name, vals.get('name', False), cur_analytic_account['code'], cur_analytic_account['name']))) + raise orm.except_orm(_('Error :'), _("Analytic policy is set to 'Never' with account %s '%s' but the account move line with label '%s' has an analytic account %s '%s'." % (account.code, account.name, vals.get('name', False), cur_analytic_account['code'], cur_analytic_account['name']))) return True def create(self, cr, uid, vals, context=None, check=True): @@ -64,4 +61,3 @@ def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True) self.check_analytic_required(cr, uid, vals, context=context) return super(account_move_line, self).write(cr, uid, ids, vals, context=context, check=check, update_check=update_check) -account_move_line() From 709961264b1074dfcd7989d78bec7d61c3ea2469 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Thu, 18 Apr 2013 23:02:33 +0200 Subject: [PATCH 05/69] [FIX] Move substitution arguments out of _() call [RFR] Line length of affected code [UPD] Update pot file with newly generated code strings [ADD] Dutch translations --- account_analytic_required/account.py | 17 +++- .../i18n/account_analytic_required.pot | 15 +++- account_analytic_required/i18n/nl.po | 78 +++++++++++++++++++ 3 files changed, 105 insertions(+), 5 deletions(-) create mode 100644 account_analytic_required/i18n/nl.po diff --git a/account_analytic_required/account.py b/account_analytic_required/account.py index 47d56b769..4fde451ea 100644 --- a/account_analytic_required/account.py +++ b/account_analytic_required/account.py @@ -47,10 +47,22 @@ def check_analytic_required(self, cr, uid, vals, context=None): if vals.has_key('account_id') and (vals.get('debit',0.0) != 0.0 or vals.get('credit',0.0) != 0.0): account = self.pool.get('account.account').browse(cr, uid, vals['account_id'], context=context) if account.user_type.analytic_policy == 'always' and not vals.get('analytic_account_id', False): - raise orm.except_orm(_('Error :'), _("Analytic policy is set to 'Always' with account %s '%s' but the analytic account is missing in the account move line with label '%s'." % (account.code, account.name, vals.get('name', False)))) + raise osv.except_osv( + _('Error :'), + _("Analytic policy is set to 'Always' with account %s '%s' " + "but the analytic account is missing in the account move " + "line with label '%s'.") % ( + account.code, account.name, vals.get('name', False))) elif account.user_type.analytic_policy == 'never' and vals.get('analytic_account_id', False): cur_analytic_account = self.pool.get('account.analytic.account').read(cr, uid, vals['analytic_account_id'], ['name', 'code'], context=context) - raise orm.except_orm(_('Error :'), _("Analytic policy is set to 'Never' with account %s '%s' but the account move line with label '%s' has an analytic account %s '%s'." % (account.code, account.name, vals.get('name', False), cur_analytic_account['code'], cur_analytic_account['name']))) + raise osv.except_osv( + _('Error :'), + _("Analytic policy is set to 'Never' with account %s '%s' " + "but the account move line with label '%s' has an " + "analytic account %s '%s'.") % ( + account.code, account.name, vals.get('name', False), + cur_analytic_account['code'], + cur_analytic_account['name'])) return True def create(self, cr, uid, vals, context=None, check=True): @@ -60,4 +72,3 @@ def create(self, cr, uid, vals, context=None, check=True): def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): self.check_analytic_required(cr, uid, vals, context=context) return super(account_move_line, self).write(cr, uid, ids, vals, context=context, check=check, update_check=update_check) - diff --git a/account_analytic_required/i18n/account_analytic_required.pot b/account_analytic_required/i18n/account_analytic_required.pot index 6724a8fcd..b9d7fd8cd 100644 --- a/account_analytic_required/i18n/account_analytic_required.pot +++ b/account_analytic_required/i18n/account_analytic_required.pot @@ -86,9 +86,20 @@ msgid "Company must be same for its related account and period." msgstr "" #. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:53 -#: code:addons/account_analytic_required/account.py:56 +#: code:addons/account_analytic_required/account.py:54 +#: code:addons/account_analytic_required/account.py:62 #, python-format msgid "Error :" msgstr "" +#. module: account_analytic_required +#: code:addons/account_analytic_required/account.py:55 +#, python-format +msgid "Analytic policy is set to 'Always' with account %s '%s' but the analytic account is missing in the account move line with label '%s'." +msgstr "" + +#. module: account_analytic_required +#: code:addons/account_analytic_required/account.py:63 +#, python-format +msgid "Analytic policy is set to 'Never' with account %s '%s' but the account move line with label '%s' has an analytic account %s '%s'." +msgstr "" diff --git a/account_analytic_required/i18n/nl.po b/account_analytic_required/i18n/nl.po new file mode 100644 index 000000000..858970d41 --- /dev/null +++ b/account_analytic_required/i18n/nl.po @@ -0,0 +1,78 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * account_analytic_required +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 6.1\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2011-06-10 07:49+0000\n" +"PO-Revision-Date: 2013-04-17 07:49+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_analytic_required +#: field:account.account.type,analytic_policy:0 +msgid "Policy for analytic account" +msgstr "Kostenplaatsenbeleid" + +#. module: account_analytic_required +#: help:account.account.type,analytic_policy:0 +msgid "Set the policy for analytic accounts : if you select 'Optional', the accountant is free to put an analytic account on an account move line with this type of account ; if you select 'Always', the accountant will get an error message if there is no analytic account ; if you select 'Never', the accountant will get an error message if an analytic account is present." +msgstr "Stel het beleid in voor kostenplaatsen: bij 'Altijd' is het opgeven van een kostenplaats verplicht bij rekeningen van dit type. 'Nooit': er treedt een foutmelding op als er bij een boeking een kostenplaats wordt opgegeven. 'Optioneel': het staat de medewerker vrij om al dan niet een kostenplaats op te geven." + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "Optioneel" + +#. module: account_analytic_required +#: model:ir.module.module,description:account_analytic_required.module_meta_information +msgid "This module adds an option 'analytic policy' on account types. You have the choice between 3 policies : always, never and optional.\n" +"\n" +"For example, if you want to have an analytic account on all your expenses, set the policy to 'always' for the account type 'expense' ; then, if you try to save an account move line with an account of type 'expense' without analytic account, you will get an error message.\n" +"\n" +"Module developped by Alexis de Lattre during the Akretion-Camptocamp code sprint of June 2011.\n" +msgstr "Deze module voegt de optie 'Beleid kostenplaatsen' toe aan rekeningcategorieën. Er zijn drie mogelijkheden: altijd, nooit en optioneel.\n" +"\n" +"Bij voorbeeld, als je wilt afdwingen dat er altijd een kostenplaats wordt opgegeven bij boekingen op een kostenrekening, zet dan het beleid op 'altijd' voor het rekeningtype 'Kosten'. Vanaf dat moment krijgt de medewerker een foutmelding als er geprobeerd wordt om een boeking te maken op een rekening van dit type zonder dat er een kostenplaats is opgegeven.\n" +"\n" +"Deze module is ontwikkeld door Alexis de Lattre tijdens de Akretion-Camptocamp code sprint van juni 2011.\n" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "Altijd" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "Nooit" + +#. module: account_analytic_required +#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information +msgid "Account analytic required" +msgstr "Kostenplaatsenbeleid" + +#. module: account_analytic_required +#: code:addons/account_analytic_required/account.py:54 +#: code:addons/account_analytic_required/account.py:62 +#, python-format +msgid "Error :" +msgstr "Fout:" + +#. module: account_analytic_required +#: code:addons/account_analytic_required/account.py:55 +#, python-format +msgid "Analytic policy is set to 'Always' with account %s '%s' but the analytic account is missing in the account move line with label '%s'." +msgstr "Het is verplicht een kostenplaats op te geven bij boekingen op rekening %s '%s', maar deze ontbreekt in de boekingsregel met de omschrijving '%s'." + +#. module: account_analytic_required +#: code:addons/account_analytic_required/account.py:63 +#, python-format +msgid "Analytic policy is set to 'Never' with account %s '%s' but the account move line with label '%s' has an analytic account %s '%s'." +msgstr "Het is niet toegestaan om een kostenplaats op te geven bij boekingen op rekening %s '%s', maar in boekingsregel met de omschrijving '%s' staat toch de kostenplaats %s '%s'." From 4e7a1fef73d77f26e20db4465f1537d1bf6f5a74 Mon Sep 17 00:00:00 2001 From: Laetitia Gangloff Date: Tue, 23 Apr 2013 16:25:48 +0200 Subject: [PATCH 06/69] account_analytic_required: in openerp.py replace *_xml by data, leave two lines before new class. --- account_analytic_required/__openerp__.py | 4 +--- account_analytic_required/account.py | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/account_analytic_required/__openerp__.py b/account_analytic_required/__openerp__.py index a193c8ddd..55f4dbdd2 100644 --- a/account_analytic_required/__openerp__.py +++ b/account_analytic_required/__openerp__.py @@ -35,9 +35,7 @@ 'author': 'Akretion', 'website': 'http://www.akretion.com/', 'depends': ['account'], - 'init_xml': [], - 'update_xml': ['account_view.xml'], - 'demo_xml': [], + 'data': ['account_view.xml'], 'installable': True, 'active': False, } diff --git a/account_analytic_required/account.py b/account_analytic_required/account.py index 4fde451ea..e63d085cb 100644 --- a/account_analytic_required/account.py +++ b/account_analytic_required/account.py @@ -40,6 +40,7 @@ class account_account_type(orm.Model): 'analytic_policy': lambda *a: 'optional', } + class account_move_line(orm.Model): _inherit = "account.move.line" From f8ecb93a253d6b20a9f0ac92681a77807403f470 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 18 Apr 2014 15:28:34 +0200 Subject: [PATCH 07/69] [IMP] account_analytic_required/tests --- account_analytic_required/tests/__init__.py | 30 +++++ .../tests/test_account_analytic_required.py | 125 ++++++++++++++++++ 2 files changed, 155 insertions(+) create mode 100644 account_analytic_required/tests/__init__.py create mode 100644 account_analytic_required/tests/test_account_analytic_required.py diff --git a/account_analytic_required/tests/__init__.py b/account_analytic_required/tests/__init__.py new file mode 100644 index 000000000..85d610f4e --- /dev/null +++ b/account_analytic_required/tests/__init__.py @@ -0,0 +1,30 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account analytic required module for OpenERP +# Copyright (C) 2014 Acsone (http://acsone.eu). All Rights Reserved +# @author Stéphane Bidoul +# +# 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 test_account_analytic_required + +fast_suite = [ +] + +checks = [ + test_account_analytic_required, +] diff --git a/account_analytic_required/tests/test_account_analytic_required.py b/account_analytic_required/tests/test_account_analytic_required.py new file mode 100644 index 000000000..4a1fb242a --- /dev/null +++ b/account_analytic_required/tests/test_account_analytic_required.py @@ -0,0 +1,125 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account analytic required module for OpenERP +# Copyright (C) 2014 Acsone (http://acsone.eu). All Rights Reserved +# @author Stéphane Bidoul +# +# 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 datetime import datetime + +from openerp.tests import common +from openerp.osv import orm + + +class test_account_analytic_required(common.TransactionCase): + + def setUp(self): + super(test_account_analytic_required, self).setUp() + self.account_obj = self.registry('account.account') + self.account_type_obj = self.registry('account.account.type') + self.move_obj = self.registry('account.move') + self.move_line_obj = self.registry('account.move.line') + self.analytic_account_obj = self.registry('account.analytic.account') + self.analytic_account_id = self.analytic_account_obj.create( + self.cr, self.uid, {'name': 'test aa', 'type': 'normal'}) + + def _create_move(self, with_analytic, amount=100): + date = datetime.now() + period_id = self.registry('account.period').find( + self.cr, self.uid, date, + context={'account_period_prefer_normal': True})[0] + move_vals = { + 'journal_id': self.ref('account.sales_journal'), + 'period_id': period_id, + 'date': date, + } + move_id = self.move_obj.create(self.cr, self.uid, move_vals) + self.move_line_obj.create( + self.cr, self.uid, + {'move_id': move_id, + 'name': '/', + 'debit': 0, + 'credit': amount, + 'account_id': self.ref('account.a_sale'), + 'analytic_account_id': self.analytic_account_id if with_analytic else False}) + move_line_id = self.move_line_obj.create( + self.cr, self.uid, + {'move_id': move_id, + 'name': '/', + 'debit': amount, + 'credit': 0, + 'account_id': self.ref('account.a_recv')}) + return move_line_id + + def _set_analytic_policy(self, policy, aref='account.a_sale'): + account_type = self.account_obj.browse(self.cr, self.uid, + self.ref(aref)).user_type + self.account_type_obj.write(self.cr, self.uid, account_type.id, + {'analytic_policy': policy}) + + def test_optional(self): + self._create_move(with_analytic=False) + self._create_move(with_analytic=True) + + def test_always_no_analytic(self): + self._set_analytic_policy('always') + with self.assertRaises(orm.except_orm): + self._create_move(with_analytic=False) + + def test_always_no_analytic_0(self): + # accept missing analytic account when debit=credit=0 + self._set_analytic_policy('always') + self._create_move(with_analytic=False, amount=0) + + def test_always_with_analytic(self): + self._set_analytic_policy('always') + self._create_move(with_analytic=True) + + def test_never_no_analytic(self): + self._set_analytic_policy('never') + self._create_move(with_analytic=False) + + def test_never_with_analytic(self): + self._set_analytic_policy('never') + with self.assertRaises(orm.except_orm): + self._create_move(with_analytic=True) + + def test_never_with_analytic_0(self): + # accept analytic when debit=credit=0 + self._set_analytic_policy('never') + self._create_move(with_analytic=True, amount=0) + + def test_always_remove_analytic(self): + # remove partner when policy is always + self._set_analytic_policy('always') + line_id = self._create_move(with_analytic=True) + with self.assertRaises(orm.except_orm): + self.move_line_obj.write(self.cr, self.uid, line_id, + {'analytic_account_id': False}) + + def test_change_account(self): + self._set_analytic_policy('always', aref='account.a_expense') + line_id = self._create_move(with_analytic=False) + # change account to a_pay with policy always but missing partner + with self.assertRaises(orm.except_orm): + self.move_line_obj.write(self.cr, self.uid, line_id, + {'account_id': self.ref('account.a_expense')}) + # change account to a_pay with policy always with partner -> ok + self.move_line_obj.write(self.cr, self.uid, line_id, + {'account_id': self.ref('account.a_expense'), + 'analytic_account_id': self.analytic.account_id}) From 54a689eb7b1b46ac2f1d2d45d54b348cca1eae31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 18 Apr 2014 15:45:56 +0200 Subject: [PATCH 08/69] [FIX] account_analytic_required allowed policy violation to slip through when changing analytic account --- account_analytic_required/account.py | 43 ++++++++----------- .../tests/test_account_analytic_required.py | 8 ++-- 2 files changed, 23 insertions(+), 28 deletions(-) diff --git a/account_analytic_required/account.py b/account_analytic_required/account.py index e63d085cb..02cfcc96e 100644 --- a/account_analytic_required/account.py +++ b/account_analytic_required/account.py @@ -44,32 +44,27 @@ class account_account_type(orm.Model): class account_move_line(orm.Model): _inherit = "account.move.line" - def check_analytic_required(self, cr, uid, vals, context=None): - if vals.has_key('account_id') and (vals.get('debit',0.0) != 0.0 or vals.get('credit',0.0) != 0.0): - account = self.pool.get('account.account').browse(cr, uid, vals['account_id'], context=context) - if account.user_type.analytic_policy == 'always' and not vals.get('analytic_account_id', False): - raise osv.except_osv( - _('Error :'), - _("Analytic policy is set to 'Always' with account %s '%s' " - "but the analytic account is missing in the account move " - "line with label '%s'.") % ( - account.code, account.name, vals.get('name', False))) - elif account.user_type.analytic_policy == 'never' and vals.get('analytic_account_id', False): - cur_analytic_account = self.pool.get('account.analytic.account').read(cr, uid, vals['analytic_account_id'], ['name', 'code'], context=context) - raise osv.except_osv( - _('Error :'), - _("Analytic policy is set to 'Never' with account %s '%s' " - "but the account move line with label '%s' has an " - "analytic account %s '%s'.") % ( - account.code, account.name, vals.get('name', False), - cur_analytic_account['code'], - cur_analytic_account['name'])) + def check_analytic_required(self, cr, uid, ids, vals, context=None): + if 'account_id' in vals or 'analytic_account_id' in vals or \ + 'debit' in vals or 'credit' in vals: + if isinstance(ids, (int, long)): + ids = [ids] + for move_line in self.browse(cr, uid, ids, context): + if move_line.debit == 0 and move_line.credit == 0: + continue + analytic_policy = move_line.account_id.user_type.analytic_policy + if analytic_policy == 'always' and not move_line.analytic_account_id: + raise orm.except_orm(_('Error :'), _("Analytic policy is set to 'Always' with account %s '%s' but the analytic account is missing in the account move line with label '%s'." % (move_line.account_id.code, move_line.account_id.name, move_line.name))) + elif analytic_policy == 'never' and move_line.analytic_account_id: + raise orm.except_orm(_('Error :'), _("Analytic policy is set to 'Never' with account %s '%s' but the account move line with label '%s' has an analytic account %s '%s'." % (move_line.account_id.code, move_line.account_id.name, move_line.name, move_line.analytic_account_id.code, move_line.analytic_account_id.name))) return True def create(self, cr, uid, vals, context=None, check=True): - self.check_analytic_required(cr, uid, vals, context=context) - return super(account_move_line, self).create(cr, uid, vals, context=context, check=check) + line_id = super(account_move_line, self).create(cr, uid, vals, context=context, check=check) + self.check_analytic_required(cr, uid, line_id, vals, context=context) + return line_id def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): - self.check_analytic_required(cr, uid, vals, context=context) - return super(account_move_line, self).write(cr, uid, ids, vals, context=context, check=check, update_check=update_check) + res = super(account_move_line, self).write(cr, uid, ids, vals, context=context, check=check, update_check=update_check) + self.check_analytic_required(cr, uid, ids, vals, context=context) + return res diff --git a/account_analytic_required/tests/test_account_analytic_required.py b/account_analytic_required/tests/test_account_analytic_required.py index 4a1fb242a..5122e9992 100644 --- a/account_analytic_required/tests/test_account_analytic_required.py +++ b/account_analytic_required/tests/test_account_analytic_required.py @@ -49,7 +49,7 @@ def _create_move(self, with_analytic, amount=100): 'date': date, } move_id = self.move_obj.create(self.cr, self.uid, move_vals) - self.move_line_obj.create( + move_line_id = self.move_line_obj.create( self.cr, self.uid, {'move_id': move_id, 'name': '/', @@ -57,7 +57,7 @@ def _create_move(self, with_analytic, amount=100): 'credit': amount, 'account_id': self.ref('account.a_sale'), 'analytic_account_id': self.analytic_account_id if with_analytic else False}) - move_line_id = self.move_line_obj.create( + self.move_line_obj.create( self.cr, self.uid, {'move_id': move_id, 'name': '/', @@ -115,11 +115,11 @@ def test_always_remove_analytic(self): def test_change_account(self): self._set_analytic_policy('always', aref='account.a_expense') line_id = self._create_move(with_analytic=False) - # change account to a_pay with policy always but missing partner + # change account to a_pay with policy always but missing analytic_account with self.assertRaises(orm.except_orm): self.move_line_obj.write(self.cr, self.uid, line_id, {'account_id': self.ref('account.a_expense')}) # change account to a_pay with policy always with partner -> ok self.move_line_obj.write(self.cr, self.uid, line_id, {'account_id': self.ref('account.a_expense'), - 'analytic_account_id': self.analytic.account_id}) + 'analytic_account_id': self.analytic_account_id}) From d760ccf4814b02047d906a19e0c466c127f1fae3 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Sat, 19 Apr 2014 00:24:50 +0200 Subject: [PATCH 09/69] Validate with flake8. Update import path. --- account_analytic_required/__init__.py | 2 +- account_analytic_required/__openerp__.py | 15 +++-- account_analytic_required/account.py | 59 +++++++++++++++---- account_analytic_required/account_view.xml | 13 +++- .../tests/test_account_analytic_required.py | 18 +++--- 5 files changed, 79 insertions(+), 28 deletions(-) diff --git a/account_analytic_required/__init__.py b/account_analytic_required/__init__.py index 71b2d9b73..fdc3ea32b 100644 --- a/account_analytic_required/__init__.py +++ b/account_analytic_required/__init__.py @@ -21,4 +21,4 @@ ############################################################################## -import account +from . import account diff --git a/account_analytic_required/__openerp__.py b/account_analytic_required/__openerp__.py index 55f4dbdd2..7e392b5ba 100644 --- a/account_analytic_required/__openerp__.py +++ b/account_analytic_required/__openerp__.py @@ -2,7 +2,7 @@ ############################################################################## # # Account analytic required module for OpenERP -# Copyright (C) 2011 Akretion (http://www.akretion.com). All Rights Reserved +# Copyright (C) 2011 Akretion (http://www.akretion.com) # @author Alexis de Lattre # # This program is free software: you can redistribute it and/or modify @@ -22,13 +22,17 @@ { - 'name': 'Account analytic required', + 'name': 'Account Analytic Required', 'version': '0.2', - 'category': 'Generic Modules/Accounting', + 'category': 'Analytic Accounting', 'license': 'AGPL-3', - 'description': """This module adds an option "analytic policy" on account types. You have the choice between 3 policies : always, never and optional. + 'description': """ +Account Analytic Required +========================= -For example, if you want to have an analytic account on all your expenses, set the policy to "always" for the account type "expense" ; then, if you try to save an account move line with an account of type "expense" without analytic account, you will get an error message. +This module adds an option *analytic policy* on account types. You have the choice between 3 policies : *always*, *never* and *optional*. + +For example, if you want to have an analytic account on all your expenses, set the policy to *always* for the account type *expense* ; then, if you try to save an account move line with an account of type *expense* without analytic account, you will get an error message. Module developped by Alexis de Lattre during the Akretion-Camptocamp code sprint of June 2011. """, @@ -39,4 +43,3 @@ 'installable': True, 'active': False, } - diff --git a/account_analytic_required/account.py b/account_analytic_required/account.py index 02cfcc96e..a5de6c111 100644 --- a/account_analytic_required/account.py +++ b/account_analytic_required/account.py @@ -2,7 +2,7 @@ ############################################################################## # # Account analytic required module for OpenERP -# Copyright (C) 2011 Akretion (http://www.akretion.com). All Rights Reserved +# Copyright (C) 2011 Akretion (http://www.akretion.com) # @author Alexis de Lattre # Developped during the Akretion-Camptocamp code sprint of June 2011 # @@ -22,22 +22,29 @@ ############################################################################## from openerp.osv import orm, fields -from tools.translate import _ +from openerp.tools.translate import _ class account_account_type(orm.Model): _inherit = "account.account.type" _columns = { - 'analytic_policy' : fields.selection([ + 'analytic_policy': fields.selection([ ('optional', 'Optional'), ('always', 'Always'), ('never', 'Never') - ], 'Policy for analytic account', help="Set the policy for analytic accounts : if you select 'Optional', the accountant is free to put an analytic account on an account move line with this type of account ; if you select 'Always', the accountant will get an error message if there is no analytic account ; if you select 'Never', the accountant will get an error message if an analytic account is present."), + ], 'Policy for analytic account', + help="Set the policy for analytic accounts : if you select " + "'Optional', the accountant is free to put an analytic account " + "on an account move line with this type of account ; if you " + "select 'Always', the accountant will get an error message if " + "there is no analytic account ; if you select 'Never', the " + "accountant will get an error message if an analytic account " + "is present."), } _defaults = { - 'analytic_policy': lambda *a: 'optional', + 'analytic_policy': 'optional', } @@ -52,19 +59,45 @@ def check_analytic_required(self, cr, uid, ids, vals, context=None): for move_line in self.browse(cr, uid, ids, context): if move_line.debit == 0 and move_line.credit == 0: continue - analytic_policy = move_line.account_id.user_type.analytic_policy - if analytic_policy == 'always' and not move_line.analytic_account_id: - raise orm.except_orm(_('Error :'), _("Analytic policy is set to 'Always' with account %s '%s' but the analytic account is missing in the account move line with label '%s'." % (move_line.account_id.code, move_line.account_id.name, move_line.name))) - elif analytic_policy == 'never' and move_line.analytic_account_id: - raise orm.except_orm(_('Error :'), _("Analytic policy is set to 'Never' with account %s '%s' but the account move line with label '%s' has an analytic account %s '%s'." % (move_line.account_id.code, move_line.account_id.name, move_line.name, move_line.analytic_account_id.code, move_line.analytic_account_id.name))) + analytic_policy = \ + move_line.account_id.user_type.analytic_policy + if analytic_policy == 'always' and \ + not move_line.analytic_account_id: + raise orm.except_orm( + _('Error :'), + _("Analytic policy is set to 'Always' with account " + "%s '%s' but the analytic account is missing in " + "the account move line with label '%s'.") + % ( + move_line.account_id.code, + move_line.account_id.name, + move_line.name)) + elif analytic_policy == 'never' and \ + move_line.analytic_account_id: + raise orm.except_orm( + _('Error :'), + _("Analytic policy is set to 'Never' with account %s " + "'%s' but the account move line with label '%s' " + "has an analytic account %s '%s'.") + % ( + move_line.account_id.code, + move_line.account_id.name, + move_line.name, + move_line.analytic_account_id.code, + move_line.analytic_account_id.name)) return True def create(self, cr, uid, vals, context=None, check=True): - line_id = super(account_move_line, self).create(cr, uid, vals, context=context, check=check) + line_id = super(account_move_line, self).create( + cr, uid, vals, context=context, check=check) self.check_analytic_required(cr, uid, line_id, vals, context=context) return line_id - def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): - res = super(account_move_line, self).write(cr, uid, ids, vals, context=context, check=check, update_check=update_check) + def write( + self, cr, uid, ids, vals, context=None, check=True, + update_check=True): + res = super(account_move_line, self).write( + cr, uid, ids, vals, context=context, check=check, + update_check=update_check) self.check_analytic_required(cr, uid, ids, vals, context=context) return res diff --git a/account_analytic_required/account_view.xml b/account_analytic_required/account_view.xml index def05a1e8..5ae1b50a3 100644 --- a/account_analytic_required/account_view.xml +++ b/account_analytic_required/account_view.xml @@ -15,7 +15,18 @@ - + + + + + + + account_analytic_required.account_type_tree + account.account.type + + + + diff --git a/account_analytic_required/tests/test_account_analytic_required.py b/account_analytic_required/tests/test_account_analytic_required.py index 5122e9992..f246028d0 100644 --- a/account_analytic_required/tests/test_account_analytic_required.py +++ b/account_analytic_required/tests/test_account_analytic_required.py @@ -56,7 +56,8 @@ def _create_move(self, with_analytic, amount=100): 'debit': 0, 'credit': amount, 'account_id': self.ref('account.a_sale'), - 'analytic_account_id': self.analytic_account_id if with_analytic else False}) + 'analytic_account_id': + self.analytic_account_id if with_analytic else False}) self.move_line_obj.create( self.cr, self.uid, {'move_id': move_id, @@ -115,11 +116,14 @@ def test_always_remove_analytic(self): def test_change_account(self): self._set_analytic_policy('always', aref='account.a_expense') line_id = self._create_move(with_analytic=False) - # change account to a_pay with policy always but missing analytic_account + # change account to a_pay with policy always but missing + # analytic_account with self.assertRaises(orm.except_orm): - self.move_line_obj.write(self.cr, self.uid, line_id, - {'account_id': self.ref('account.a_expense')}) + self.move_line_obj.write( + self.cr, self.uid, line_id, + {'account_id': self.ref('account.a_expense')}) # change account to a_pay with policy always with partner -> ok - self.move_line_obj.write(self.cr, self.uid, line_id, - {'account_id': self.ref('account.a_expense'), - 'analytic_account_id': self.analytic_account_id}) + self.move_line_obj.write( + self.cr, self.uid, line_id, { + 'account_id': self.ref('account.a_expense'), + 'analytic_account_id': self.analytic_account_id}) From 49a16d32f40fd8c3a7faa87280b94fba74fcfd7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sat, 19 Apr 2014 12:20:24 +0200 Subject: [PATCH 10/69] [IMP] comments in test suite + long lines __openerp__.py --- account_analytic_required/__openerp__.py | 11 ++++++++--- .../tests/test_account_analytic_required.py | 5 +++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/account_analytic_required/__openerp__.py b/account_analytic_required/__openerp__.py index 7e392b5ba..1da3b3322 100644 --- a/account_analytic_required/__openerp__.py +++ b/account_analytic_required/__openerp__.py @@ -30,11 +30,16 @@ Account Analytic Required ========================= -This module adds an option *analytic policy* on account types. You have the choice between 3 policies : *always*, *never* and *optional*. +This module adds an option *analytic policy* on account types. +You have the choice between 3 policies : *always*, *never* and *optional*. -For example, if you want to have an analytic account on all your expenses, set the policy to *always* for the account type *expense* ; then, if you try to save an account move line with an account of type *expense* without analytic account, you will get an error message. +For example, if you want to have an analytic account on all your expenses, +set the policy to *always* for the account type *expense* ; then, if you +try to save an account move line with an account of type *expense* +without analytic account, you will get an error message. -Module developped by Alexis de Lattre during the Akretion-Camptocamp code sprint of June 2011. +Module developped by Alexis de Lattre +during the Akretion-Camptocamp code sprint of June 2011. """, 'author': 'Akretion', 'website': 'http://www.akretion.com/', diff --git a/account_analytic_required/tests/test_account_analytic_required.py b/account_analytic_required/tests/test_account_analytic_required.py index f246028d0..39bc393d1 100644 --- a/account_analytic_required/tests/test_account_analytic_required.py +++ b/account_analytic_required/tests/test_account_analytic_required.py @@ -116,13 +116,14 @@ def test_always_remove_analytic(self): def test_change_account(self): self._set_analytic_policy('always', aref='account.a_expense') line_id = self._create_move(with_analytic=False) - # change account to a_pay with policy always but missing + # change account to a_expense with policy always but missing # analytic_account with self.assertRaises(orm.except_orm): self.move_line_obj.write( self.cr, self.uid, line_id, {'account_id': self.ref('account.a_expense')}) - # change account to a_pay with policy always with partner -> ok + # change account to a_expense with policy always + # with analytic account -> ok self.move_line_obj.write( self.cr, self.uid, line_id, { 'account_id': self.ref('account.a_expense'), From a3030b1e3f541b30b4161f5bb91ad0ae9ad8df6c Mon Sep 17 00:00:00 2001 From: Launchpad Translations on behalf of account-core-editors Date: Fri, 27 Jun 2014 07:09:00 +0000 Subject: [PATCH 11/69] Launchpad automatic translations update. --- account_analytic_required/i18n/ar.po | 8 ++++---- account_analytic_required/i18n/ca.po | 6 +++--- account_analytic_required/i18n/es.po | 6 +++--- account_analytic_required/i18n/fr.po | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/account_analytic_required/i18n/ar.po b/account_analytic_required/i18n/ar.po index 9452af052..870152419 100644 --- a/account_analytic_required/i18n/ar.po +++ b/account_analytic_required/i18n/ar.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openobject-addons\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2011-06-10 07:49+0000\n" -"PO-Revision-Date: 2012-02-08 07:01+0000\n" -"Last-Translator: husam \n" +"PO-Revision-Date: 2014-06-26 11:15+0000\n" +"Last-Translator: Pedro Manuel Baeza \n" "Language-Team: Arabic \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-09-25 05:07+0000\n" -"X-Generator: Launchpad (build 16019)\n" +"X-Launchpad-Export-Date: 2014-06-27 07:08+0000\n" +"X-Generator: Launchpad (build 17077)\n" #. module: account_analytic_required #: field:account.account.type,analytic_policy:0 diff --git a/account_analytic_required/i18n/ca.po b/account_analytic_required/i18n/ca.po index f812bd33e..9048d6626 100644 --- a/account_analytic_required/i18n/ca.po +++ b/account_analytic_required/i18n/ca.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0.2\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-06-10 07:49+0000\n" -"PO-Revision-Date: 2011-06-24 10:26+0000\n" +"PO-Revision-Date: 2014-06-26 11:18+0000\n" "Last-Translator: jmartin (Zikzakmedia) \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-09-25 05:07+0000\n" -"X-Generator: Launchpad (build 16019)\n" +"X-Launchpad-Export-Date: 2014-06-27 07:08+0000\n" +"X-Generator: Launchpad (build 17077)\n" #. module: account_analytic_required #: field:account.account.type,analytic_policy:0 diff --git a/account_analytic_required/i18n/es.po b/account_analytic_required/i18n/es.po index 38626e05e..8e21c5850 100644 --- a/account_analytic_required/i18n/es.po +++ b/account_analytic_required/i18n/es.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0.2\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-06-10 07:49+0000\n" -"PO-Revision-Date: 2011-06-24 10:25+0000\n" +"PO-Revision-Date: 2014-06-26 11:18+0000\n" "Last-Translator: jmartin (Zikzakmedia) \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-09-25 05:07+0000\n" -"X-Generator: Launchpad (build 16019)\n" +"X-Launchpad-Export-Date: 2014-06-27 07:09+0000\n" +"X-Generator: Launchpad (build 17077)\n" #. module: account_analytic_required #: field:account.account.type,analytic_policy:0 diff --git a/account_analytic_required/i18n/fr.po b/account_analytic_required/i18n/fr.po index cbfecc6fe..5b1a2fb2e 100644 --- a/account_analytic_required/i18n/fr.po +++ b/account_analytic_required/i18n/fr.po @@ -7,14 +7,14 @@ msgstr "" "Project-Id-Version: OpenERP Server 6.0.2\n" "Report-Msgid-Bugs-To: support@openerp.com\n" "POT-Creation-Date: 2011-06-10 07:49+0000\n" -"PO-Revision-Date: 2011-06-14 15:19+0000\n" +"PO-Revision-Date: 2014-06-26 11:18+0000\n" "Last-Translator: Alexis de Lattre \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-09-25 05:07+0000\n" -"X-Generator: Launchpad (build 16019)\n" +"X-Launchpad-Export-Date: 2014-06-27 07:08+0000\n" +"X-Generator: Launchpad (build 17077)\n" #. module: account_analytic_required #: field:account.account.type,analytic_policy:0 From 8d62e61155deaae7328cc321fc8321df00632bdb Mon Sep 17 00:00:00 2001 From: Leonardo Pistone Date: Mon, 4 Aug 2014 18:57:44 +0200 Subject: [PATCH 12/69] lint the whole repo --- account_analytic_required/__init__.py | 24 ---- account_analytic_required/__openerp__.py | 50 ------- account_analytic_required/account.py | 103 -------------- account_analytic_required/account_view.xml | 35 ----- .../i18n/account_analytic_required.pot | 105 -------------- account_analytic_required/i18n/ar.po | 120 ---------------- account_analytic_required/i18n/ca.po | 120 ---------------- account_analytic_required/i18n/es.po | 122 ---------------- account_analytic_required/i18n/fr.po | 121 ---------------- account_analytic_required/tests/__init__.py | 30 ---- .../tests/test_account_analytic_required.py | 130 ------------------ 11 files changed, 960 deletions(-) delete mode 100644 account_analytic_required/__init__.py delete mode 100644 account_analytic_required/__openerp__.py delete mode 100644 account_analytic_required/account.py delete mode 100644 account_analytic_required/account_view.xml delete mode 100644 account_analytic_required/i18n/account_analytic_required.pot delete mode 100644 account_analytic_required/i18n/ar.po delete mode 100644 account_analytic_required/i18n/ca.po delete mode 100644 account_analytic_required/i18n/es.po delete mode 100644 account_analytic_required/i18n/fr.po delete mode 100644 account_analytic_required/tests/__init__.py delete mode 100644 account_analytic_required/tests/test_account_analytic_required.py diff --git a/account_analytic_required/__init__.py b/account_analytic_required/__init__.py deleted file mode 100644 index fdc3ea32b..000000000 --- a/account_analytic_required/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account analytic required module for OpenERP -# Copyright (C) 2011 Akretion (http://www.akretion.com). All Rights Reserved -# @author Alexis de Lattre -# -# 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 diff --git a/account_analytic_required/__openerp__.py b/account_analytic_required/__openerp__.py deleted file mode 100644 index 1da3b3322..000000000 --- a/account_analytic_required/__openerp__.py +++ /dev/null @@ -1,50 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account analytic required module for OpenERP -# Copyright (C) 2011 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# 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': 'Account Analytic Required', - 'version': '0.2', - 'category': 'Analytic Accounting', - 'license': 'AGPL-3', - 'description': """ -Account Analytic Required -========================= - -This module adds an option *analytic policy* on account types. -You have the choice between 3 policies : *always*, *never* and *optional*. - -For example, if you want to have an analytic account on all your expenses, -set the policy to *always* for the account type *expense* ; then, if you -try to save an account move line with an account of type *expense* -without analytic account, you will get an error message. - -Module developped by Alexis de Lattre -during the Akretion-Camptocamp code sprint of June 2011. -""", - 'author': 'Akretion', - 'website': 'http://www.akretion.com/', - 'depends': ['account'], - 'data': ['account_view.xml'], - 'installable': True, - 'active': False, -} diff --git a/account_analytic_required/account.py b/account_analytic_required/account.py deleted file mode 100644 index a5de6c111..000000000 --- a/account_analytic_required/account.py +++ /dev/null @@ -1,103 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account analytic required module for OpenERP -# Copyright (C) 2011 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# Developped during the Akretion-Camptocamp code sprint of June 2011 -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields -from openerp.tools.translate import _ - - -class account_account_type(orm.Model): - _inherit = "account.account.type" - - _columns = { - 'analytic_policy': fields.selection([ - ('optional', 'Optional'), - ('always', 'Always'), - ('never', 'Never') - ], 'Policy for analytic account', - help="Set the policy for analytic accounts : if you select " - "'Optional', the accountant is free to put an analytic account " - "on an account move line with this type of account ; if you " - "select 'Always', the accountant will get an error message if " - "there is no analytic account ; if you select 'Never', the " - "accountant will get an error message if an analytic account " - "is present."), - } - - _defaults = { - 'analytic_policy': 'optional', - } - - -class account_move_line(orm.Model): - _inherit = "account.move.line" - - def check_analytic_required(self, cr, uid, ids, vals, context=None): - if 'account_id' in vals or 'analytic_account_id' in vals or \ - 'debit' in vals or 'credit' in vals: - if isinstance(ids, (int, long)): - ids = [ids] - for move_line in self.browse(cr, uid, ids, context): - if move_line.debit == 0 and move_line.credit == 0: - continue - analytic_policy = \ - move_line.account_id.user_type.analytic_policy - if analytic_policy == 'always' and \ - not move_line.analytic_account_id: - raise orm.except_orm( - _('Error :'), - _("Analytic policy is set to 'Always' with account " - "%s '%s' but the analytic account is missing in " - "the account move line with label '%s'.") - % ( - move_line.account_id.code, - move_line.account_id.name, - move_line.name)) - elif analytic_policy == 'never' and \ - move_line.analytic_account_id: - raise orm.except_orm( - _('Error :'), - _("Analytic policy is set to 'Never' with account %s " - "'%s' but the account move line with label '%s' " - "has an analytic account %s '%s'.") - % ( - move_line.account_id.code, - move_line.account_id.name, - move_line.name, - move_line.analytic_account_id.code, - move_line.analytic_account_id.name)) - return True - - def create(self, cr, uid, vals, context=None, check=True): - line_id = super(account_move_line, self).create( - cr, uid, vals, context=context, check=check) - self.check_analytic_required(cr, uid, line_id, vals, context=context) - return line_id - - def write( - self, cr, uid, ids, vals, context=None, check=True, - update_check=True): - res = super(account_move_line, self).write( - cr, uid, ids, vals, context=context, check=check, - update_check=update_check) - self.check_analytic_required(cr, uid, ids, vals, context=context) - return res diff --git a/account_analytic_required/account_view.xml b/account_analytic_required/account_view.xml deleted file mode 100644 index 5ae1b50a3..000000000 --- a/account_analytic_required/account_view.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - account_analytic_required.account_type_form - account.account.type - - - - - - - - - - account_analytic_required.account_type_tree - account.account.type - - - - - - - - - - diff --git a/account_analytic_required/i18n/account_analytic_required.pot b/account_analytic_required/i18n/account_analytic_required.pot deleted file mode 100644 index b9d7fd8cd..000000000 --- a/account_analytic_required/i18n/account_analytic_required.pot +++ /dev/null @@ -1,105 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_analytic_required -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 6.0.2\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2011-06-10 07:49+0000\n" -"PO-Revision-Date: 2011-06-10 07:49+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_analytic_required -#: field:account.account.type,analytic_policy:0 -msgid "Policy for analytic account" -msgstr "" - -#. module: account_analytic_required -#: help:account.account.type,analytic_policy:0 -msgid "Set the policy for analytic accounts : if you select 'Optional', the accountant is free to put an analytic account on an account move line with this type of account ; if you select 'Always', the accountant will get an error message if there is no analytic account ; if you select 'Never', the accountant will get an error message if an analytic account is present." -msgstr "" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Optional" -msgstr "" - -#. module: account_analytic_required -#: model:ir.module.module,description:account_analytic_required.module_meta_information -msgid "This module adds an option \"analytic policy\" on account types. You have the choice between 3 policies : always, never and optional.\n" -"\n" -"For example, if you want to have an analytic account on all your expenses, set the policy to \"always\" for the account type \"expense\" ; then, if you try to save an account move line with an account of type \"expense\" without analytic account, you will get an error message.\n" -"\n" -"Module developped by Alexis de Lattre during the Akretion-Camptocamp code sprint of June 2011.\n" -"" -msgstr "" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on closed account." -msgstr "" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Always" -msgstr "" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Never" -msgstr "" - -#. module: account_analytic_required -#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information -msgid "Account analytic required" -msgstr "" - -#. module: account_analytic_required -#: sql_constraint:account.move.line:0 -msgid "Wrong credit or debit value in accounting entry !" -msgstr "" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on view account." -msgstr "" - -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move_line -msgid "Journal Items" -msgstr "" - -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_account_type -msgid "Account Type" -msgstr "" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "Company must be same for its related account and period." -msgstr "" - -#. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:54 -#: code:addons/account_analytic_required/account.py:62 -#, python-format -msgid "Error :" -msgstr "" - -#. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:55 -#, python-format -msgid "Analytic policy is set to 'Always' with account %s '%s' but the analytic account is missing in the account move line with label '%s'." -msgstr "" - -#. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:63 -#, python-format -msgid "Analytic policy is set to 'Never' with account %s '%s' but the account move line with label '%s' has an analytic account %s '%s'." -msgstr "" diff --git a/account_analytic_required/i18n/ar.po b/account_analytic_required/i18n/ar.po deleted file mode 100644 index 870152419..000000000 --- a/account_analytic_required/i18n/ar.po +++ /dev/null @@ -1,120 +0,0 @@ -# Arabic translation for openobject-addons -# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR , 2012. -# -msgid "" -msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2011-06-10 07:49+0000\n" -"PO-Revision-Date: 2014-06-26 11:15+0000\n" -"Last-Translator: Pedro Manuel Baeza \n" -"Language-Team: Arabic \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-06-27 07:08+0000\n" -"X-Generator: Launchpad (build 17077)\n" - -#. module: account_analytic_required -#: field:account.account.type,analytic_policy:0 -msgid "Policy for analytic account" -msgstr "سياسة للحسابات التحليلية" - -#. module: account_analytic_required -#: help:account.account.type,analytic_policy:0 -msgid "" -"Set the policy for analytic accounts : if you select 'Optional', the " -"accountant is free to put an analytic account on an account move line with " -"this type of account ; if you select 'Always', the accountant will get an " -"error message if there is no analytic account ; if you select 'Never', the " -"accountant will get an error message if an analytic account is present." -msgstr "" -"ضع سياسة للحسابات التحليلية: إذا قمت بتحديد \"الاختياري\"، فان المحاسب حر في " -"وضع حساب تحليلي على حساب خط التحرك مع هذا النوع من الحساب، وإذا قمت بتحديد " -"\"دائما\"، فان المحاسب سوف يحصل على رسالة خطأ إذا كان هناك لا يوجد حساب " -"تحليلي، وإذا قمت بتحديد \"أبدا\"، فان المحاسب سوف يحصل على رسالة خطأ إذا كان " -"هناك حساب تحليلي موجود" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Optional" -msgstr "إختياري" - -#. module: account_analytic_required -#: model:ir.module.module,description:account_analytic_required.module_meta_information -msgid "" -"This module adds an option \"analytic policy\" on account types. You have " -"the choice between 3 policies : always, never and optional.\n" -"\n" -"For example, if you want to have an analytic account on all your expenses, " -"set the policy to \"always\" for the account type \"expense\" ; then, if you " -"try to save an account move line with an account of type \"expense\" without " -"analytic account, you will get an error message.\n" -"\n" -"Module developped by Alexis de Lattre during " -"the Akretion-Camptocamp code sprint of June 2011.\n" -msgstr "" -"هذه الوحدة تضيف خيار \"السياسة التحليلية\" على أنواع الحسابات. لديك خيار بين " -"3 سياسات: دائما، أبدا، واختياري.\n" -"\n" -"على سبيل المثال، إذا كنت تريد أن يكون لديك حساب تحليلي عن جميع النفقات " -"الخاصة بك، اختار النهج \"دائما\" من أجل نوع الحساب\"مصروف\"، ثم، إذا حاولت " -"حفظ الحركة في حساب مع حساب \"مصروف\" من دون حساب تحليلي، وسوف تحصل على " -"رسالة خطأ.\n" -"\n" -"طورت الوحدة بواسطة اتر أليكسيس دي alexis.delattre@akretion.com> Akretion-" -"Camptocamp من يونيو 2011\n" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on closed account." -msgstr "لا يمكنك انشاء حركة على الحساب" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Always" -msgstr "دائماً" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Never" -msgstr "أبدًا" - -#. module: account_analytic_required -#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information -msgid "Account analytic required" -msgstr "مطلوب حساب تحليلي" - -#. module: account_analytic_required -#: sql_constraint:account.move.line:0 -msgid "Wrong credit or debit value in accounting entry !" -msgstr "قيمة دائنة أو مدينة خاطئة في القيد المحاسبي !" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on view account." -msgstr "لا يمكنك عمل حركة على هذا الحساب" - -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move_line -msgid "Journal Items" -msgstr "عناصر دفتر اليومية" - -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_account_type -msgid "Account Type" -msgstr "نوع الحساب" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "Company must be same for its related account and period." -msgstr "يجب ان تكون الشركة نفس فترتها وحسابها المتعلق بها." - -#. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:53 -#: code:addons/account_analytic_required/account.py:56 -#, python-format -msgid "Error :" -msgstr "خطأ :" diff --git a/account_analytic_required/i18n/ca.po b/account_analytic_required/i18n/ca.po deleted file mode 100644 index 9048d6626..000000000 --- a/account_analytic_required/i18n/ca.po +++ /dev/null @@ -1,120 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_analytic_required -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 6.0.2\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2011-06-10 07:49+0000\n" -"PO-Revision-Date: 2014-06-26 11:18+0000\n" -"Last-Translator: jmartin (Zikzakmedia) \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-06-27 07:08+0000\n" -"X-Generator: Launchpad (build 17077)\n" - -#. module: account_analytic_required -#: field:account.account.type,analytic_policy:0 -msgid "Policy for analytic account" -msgstr "Política per als comptes analítics" - -#. module: account_analytic_required -#: help:account.account.type,analytic_policy:0 -msgid "" -"Set the policy for analytic accounts : if you select 'Optional', the " -"accountant is free to put an analytic account on an account move line with " -"this type of account ; if you select 'Always', the accountant will get an " -"error message if there is no analytic account ; if you select 'Never', the " -"accountant will get an error message if an analytic account is present." -msgstr "" -"Configura la política per als comptes analítics: Si seleccioneu 'Opcional', " -"el comptable és lliure de posar un compte analític en un apunt comptable amb " -"aquest tipus de compte; si seleccioneu 'Sempre', el comptable rebrà un " -"missatge d'error si l'apunt no té compte analític; si seleccioneu 'Mai', el " -"comptable rebrà un missatge d'error si l'apunt té un compte analític." - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Optional" -msgstr "Opcional" - -#. module: account_analytic_required -#: model:ir.module.module,description:account_analytic_required.module_meta_information -msgid "" -"This module adds an option \"analytic policy\" on account types. You have " -"the choice between 3 policies : always, never and optional.\n" -"\n" -"For example, if you want to have an analytic account on all your expenses, " -"set the policy to \"always\" for the account type \"expense\" ; then, if you " -"try to save an account move line with an account of type \"expense\" without " -"analytic account, you will get an error message.\n" -"\n" -"Module developped by Alexis de Lattre during " -"the Akretion-Camptocamp code sprint of June 2011.\n" -msgstr "" -"Aquest mòdul afegeix una opció \"política analítica\" als tipus comptables. " -"Podeu escollir entre 3 polítiques: 'Sempre', 'Mai' i 'Opcional'.\n" -"\n" -"Per exemple, si voleu tenir un compte analític de totes les vostres " -"despeses, seleccioneu la política \"Sempre\" per al tipus comptable " -"\"Despesa\"; llavors, si intenteu desar un apunt comptable de tipus " -"comptable \"Despesa\" sense compte analític, obtindreu un missatge d'error.\n" -"\n" -"Mòdul desenvolupat per Alexis de Lattre " -"durant la cursa de codi Akretion-Camptocamp de juny de 2011.\n" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on closed account." -msgstr "No podeu crear un apunt en un compte tancat." - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Always" -msgstr "Sempre" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Never" -msgstr "Mai" - -#. module: account_analytic_required -#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information -msgid "Account analytic required" -msgstr "El compte analític és requerit." - -#. module: account_analytic_required -#: sql_constraint:account.move.line:0 -msgid "Wrong credit or debit value in accounting entry !" -msgstr "Valor erroni al deure o a l'haver de l'assentament comptable!" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on view account." -msgstr "No podeu crear un apunt en un compte de tipus \"Vista\"." - -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move_line -msgid "Journal Items" -msgstr "Apunts comptables" - -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_account_type -msgid "Account Type" -msgstr "Tipus de compte" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "Company must be same for its related account and period." -msgstr "" -"La companyia ha de ser la mateixa que la dels comptes i períodes relacionats." - -#. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:53 -#: code:addons/account_analytic_required/account.py:56 -#, python-format -msgid "Error :" -msgstr "Error:" diff --git a/account_analytic_required/i18n/es.po b/account_analytic_required/i18n/es.po deleted file mode 100644 index 8e21c5850..000000000 --- a/account_analytic_required/i18n/es.po +++ /dev/null @@ -1,122 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_analytic_required -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 6.0.2\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2011-06-10 07:49+0000\n" -"PO-Revision-Date: 2014-06-26 11:18+0000\n" -"Last-Translator: jmartin (Zikzakmedia) \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-06-27 07:09+0000\n" -"X-Generator: Launchpad (build 17077)\n" - -#. module: account_analytic_required -#: field:account.account.type,analytic_policy:0 -msgid "Policy for analytic account" -msgstr "Política para las cuentas analíticas" - -#. module: account_analytic_required -#: help:account.account.type,analytic_policy:0 -msgid "" -"Set the policy for analytic accounts : if you select 'Optional', the " -"accountant is free to put an analytic account on an account move line with " -"this type of account ; if you select 'Always', the accountant will get an " -"error message if there is no analytic account ; if you select 'Never', the " -"accountant will get an error message if an analytic account is present." -msgstr "" -"Configura la política para las cuentas analíticas: Si selecciona 'Opcional', " -"el contable es libre de poner una cuenta analítica en un apunte contable de " -"este tipo de cuenta; si selecciona 'Siempre', el contable recibirá un " -"mensaje de error si el apunte no tiene cuenta analítica; si selecciona " -"'Nunca', el contable recibirá un mensaje de error si el apunte tiene una " -"cuenta analítica." - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Optional" -msgstr "Opcional" - -#. module: account_analytic_required -#: model:ir.module.module,description:account_analytic_required.module_meta_information -msgid "" -"This module adds an option \"analytic policy\" on account types. You have " -"the choice between 3 policies : always, never and optional.\n" -"\n" -"For example, if you want to have an analytic account on all your expenses, " -"set the policy to \"always\" for the account type \"expense\" ; then, if you " -"try to save an account move line with an account of type \"expense\" without " -"analytic account, you will get an error message.\n" -"\n" -"Module developped by Alexis de Lattre during " -"the Akretion-Camptocamp code sprint of June 2011.\n" -msgstr "" -"Este módulo añade una opción \"política analítica\" a los tipos contables. " -"Puede escoger entre 3 políticas: 'Siempre', 'Nunca' y 'Opcional'.\n" -"\n" -"Por ejemplo, si quiere tener una cuenta analítica de todos sus gastos, " -"seleccione la política \"Siempre\" para el tipo contable \"Gasto\"; " -"entonces, si intenta guardar un apunte contable de tipo contable \"Gasto\" " -"sin cuenta analítica, obtendrá un mensaje de error.\n" -"\n" -"Módulo desarrollado por Alexis de Lattre " -"durante la carrera de código Akretion-Camptocamp de junio de 2011.\n" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on closed account." -msgstr "No puede crear un apunte en una cuenta cerrada." - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Always" -msgstr "Siempre" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Never" -msgstr "Nunca" - -#. module: account_analytic_required -#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information -msgid "Account analytic required" -msgstr "La cuenta analítica es requerida." - -#. module: account_analytic_required -#: sql_constraint:account.move.line:0 -msgid "Wrong credit or debit value in accounting entry !" -msgstr "¡Valor erróneo en el debe o en el haber del asiento contable!" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on view account." -msgstr "No puede crear un apunte en una cuenta de tipo \"Vista\"." - -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move_line -msgid "Journal Items" -msgstr "Apuntes contables" - -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_account_type -msgid "Account Type" -msgstr "Tipo de cuenta" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "Company must be same for its related account and period." -msgstr "" -"La compañía debe ser la misma que la de las cuentas y los periodos " -"relacionados." - -#. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:53 -#: code:addons/account_analytic_required/account.py:56 -#, python-format -msgid "Error :" -msgstr "Error:" diff --git a/account_analytic_required/i18n/fr.po b/account_analytic_required/i18n/fr.po deleted file mode 100644 index 5b1a2fb2e..000000000 --- a/account_analytic_required/i18n/fr.po +++ /dev/null @@ -1,121 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_analytic_required -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 6.0.2\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2011-06-10 07:49+0000\n" -"PO-Revision-Date: 2014-06-26 11:18+0000\n" -"Last-Translator: Alexis de Lattre \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-06-27 07:08+0000\n" -"X-Generator: Launchpad (build 17077)\n" - -#. module: account_analytic_required -#: field:account.account.type,analytic_policy:0 -msgid "Policy for analytic account" -msgstr "Politique pour les comptes analytiques" - -#. module: account_analytic_required -#: help:account.account.type,analytic_policy:0 -msgid "" -"Set the policy for analytic accounts : if you select 'Optional', the " -"accountant is free to put an analytic account on an account move line with " -"this type of account ; if you select 'Always', the accountant will get an " -"error message if there is no analytic account ; if you select 'Never', the " -"accountant will get an error message if an analytic account is present." -msgstr "" -"Configurez la politique pour les comptes analytiques : si vous sélectionnez " -"'Optionnel', le comptable est libre de saisir ou non un compte analytique " -"sur une ligne comptable avec ce type de compte de comptabilité générale ; si " -"vous sélectionnez 'Toujours', le comptable aura un message d'erreur si il " -"n'y a pas de compte analytique ; si vous sélectionnez 'Jamais', le comptable " -"aura un message d'erreur si un compte analytique est présent." - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Optional" -msgstr "Optionnel" - -#. module: account_analytic_required -#: model:ir.module.module,description:account_analytic_required.module_meta_information -msgid "" -"This module adds an option \"analytic policy\" on account types. You have " -"the choice between 3 policies : always, never and optional.\n" -"\n" -"For example, if you want to have an analytic account on all your expenses, " -"set the policy to \"always\" for the account type \"expense\" ; then, if you " -"try to save an account move line with an account of type \"expense\" without " -"analytic account, you will get an error message.\n" -"\n" -"Module developped by Alexis de Lattre during " -"the Akretion-Camptocamp code sprint of June 2011.\n" -msgstr "" -"This module adds an option \"analytic policy\" on account types. You have " -"the choice between 3 policies : always, never and optional.\n" -"\n" -"For example, if you want to have an analytic account on all your expenses, " -"set the policy to \"always\" for the account type \"expense\" ; then, if you " -"try to save an account move line with an account of type \"expense\" without " -"analytic account, you will get an error message.\n" -"\n" -"Module developped by Alexis de Lattre during " -"the Akretion-Camptocamp code sprint of June 2011.\n" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on closed account." -msgstr "Impossible de créer une ligne d'écriture sur un compte clôturé" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Always" -msgstr "Toujours" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Never" -msgstr "Jamais" - -#. module: account_analytic_required -#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information -msgid "Account analytic required" -msgstr "Account analytic required" - -#. module: account_analytic_required -#: sql_constraint:account.move.line:0 -msgid "Wrong credit or debit value in accounting entry !" -msgstr "Valeur erronée au crédit ou au débit de la pièce comptable !" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on view account." -msgstr "" -"Vous ne pouvez pas créer de ligne d'écriture sur un compte de type \"Vue\"." - -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move_line -msgid "Journal Items" -msgstr "Écritures comptables" - -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_account_type -msgid "Account Type" -msgstr "Type de compte" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "Company must be same for its related account and period." -msgstr "La société doit être la même pour les comptes et périodes liées." - -#. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:53 -#: code:addons/account_analytic_required/account.py:56 -#, python-format -msgid "Error :" -msgstr "Erreur :" diff --git a/account_analytic_required/tests/__init__.py b/account_analytic_required/tests/__init__.py deleted file mode 100644 index 85d610f4e..000000000 --- a/account_analytic_required/tests/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account analytic required module for OpenERP -# Copyright (C) 2014 Acsone (http://acsone.eu). All Rights Reserved -# @author Stéphane Bidoul -# -# 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 test_account_analytic_required - -fast_suite = [ -] - -checks = [ - test_account_analytic_required, -] diff --git a/account_analytic_required/tests/test_account_analytic_required.py b/account_analytic_required/tests/test_account_analytic_required.py deleted file mode 100644 index 39bc393d1..000000000 --- a/account_analytic_required/tests/test_account_analytic_required.py +++ /dev/null @@ -1,130 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account analytic required module for OpenERP -# Copyright (C) 2014 Acsone (http://acsone.eu). All Rights Reserved -# @author Stéphane Bidoul -# -# 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 datetime import datetime - -from openerp.tests import common -from openerp.osv import orm - - -class test_account_analytic_required(common.TransactionCase): - - def setUp(self): - super(test_account_analytic_required, self).setUp() - self.account_obj = self.registry('account.account') - self.account_type_obj = self.registry('account.account.type') - self.move_obj = self.registry('account.move') - self.move_line_obj = self.registry('account.move.line') - self.analytic_account_obj = self.registry('account.analytic.account') - self.analytic_account_id = self.analytic_account_obj.create( - self.cr, self.uid, {'name': 'test aa', 'type': 'normal'}) - - def _create_move(self, with_analytic, amount=100): - date = datetime.now() - period_id = self.registry('account.period').find( - self.cr, self.uid, date, - context={'account_period_prefer_normal': True})[0] - move_vals = { - 'journal_id': self.ref('account.sales_journal'), - 'period_id': period_id, - 'date': date, - } - move_id = self.move_obj.create(self.cr, self.uid, move_vals) - move_line_id = self.move_line_obj.create( - self.cr, self.uid, - {'move_id': move_id, - 'name': '/', - 'debit': 0, - 'credit': amount, - 'account_id': self.ref('account.a_sale'), - 'analytic_account_id': - self.analytic_account_id if with_analytic else False}) - self.move_line_obj.create( - self.cr, self.uid, - {'move_id': move_id, - 'name': '/', - 'debit': amount, - 'credit': 0, - 'account_id': self.ref('account.a_recv')}) - return move_line_id - - def _set_analytic_policy(self, policy, aref='account.a_sale'): - account_type = self.account_obj.browse(self.cr, self.uid, - self.ref(aref)).user_type - self.account_type_obj.write(self.cr, self.uid, account_type.id, - {'analytic_policy': policy}) - - def test_optional(self): - self._create_move(with_analytic=False) - self._create_move(with_analytic=True) - - def test_always_no_analytic(self): - self._set_analytic_policy('always') - with self.assertRaises(orm.except_orm): - self._create_move(with_analytic=False) - - def test_always_no_analytic_0(self): - # accept missing analytic account when debit=credit=0 - self._set_analytic_policy('always') - self._create_move(with_analytic=False, amount=0) - - def test_always_with_analytic(self): - self._set_analytic_policy('always') - self._create_move(with_analytic=True) - - def test_never_no_analytic(self): - self._set_analytic_policy('never') - self._create_move(with_analytic=False) - - def test_never_with_analytic(self): - self._set_analytic_policy('never') - with self.assertRaises(orm.except_orm): - self._create_move(with_analytic=True) - - def test_never_with_analytic_0(self): - # accept analytic when debit=credit=0 - self._set_analytic_policy('never') - self._create_move(with_analytic=True, amount=0) - - def test_always_remove_analytic(self): - # remove partner when policy is always - self._set_analytic_policy('always') - line_id = self._create_move(with_analytic=True) - with self.assertRaises(orm.except_orm): - self.move_line_obj.write(self.cr, self.uid, line_id, - {'analytic_account_id': False}) - - def test_change_account(self): - self._set_analytic_policy('always', aref='account.a_expense') - line_id = self._create_move(with_analytic=False) - # change account to a_expense with policy always but missing - # analytic_account - with self.assertRaises(orm.except_orm): - self.move_line_obj.write( - self.cr, self.uid, line_id, - {'account_id': self.ref('account.a_expense')}) - # change account to a_expense with policy always - # with analytic account -> ok - self.move_line_obj.write( - self.cr, self.uid, line_id, { - 'account_id': self.ref('account.a_expense'), - 'analytic_account_id': self.analytic_account_id}) From cb9de2c1df2cc4f29c8df57851c3c68595e4d6a9 Mon Sep 17 00:00:00 2001 From: Adrien Peiffer Date: Wed, 3 Sep 2014 16:17:48 +0200 Subject: [PATCH 13/69] [MOD] Move account_analytic_required out of __unported__ --- account_analytic_required/__init__.py | 24 ++++ account_analytic_required/__openerp__.py | 50 +++++++ account_analytic_required/account.py | 103 ++++++++++++++ account_analytic_required/account_view.xml | 35 +++++ .../i18n/account_analytic_required.pot | 94 +++++++++++++ account_analytic_required/i18n/ar.po | 120 ++++++++++++++++ account_analytic_required/i18n/ca.po | 120 ++++++++++++++++ account_analytic_required/i18n/es.po | 122 ++++++++++++++++ account_analytic_required/i18n/fr.po | 121 ++++++++++++++++ account_analytic_required/tests/__init__.py | 30 ++++ .../tests/test_account_analytic_required.py | 130 ++++++++++++++++++ 11 files changed, 949 insertions(+) create mode 100644 account_analytic_required/__init__.py create mode 100644 account_analytic_required/__openerp__.py create mode 100644 account_analytic_required/account.py create mode 100644 account_analytic_required/account_view.xml create mode 100644 account_analytic_required/i18n/account_analytic_required.pot create mode 100644 account_analytic_required/i18n/ar.po create mode 100644 account_analytic_required/i18n/ca.po create mode 100644 account_analytic_required/i18n/es.po create mode 100644 account_analytic_required/i18n/fr.po create mode 100644 account_analytic_required/tests/__init__.py create mode 100644 account_analytic_required/tests/test_account_analytic_required.py diff --git a/account_analytic_required/__init__.py b/account_analytic_required/__init__.py new file mode 100644 index 000000000..fdc3ea32b --- /dev/null +++ b/account_analytic_required/__init__.py @@ -0,0 +1,24 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account analytic required module for OpenERP +# Copyright (C) 2011 Akretion (http://www.akretion.com). All Rights Reserved +# @author Alexis de Lattre +# +# 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 diff --git a/account_analytic_required/__openerp__.py b/account_analytic_required/__openerp__.py new file mode 100644 index 000000000..5f49cd080 --- /dev/null +++ b/account_analytic_required/__openerp__.py @@ -0,0 +1,50 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account analytic required module for OpenERP +# Copyright (C) 2011 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# 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': 'Account Analytic Required', + 'version': '0.2', + 'category': 'Analytic Accounting', + 'license': 'AGPL-3', + 'description': """ +Account Analytic Required +========================= + +This module adds an option *analytic policy* on account types. +You have the choice between 3 policies : *always*, *never* and *optional*. + +For example, if you want to have an analytic account on all your expenses, +set the policy to *always* for the account type *expense* ; then, if you +try to save an account move line with an account of type *expense* +without analytic account, you will get an error message. + +Module developped by Alexis de Lattre +during the Akretion-Camptocamp code sprint of June 2011. +""", + 'author': 'Akretion', + 'website': 'http://www.akretion.com/', + 'depends': ['account'], + 'data': ['account_view.xml'], + 'installable': True, + 'auto_install': False, +} diff --git a/account_analytic_required/account.py b/account_analytic_required/account.py new file mode 100644 index 000000000..a5de6c111 --- /dev/null +++ b/account_analytic_required/account.py @@ -0,0 +1,103 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account analytic required module for OpenERP +# Copyright (C) 2011 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# Developped during the Akretion-Camptocamp code sprint of June 2011 +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from openerp.osv import orm, fields +from openerp.tools.translate import _ + + +class account_account_type(orm.Model): + _inherit = "account.account.type" + + _columns = { + 'analytic_policy': fields.selection([ + ('optional', 'Optional'), + ('always', 'Always'), + ('never', 'Never') + ], 'Policy for analytic account', + help="Set the policy for analytic accounts : if you select " + "'Optional', the accountant is free to put an analytic account " + "on an account move line with this type of account ; if you " + "select 'Always', the accountant will get an error message if " + "there is no analytic account ; if you select 'Never', the " + "accountant will get an error message if an analytic account " + "is present."), + } + + _defaults = { + 'analytic_policy': 'optional', + } + + +class account_move_line(orm.Model): + _inherit = "account.move.line" + + def check_analytic_required(self, cr, uid, ids, vals, context=None): + if 'account_id' in vals or 'analytic_account_id' in vals or \ + 'debit' in vals or 'credit' in vals: + if isinstance(ids, (int, long)): + ids = [ids] + for move_line in self.browse(cr, uid, ids, context): + if move_line.debit == 0 and move_line.credit == 0: + continue + analytic_policy = \ + move_line.account_id.user_type.analytic_policy + if analytic_policy == 'always' and \ + not move_line.analytic_account_id: + raise orm.except_orm( + _('Error :'), + _("Analytic policy is set to 'Always' with account " + "%s '%s' but the analytic account is missing in " + "the account move line with label '%s'.") + % ( + move_line.account_id.code, + move_line.account_id.name, + move_line.name)) + elif analytic_policy == 'never' and \ + move_line.analytic_account_id: + raise orm.except_orm( + _('Error :'), + _("Analytic policy is set to 'Never' with account %s " + "'%s' but the account move line with label '%s' " + "has an analytic account %s '%s'.") + % ( + move_line.account_id.code, + move_line.account_id.name, + move_line.name, + move_line.analytic_account_id.code, + move_line.analytic_account_id.name)) + return True + + def create(self, cr, uid, vals, context=None, check=True): + line_id = super(account_move_line, self).create( + cr, uid, vals, context=context, check=check) + self.check_analytic_required(cr, uid, line_id, vals, context=context) + return line_id + + def write( + self, cr, uid, ids, vals, context=None, check=True, + update_check=True): + res = super(account_move_line, self).write( + cr, uid, ids, vals, context=context, check=check, + update_check=update_check) + self.check_analytic_required(cr, uid, ids, vals, context=context) + return res diff --git a/account_analytic_required/account_view.xml b/account_analytic_required/account_view.xml new file mode 100644 index 000000000..5ae1b50a3 --- /dev/null +++ b/account_analytic_required/account_view.xml @@ -0,0 +1,35 @@ + + + + + + + + account_analytic_required.account_type_form + account.account.type + + + + + + + + + + account_analytic_required.account_type_tree + account.account.type + + + + + + + + + + diff --git a/account_analytic_required/i18n/account_analytic_required.pot b/account_analytic_required/i18n/account_analytic_required.pot new file mode 100644 index 000000000..6724a8fcd --- /dev/null +++ b/account_analytic_required/i18n/account_analytic_required.pot @@ -0,0 +1,94 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * account_analytic_required +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 6.0.2\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2011-06-10 07:49+0000\n" +"PO-Revision-Date: 2011-06-10 07:49+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_analytic_required +#: field:account.account.type,analytic_policy:0 +msgid "Policy for analytic account" +msgstr "" + +#. module: account_analytic_required +#: help:account.account.type,analytic_policy:0 +msgid "Set the policy for analytic accounts : if you select 'Optional', the accountant is free to put an analytic account on an account move line with this type of account ; if you select 'Always', the accountant will get an error message if there is no analytic account ; if you select 'Never', the accountant will get an error message if an analytic account is present." +msgstr "" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "" + +#. module: account_analytic_required +#: model:ir.module.module,description:account_analytic_required.module_meta_information +msgid "This module adds an option \"analytic policy\" on account types. You have the choice between 3 policies : always, never and optional.\n" +"\n" +"For example, if you want to have an analytic account on all your expenses, set the policy to \"always\" for the account type \"expense\" ; then, if you try to save an account move line with an account of type \"expense\" without analytic account, you will get an error message.\n" +"\n" +"Module developped by Alexis de Lattre during the Akretion-Camptocamp code sprint of June 2011.\n" +"" +msgstr "" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on closed account." +msgstr "" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "" + +#. module: account_analytic_required +#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information +msgid "Account analytic required" +msgstr "" + +#. module: account_analytic_required +#: sql_constraint:account.move.line:0 +msgid "Wrong credit or debit value in accounting entry !" +msgstr "" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on view account." +msgstr "" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Items" +msgstr "" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "Company must be same for its related account and period." +msgstr "" + +#. module: account_analytic_required +#: code:addons/account_analytic_required/account.py:53 +#: code:addons/account_analytic_required/account.py:56 +#, python-format +msgid "Error :" +msgstr "" + diff --git a/account_analytic_required/i18n/ar.po b/account_analytic_required/i18n/ar.po new file mode 100644 index 000000000..870152419 --- /dev/null +++ b/account_analytic_required/i18n/ar.po @@ -0,0 +1,120 @@ +# Arabic translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2011-06-10 07:49+0000\n" +"PO-Revision-Date: 2014-06-26 11:15+0000\n" +"Last-Translator: Pedro Manuel Baeza \n" +"Language-Team: Arabic \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2014-06-27 07:08+0000\n" +"X-Generator: Launchpad (build 17077)\n" + +#. module: account_analytic_required +#: field:account.account.type,analytic_policy:0 +msgid "Policy for analytic account" +msgstr "سياسة للحسابات التحليلية" + +#. module: account_analytic_required +#: help:account.account.type,analytic_policy:0 +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Never', the " +"accountant will get an error message if an analytic account is present." +msgstr "" +"ضع سياسة للحسابات التحليلية: إذا قمت بتحديد \"الاختياري\"، فان المحاسب حر في " +"وضع حساب تحليلي على حساب خط التحرك مع هذا النوع من الحساب، وإذا قمت بتحديد " +"\"دائما\"، فان المحاسب سوف يحصل على رسالة خطأ إذا كان هناك لا يوجد حساب " +"تحليلي، وإذا قمت بتحديد \"أبدا\"، فان المحاسب سوف يحصل على رسالة خطأ إذا كان " +"هناك حساب تحليلي موجود" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "إختياري" + +#. module: account_analytic_required +#: model:ir.module.module,description:account_analytic_required.module_meta_information +msgid "" +"This module adds an option \"analytic policy\" on account types. You have " +"the choice between 3 policies : always, never and optional.\n" +"\n" +"For example, if you want to have an analytic account on all your expenses, " +"set the policy to \"always\" for the account type \"expense\" ; then, if you " +"try to save an account move line with an account of type \"expense\" without " +"analytic account, you will get an error message.\n" +"\n" +"Module developped by Alexis de Lattre during " +"the Akretion-Camptocamp code sprint of June 2011.\n" +msgstr "" +"هذه الوحدة تضيف خيار \"السياسة التحليلية\" على أنواع الحسابات. لديك خيار بين " +"3 سياسات: دائما، أبدا، واختياري.\n" +"\n" +"على سبيل المثال، إذا كنت تريد أن يكون لديك حساب تحليلي عن جميع النفقات " +"الخاصة بك، اختار النهج \"دائما\" من أجل نوع الحساب\"مصروف\"، ثم، إذا حاولت " +"حفظ الحركة في حساب مع حساب \"مصروف\" من دون حساب تحليلي، وسوف تحصل على " +"رسالة خطأ.\n" +"\n" +"طورت الوحدة بواسطة اتر أليكسيس دي alexis.delattre@akretion.com> Akretion-" +"Camptocamp من يونيو 2011\n" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on closed account." +msgstr "لا يمكنك انشاء حركة على الحساب" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "دائماً" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "أبدًا" + +#. module: account_analytic_required +#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information +msgid "Account analytic required" +msgstr "مطلوب حساب تحليلي" + +#. module: account_analytic_required +#: sql_constraint:account.move.line:0 +msgid "Wrong credit or debit value in accounting entry !" +msgstr "قيمة دائنة أو مدينة خاطئة في القيد المحاسبي !" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on view account." +msgstr "لا يمكنك عمل حركة على هذا الحساب" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Items" +msgstr "عناصر دفتر اليومية" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "نوع الحساب" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "Company must be same for its related account and period." +msgstr "يجب ان تكون الشركة نفس فترتها وحسابها المتعلق بها." + +#. module: account_analytic_required +#: code:addons/account_analytic_required/account.py:53 +#: code:addons/account_analytic_required/account.py:56 +#, python-format +msgid "Error :" +msgstr "خطأ :" diff --git a/account_analytic_required/i18n/ca.po b/account_analytic_required/i18n/ca.po new file mode 100644 index 000000000..9048d6626 --- /dev/null +++ b/account_analytic_required/i18n/ca.po @@ -0,0 +1,120 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * account_analytic_required +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 6.0.2\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2011-06-10 07:49+0000\n" +"PO-Revision-Date: 2014-06-26 11:18+0000\n" +"Last-Translator: jmartin (Zikzakmedia) \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2014-06-27 07:08+0000\n" +"X-Generator: Launchpad (build 17077)\n" + +#. module: account_analytic_required +#: field:account.account.type,analytic_policy:0 +msgid "Policy for analytic account" +msgstr "Política per als comptes analítics" + +#. module: account_analytic_required +#: help:account.account.type,analytic_policy:0 +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Never', the " +"accountant will get an error message if an analytic account is present." +msgstr "" +"Configura la política per als comptes analítics: Si seleccioneu 'Opcional', " +"el comptable és lliure de posar un compte analític en un apunt comptable amb " +"aquest tipus de compte; si seleccioneu 'Sempre', el comptable rebrà un " +"missatge d'error si l'apunt no té compte analític; si seleccioneu 'Mai', el " +"comptable rebrà un missatge d'error si l'apunt té un compte analític." + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "Opcional" + +#. module: account_analytic_required +#: model:ir.module.module,description:account_analytic_required.module_meta_information +msgid "" +"This module adds an option \"analytic policy\" on account types. You have " +"the choice between 3 policies : always, never and optional.\n" +"\n" +"For example, if you want to have an analytic account on all your expenses, " +"set the policy to \"always\" for the account type \"expense\" ; then, if you " +"try to save an account move line with an account of type \"expense\" without " +"analytic account, you will get an error message.\n" +"\n" +"Module developped by Alexis de Lattre during " +"the Akretion-Camptocamp code sprint of June 2011.\n" +msgstr "" +"Aquest mòdul afegeix una opció \"política analítica\" als tipus comptables. " +"Podeu escollir entre 3 polítiques: 'Sempre', 'Mai' i 'Opcional'.\n" +"\n" +"Per exemple, si voleu tenir un compte analític de totes les vostres " +"despeses, seleccioneu la política \"Sempre\" per al tipus comptable " +"\"Despesa\"; llavors, si intenteu desar un apunt comptable de tipus " +"comptable \"Despesa\" sense compte analític, obtindreu un missatge d'error.\n" +"\n" +"Mòdul desenvolupat per Alexis de Lattre " +"durant la cursa de codi Akretion-Camptocamp de juny de 2011.\n" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on closed account." +msgstr "No podeu crear un apunt en un compte tancat." + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "Sempre" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "Mai" + +#. module: account_analytic_required +#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information +msgid "Account analytic required" +msgstr "El compte analític és requerit." + +#. module: account_analytic_required +#: sql_constraint:account.move.line:0 +msgid "Wrong credit or debit value in accounting entry !" +msgstr "Valor erroni al deure o a l'haver de l'assentament comptable!" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on view account." +msgstr "No podeu crear un apunt en un compte de tipus \"Vista\"." + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Items" +msgstr "Apunts comptables" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "Tipus de compte" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "Company must be same for its related account and period." +msgstr "" +"La companyia ha de ser la mateixa que la dels comptes i períodes relacionats." + +#. module: account_analytic_required +#: code:addons/account_analytic_required/account.py:53 +#: code:addons/account_analytic_required/account.py:56 +#, python-format +msgid "Error :" +msgstr "Error:" diff --git a/account_analytic_required/i18n/es.po b/account_analytic_required/i18n/es.po new file mode 100644 index 000000000..8e21c5850 --- /dev/null +++ b/account_analytic_required/i18n/es.po @@ -0,0 +1,122 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * account_analytic_required +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 6.0.2\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2011-06-10 07:49+0000\n" +"PO-Revision-Date: 2014-06-26 11:18+0000\n" +"Last-Translator: jmartin (Zikzakmedia) \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2014-06-27 07:09+0000\n" +"X-Generator: Launchpad (build 17077)\n" + +#. module: account_analytic_required +#: field:account.account.type,analytic_policy:0 +msgid "Policy for analytic account" +msgstr "Política para las cuentas analíticas" + +#. module: account_analytic_required +#: help:account.account.type,analytic_policy:0 +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Never', the " +"accountant will get an error message if an analytic account is present." +msgstr "" +"Configura la política para las cuentas analíticas: Si selecciona 'Opcional', " +"el contable es libre de poner una cuenta analítica en un apunte contable de " +"este tipo de cuenta; si selecciona 'Siempre', el contable recibirá un " +"mensaje de error si el apunte no tiene cuenta analítica; si selecciona " +"'Nunca', el contable recibirá un mensaje de error si el apunte tiene una " +"cuenta analítica." + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "Opcional" + +#. module: account_analytic_required +#: model:ir.module.module,description:account_analytic_required.module_meta_information +msgid "" +"This module adds an option \"analytic policy\" on account types. You have " +"the choice between 3 policies : always, never and optional.\n" +"\n" +"For example, if you want to have an analytic account on all your expenses, " +"set the policy to \"always\" for the account type \"expense\" ; then, if you " +"try to save an account move line with an account of type \"expense\" without " +"analytic account, you will get an error message.\n" +"\n" +"Module developped by Alexis de Lattre during " +"the Akretion-Camptocamp code sprint of June 2011.\n" +msgstr "" +"Este módulo añade una opción \"política analítica\" a los tipos contables. " +"Puede escoger entre 3 políticas: 'Siempre', 'Nunca' y 'Opcional'.\n" +"\n" +"Por ejemplo, si quiere tener una cuenta analítica de todos sus gastos, " +"seleccione la política \"Siempre\" para el tipo contable \"Gasto\"; " +"entonces, si intenta guardar un apunte contable de tipo contable \"Gasto\" " +"sin cuenta analítica, obtendrá un mensaje de error.\n" +"\n" +"Módulo desarrollado por Alexis de Lattre " +"durante la carrera de código Akretion-Camptocamp de junio de 2011.\n" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on closed account." +msgstr "No puede crear un apunte en una cuenta cerrada." + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "Siempre" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "Nunca" + +#. module: account_analytic_required +#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information +msgid "Account analytic required" +msgstr "La cuenta analítica es requerida." + +#. module: account_analytic_required +#: sql_constraint:account.move.line:0 +msgid "Wrong credit or debit value in accounting entry !" +msgstr "¡Valor erróneo en el debe o en el haber del asiento contable!" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on view account." +msgstr "No puede crear un apunte en una cuenta de tipo \"Vista\"." + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Items" +msgstr "Apuntes contables" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "Tipo de cuenta" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "Company must be same for its related account and period." +msgstr "" +"La compañía debe ser la misma que la de las cuentas y los periodos " +"relacionados." + +#. module: account_analytic_required +#: code:addons/account_analytic_required/account.py:53 +#: code:addons/account_analytic_required/account.py:56 +#, python-format +msgid "Error :" +msgstr "Error:" diff --git a/account_analytic_required/i18n/fr.po b/account_analytic_required/i18n/fr.po new file mode 100644 index 000000000..5b1a2fb2e --- /dev/null +++ b/account_analytic_required/i18n/fr.po @@ -0,0 +1,121 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * account_analytic_required +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 6.0.2\n" +"Report-Msgid-Bugs-To: support@openerp.com\n" +"POT-Creation-Date: 2011-06-10 07:49+0000\n" +"PO-Revision-Date: 2014-06-26 11:18+0000\n" +"Last-Translator: Alexis de Lattre \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2014-06-27 07:08+0000\n" +"X-Generator: Launchpad (build 17077)\n" + +#. module: account_analytic_required +#: field:account.account.type,analytic_policy:0 +msgid "Policy for analytic account" +msgstr "Politique pour les comptes analytiques" + +#. module: account_analytic_required +#: help:account.account.type,analytic_policy:0 +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Never', the " +"accountant will get an error message if an analytic account is present." +msgstr "" +"Configurez la politique pour les comptes analytiques : si vous sélectionnez " +"'Optionnel', le comptable est libre de saisir ou non un compte analytique " +"sur une ligne comptable avec ce type de compte de comptabilité générale ; si " +"vous sélectionnez 'Toujours', le comptable aura un message d'erreur si il " +"n'y a pas de compte analytique ; si vous sélectionnez 'Jamais', le comptable " +"aura un message d'erreur si un compte analytique est présent." + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "Optionnel" + +#. module: account_analytic_required +#: model:ir.module.module,description:account_analytic_required.module_meta_information +msgid "" +"This module adds an option \"analytic policy\" on account types. You have " +"the choice between 3 policies : always, never and optional.\n" +"\n" +"For example, if you want to have an analytic account on all your expenses, " +"set the policy to \"always\" for the account type \"expense\" ; then, if you " +"try to save an account move line with an account of type \"expense\" without " +"analytic account, you will get an error message.\n" +"\n" +"Module developped by Alexis de Lattre during " +"the Akretion-Camptocamp code sprint of June 2011.\n" +msgstr "" +"This module adds an option \"analytic policy\" on account types. You have " +"the choice between 3 policies : always, never and optional.\n" +"\n" +"For example, if you want to have an analytic account on all your expenses, " +"set the policy to \"always\" for the account type \"expense\" ; then, if you " +"try to save an account move line with an account of type \"expense\" without " +"analytic account, you will get an error message.\n" +"\n" +"Module developped by Alexis de Lattre during " +"the Akretion-Camptocamp code sprint of June 2011.\n" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on closed account." +msgstr "Impossible de créer une ligne d'écriture sur un compte clôturé" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "Toujours" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "Jamais" + +#. module: account_analytic_required +#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information +msgid "Account analytic required" +msgstr "Account analytic required" + +#. module: account_analytic_required +#: sql_constraint:account.move.line:0 +msgid "Wrong credit or debit value in accounting entry !" +msgstr "Valeur erronée au crédit ou au débit de la pièce comptable !" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "You can not create move line on view account." +msgstr "" +"Vous ne pouvez pas créer de ligne d'écriture sur un compte de type \"Vue\"." + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Items" +msgstr "Écritures comptables" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "Type de compte" + +#. module: account_analytic_required +#: constraint:account.move.line:0 +msgid "Company must be same for its related account and period." +msgstr "La société doit être la même pour les comptes et périodes liées." + +#. module: account_analytic_required +#: code:addons/account_analytic_required/account.py:53 +#: code:addons/account_analytic_required/account.py:56 +#, python-format +msgid "Error :" +msgstr "Erreur :" diff --git a/account_analytic_required/tests/__init__.py b/account_analytic_required/tests/__init__.py new file mode 100644 index 000000000..85d610f4e --- /dev/null +++ b/account_analytic_required/tests/__init__.py @@ -0,0 +1,30 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account analytic required module for OpenERP +# Copyright (C) 2014 Acsone (http://acsone.eu). All Rights Reserved +# @author Stéphane Bidoul +# +# 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 test_account_analytic_required + +fast_suite = [ +] + +checks = [ + test_account_analytic_required, +] diff --git a/account_analytic_required/tests/test_account_analytic_required.py b/account_analytic_required/tests/test_account_analytic_required.py new file mode 100644 index 000000000..39bc393d1 --- /dev/null +++ b/account_analytic_required/tests/test_account_analytic_required.py @@ -0,0 +1,130 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account analytic required module for OpenERP +# Copyright (C) 2014 Acsone (http://acsone.eu). All Rights Reserved +# @author Stéphane Bidoul +# +# 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 datetime import datetime + +from openerp.tests import common +from openerp.osv import orm + + +class test_account_analytic_required(common.TransactionCase): + + def setUp(self): + super(test_account_analytic_required, self).setUp() + self.account_obj = self.registry('account.account') + self.account_type_obj = self.registry('account.account.type') + self.move_obj = self.registry('account.move') + self.move_line_obj = self.registry('account.move.line') + self.analytic_account_obj = self.registry('account.analytic.account') + self.analytic_account_id = self.analytic_account_obj.create( + self.cr, self.uid, {'name': 'test aa', 'type': 'normal'}) + + def _create_move(self, with_analytic, amount=100): + date = datetime.now() + period_id = self.registry('account.period').find( + self.cr, self.uid, date, + context={'account_period_prefer_normal': True})[0] + move_vals = { + 'journal_id': self.ref('account.sales_journal'), + 'period_id': period_id, + 'date': date, + } + move_id = self.move_obj.create(self.cr, self.uid, move_vals) + move_line_id = self.move_line_obj.create( + self.cr, self.uid, + {'move_id': move_id, + 'name': '/', + 'debit': 0, + 'credit': amount, + 'account_id': self.ref('account.a_sale'), + 'analytic_account_id': + self.analytic_account_id if with_analytic else False}) + self.move_line_obj.create( + self.cr, self.uid, + {'move_id': move_id, + 'name': '/', + 'debit': amount, + 'credit': 0, + 'account_id': self.ref('account.a_recv')}) + return move_line_id + + def _set_analytic_policy(self, policy, aref='account.a_sale'): + account_type = self.account_obj.browse(self.cr, self.uid, + self.ref(aref)).user_type + self.account_type_obj.write(self.cr, self.uid, account_type.id, + {'analytic_policy': policy}) + + def test_optional(self): + self._create_move(with_analytic=False) + self._create_move(with_analytic=True) + + def test_always_no_analytic(self): + self._set_analytic_policy('always') + with self.assertRaises(orm.except_orm): + self._create_move(with_analytic=False) + + def test_always_no_analytic_0(self): + # accept missing analytic account when debit=credit=0 + self._set_analytic_policy('always') + self._create_move(with_analytic=False, amount=0) + + def test_always_with_analytic(self): + self._set_analytic_policy('always') + self._create_move(with_analytic=True) + + def test_never_no_analytic(self): + self._set_analytic_policy('never') + self._create_move(with_analytic=False) + + def test_never_with_analytic(self): + self._set_analytic_policy('never') + with self.assertRaises(orm.except_orm): + self._create_move(with_analytic=True) + + def test_never_with_analytic_0(self): + # accept analytic when debit=credit=0 + self._set_analytic_policy('never') + self._create_move(with_analytic=True, amount=0) + + def test_always_remove_analytic(self): + # remove partner when policy is always + self._set_analytic_policy('always') + line_id = self._create_move(with_analytic=True) + with self.assertRaises(orm.except_orm): + self.move_line_obj.write(self.cr, self.uid, line_id, + {'analytic_account_id': False}) + + def test_change_account(self): + self._set_analytic_policy('always', aref='account.a_expense') + line_id = self._create_move(with_analytic=False) + # change account to a_expense with policy always but missing + # analytic_account + with self.assertRaises(orm.except_orm): + self.move_line_obj.write( + self.cr, self.uid, line_id, + {'account_id': self.ref('account.a_expense')}) + # change account to a_expense with policy always + # with analytic account -> ok + self.move_line_obj.write( + self.cr, self.uid, line_id, { + 'account_id': self.ref('account.a_expense'), + 'analytic_account_id': self.analytic_account_id}) From 8e6271b553729a8c13520398f3af20ad1cce5132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Wed, 24 Sep 2014 23:32:12 +0200 Subject: [PATCH 14/69] [IMP] refactor account_analytic_required with constraints for robustness --- account_analytic_required/account.py | 100 ++++++++---------- .../tests/test_account_analytic_required.py | 6 +- 2 files changed, 49 insertions(+), 57 deletions(-) diff --git a/account_analytic_required/account.py b/account_analytic_required/account.py index a5de6c111..0d47b7f5d 100644 --- a/account_analytic_required/account.py +++ b/account_analytic_required/account.py @@ -28,12 +28,17 @@ class account_account_type(orm.Model): _inherit = "account.account.type" + def _get_policies(self, cr, uid, context=None): + """This is the method to be inherited for adding policies""" + return [('optional', _('Optional')), + ('always', _('Always')), + ('never', _('Never'))] + _columns = { - 'analytic_policy': fields.selection([ - ('optional', 'Optional'), - ('always', 'Always'), - ('never', 'Never') - ], 'Policy for analytic account', + 'analytic_policy': fields.selection( + lambda self, *args, **kwargs: self._get_policies(*args, **kwargs), + 'Policy for analytic account', + required=True, help="Set the policy for analytic accounts : if you select " "'Optional', the accountant is free to put an analytic account " "on an account move line with this type of account ; if you " @@ -45,59 +50,46 @@ class account_account_type(orm.Model): _defaults = { 'analytic_policy': 'optional', - } + } class account_move_line(orm.Model): _inherit = "account.move.line" - def check_analytic_required(self, cr, uid, ids, vals, context=None): - if 'account_id' in vals or 'analytic_account_id' in vals or \ - 'debit' in vals or 'credit' in vals: - if isinstance(ids, (int, long)): - ids = [ids] - for move_line in self.browse(cr, uid, ids, context): - if move_line.debit == 0 and move_line.credit == 0: - continue - analytic_policy = \ - move_line.account_id.user_type.analytic_policy - if analytic_policy == 'always' and \ - not move_line.analytic_account_id: - raise orm.except_orm( - _('Error :'), - _("Analytic policy is set to 'Always' with account " - "%s '%s' but the analytic account is missing in " - "the account move line with label '%s'.") - % ( - move_line.account_id.code, - move_line.account_id.name, - move_line.name)) - elif analytic_policy == 'never' and \ - move_line.analytic_account_id: - raise orm.except_orm( - _('Error :'), - _("Analytic policy is set to 'Never' with account %s " - "'%s' but the account move line with label '%s' " - "has an analytic account %s '%s'.") - % ( - move_line.account_id.code, - move_line.account_id.name, - move_line.name, - move_line.analytic_account_id.code, - move_line.analytic_account_id.name)) - return True + def _get_analytic_policy(self, cr, uid, account, context=None): + """ Extension point to obtain analytic policy for an account """ + return account.user_type.analytic_policy + + def _check_analytic_required_msg(self, cr, uid, ids, context=None): + for move_line in self.browse(cr, uid, ids, context): + if move_line.debit == 0 and move_line.credit == 0: + continue + analytic_policy = self._get_analytic_policy(cr, uid, + move_line.account_id, + context=context) + if analytic_policy == 'always' and \ + not move_line.analytic_account_id: + return _("Analytic policy is set to 'Always' with account " + "%s '%s' but the analytic account is missing in " + "the account move line with label '%s'.") % \ + (move_line.account_id.code, + move_line.account_id.name, + move_line.name) + elif analytic_policy == 'never' and \ + move_line.analytic_account_id: + return _("Analytic policy is set to 'Never' with account %s " + "'%s' but the account move line with label '%s' " + "has an analytic account %s '%s'.") % \ + (move_line.account_id.code, + move_line.account_id.name, + move_line.name, + move_line.analytic_account_id.code, + move_line.analytic_account_id.name) - def create(self, cr, uid, vals, context=None, check=True): - line_id = super(account_move_line, self).create( - cr, uid, vals, context=context, check=check) - self.check_analytic_required(cr, uid, line_id, vals, context=context) - return line_id + def _check_analytic_required(self, cr, uid, ids, context=None): + return not self._check_analytic_required_msg(cr, uid, ids, + context=context) - def write( - self, cr, uid, ids, vals, context=None, check=True, - update_check=True): - res = super(account_move_line, self).write( - cr, uid, ids, vals, context=context, check=check, - update_check=update_check) - self.check_analytic_required(cr, uid, ids, vals, context=context) - return res + _constraints = [(_check_analytic_required, + _check_analytic_required_msg, + ['analytic_account_id', 'account_id', 'debit', 'credit'])] diff --git a/account_analytic_required/tests/test_account_analytic_required.py b/account_analytic_required/tests/test_account_analytic_required.py index 39bc393d1..f66bd54a9 100644 --- a/account_analytic_required/tests/test_account_analytic_required.py +++ b/account_analytic_required/tests/test_account_analytic_required.py @@ -110,7 +110,7 @@ def test_always_remove_analytic(self): self._set_analytic_policy('always') line_id = self._create_move(with_analytic=True) with self.assertRaises(orm.except_orm): - self.move_line_obj.write(self.cr, self.uid, line_id, + self.move_line_obj.write(self.cr, self.uid, [line_id], {'analytic_account_id': False}) def test_change_account(self): @@ -120,11 +120,11 @@ def test_change_account(self): # analytic_account with self.assertRaises(orm.except_orm): self.move_line_obj.write( - self.cr, self.uid, line_id, + self.cr, self.uid, [line_id], {'account_id': self.ref('account.a_expense')}) # change account to a_expense with policy always # with analytic account -> ok self.move_line_obj.write( - self.cr, self.uid, line_id, { + self.cr, self.uid, [line_id], { 'account_id': self.ref('account.a_expense'), 'analytic_account_id': self.analytic_account_id}) From 361b42eae6d1b64c10b28a875be94e853ecf5399 Mon Sep 17 00:00:00 2001 From: Alexandre Fayolle Date: Mon, 2 Mar 2015 17:22:10 +0100 Subject: [PATCH 15/69] Add OCA as author of OCA addons In order to get visibility on https://www.odoo.com/apps the OCA board has decided to add the OCA as author of all the addons maintained as part of the association. --- account_analytic_required/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_analytic_required/__openerp__.py b/account_analytic_required/__openerp__.py index 5f49cd080..1596c1d91 100644 --- a/account_analytic_required/__openerp__.py +++ b/account_analytic_required/__openerp__.py @@ -41,7 +41,7 @@ Module developped by Alexis de Lattre during the Akretion-Camptocamp code sprint of June 2011. """, - 'author': 'Akretion', + 'author': "Akretion,Odoo Community Association (OCA)", 'website': 'http://www.akretion.com/', 'depends': ['account'], 'data': ['account_view.xml'], From 60f606b0775347d08e018f27cd8f910072b4a163 Mon Sep 17 00:00:00 2001 From: Alexandre Fayolle Date: Thu, 27 Aug 2015 16:51:59 +0200 Subject: [PATCH 16/69] remove deprecated test suite declarations these cause Warnings during the tests --- account_analytic_required/tests/__init__.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/account_analytic_required/tests/__init__.py b/account_analytic_required/tests/__init__.py index 85d610f4e..f70d8a2c8 100644 --- a/account_analytic_required/tests/__init__.py +++ b/account_analytic_required/tests/__init__.py @@ -21,10 +21,3 @@ ############################################################################## from . import test_account_analytic_required - -fast_suite = [ -] - -checks = [ - test_account_analytic_required, -] From 8c87c8ffd59fe62107ae83bf87d45dd6102038f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 9 Oct 2015 09:58:12 +0200 Subject: [PATCH 17/69] [UPD] prefix versions with 8.0 --- account_analytic_required/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_analytic_required/__openerp__.py b/account_analytic_required/__openerp__.py index 1596c1d91..b747f1382 100644 --- a/account_analytic_required/__openerp__.py +++ b/account_analytic_required/__openerp__.py @@ -23,7 +23,7 @@ { 'name': 'Account Analytic Required', - 'version': '0.2', + 'version': '8.0.0.2.0', 'category': 'Analytic Accounting', 'license': 'AGPL-3', 'description': """ From 90b53a64a690ce5676bd2bcf22e37f7179c21e6b Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 14 Oct 2015 02:50:16 +0200 Subject: [PATCH 18/69] [MIG] Make modules uninstallable --- account_analytic_required/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_analytic_required/__openerp__.py b/account_analytic_required/__openerp__.py index b747f1382..f91cbdbb7 100644 --- a/account_analytic_required/__openerp__.py +++ b/account_analytic_required/__openerp__.py @@ -45,6 +45,6 @@ 'website': 'http://www.akretion.com/', 'depends': ['account'], 'data': ['account_view.xml'], - 'installable': True, + 'installable': False, 'auto_install': False, } From c8c3240b20bae500a308cf52fe429203e443bfc5 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Fri, 3 Jun 2016 09:36:58 +0200 Subject: [PATCH 19/69] [9.0][PORT] account_analytic_required --- account_analytic_required/README.rst | 59 ++++++++ account_analytic_required/__init__.py | 25 +--- account_analytic_required/__openerp__.py | 48 +------ account_analytic_required/account.py | 95 ------------ account_analytic_required/models/__init__.py | 1 + account_analytic_required/models/account.py | 74 ++++++++++ account_analytic_required/tests/__init__.py | 22 --- .../tests/test_account_analytic_required.py | 135 +++++++++--------- .../{account_view.xml => views/account.xml} | 28 ++-- 9 files changed, 222 insertions(+), 265 deletions(-) create mode 100644 account_analytic_required/README.rst delete mode 100644 account_analytic_required/account.py create mode 100644 account_analytic_required/models/__init__.py create mode 100644 account_analytic_required/models/account.py rename account_analytic_required/{account_view.xml => views/account.xml} (58%) diff --git a/account_analytic_required/README.rst b/account_analytic_required/README.rst new file mode 100644 index 000000000..c5cef4b83 --- /dev/null +++ b/account_analytic_required/README.rst @@ -0,0 +1,59 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License + +========================= +Account Analytic Required +========================= + +This module adds an option *analytic policy* on account types. +You have the choice between 3 policies : *always*, *never* and *optional*. + +Configuration +============= + +For example, if you want to have an analytic account on all your expenses, +set the policy to *always* for the account type *expense* ; then, if you +try to save an account move line with an account of type *expense* +without analytic account, you will get an error message. + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/87/9.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Contributors +------------ +* Alexis de Lattre +* Stéphane Bidoul +* Sefan Rijnhart +* Laetitia Gangloff +* Luc De Meyer, Noviat +* Yannick Vaucher + +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 https://odoo-community.org. diff --git a/account_analytic_required/__init__.py b/account_analytic_required/__init__.py index fdc3ea32b..0650744f6 100644 --- a/account_analytic_required/__init__.py +++ b/account_analytic_required/__init__.py @@ -1,24 +1 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account analytic required module for OpenERP -# Copyright (C) 2011 Akretion (http://www.akretion.com). All Rights Reserved -# @author Alexis de Lattre -# -# 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 +from . import models diff --git a/account_analytic_required/__openerp__.py b/account_analytic_required/__openerp__.py index f91cbdbb7..d86b4e2c9 100644 --- a/account_analytic_required/__openerp__.py +++ b/account_analytic_required/__openerp__.py @@ -1,50 +1,16 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account analytic required module for OpenERP -# Copyright (C) 2011 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# -# 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 . -# -############################################################################## - - +# -*- coding: utf-8 -*- +# © 2011 Akretion +# © 2016 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) { 'name': 'Account Analytic Required', - 'version': '8.0.0.2.0', + 'version': '9.0.1.0.0', 'category': 'Analytic Accounting', 'license': 'AGPL-3', - 'description': """ -Account Analytic Required -========================= - -This module adds an option *analytic policy* on account types. -You have the choice between 3 policies : *always*, *never* and *optional*. - -For example, if you want to have an analytic account on all your expenses, -set the policy to *always* for the account type *expense* ; then, if you -try to save an account move line with an account of type *expense* -without analytic account, you will get an error message. - -Module developped by Alexis de Lattre -during the Akretion-Camptocamp code sprint of June 2011. -""", 'author': "Akretion,Odoo Community Association (OCA)", 'website': 'http://www.akretion.com/', 'depends': ['account'], - 'data': ['account_view.xml'], - 'installable': False, + 'data': ['views/account.xml'], + 'installable': True, 'auto_install': False, } diff --git a/account_analytic_required/account.py b/account_analytic_required/account.py deleted file mode 100644 index 0d47b7f5d..000000000 --- a/account_analytic_required/account.py +++ /dev/null @@ -1,95 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account analytic required module for OpenERP -# Copyright (C) 2011 Akretion (http://www.akretion.com) -# @author Alexis de Lattre -# Developped during the Akretion-Camptocamp code sprint of June 2011 -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp.osv import orm, fields -from openerp.tools.translate import _ - - -class account_account_type(orm.Model): - _inherit = "account.account.type" - - def _get_policies(self, cr, uid, context=None): - """This is the method to be inherited for adding policies""" - return [('optional', _('Optional')), - ('always', _('Always')), - ('never', _('Never'))] - - _columns = { - 'analytic_policy': fields.selection( - lambda self, *args, **kwargs: self._get_policies(*args, **kwargs), - 'Policy for analytic account', - required=True, - help="Set the policy for analytic accounts : if you select " - "'Optional', the accountant is free to put an analytic account " - "on an account move line with this type of account ; if you " - "select 'Always', the accountant will get an error message if " - "there is no analytic account ; if you select 'Never', the " - "accountant will get an error message if an analytic account " - "is present."), - } - - _defaults = { - 'analytic_policy': 'optional', - } - - -class account_move_line(orm.Model): - _inherit = "account.move.line" - - def _get_analytic_policy(self, cr, uid, account, context=None): - """ Extension point to obtain analytic policy for an account """ - return account.user_type.analytic_policy - - def _check_analytic_required_msg(self, cr, uid, ids, context=None): - for move_line in self.browse(cr, uid, ids, context): - if move_line.debit == 0 and move_line.credit == 0: - continue - analytic_policy = self._get_analytic_policy(cr, uid, - move_line.account_id, - context=context) - if analytic_policy == 'always' and \ - not move_line.analytic_account_id: - return _("Analytic policy is set to 'Always' with account " - "%s '%s' but the analytic account is missing in " - "the account move line with label '%s'.") % \ - (move_line.account_id.code, - move_line.account_id.name, - move_line.name) - elif analytic_policy == 'never' and \ - move_line.analytic_account_id: - return _("Analytic policy is set to 'Never' with account %s " - "'%s' but the account move line with label '%s' " - "has an analytic account %s '%s'.") % \ - (move_line.account_id.code, - move_line.account_id.name, - move_line.name, - move_line.analytic_account_id.code, - move_line.analytic_account_id.name) - - def _check_analytic_required(self, cr, uid, ids, context=None): - return not self._check_analytic_required_msg(cr, uid, ids, - context=context) - - _constraints = [(_check_analytic_required, - _check_analytic_required_msg, - ['analytic_account_id', 'account_id', 'debit', 'credit'])] diff --git a/account_analytic_required/models/__init__.py b/account_analytic_required/models/__init__.py new file mode 100644 index 000000000..2b77ae28f --- /dev/null +++ b/account_analytic_required/models/__init__.py @@ -0,0 +1 @@ +from . import account diff --git a/account_analytic_required/models/account.py b/account_analytic_required/models/account.py new file mode 100644 index 000000000..9734adaab --- /dev/null +++ b/account_analytic_required/models/account.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- +# © 2011 Akretion +# © 2016 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) + +from openerp import _, api, exceptions, fields, models +from openerp.tools import float_is_zero + + +class AccountAccountType(models.Model): + _inherit = "account.account.type" + + @api.model + def _get_policies(self): + """This is the method to be inherited for adding policies""" + return [('optional', 'Optional'), + ('always', 'Always'), + ('never', 'Never')] + + analytic_policy = fields.Selection( + _get_policies, + 'Policy for analytic account', + required=True, + default='optional', + help="Set the policy for analytic accounts : if you select " + "'Optional', the accountant is free to put an analytic account " + "on an account move line with this type of account ; if you " + "select 'Always', the accountant will get an error message if " + "there is no analytic account ; if you select 'Never', the " + "accountant will get an error message if an analytic account " + "is present.") + + +class AccountMoveLine(models.Model): + _inherit = "account.move.line" + + @api.model + def _get_analytic_policy(self, account): + """ Extension point to obtain analytic policy for an account """ + return account.user_type_id.analytic_policy + + @api.multi + def _check_analytic_required_msg(self): + for move_line in self: + prec = move_line.company_currency_id.rounding + if (float_is_zero(move_line.debit, precision_rounding=prec) and + float_is_zero(move_line.credit, precision_rounding=prec)): + continue + analytic_policy = self._get_analytic_policy(move_line.account_id) + if (analytic_policy == 'always' and + not move_line.analytic_account_id): + return _("Analytic policy is set to 'Always' with account " + "%s '%s' but the analytic account is missing in " + "the account move line with label '%s'." + ) % (move_line.account_id.code, + move_line.account_id.name, + move_line.name) + elif (analytic_policy == 'never' and + move_line.analytic_account_id): + return _("Analytic policy is set to 'Never' with account %s " + "'%s' but the account move line with label '%s' " + "has an analytic account %s '%s'." + ) % (move_line.account_id.code, + move_line.account_id.name, + move_line.name, + move_line.analytic_account_id.code, + move_line.analytic_account_id.name) + + @api.constrains('analytic_account_id', 'account_id', 'debit', 'credit') + def _check_analytic_required(self): + for rec in self: + message = rec._check_analytic_required_msg() + if message: + raise exceptions.ValidationError(message) diff --git a/account_analytic_required/tests/__init__.py b/account_analytic_required/tests/__init__.py index f70d8a2c8..fc369e3ef 100644 --- a/account_analytic_required/tests/__init__.py +++ b/account_analytic_required/tests/__init__.py @@ -1,23 +1 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account analytic required module for OpenERP -# Copyright (C) 2014 Acsone (http://acsone.eu). All Rights Reserved -# @author Stéphane Bidoul -# -# 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 test_account_analytic_required diff --git a/account_analytic_required/tests/test_account_analytic_required.py b/account_analytic_required/tests/test_account_analytic_required.py index f66bd54a9..9b8cb33bb 100644 --- a/account_analytic_required/tests/test_account_analytic_required.py +++ b/account_analytic_required/tests/test_account_analytic_required.py @@ -1,77 +1,78 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# Account analytic required module for OpenERP -# Copyright (C) 2014 Acsone (http://acsone.eu). All Rights Reserved -# @author Stéphane Bidoul -# -# 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 . -# -############################################################################## - +# -*- coding: utf-8 -*- +# © 2014 Acsone +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from datetime import datetime from openerp.tests import common -from openerp.osv import orm +from openerp import exceptions -class test_account_analytic_required(common.TransactionCase): +class TestAccountAnalyticRequired(common.TransactionCase): def setUp(self): - super(test_account_analytic_required, self).setUp() - self.account_obj = self.registry('account.account') - self.account_type_obj = self.registry('account.account.type') - self.move_obj = self.registry('account.move') - self.move_line_obj = self.registry('account.move.line') - self.analytic_account_obj = self.registry('account.analytic.account') - self.analytic_account_id = self.analytic_account_obj.create( - self.cr, self.uid, {'name': 'test aa', 'type': 'normal'}) + super(TestAccountAnalyticRequired, self).setUp() + self.account_obj = self.env['account.account'] + self.account_type_obj = self.env['account.account.type'] + self.move_obj = self.env['account.move'] + self.move_line_obj = self.env['account.move.line'] + self.analytic_account_obj = self.env['account.analytic.account'] + self.analytic_account = self.analytic_account_obj.create( + {'name': 'test aa', 'account_type': 'normal'}) + self.account_sales = self.env['account.account'].create({ + 'code': "X1020", + 'name': "Product Sales - (test)", + 'user_type_id': self.ref('account.data_account_type_revenue') + }) + self.account_recv = self.env['account.account'].create({ + 'code': "X11002", + 'name': "Debtors - (test)", + 'reconcile': True, + 'user_type_id': self.ref('account.data_account_type_receivable') + }) + self.account_exp = self.env['account.account'].create({ + 'code': "X2110", + 'name': "Expenses - (test)", + 'user_type_id': self.ref('account.data_account_type_expenses') + }) + self.sales_journal = self.env['account.journal'].create({ + 'name': "Sales Journal - (test)", + 'code': "TSAJ", + 'type': "sale", + 'refund_sequence': True, + 'default_debit_account_id': self.account_sales.id, + 'default_credit_account_id': self.account_sales.id, + }) def _create_move(self, with_analytic, amount=100): date = datetime.now() - period_id = self.registry('account.period').find( - self.cr, self.uid, date, - context={'account_period_prefer_normal': True})[0] + ml_obj = self.move_line_obj.with_context(check_move_validity=False) move_vals = { - 'journal_id': self.ref('account.sales_journal'), - 'period_id': period_id, + 'name': '/', + 'journal_id': self.sales_journal.id, 'date': date, } - move_id = self.move_obj.create(self.cr, self.uid, move_vals) - move_line_id = self.move_line_obj.create( - self.cr, self.uid, - {'move_id': move_id, + move = self.move_obj.create(move_vals) + move_line = ml_obj.create( + {'move_id': move.id, 'name': '/', 'debit': 0, 'credit': amount, - 'account_id': self.ref('account.a_sale'), + 'account_id': self.account_sales.id, 'analytic_account_id': - self.analytic_account_id if with_analytic else False}) - self.move_line_obj.create( - self.cr, self.uid, - {'move_id': move_id, + self.analytic_account.id if with_analytic else False}) + ml_obj.create( + {'move_id': move.id, 'name': '/', 'debit': amount, 'credit': 0, - 'account_id': self.ref('account.a_recv')}) - return move_line_id + 'account_id': self.account_recv.id, + }) + return move_line - def _set_analytic_policy(self, policy, aref='account.a_sale'): - account_type = self.account_obj.browse(self.cr, self.uid, - self.ref(aref)).user_type - self.account_type_obj.write(self.cr, self.uid, account_type.id, - {'analytic_policy': policy}) + def _set_analytic_policy(self, policy, account=None): + if account is None: + account = self.account_sales + account.user_type_id.analytic_policy = policy def test_optional(self): self._create_move(with_analytic=False) @@ -79,7 +80,7 @@ def test_optional(self): def test_always_no_analytic(self): self._set_analytic_policy('always') - with self.assertRaises(orm.except_orm): + with self.assertRaises(exceptions.ValidationError): self._create_move(with_analytic=False) def test_always_no_analytic_0(self): @@ -97,7 +98,7 @@ def test_never_no_analytic(self): def test_never_with_analytic(self): self._set_analytic_policy('never') - with self.assertRaises(orm.except_orm): + with self.assertRaises(exceptions.ValidationError): self._create_move(with_analytic=True) def test_never_with_analytic_0(self): @@ -108,23 +109,19 @@ def test_never_with_analytic_0(self): def test_always_remove_analytic(self): # remove partner when policy is always self._set_analytic_policy('always') - line_id = self._create_move(with_analytic=True) - with self.assertRaises(orm.except_orm): - self.move_line_obj.write(self.cr, self.uid, [line_id], - {'analytic_account_id': False}) + line = self._create_move(with_analytic=True) + with self.assertRaises(exceptions.ValidationError): + line.write({'analytic_account_id': False}) def test_change_account(self): - self._set_analytic_policy('always', aref='account.a_expense') - line_id = self._create_move(with_analytic=False) + self._set_analytic_policy('always', account=self.account_exp) + line = self._create_move(with_analytic=False) # change account to a_expense with policy always but missing # analytic_account - with self.assertRaises(orm.except_orm): - self.move_line_obj.write( - self.cr, self.uid, [line_id], - {'account_id': self.ref('account.a_expense')}) + with self.assertRaises(exceptions.ValidationError): + line.write({'account_id': self.account_exp.id}) # change account to a_expense with policy always # with analytic account -> ok - self.move_line_obj.write( - self.cr, self.uid, [line_id], { - 'account_id': self.ref('account.a_expense'), - 'analytic_account_id': self.analytic_account_id}) + line.write({ + 'account_id': self.account_exp.id, + 'analytic_account_id': self.analytic_account.id}) diff --git a/account_analytic_required/account_view.xml b/account_analytic_required/views/account.xml similarity index 58% rename from account_analytic_required/account_view.xml rename to account_analytic_required/views/account.xml index 5ae1b50a3..72b9ab8bc 100644 --- a/account_analytic_required/account_view.xml +++ b/account_analytic_required/views/account.xml @@ -6,30 +6,30 @@ The licence is in the file __openerp__.py --> - - + - + account_analytic_required.account_type_form account.account.type - - - + + + - + - + account_analytic_required.account_type_tree account.account.type - - - + + + - + - - + + + From 39fd73914b98b80738620832bd826278e7ebcd63 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 6 Oct 2016 14:44:54 +0200 Subject: [PATCH 20/69] [MIG] Make modules uninstallable --- account_analytic_required/{__openerp__.py => __manifest__.py} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename account_analytic_required/{__openerp__.py => __manifest__.py} (94%) diff --git a/account_analytic_required/__openerp__.py b/account_analytic_required/__manifest__.py similarity index 94% rename from account_analytic_required/__openerp__.py rename to account_analytic_required/__manifest__.py index d86b4e2c9..4f449ffcd 100644 --- a/account_analytic_required/__openerp__.py +++ b/account_analytic_required/__manifest__.py @@ -11,6 +11,6 @@ 'website': 'http://www.akretion.com/', 'depends': ['account'], 'data': ['views/account.xml'], - 'installable': True, + 'installable': False, 'auto_install': False, } From 4d4c46569692bc11e26825e7b23999858d84f784 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 10 Oct 2016 20:52:41 +0200 Subject: [PATCH 21/69] Port account_analytic_required to v10 --- account_analytic_required/README.rst | 2 +- account_analytic_required/__manifest__.py | 9 ++++----- account_analytic_required/models/account.py | 11 +++++----- .../tests/test_account_analytic_required.py | 9 +++++---- account_analytic_required/views/account.xml | 20 ++++++++++++++----- 5 files changed, 30 insertions(+), 21 deletions(-) diff --git a/account_analytic_required/README.rst b/account_analytic_required/README.rst index c5cef4b83..ad888a492 100644 --- a/account_analytic_required/README.rst +++ b/account_analytic_required/README.rst @@ -22,7 +22,7 @@ Usage .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/87/9.0 + :target: https://runbot.odoo-community.org/runbot/87/10.0 Bug Tracker =========== diff --git a/account_analytic_required/__manifest__.py b/account_analytic_required/__manifest__.py index 4f449ffcd..4b195b4d4 100644 --- a/account_analytic_required/__manifest__.py +++ b/account_analytic_required/__manifest__.py @@ -1,16 +1,15 @@ # -*- coding: utf-8 -*- -# © 2011 Akretion +# © 2011-2016 Akretion (Alexis de Lattre ) # © 2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) { 'name': 'Account Analytic Required', - 'version': '9.0.1.0.0', + 'version': '10.0.1.0.0', 'category': 'Analytic Accounting', 'license': 'AGPL-3', 'author': "Akretion,Odoo Community Association (OCA)", 'website': 'http://www.akretion.com/', - 'depends': ['account'], + 'depends': ['account', 'account_type_menu'], 'data': ['views/account.xml'], - 'installable': False, - 'auto_install': False, + 'installable': True, } diff --git a/account_analytic_required/models/account.py b/account_analytic_required/models/account.py index 9734adaab..fbe4de4b1 100644 --- a/account_analytic_required/models/account.py +++ b/account_analytic_required/models/account.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- -# © 2011 Akretion +# © 2011-2016 Akretion (Alexis de Lattre ) # © 2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) -from openerp import _, api, exceptions, fields, models -from openerp.tools import float_is_zero +from odoo import _, api, exceptions, fields, models +from odoo.tools import float_is_zero class AccountAccountType(models.Model): @@ -59,12 +59,11 @@ def _check_analytic_required_msg(self): move_line.analytic_account_id): return _("Analytic policy is set to 'Never' with account %s " "'%s' but the account move line with label '%s' " - "has an analytic account %s '%s'." + "has an analytic account '%s'." ) % (move_line.account_id.code, move_line.account_id.name, move_line.name, - move_line.analytic_account_id.code, - move_line.analytic_account_id.name) + move_line.analytic_account_id.name_get()[0][1]) @api.constrains('analytic_account_id', 'account_id', 'debit', 'credit') def _check_analytic_required(self): diff --git a/account_analytic_required/tests/test_account_analytic_required.py b/account_analytic_required/tests/test_account_analytic_required.py index 9b8cb33bb..fc1b77e2c 100644 --- a/account_analytic_required/tests/test_account_analytic_required.py +++ b/account_analytic_required/tests/test_account_analytic_required.py @@ -3,8 +3,8 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from datetime import datetime -from openerp.tests import common -from openerp import exceptions +from odoo.tests import common +from odoo import exceptions class TestAccountAnalyticRequired(common.TransactionCase): @@ -17,7 +17,7 @@ def setUp(self): self.move_line_obj = self.env['account.move.line'] self.analytic_account_obj = self.env['account.analytic.account'] self.analytic_account = self.analytic_account_obj.create( - {'name': 'test aa', 'account_type': 'normal'}) + {'name': 'test aa'}) self.account_sales = self.env['account.account'].create({ 'code': "X1020", 'name': "Product Sales - (test)", @@ -75,6 +75,7 @@ def _set_analytic_policy(self, policy, account=None): account.user_type_id.analytic_policy = policy def test_optional(self): + self._set_analytic_policy('optional') self._create_move(with_analytic=False) self._create_move(with_analytic=True) @@ -107,7 +108,7 @@ def test_never_with_analytic_0(self): self._create_move(with_analytic=True, amount=0) def test_always_remove_analytic(self): - # remove partner when policy is always + # remove analytic when policy is always self._set_analytic_policy('always') line = self._create_move(with_analytic=True) with self.assertRaises(exceptions.ValidationError): diff --git a/account_analytic_required/views/account.xml b/account_analytic_required/views/account.xml index 72b9ab8bc..ac2032447 100644 --- a/account_analytic_required/views/account.xml +++ b/account_analytic_required/views/account.xml @@ -1,9 +1,7 @@ @@ -30,6 +28,18 @@ - + + account_analytic_required.account_type_search + account.account.type + + + + + + + + + From 488fec2c0202977cfb1e372ea84be1209d4b7a6b Mon Sep 17 00:00:00 2001 From: cubells Date: Wed, 24 May 2017 10:14:06 +0200 Subject: [PATCH 22/69] [IMP] Use new api to extend selection --- account_analytic_required/models/account.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/account_analytic_required/models/account.py b/account_analytic_required/models/account.py index fbe4de4b1..8be70c4aa 100644 --- a/account_analytic_required/models/account.py +++ b/account_analytic_required/models/account.py @@ -10,16 +10,11 @@ class AccountAccountType(models.Model): _inherit = "account.account.type" - @api.model - def _get_policies(self): - """This is the method to be inherited for adding policies""" - return [('optional', 'Optional'), - ('always', 'Always'), - ('never', 'Never')] - analytic_policy = fields.Selection( - _get_policies, - 'Policy for analytic account', + selection=[('optional', 'Optional'), + ('always', 'Always'), + ('never', 'Never')], + string='Policy for analytic account', required=True, default='optional', help="Set the policy for analytic accounts : if you select " From 070d4532a6158592186e68cb683a2ff09bd3a609 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Mon, 1 May 2017 14:46:45 +0200 Subject: [PATCH 23/69] OCA Transbot updated translations from Transifex --- account_analytic_required/i18n/ar.po | 147 ++++++++-------------- account_analytic_required/i18n/ca.po | 143 ++++++++-------------- account_analytic_required/i18n/es.po | 156 +++++++++++------------- account_analytic_required/i18n/fr.po | 145 ++++++++-------------- account_analytic_required/i18n/hr_HR.po | 105 ++++++++++++++++ account_analytic_required/i18n/nl.po | 118 ++++++++++-------- account_analytic_required/i18n/pt_BR.po | 95 +++++++++++++++ 7 files changed, 484 insertions(+), 425 deletions(-) create mode 100644 account_analytic_required/i18n/hr_HR.po create mode 100644 account_analytic_required/i18n/pt_BR.po diff --git a/account_analytic_required/i18n/ar.po b/account_analytic_required/i18n/ar.po index 870152419..4d31d9e2e 100644 --- a/account_analytic_required/i18n/ar.po +++ b/account_analytic_required/i18n/ar.po @@ -1,120 +1,75 @@ -# Arabic translation for openobject-addons -# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 -# This file is distributed under the same license as the openobject-addons package. -# FIRST AUTHOR , 2012. -# +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_analytic_required +# +# Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: openobject-addons\n" -"Report-Msgid-Bugs-To: FULL NAME \n" -"POT-Creation-Date: 2011-06-10 07:49+0000\n" -"PO-Revision-Date: 2014-06-26 11:15+0000\n" -"Last-Translator: Pedro Manuel Baeza \n" -"Language-Team: Arabic \n" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-25 08:50+0000\n" +"PO-Revision-Date: 2017-04-25 08:50+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-06-27 07:08+0000\n" -"X-Generator: Launchpad (build 17077)\n" +"Content-Transfer-Encoding: \n" +"Language: ar\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" #. module: account_analytic_required -#: field:account.account.type,analytic_policy:0 -msgid "Policy for analytic account" -msgstr "سياسة للحسابات التحليلية" +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "نوع الحساب" #. module: account_analytic_required -#: help:account.account.type,analytic_policy:0 -msgid "" -"Set the policy for analytic accounts : if you select 'Optional', the " -"accountant is free to put an analytic account on an account move line with " -"this type of account ; if you select 'Always', the accountant will get an " -"error message if there is no analytic account ; if you select 'Never', the " -"accountant will get an error message if an analytic account is present." +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Analytic Policy" msgstr "" -"ضع سياسة للحسابات التحليلية: إذا قمت بتحديد \"الاختياري\"، فان المحاسب حر في " -"وضع حساب تحليلي على حساب خط التحرك مع هذا النوع من الحساب، وإذا قمت بتحديد " -"\"دائما\"، فان المحاسب سوف يحصل على رسالة خطأ إذا كان هناك لا يوجد حساب " -"تحليلي، وإذا قمت بتحديد \"أبدا\"، فان المحاسب سوف يحصل على رسالة خطأ إذا كان " -"هناك حساب تحليلي موجود" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Optional" -msgstr "إختياري" #. module: account_analytic_required -#: model:ir.module.module,description:account_analytic_required.module_meta_information +#: code:addons/account_analytic_required/models/account.py:52 +#, python-format msgid "" -"This module adds an option \"analytic policy\" on account types. You have " -"the choice between 3 policies : always, never and optional.\n" -"\n" -"For example, if you want to have an analytic account on all your expenses, " -"set the policy to \"always\" for the account type \"expense\" ; then, if you " -"try to save an account move line with an account of type \"expense\" without " -"analytic account, you will get an error message.\n" -"\n" -"Module developped by Alexis de Lattre during " -"the Akretion-Camptocamp code sprint of June 2011.\n" +"Analytic policy is set to 'Always' with account %s '%s' but the analytic " +"account is missing in the account move line with label '%s'." msgstr "" -"هذه الوحدة تضيف خيار \"السياسة التحليلية\" على أنواع الحسابات. لديك خيار بين " -"3 سياسات: دائما، أبدا، واختياري.\n" -"\n" -"على سبيل المثال، إذا كنت تريد أن يكون لديك حساب تحليلي عن جميع النفقات " -"الخاصة بك، اختار النهج \"دائما\" من أجل نوع الحساب\"مصروف\"، ثم، إذا حاولت " -"حفظ الحركة في حساب مع حساب \"مصروف\" من دون حساب تحليلي، وسوف تحصل على " -"رسالة خطأ.\n" -"\n" -"طورت الوحدة بواسطة اتر أليكسيس دي alexis.delattre@akretion.com> Akretion-" -"Camptocamp من يونيو 2011\n" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on closed account." -msgstr "لا يمكنك انشاء حركة على الحساب" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Always" -msgstr "دائماً" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Never" -msgstr "أبدًا" - -#. module: account_analytic_required -#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information -msgid "Account analytic required" -msgstr "مطلوب حساب تحليلي" #. module: account_analytic_required -#: sql_constraint:account.move.line:0 -msgid "Wrong credit or debit value in accounting entry !" -msgstr "قيمة دائنة أو مدينة خاطئة في القيد المحاسبي !" +#: code:addons/account_analytic_required/models/account.py:60 +#, python-format +msgid "" +"Analytic policy is set to 'Never' with account %s '%s' but the account move " +"line with label '%s' has an analytic account '%s'." +msgstr "" #. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on view account." -msgstr "لا يمكنك عمل حركة على هذا الحساب" +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Group By" +msgstr "" #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line -msgid "Journal Items" -msgstr "عناصر دفتر اليومية" - -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_account_type -msgid "Account Type" -msgstr "نوع الحساب" +msgid "Journal Item" +msgstr "" #. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "Company must be same for its related account and period." -msgstr "يجب ان تكون الشركة نفس فترتها وحسابها المتعلق بها." +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +msgid "Policy for analytic account" +msgstr "سياسة للحسابات التحليلية" #. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:53 -#: code:addons/account_analytic_required/account.py:56 -#, python-format -msgid "Error :" -msgstr "خطأ :" +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Never', the " +"accountant will get an error message if an analytic account is present." +msgstr "" +"ضع سياسة للحسابات التحليلية: إذا قمت بتحديد \"الاختياري\"، فان المحاسب حر في" +" وضع حساب تحليلي على حساب خط التحرك مع هذا النوع من الحساب، وإذا قمت بتحديد " +"\"دائما\"، فان المحاسب سوف يحصل على رسالة خطأ إذا كان هناك لا يوجد حساب " +"تحليلي، وإذا قمت بتحديد \"أبدا\"، فان المحاسب سوف يحصل على رسالة خطأ إذا كان" +" هناك حساب تحليلي موجود" diff --git a/account_analytic_required/i18n/ca.po b/account_analytic_required/i18n/ca.po index 9048d6626..2abd17d89 100644 --- a/account_analytic_required/i18n/ca.po +++ b/account_analytic_required/i18n/ca.po @@ -1,120 +1,75 @@ -# Translation of OpenERP Server. +# Translation of Odoo Server. # This file contains the translation of the following modules: -# * account_analytic_required -# +# * account_analytic_required +# +# Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 6.0.2\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2011-06-10 07:49+0000\n" -"PO-Revision-Date: 2014-06-26 11:18+0000\n" -"Last-Translator: jmartin (Zikzakmedia) \n" -"Language-Team: \n" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-25 08:50+0000\n" +"PO-Revision-Date: 2017-04-25 08:50+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-06-27 07:08+0000\n" -"X-Generator: Launchpad (build 17077)\n" +"Content-Transfer-Encoding: \n" +"Language: ca\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_analytic_required -#: field:account.account.type,analytic_policy:0 -msgid "Policy for analytic account" -msgstr "Política per als comptes analítics" +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "Tipus de compte" #. module: account_analytic_required -#: help:account.account.type,analytic_policy:0 -msgid "" -"Set the policy for analytic accounts : if you select 'Optional', the " -"accountant is free to put an analytic account on an account move line with " -"this type of account ; if you select 'Always', the accountant will get an " -"error message if there is no analytic account ; if you select 'Never', the " -"accountant will get an error message if an analytic account is present." +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Analytic Policy" msgstr "" -"Configura la política per als comptes analítics: Si seleccioneu 'Opcional', " -"el comptable és lliure de posar un compte analític en un apunt comptable amb " -"aquest tipus de compte; si seleccioneu 'Sempre', el comptable rebrà un " -"missatge d'error si l'apunt no té compte analític; si seleccioneu 'Mai', el " -"comptable rebrà un missatge d'error si l'apunt té un compte analític." - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Optional" -msgstr "Opcional" #. module: account_analytic_required -#: model:ir.module.module,description:account_analytic_required.module_meta_information +#: code:addons/account_analytic_required/models/account.py:52 +#, python-format msgid "" -"This module adds an option \"analytic policy\" on account types. You have " -"the choice between 3 policies : always, never and optional.\n" -"\n" -"For example, if you want to have an analytic account on all your expenses, " -"set the policy to \"always\" for the account type \"expense\" ; then, if you " -"try to save an account move line with an account of type \"expense\" without " -"analytic account, you will get an error message.\n" -"\n" -"Module developped by Alexis de Lattre during " -"the Akretion-Camptocamp code sprint of June 2011.\n" +"Analytic policy is set to 'Always' with account %s '%s' but the analytic " +"account is missing in the account move line with label '%s'." msgstr "" -"Aquest mòdul afegeix una opció \"política analítica\" als tipus comptables. " -"Podeu escollir entre 3 polítiques: 'Sempre', 'Mai' i 'Opcional'.\n" -"\n" -"Per exemple, si voleu tenir un compte analític de totes les vostres " -"despeses, seleccioneu la política \"Sempre\" per al tipus comptable " -"\"Despesa\"; llavors, si intenteu desar un apunt comptable de tipus " -"comptable \"Despesa\" sense compte analític, obtindreu un missatge d'error.\n" -"\n" -"Mòdul desenvolupat per Alexis de Lattre " -"durant la cursa de codi Akretion-Camptocamp de juny de 2011.\n" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on closed account." -msgstr "No podeu crear un apunt en un compte tancat." - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Always" -msgstr "Sempre" #. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Never" -msgstr "Mai" - -#. module: account_analytic_required -#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information -msgid "Account analytic required" -msgstr "El compte analític és requerit." - -#. module: account_analytic_required -#: sql_constraint:account.move.line:0 -msgid "Wrong credit or debit value in accounting entry !" -msgstr "Valor erroni al deure o a l'haver de l'assentament comptable!" +#: code:addons/account_analytic_required/models/account.py:60 +#, python-format +msgid "" +"Analytic policy is set to 'Never' with account %s '%s' but the account move " +"line with label '%s' has an analytic account '%s'." +msgstr "" #. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on view account." -msgstr "No podeu crear un apunt en un compte de tipus \"Vista\"." +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Group By" +msgstr "" #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line -msgid "Journal Items" -msgstr "Apunts comptables" +msgid "Journal Item" +msgstr "" #. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_account_type -msgid "Account Type" -msgstr "Tipus de compte" +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +msgid "Policy for analytic account" +msgstr "Política per als comptes analítics" #. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "Company must be same for its related account and period." +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Never', the " +"accountant will get an error message if an analytic account is present." msgstr "" -"La companyia ha de ser la mateixa que la dels comptes i períodes relacionats." - -#. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:53 -#: code:addons/account_analytic_required/account.py:56 -#, python-format -msgid "Error :" -msgstr "Error:" +"Configura la política per als comptes analítics: Si seleccioneu 'Opcional', " +"el comptable és lliure de posar un compte analític en un apunt comptable amb" +" aquest tipus de compte; si seleccioneu 'Sempre', el comptable rebrà un " +"missatge d'error si l'apunt no té compte analític; si seleccioneu 'Mai', el " +"comptable rebrà un missatge d'error si l'apunt té un compte analític." diff --git a/account_analytic_required/i18n/es.po b/account_analytic_required/i18n/es.po index 8e21c5850..f4d44df1f 100644 --- a/account_analytic_required/i18n/es.po +++ b/account_analytic_required/i18n/es.po @@ -1,122 +1,102 @@ -# Translation of OpenERP Server. +# Translation of Odoo Server. # This file contains the translation of the following modules: -# * account_analytic_required -# +# * account_analytic_required +# +# Translators: +# OCA Transbot , 2017 +# Pedro M. Baeza , 2017 msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 6.0.2\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2011-06-10 07:49+0000\n" -"PO-Revision-Date: 2014-06-26 11:18+0000\n" -"Last-Translator: jmartin (Zikzakmedia) \n" -"Language-Team: \n" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-21 02:39+0000\n" +"PO-Revision-Date: 2017-06-21 02:39+0000\n" +"Last-Translator: Pedro M. Baeza , 2017\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-06-27 07:09+0000\n" -"X-Generator: Launchpad (build 17077)\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_analytic_required -#: field:account.account.type,analytic_policy:0 -msgid "Policy for analytic account" -msgstr "Política para las cuentas analíticas" - -#. module: account_analytic_required -#: help:account.account.type,analytic_policy:0 -msgid "" -"Set the policy for analytic accounts : if you select 'Optional', the " -"accountant is free to put an analytic account on an account move line with " -"this type of account ; if you select 'Always', the accountant will get an " -"error message if there is no analytic account ; if you select 'Never', the " -"accountant will get an error message if an analytic account is present." -msgstr "" -"Configura la política para las cuentas analíticas: Si selecciona 'Opcional', " -"el contable es libre de poner una cuenta analítica en un apunte contable de " -"este tipo de cuenta; si selecciona 'Siempre', el contable recibirá un " -"mensaje de error si el apunte no tiene cuenta analítica; si selecciona " -"'Nunca', el contable recibirá un mensaje de error si el apunte tiene una " -"cuenta analítica." +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "Tipo de cuenta" #. module: account_analytic_required #: selection:account.account.type,analytic_policy:0 -msgid "Optional" -msgstr "Opcional" - -#. module: account_analytic_required -#: model:ir.module.module,description:account_analytic_required.module_meta_information -msgid "" -"This module adds an option \"analytic policy\" on account types. You have " -"the choice between 3 policies : always, never and optional.\n" -"\n" -"For example, if you want to have an analytic account on all your expenses, " -"set the policy to \"always\" for the account type \"expense\" ; then, if you " -"try to save an account move line with an account of type \"expense\" without " -"analytic account, you will get an error message.\n" -"\n" -"Module developped by Alexis de Lattre during " -"the Akretion-Camptocamp code sprint of June 2011.\n" +msgid "Always" msgstr "" -"Este módulo añade una opción \"política analítica\" a los tipos contables. " -"Puede escoger entre 3 políticas: 'Siempre', 'Nunca' y 'Opcional'.\n" -"\n" -"Por ejemplo, si quiere tener una cuenta analítica de todos sus gastos, " -"seleccione la política \"Siempre\" para el tipo contable \"Gasto\"; " -"entonces, si intenta guardar un apunte contable de tipo contable \"Gasto\" " -"sin cuenta analítica, obtendrá un mensaje de error.\n" -"\n" -"Módulo desarrollado por Alexis de Lattre " -"durante la carrera de código Akretion-Camptocamp de junio de 2011.\n" #. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on closed account." -msgstr "No puede crear un apunte en una cuenta cerrada." +#: selection:account.account.type,analytic_policy:0 +msgid "Always (analytic account or distribution)" +msgstr "Siempre (cuenta analítica o distribución)" #. module: account_analytic_required #: selection:account.account.type,analytic_policy:0 -msgid "Always" -msgstr "Siempre" +msgid "Always (analytic distribution)" +msgstr "Siempre (distribución analítica)" #. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Never" -msgstr "Nunca" +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Analytic Policy" +msgstr "" #. module: account_analytic_required -#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information -msgid "Account analytic required" -msgstr "La cuenta analítica es requerida." +#: code:addons/account_analytic_required/models/account.py:47 +#, python-format +msgid "" +"Analytic policy is set to 'Always' with account %s '%s' but the analytic " +"account is missing in the account move line with label '%s'." +msgstr "" #. module: account_analytic_required -#: sql_constraint:account.move.line:0 -msgid "Wrong credit or debit value in accounting entry !" -msgstr "¡Valor erróneo en el debe o en el haber del asiento contable!" +#: code:addons/account_analytic_required/models/account.py:55 +#, python-format +msgid "" +"Analytic policy is set to 'Never' with account %s '%s' but the account move " +"line with label '%s' has an analytic account '%s'." +msgstr "" #. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on view account." -msgstr "No puede crear un apunte en una cuenta de tipo \"Vista\"." +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Group By" +msgstr "" #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line -msgid "Journal Items" -msgstr "Apuntes contables" +msgid "Journal Item" +msgstr "Apunte contable" #. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_account_type -msgid "Account Type" -msgstr "Tipo de cuenta" +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "" #. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "Company must be same for its related account and period." +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" msgstr "" -"La compañía debe ser la misma que la de las cuentas y los periodos " -"relacionados." #. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:53 -#: code:addons/account_analytic_required/account.py:56 -#, python-format -msgid "Error :" -msgstr "Error:" +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +msgid "Policy for analytic account" +msgstr "Política para las cuentas analíticas" + +#. module: account_analytic_required +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Never', the " +"accountant will get an error message if an analytic account is present." +msgstr "" +"Configura la política para las cuentas analíticas: Si selecciona 'Opcional'," +" el contable es libre de poner una cuenta analítica en un apunte contable de" +" este tipo de cuenta; si selecciona 'Siempre', el contable recibirá un " +"mensaje de error si el apunte no tiene cuenta analítica; si selecciona " +"'Nunca', el contable recibirá un mensaje de error si el apunte tiene una " +"cuenta analítica." diff --git a/account_analytic_required/i18n/fr.po b/account_analytic_required/i18n/fr.po index 5b1a2fb2e..f3ff2545c 100644 --- a/account_analytic_required/i18n/fr.po +++ b/account_analytic_required/i18n/fr.po @@ -1,121 +1,76 @@ -# Translation of OpenERP Server. +# Translation of Odoo Server. # This file contains the translation of the following modules: -# * account_analytic_required -# +# * account_analytic_required +# +# Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 6.0.2\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2011-06-10 07:49+0000\n" -"PO-Revision-Date: 2014-06-26 11:18+0000\n" -"Last-Translator: Alexis de Lattre \n" -"Language-Team: \n" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-04-25 08:50+0000\n" +"PO-Revision-Date: 2017-04-25 08:50+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2014-06-27 07:08+0000\n" -"X-Generator: Launchpad (build 17077)\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: account_analytic_required -#: field:account.account.type,analytic_policy:0 -msgid "Policy for analytic account" -msgstr "Politique pour les comptes analytiques" +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "Type de compte" #. module: account_analytic_required -#: help:account.account.type,analytic_policy:0 -msgid "" -"Set the policy for analytic accounts : if you select 'Optional', the " -"accountant is free to put an analytic account on an account move line with " -"this type of account ; if you select 'Always', the accountant will get an " -"error message if there is no analytic account ; if you select 'Never', the " -"accountant will get an error message if an analytic account is present." +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Analytic Policy" msgstr "" -"Configurez la politique pour les comptes analytiques : si vous sélectionnez " -"'Optionnel', le comptable est libre de saisir ou non un compte analytique " -"sur une ligne comptable avec ce type de compte de comptabilité générale ; si " -"vous sélectionnez 'Toujours', le comptable aura un message d'erreur si il " -"n'y a pas de compte analytique ; si vous sélectionnez 'Jamais', le comptable " -"aura un message d'erreur si un compte analytique est présent." - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Optional" -msgstr "Optionnel" #. module: account_analytic_required -#: model:ir.module.module,description:account_analytic_required.module_meta_information +#: code:addons/account_analytic_required/models/account.py:52 +#, python-format msgid "" -"This module adds an option \"analytic policy\" on account types. You have " -"the choice between 3 policies : always, never and optional.\n" -"\n" -"For example, if you want to have an analytic account on all your expenses, " -"set the policy to \"always\" for the account type \"expense\" ; then, if you " -"try to save an account move line with an account of type \"expense\" without " -"analytic account, you will get an error message.\n" -"\n" -"Module developped by Alexis de Lattre during " -"the Akretion-Camptocamp code sprint of June 2011.\n" +"Analytic policy is set to 'Always' with account %s '%s' but the analytic " +"account is missing in the account move line with label '%s'." msgstr "" -"This module adds an option \"analytic policy\" on account types. You have " -"the choice between 3 policies : always, never and optional.\n" -"\n" -"For example, if you want to have an analytic account on all your expenses, " -"set the policy to \"always\" for the account type \"expense\" ; then, if you " -"try to save an account move line with an account of type \"expense\" without " -"analytic account, you will get an error message.\n" -"\n" -"Module developped by Alexis de Lattre during " -"the Akretion-Camptocamp code sprint of June 2011.\n" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on closed account." -msgstr "Impossible de créer une ligne d'écriture sur un compte clôturé" #. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Always" -msgstr "Toujours" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Never" -msgstr "Jamais" - -#. module: account_analytic_required -#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information -msgid "Account analytic required" -msgstr "Account analytic required" - -#. module: account_analytic_required -#: sql_constraint:account.move.line:0 -msgid "Wrong credit or debit value in accounting entry !" -msgstr "Valeur erronée au crédit ou au débit de la pièce comptable !" +#: code:addons/account_analytic_required/models/account.py:60 +#, python-format +msgid "" +"Analytic policy is set to 'Never' with account %s '%s' but the account move " +"line with label '%s' has an analytic account '%s'." +msgstr "" #. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on view account." +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Group By" msgstr "" -"Vous ne pouvez pas créer de ligne d'écriture sur un compte de type \"Vue\"." #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line -msgid "Journal Items" -msgstr "Écritures comptables" - -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_account_type -msgid "Account Type" -msgstr "Type de compte" +msgid "Journal Item" +msgstr "" #. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "Company must be same for its related account and period." -msgstr "La société doit être la même pour les comptes et périodes liées." +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +msgid "Policy for analytic account" +msgstr "Politique pour les comptes analytiques" #. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:53 -#: code:addons/account_analytic_required/account.py:56 -#, python-format -msgid "Error :" -msgstr "Erreur :" +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Never', the " +"accountant will get an error message if an analytic account is present." +msgstr "" +"Configurez la politique pour les comptes analytiques : si vous sélectionnez " +"'Optionnel', le comptable est libre de saisir ou non un compte analytique " +"sur une ligne comptable avec ce type de compte de comptabilité générale ; si" +" vous sélectionnez 'Toujours', le comptable aura un message d'erreur si il " +"n'y a pas de compte analytique ; si vous sélectionnez 'Jamais', le comptable" +" aura un message d'erreur si un compte analytique est présent." diff --git a/account_analytic_required/i18n/hr_HR.po b/account_analytic_required/i18n/hr_HR.po new file mode 100644 index 000000000..fb76b69a3 --- /dev/null +++ b/account_analytic_required/i18n/hr_HR.po @@ -0,0 +1,105 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_analytic_required +# +# Translators: +# OCA Transbot , 2017 +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-30 02:40+0000\n" +"PO-Revision-Date: 2017-06-30 02:40+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr_HR\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "Tip konta" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "Uvijek" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always (analytic account or distribution)" +msgstr "Uvjek (analitički konto ili distribucija)" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always (analytic distribution)" +msgstr "Uvjek (analitička distribucija)" + +#. module: account_analytic_required +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Analytic Policy" +msgstr "Analitička pravila" + +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:47 +#, python-format +msgid "" +"Analytic policy is set to 'Always' with account %s '%s' but the analytic " +"account is missing in the account move line with label '%s'." +msgstr "" +"Analitičko pravilo je postavljeno na 'Uvijek' za konto %s '%s' ali " +"analitički konto nedostaje u stavci temeljnice sa naslovom '%s'." + +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:55 +#, python-format +msgid "" +"Analytic policy is set to 'Never' with account %s '%s' but the account move " +"line with label '%s' has an analytic account '%s'." +msgstr "" +"Analitičko pravilo je postavljeno na 'Nikada' za konto %s '%s' ali na stavci" +" temeljnice sa oznakom '%s' postoji analitički konto '%s'." + +#. module: account_analytic_required +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Group By" +msgstr "Grupiraj po" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Item" +msgstr "Stavka dnevnika" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "Nikad" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "Opcionalno" + +#. module: account_analytic_required +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +msgid "Policy for analytic account" +msgstr "Pravila za analitička konta" + +#. module: account_analytic_required +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Never', the " +"accountant will get an error message if an analytic account is present." +msgstr "" +"Postavite pravila za analitička konta: ako odaberete 'Opcionalno', " +"knjigovođa može slobodno birati hoće li postaviti analitički konto na stavke" +" temeljnice ovog tipa konta, ako odaberete 'Uvijek', knjigovođa će dobiti " +"upozorenje o grešci ako ga nema, i ako odaberete 'Nikad' knjigovođa će " +"dobiti upozorenje o greški ako postoji analitički konto." diff --git a/account_analytic_required/i18n/nl.po b/account_analytic_required/i18n/nl.po index 858970d41..79b39d3d3 100644 --- a/account_analytic_required/i18n/nl.po +++ b/account_analytic_required/i18n/nl.po @@ -1,78 +1,92 @@ -# Translation of OpenERP Server. +# Translation of Odoo Server. # This file contains the translation of the following modules: -# * account_analytic_required -# +# * account_analytic_required +# +# Translators: +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 6.1\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2011-06-10 07:49+0000\n" -"PO-Revision-Date: 2013-04-17 07:49+0000\n" -"Last-Translator: \n" -"Language-Team: \n" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-24 09:51+0000\n" +"PO-Revision-Date: 2017-05-24 09:51+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: \n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_analytic_required -#: field:account.account.type,analytic_policy:0 -msgid "Policy for analytic account" -msgstr "Kostenplaatsenbeleid" +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "" #. module: account_analytic_required -#: help:account.account.type,analytic_policy:0 -msgid "Set the policy for analytic accounts : if you select 'Optional', the accountant is free to put an analytic account on an account move line with this type of account ; if you select 'Always', the accountant will get an error message if there is no analytic account ; if you select 'Never', the accountant will get an error message if an analytic account is present." -msgstr "Stel het beleid in voor kostenplaatsen: bij 'Altijd' is het opgeven van een kostenplaats verplicht bij rekeningen van dit type. 'Nooit': er treedt een foutmelding op als er bij een boeking een kostenplaats wordt opgegeven. 'Optioneel': het staat de medewerker vrij om al dan niet een kostenplaats op te geven." +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "" #. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Optional" -msgstr "Optioneel" +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Analytic Policy" +msgstr "" #. module: account_analytic_required -#: model:ir.module.module,description:account_analytic_required.module_meta_information -msgid "This module adds an option 'analytic policy' on account types. You have the choice between 3 policies : always, never and optional.\n" -"\n" -"For example, if you want to have an analytic account on all your expenses, set the policy to 'always' for the account type 'expense' ; then, if you try to save an account move line with an account of type 'expense' without analytic account, you will get an error message.\n" -"\n" -"Module developped by Alexis de Lattre during the Akretion-Camptocamp code sprint of June 2011.\n" -msgstr "Deze module voegt de optie 'Beleid kostenplaatsen' toe aan rekeningcategorieën. Er zijn drie mogelijkheden: altijd, nooit en optioneel.\n" -"\n" -"Bij voorbeeld, als je wilt afdwingen dat er altijd een kostenplaats wordt opgegeven bij boekingen op een kostenrekening, zet dan het beleid op 'altijd' voor het rekeningtype 'Kosten'. Vanaf dat moment krijgt de medewerker een foutmelding als er geprobeerd wordt om een boeking te maken op een rekening van dit type zonder dat er een kostenplaats is opgegeven.\n" -"\n" -"Deze module is ontwikkeld door Alexis de Lattre tijdens de Akretion-Camptocamp code sprint van juni 2011.\n" +#: code:addons/account_analytic_required/models/account.py:47 +#, python-format +msgid "" +"Analytic policy is set to 'Always' with account %s '%s' but the analytic " +"account is missing in the account move line with label '%s'." +msgstr "" +"Het is verplicht een kostenplaats op te geven bij boekingen op rekening %s " +"'%s', maar deze ontbreekt in de boekingsregel met de omschrijving '%s'." #. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Always" -msgstr "Altijd" +#: code:addons/account_analytic_required/models/account.py:55 +#, python-format +msgid "" +"Analytic policy is set to 'Never' with account %s '%s' but the account move " +"line with label '%s' has an analytic account '%s'." +msgstr "" #. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Never" -msgstr "Nooit" +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Group By" +msgstr "" #. module: account_analytic_required -#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information -msgid "Account analytic required" -msgstr "Kostenplaatsenbeleid" +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Item" +msgstr "" #. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:54 -#: code:addons/account_analytic_required/account.py:62 -#, python-format -msgid "Error :" -msgstr "Fout:" +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "" #. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:55 -#, python-format -msgid "Analytic policy is set to 'Always' with account %s '%s' but the analytic account is missing in the account move line with label '%s'." -msgstr "Het is verplicht een kostenplaats op te geven bij boekingen op rekening %s '%s', maar deze ontbreekt in de boekingsregel met de omschrijving '%s'." +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "" #. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:63 -#, python-format -msgid "Analytic policy is set to 'Never' with account %s '%s' but the account move line with label '%s' has an analytic account %s '%s'." -msgstr "Het is niet toegestaan om een kostenplaats op te geven bij boekingen op rekening %s '%s', maar in boekingsregel met de omschrijving '%s' staat toch de kostenplaats %s '%s'." +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +msgid "Policy for analytic account" +msgstr "Kostenplaatsenbeleid" + +#. module: account_analytic_required +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Never', the " +"accountant will get an error message if an analytic account is present." +msgstr "" +"Stel het beleid in voor kostenplaatsen: bij 'Altijd' is het opgeven van een " +"kostenplaats verplicht bij rekeningen van dit type. 'Nooit': er treedt een " +"foutmelding op als er bij een boeking een kostenplaats wordt opgegeven. " +"'Optioneel': het staat de medewerker vrij om al dan niet een kostenplaats op" +" te geven." diff --git a/account_analytic_required/i18n/pt_BR.po b/account_analytic_required/i18n/pt_BR.po new file mode 100644 index 000000000..444da11ae --- /dev/null +++ b/account_analytic_required/i18n/pt_BR.po @@ -0,0 +1,95 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_analytic_required +# +# Translators: +# Rodrigo de Almeida Sottomaior Macedo , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-13 09:51+0000\n" +"PO-Revision-Date: 2017-06-13 09:51+0000\n" +"Last-Translator: Rodrigo de Almeida Sottomaior Macedo , 2017\n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "Tipo de Conta" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "Sempre" + +#. module: account_analytic_required +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Analytic Policy" +msgstr "Política Analítica" + +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:47 +#, python-format +msgid "" +"Analytic policy is set to 'Always' with account %s '%s' but the analytic " +"account is missing in the account move line with label '%s'." +msgstr "" +"A política analítica é definida como \"Sempre\" com conta%s '%s' Mas a conta" +" analítica está faltando na linha de mudança de conta com o rótulo '%s'." + +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:55 +#, python-format +msgid "" +"Analytic policy is set to 'Never' with account %s '%s' but the account move " +"line with label '%s' has an analytic account '%s'." +msgstr "" +"A política analítica é definida como \"Nunca\" com conta%s '%s' mas a linha " +"de movimento da conta com o rótulo '%s' tem uma conta analítica '%s'." + +#. module: account_analytic_required +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Group By" +msgstr "Agrupar por" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Item" +msgstr "Item diário" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "Nunca" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "Opcional" + +#. module: account_analytic_required +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +msgid "Policy for analytic account" +msgstr "Política para conta analítica" + +#. module: account_analytic_required +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Never', the " +"accountant will get an error message if an analytic account is present." +msgstr "" +"Defina a política para contas analíticas: se você selecionar \"Opcional\", o" +" contador é livre para colocar uma conta analítica em uma linha de mudança " +"de conta com esse tipo de conta; Se você selecionar 'Sempre', o contador " +"receberá uma mensagem de erro se não houver uma conta analítica; Se você " +"selecionar 'Nunca', o contador receberá uma mensagem de erro se uma conta " +"analítica estiver presente." From 69fadb96c5cba8a6dc9bf6cdf9397e11133f7619 Mon Sep 17 00:00:00 2001 From: Artem Kostyuk Date: Wed, 13 Dec 2017 16:53:20 +0200 Subject: [PATCH 24/69] [MIG] account_analytic_required: Migrate to 11.0 --- account_analytic_required/README.rst | 4 +- account_analytic_required/__manifest__.py | 11 +-- .../i18n/account_analytic_required.pot | 94 ------------------- account_analytic_required/i18n/ar.po | 2 +- account_analytic_required/i18n/ca.po | 2 +- account_analytic_required/i18n/es.po | 2 +- account_analytic_required/i18n/fr.po | 2 +- account_analytic_required/i18n/hr_HR.po | 2 +- account_analytic_required/i18n/nl.po | 2 +- account_analytic_required/i18n/pt_BR.po | 2 +- account_analytic_required/models/account.py | 7 +- .../tests/test_account_analytic_required.py | 46 ++++----- account_analytic_required/views/account.xml | 2 +- 13 files changed, 44 insertions(+), 134 deletions(-) delete mode 100644 account_analytic_required/i18n/account_analytic_required.pot diff --git a/account_analytic_required/README.rst b/account_analytic_required/README.rst index ad888a492..f657be078 100644 --- a/account_analytic_required/README.rst +++ b/account_analytic_required/README.rst @@ -22,7 +22,7 @@ Usage .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/87/10.0 + :target: https://runbot.odoo-community.org/runbot/87/11.0 Bug Tracker =========== @@ -39,7 +39,7 @@ Contributors ------------ * Alexis de Lattre * Stéphane Bidoul -* Sefan Rijnhart +* Stefan Rijnhart * Laetitia Gangloff * Luc De Meyer, Noviat * Yannick Vaucher diff --git a/account_analytic_required/__manifest__.py b/account_analytic_required/__manifest__.py index 4b195b4d4..acd5f3ed0 100644 --- a/account_analytic_required/__manifest__.py +++ b/account_analytic_required/__manifest__.py @@ -1,14 +1,13 @@ -# -*- coding: utf-8 -*- -# © 2011-2016 Akretion (Alexis de Lattre ) -# © 2016 Camptocamp SA +# Copyright 2011-2016 Akretion - Alexis de Lattre +# Copyright 2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) { 'name': 'Account Analytic Required', - 'version': '10.0.1.0.0', + 'version': '11.0.1.0.0', 'category': 'Analytic Accounting', 'license': 'AGPL-3', - 'author': "Akretion,Odoo Community Association (OCA)", - 'website': 'http://www.akretion.com/', + 'author': "Akretion, Odoo Community Association (OCA)", + 'website': 'https://github.com/OCA/account-analytic', 'depends': ['account', 'account_type_menu'], 'data': ['views/account.xml'], 'installable': True, diff --git a/account_analytic_required/i18n/account_analytic_required.pot b/account_analytic_required/i18n/account_analytic_required.pot deleted file mode 100644 index 6724a8fcd..000000000 --- a/account_analytic_required/i18n/account_analytic_required.pot +++ /dev/null @@ -1,94 +0,0 @@ -# Translation of OpenERP Server. -# This file contains the translation of the following modules: -# * account_analytic_required -# -msgid "" -msgstr "" -"Project-Id-Version: OpenERP Server 6.0.2\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2011-06-10 07:49+0000\n" -"PO-Revision-Date: 2011-06-10 07:49+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_analytic_required -#: field:account.account.type,analytic_policy:0 -msgid "Policy for analytic account" -msgstr "" - -#. module: account_analytic_required -#: help:account.account.type,analytic_policy:0 -msgid "Set the policy for analytic accounts : if you select 'Optional', the accountant is free to put an analytic account on an account move line with this type of account ; if you select 'Always', the accountant will get an error message if there is no analytic account ; if you select 'Never', the accountant will get an error message if an analytic account is present." -msgstr "" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Optional" -msgstr "" - -#. module: account_analytic_required -#: model:ir.module.module,description:account_analytic_required.module_meta_information -msgid "This module adds an option \"analytic policy\" on account types. You have the choice between 3 policies : always, never and optional.\n" -"\n" -"For example, if you want to have an analytic account on all your expenses, set the policy to \"always\" for the account type \"expense\" ; then, if you try to save an account move line with an account of type \"expense\" without analytic account, you will get an error message.\n" -"\n" -"Module developped by Alexis de Lattre during the Akretion-Camptocamp code sprint of June 2011.\n" -"" -msgstr "" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on closed account." -msgstr "" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Always" -msgstr "" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Never" -msgstr "" - -#. module: account_analytic_required -#: model:ir.module.module,shortdesc:account_analytic_required.module_meta_information -msgid "Account analytic required" -msgstr "" - -#. module: account_analytic_required -#: sql_constraint:account.move.line:0 -msgid "Wrong credit or debit value in accounting entry !" -msgstr "" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "You can not create move line on view account." -msgstr "" - -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move_line -msgid "Journal Items" -msgstr "" - -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_account_type -msgid "Account Type" -msgstr "" - -#. module: account_analytic_required -#: constraint:account.move.line:0 -msgid "Company must be same for its related account and period." -msgstr "" - -#. module: account_analytic_required -#: code:addons/account_analytic_required/account.py:53 -#: code:addons/account_analytic_required/account.py:56 -#, python-format -msgid "Error :" -msgstr "" - diff --git a/account_analytic_required/i18n/ar.po b/account_analytic_required/i18n/ar.po index 4d31d9e2e..ed7817cf6 100644 --- a/account_analytic_required/i18n/ar.po +++ b/account_analytic_required/i18n/ar.po @@ -6,7 +6,7 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-04-25 08:50+0000\n" "PO-Revision-Date: 2017-04-25 08:50+0000\n" diff --git a/account_analytic_required/i18n/ca.po b/account_analytic_required/i18n/ca.po index 2abd17d89..bc407ab22 100644 --- a/account_analytic_required/i18n/ca.po +++ b/account_analytic_required/i18n/ca.po @@ -6,7 +6,7 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-04-25 08:50+0000\n" "PO-Revision-Date: 2017-04-25 08:50+0000\n" diff --git a/account_analytic_required/i18n/es.po b/account_analytic_required/i18n/es.po index f4d44df1f..0305ffeb1 100644 --- a/account_analytic_required/i18n/es.po +++ b/account_analytic_required/i18n/es.po @@ -7,7 +7,7 @@ # Pedro M. Baeza , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-06-21 02:39+0000\n" "PO-Revision-Date: 2017-06-21 02:39+0000\n" diff --git a/account_analytic_required/i18n/fr.po b/account_analytic_required/i18n/fr.po index f3ff2545c..2676610b6 100644 --- a/account_analytic_required/i18n/fr.po +++ b/account_analytic_required/i18n/fr.po @@ -6,7 +6,7 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-04-25 08:50+0000\n" "PO-Revision-Date: 2017-04-25 08:50+0000\n" diff --git a/account_analytic_required/i18n/hr_HR.po b/account_analytic_required/i18n/hr_HR.po index fb76b69a3..4e53712eb 100644 --- a/account_analytic_required/i18n/hr_HR.po +++ b/account_analytic_required/i18n/hr_HR.po @@ -7,7 +7,7 @@ # Bole , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-06-30 02:40+0000\n" "PO-Revision-Date: 2017-06-30 02:40+0000\n" diff --git a/account_analytic_required/i18n/nl.po b/account_analytic_required/i18n/nl.po index 79b39d3d3..fec3e3ffd 100644 --- a/account_analytic_required/i18n/nl.po +++ b/account_analytic_required/i18n/nl.po @@ -6,7 +6,7 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-05-24 09:51+0000\n" "PO-Revision-Date: 2017-05-24 09:51+0000\n" diff --git a/account_analytic_required/i18n/pt_BR.po b/account_analytic_required/i18n/pt_BR.po index 444da11ae..285b0d5ae 100644 --- a/account_analytic_required/i18n/pt_BR.po +++ b/account_analytic_required/i18n/pt_BR.po @@ -6,7 +6,7 @@ # Rodrigo de Almeida Sottomaior Macedo , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-06-13 09:51+0000\n" "PO-Revision-Date: 2017-06-13 09:51+0000\n" diff --git a/account_analytic_required/models/account.py b/account_analytic_required/models/account.py index 8be70c4aa..770f5e163 100644 --- a/account_analytic_required/models/account.py +++ b/account_analytic_required/models/account.py @@ -1,6 +1,5 @@ -# -*- coding: utf-8 -*- -# © 2011-2016 Akretion (Alexis de Lattre ) -# © 2016 Camptocamp SA +# Copyright 2011-2016 Akretion - Alexis de Lattre +# Copyright 2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from odoo import _, api, exceptions, fields, models @@ -59,6 +58,8 @@ def _check_analytic_required_msg(self): move_line.account_id.name, move_line.name, move_line.analytic_account_id.name_get()[0][1]) + else: + return None @api.constrains('analytic_account_id', 'account_id', 'debit', 'credit') def _check_analytic_required(self): diff --git a/account_analytic_required/tests/test_account_analytic_required.py b/account_analytic_required/tests/test_account_analytic_required.py index fc1b77e2c..420250091 100644 --- a/account_analytic_required/tests/test_account_analytic_required.py +++ b/account_analytic_required/tests/test_account_analytic_required.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2014 Acsone +# Copyright 2014 Acsone # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from datetime import datetime @@ -7,43 +6,48 @@ from odoo import exceptions -class TestAccountAnalyticRequired(common.TransactionCase): +class TestAccountAnalyticRequired(common.SavepointCase): - def setUp(self): - super(TestAccountAnalyticRequired, self).setUp() - self.account_obj = self.env['account.account'] - self.account_type_obj = self.env['account.account.type'] - self.move_obj = self.env['account.move'] - self.move_line_obj = self.env['account.move.line'] - self.analytic_account_obj = self.env['account.analytic.account'] - self.analytic_account = self.analytic_account_obj.create( + @classmethod + def setUpClass(cls): + super(TestAccountAnalyticRequired, cls).setUpClass() + cls.account_obj = cls.env['account.account'] + cls.account_type_obj = cls.env['account.account.type'] + cls.move_obj = cls.env['account.move'] + cls.move_line_obj = cls.env['account.move.line'] + cls.analytic_account_obj = cls.env['account.analytic.account'] + cls.analytic_account = cls.analytic_account_obj.create( {'name': 'test aa'}) - self.account_sales = self.env['account.account'].create({ + cls.account_sales = cls.env['account.account'].create({ 'code': "X1020", 'name': "Product Sales - (test)", - 'user_type_id': self.ref('account.data_account_type_revenue') + 'user_type_id': cls.env.ref( + 'account.data_account_type_revenue').id }) - self.account_recv = self.env['account.account'].create({ + cls.account_recv = cls.env['account.account'].create({ 'code': "X11002", 'name': "Debtors - (test)", 'reconcile': True, - 'user_type_id': self.ref('account.data_account_type_receivable') + 'user_type_id': cls.env.ref( + 'account.data_account_type_receivable').id }) - self.account_exp = self.env['account.account'].create({ + cls.account_exp = cls.env['account.account'].create({ 'code': "X2110", 'name': "Expenses - (test)", - 'user_type_id': self.ref('account.data_account_type_expenses') + 'user_type_id': cls.env.ref( + 'account.data_account_type_expenses').id }) - self.sales_journal = self.env['account.journal'].create({ + cls.sales_journal = cls.env['account.journal'].create({ 'name': "Sales Journal - (test)", 'code': "TSAJ", 'type': "sale", 'refund_sequence': True, - 'default_debit_account_id': self.account_sales.id, - 'default_credit_account_id': self.account_sales.id, + 'default_debit_account_id': cls.account_sales.id, + 'default_credit_account_id': cls.account_sales.id, }) - def _create_move(self, with_analytic, amount=100): + def _create_move(self, amount=100, **kwargs): + with_analytic = kwargs.get('with_analytic') date = datetime.now() ml_obj = self.move_line_obj.with_context(check_move_validity=False) move_vals = { diff --git a/account_analytic_required/views/account.xml b/account_analytic_required/views/account.xml index ac2032447..d8cc04dd9 100644 --- a/account_analytic_required/views/account.xml +++ b/account_analytic_required/views/account.xml @@ -1,6 +1,6 @@ From af41086e4f7f0b157a59f70ab174e04da247bae6 Mon Sep 17 00:00:00 2001 From: Akim Juillerat Date: Fri, 22 Dec 2017 14:37:18 +0100 Subject: [PATCH 25/69] [IMP] account_analytic_required: Add 'posted moves' as analytic policy --- account_analytic_required/README.rst | 4 ++- account_analytic_required/models/account.py | 26 +++++++++++++++++-- .../tests/test_account_analytic_required.py | 10 +++++++ 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/account_analytic_required/README.rst b/account_analytic_required/README.rst index f657be078..25b5de718 100644 --- a/account_analytic_required/README.rst +++ b/account_analytic_required/README.rst @@ -7,7 +7,8 @@ Account Analytic Required ========================= This module adds an option *analytic policy* on account types. -You have the choice between 3 policies : *always*, *never* and *optional*. +You have the choice between 4 policies : *always*, *never*, *posted moves* and +*optional*. Configuration ============= @@ -43,6 +44,7 @@ Contributors * Laetitia Gangloff * Luc De Meyer, Noviat * Yannick Vaucher +* Akim Juillerat Maintainer ---------- diff --git a/account_analytic_required/models/account.py b/account_analytic_required/models/account.py index 770f5e163..280b3108f 100644 --- a/account_analytic_required/models/account.py +++ b/account_analytic_required/models/account.py @@ -12,6 +12,7 @@ class AccountAccountType(models.Model): analytic_policy = fields.Selection( selection=[('optional', 'Optional'), ('always', 'Always'), + ('posted', 'Posted moves'), ('never', 'Never')], string='Policy for analytic account', required=True, @@ -20,11 +21,23 @@ class AccountAccountType(models.Model): "'Optional', the accountant is free to put an analytic account " "on an account move line with this type of account ; if you " "select 'Always', the accountant will get an error message if " - "there is no analytic account ; if you select 'Never', the " - "accountant will get an error message if an analytic account " + "there is no analytic account ; if you select 'Posted moves', " + "the accountant will get an error message if no analytic account " + "is defined when the move is posted ; if you select 'Never', " + "the accountant will get an error message if an analytic account " "is present.") +class AccountMove(models.Model): + _inherit = "account.move" + + @api.multi + def post(self): + res = super(AccountMove, self).post() + self.mapped('line_ids')._check_analytic_required() + return res + + class AccountMoveLine(models.Model): _inherit = "account.move.line" @@ -58,6 +71,15 @@ def _check_analytic_required_msg(self): move_line.account_id.name, move_line.name, move_line.analytic_account_id.name_get()[0][1]) + elif (analytic_policy == 'posted' and + not move_line.analytic_account_id and + move_line.move_id.state == 'posted'): + return _("Analytic policy is set to 'Posted moves' with " + "account %s '%s' but the analytic account is missing " + "in the account move line with label '%s'." + ) % (move_line.account_id.code, + move_line.account_id.name, + move_line.name) else: return None diff --git a/account_analytic_required/tests/test_account_analytic_required.py b/account_analytic_required/tests/test_account_analytic_required.py index 420250091..b5cc8c845 100644 --- a/account_analytic_required/tests/test_account_analytic_required.py +++ b/account_analytic_required/tests/test_account_analytic_required.py @@ -130,3 +130,13 @@ def test_change_account(self): line.write({ 'account_id': self.account_exp.id, 'analytic_account_id': self.analytic_account.id}) + + def test_posted(self): + self._set_analytic_policy('posted') + line = self._create_move(with_analytic=False) + move = line.move_id + with self.assertRaises(exceptions.ValidationError): + move.post() + line.write({'analytic_account_id': self.analytic_account.id}) + move.post() + self.assertEqual(move.state, 'posted') From a0161b2e7964950ee8d9ea57bb01f3aeef6a13d2 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 3 Feb 2018 00:02:38 +0100 Subject: [PATCH 26/69] OCA Transbot updated translations from Transifex --- account_analytic_required/i18n/ar.po | 56 +++++++++--- account_analytic_required/i18n/ca.po | 56 +++++++++--- account_analytic_required/i18n/de.po | 114 ++++++++++++++++++++++++ account_analytic_required/i18n/es.po | 53 +++++------ account_analytic_required/i18n/es_CO.po | 105 ++++++++++++++++++++++ account_analytic_required/i18n/fr.po | 80 +++++++++++++---- account_analytic_required/i18n/hr_HR.po | 52 ++++++----- account_analytic_required/i18n/nl.po | 41 ++++++--- account_analytic_required/i18n/pt_BR.po | 42 ++++++--- 9 files changed, 480 insertions(+), 119 deletions(-) create mode 100644 account_analytic_required/i18n/de.po create mode 100644 account_analytic_required/i18n/es_CO.po diff --git a/account_analytic_required/i18n/ar.po b/account_analytic_required/i18n/ar.po index ed7817cf6..eba8068ea 100644 --- a/account_analytic_required/i18n/ar.po +++ b/account_analytic_required/i18n/ar.po @@ -3,14 +3,14 @@ # * account_analytic_required # # Translators: -# OCA Transbot , 2017 +# OCA Transbot , 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-25 08:50+0000\n" -"PO-Revision-Date: 2017-04-25 08:50+0000\n" -"Last-Translator: OCA Transbot , 2017\n" +"POT-Creation-Date: 2018-02-01 03:39+0000\n" +"PO-Revision-Date: 2018-02-01 03:39+0000\n" +"Last-Translator: OCA Transbot , 2018\n" "Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -18,18 +18,28 @@ msgstr "" "Language: ar\n" "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +msgid "Account Entry" +msgstr "" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" msgstr "نوع الحساب" +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "" + #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" msgstr "" #. module: account_analytic_required -#: code:addons/account_analytic_required/models/account.py:52 +#: code:addons/account_analytic_required/models/account.py:59 #, python-format msgid "" "Analytic policy is set to 'Always' with account %s '%s' but the analytic " @@ -37,13 +47,21 @@ msgid "" msgstr "" #. module: account_analytic_required -#: code:addons/account_analytic_required/models/account.py:60 +#: code:addons/account_analytic_required/models/account.py:67 #, python-format msgid "" "Analytic policy is set to 'Never' with account %s '%s' but the account move " "line with label '%s' has an analytic account '%s'." msgstr "" +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:77 +#, python-format +msgid "" +"Analytic policy is set to 'Posted moves' with account %s '%s' but the " +"analytic account is missing in the account move line with label '%s'." +msgstr "" + #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" @@ -54,22 +72,34 @@ msgstr "" msgid "Journal Item" msgstr "" +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "" + #. module: account_analytic_required #: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy msgid "Policy for analytic account" msgstr "سياسة للحسابات التحليلية" +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Posted moves" +msgstr "" + #. module: account_analytic_required #: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " "this type of account ; if you select 'Always', the accountant will get an " -"error message if there is no analytic account ; if you select 'Never', the " -"accountant will get an error message if an analytic account is present." +"error message if there is no analytic account ; if you select 'Posted " +"moves', the accountant will get an error message if no analytic account is " +"defined when the move is posted ; if you select 'Never', the accountant will" +" get an error message if an analytic account is present." msgstr "" -"ضع سياسة للحسابات التحليلية: إذا قمت بتحديد \"الاختياري\"، فان المحاسب حر في" -" وضع حساب تحليلي على حساب خط التحرك مع هذا النوع من الحساب، وإذا قمت بتحديد " -"\"دائما\"، فان المحاسب سوف يحصل على رسالة خطأ إذا كان هناك لا يوجد حساب " -"تحليلي، وإذا قمت بتحديد \"أبدا\"، فان المحاسب سوف يحصل على رسالة خطأ إذا كان" -" هناك حساب تحليلي موجود" diff --git a/account_analytic_required/i18n/ca.po b/account_analytic_required/i18n/ca.po index bc407ab22..7463f5dc0 100644 --- a/account_analytic_required/i18n/ca.po +++ b/account_analytic_required/i18n/ca.po @@ -3,14 +3,14 @@ # * account_analytic_required # # Translators: -# OCA Transbot , 2017 +# OCA Transbot , 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-25 08:50+0000\n" -"PO-Revision-Date: 2017-04-25 08:50+0000\n" -"Last-Translator: OCA Transbot , 2017\n" +"POT-Creation-Date: 2018-02-01 03:39+0000\n" +"PO-Revision-Date: 2018-02-01 03:39+0000\n" +"Last-Translator: OCA Transbot , 2018\n" "Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -18,18 +18,28 @@ msgstr "" "Language: ca\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +msgid "Account Entry" +msgstr "" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" msgstr "Tipus de compte" +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "" + #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" msgstr "" #. module: account_analytic_required -#: code:addons/account_analytic_required/models/account.py:52 +#: code:addons/account_analytic_required/models/account.py:59 #, python-format msgid "" "Analytic policy is set to 'Always' with account %s '%s' but the analytic " @@ -37,13 +47,21 @@ msgid "" msgstr "" #. module: account_analytic_required -#: code:addons/account_analytic_required/models/account.py:60 +#: code:addons/account_analytic_required/models/account.py:67 #, python-format msgid "" "Analytic policy is set to 'Never' with account %s '%s' but the account move " "line with label '%s' has an analytic account '%s'." msgstr "" +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:77 +#, python-format +msgid "" +"Analytic policy is set to 'Posted moves' with account %s '%s' but the " +"analytic account is missing in the account move line with label '%s'." +msgstr "" + #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" @@ -54,22 +72,34 @@ msgstr "" msgid "Journal Item" msgstr "" +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "" + #. module: account_analytic_required #: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy msgid "Policy for analytic account" msgstr "Política per als comptes analítics" +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Posted moves" +msgstr "" + #. module: account_analytic_required #: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " "this type of account ; if you select 'Always', the accountant will get an " -"error message if there is no analytic account ; if you select 'Never', the " -"accountant will get an error message if an analytic account is present." +"error message if there is no analytic account ; if you select 'Posted " +"moves', the accountant will get an error message if no analytic account is " +"defined when the move is posted ; if you select 'Never', the accountant will" +" get an error message if an analytic account is present." msgstr "" -"Configura la política per als comptes analítics: Si seleccioneu 'Opcional', " -"el comptable és lliure de posar un compte analític en un apunt comptable amb" -" aquest tipus de compte; si seleccioneu 'Sempre', el comptable rebrà un " -"missatge d'error si l'apunt no té compte analític; si seleccioneu 'Mai', el " -"comptable rebrà un missatge d'error si l'apunt té un compte analític." diff --git a/account_analytic_required/i18n/de.po b/account_analytic_required/i18n/de.po new file mode 100644 index 000000000..dd78e8bf3 --- /dev/null +++ b/account_analytic_required/i18n/de.po @@ -0,0 +1,114 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_analytic_required +# +# Translators: +# Ricardo Gross , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-16 23:08+0000\n" +"PO-Revision-Date: 2018-03-16 23:08+0000\n" +"Last-Translator: Ricardo Gross , 2018\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +msgid "Account Entry" +msgstr "Kontoeintrag" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "Konto Typ" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "Immer" + +#. module: account_analytic_required +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Analytic Policy" +msgstr "Analytische Richtlinie" + +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:59 +#, python-format +msgid "" +"Analytic policy is set to 'Always' with account %s '%s' but the analytic " +"account is missing in the account move line with label '%s'." +msgstr "" +"Die Analytic-Richtlinie ist mit dem Konto %s ' %s' auf 'Immer' " +"eingestellt, aber im Analysekonto fehlt in der Buchungslinie mit der " +"Bezeichnung ' %s '." + +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:67 +#, python-format +msgid "" +"Analytic policy is set to 'Never' with account %s '%s' but the account move " +"line with label '%s' has an analytic account '%s'." +msgstr "" +"Die Analytic-Richtlinie ist auf \"Nie\" eingestellt mit Konto %s ' %s' aber" +" die Buchungslinie mit Marke ' %s ' hat ein anlaytisches Konto ' %s '. " + +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:77 +#, python-format +msgid "" +"Analytic policy is set to 'Posted moves' with account %s '%s' but the " +"analytic account is missing in the account move line with label '%s'." +msgstr "" +"Die Analytic-Richtlinie ist auf \"Posted moves\" eingestellt mit dem Konto \n" +"%s ' %s ' aber das analytische Konto fehlt in der Buchungslinie mit dem Label ' %s'." + +#. module: account_analytic_required +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Group By" +msgstr "Gruppe Von" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Item" +msgstr "Tageseintrag" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "Nie" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "Wahlweise" + +#. module: account_analytic_required +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +msgid "Policy for analytic account" +msgstr "Richtlinie für analytisches Konto" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Posted moves" +msgstr "Buchungen" + +#. module: account_analytic_required +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Posted " +"moves', the accountant will get an error message if no analytic account is " +"defined when the move is posted ; if you select 'Never', the accountant will" +" get an error message if an analytic account is present." +msgstr "" +"Legen Sie die Richtlinie für analytische Konten fest: \n" +"Wenn Sie \"Optional\" auswählen, kann der Buchhalter ein analytisches Konto in einer Kontobewegungslinie mit diesem Kontotyp anlegen. Wenn Sie \"Immer\" auswählen, erhält der Buchhalter eine Fehlermeldung, wenn kein analytisches Konto vorhanden ist. Wenn Sie \"Posted moves\" auswählen, erhält der Buchhalter eine Fehlermeldung, wenn bei der Buchung kein analytisches Konto definiert wurde. Wenn Sie \"Nie\" auswählen, erhält der Buchhalter eine Fehlermeldung, wenn ein analytisches Konto vorhanden ist." diff --git a/account_analytic_required/i18n/es.po b/account_analytic_required/i18n/es.po index 0305ffeb1..a1847cef8 100644 --- a/account_analytic_required/i18n/es.po +++ b/account_analytic_required/i18n/es.po @@ -3,15 +3,14 @@ # * account_analytic_required # # Translators: -# OCA Transbot , 2017 -# Pedro M. Baeza , 2017 +# OCA Transbot , 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-21 02:39+0000\n" -"PO-Revision-Date: 2017-06-21 02:39+0000\n" -"Last-Translator: Pedro M. Baeza , 2017\n" +"POT-Creation-Date: 2018-02-01 03:39+0000\n" +"PO-Revision-Date: 2018-02-01 03:39+0000\n" +"Last-Translator: OCA Transbot , 2018\n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,6 +18,11 @@ msgstr "" "Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +msgid "Account Entry" +msgstr "" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" @@ -29,23 +33,13 @@ msgstr "Tipo de cuenta" msgid "Always" msgstr "" -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Always (analytic account or distribution)" -msgstr "Siempre (cuenta analítica o distribución)" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Always (analytic distribution)" -msgstr "Siempre (distribución analítica)" - #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" msgstr "" #. module: account_analytic_required -#: code:addons/account_analytic_required/models/account.py:47 +#: code:addons/account_analytic_required/models/account.py:59 #, python-format msgid "" "Analytic policy is set to 'Always' with account %s '%s' but the analytic " @@ -53,13 +47,21 @@ msgid "" msgstr "" #. module: account_analytic_required -#: code:addons/account_analytic_required/models/account.py:55 +#: code:addons/account_analytic_required/models/account.py:67 #, python-format msgid "" "Analytic policy is set to 'Never' with account %s '%s' but the account move " "line with label '%s' has an analytic account '%s'." msgstr "" +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:77 +#, python-format +msgid "" +"Analytic policy is set to 'Posted moves' with account %s '%s' but the " +"analytic account is missing in the account move line with label '%s'." +msgstr "" + #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" @@ -85,18 +87,19 @@ msgstr "" msgid "Policy for analytic account" msgstr "Política para las cuentas analíticas" +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Posted moves" +msgstr "" + #. module: account_analytic_required #: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " "this type of account ; if you select 'Always', the accountant will get an " -"error message if there is no analytic account ; if you select 'Never', the " -"accountant will get an error message if an analytic account is present." +"error message if there is no analytic account ; if you select 'Posted " +"moves', the accountant will get an error message if no analytic account is " +"defined when the move is posted ; if you select 'Never', the accountant will" +" get an error message if an analytic account is present." msgstr "" -"Configura la política para las cuentas analíticas: Si selecciona 'Opcional'," -" el contable es libre de poner una cuenta analítica en un apunte contable de" -" este tipo de cuenta; si selecciona 'Siempre', el contable recibirá un " -"mensaje de error si el apunte no tiene cuenta analítica; si selecciona " -"'Nunca', el contable recibirá un mensaje de error si el apunte tiene una " -"cuenta analítica." diff --git a/account_analytic_required/i18n/es_CO.po b/account_analytic_required/i18n/es_CO.po new file mode 100644 index 000000000..ffde03b5b --- /dev/null +++ b/account_analytic_required/i18n/es_CO.po @@ -0,0 +1,105 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_analytic_required +# +# Translators: +# JOSE ALEJANDRO ECHEVERRI VALENCIA , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-01 03:39+0000\n" +"PO-Revision-Date: 2018-02-01 03:39+0000\n" +"Last-Translator: JOSE ALEJANDRO ECHEVERRI VALENCIA , 2018\n" +"Language-Team: Spanish (Colombia) (https://www.transifex.com/oca/teams/23907/es_CO/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es_CO\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +msgid "Account Entry" +msgstr "" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "Tipo de Cuenta" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "Siempre" + +#. module: account_analytic_required +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Analytic Policy" +msgstr "" + +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:59 +#, python-format +msgid "" +"Analytic policy is set to 'Always' with account %s '%s' but the analytic " +"account is missing in the account move line with label '%s'." +msgstr "" + +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:67 +#, python-format +msgid "" +"Analytic policy is set to 'Never' with account %s '%s' but the account move " +"line with label '%s' has an analytic account '%s'." +msgstr "" + +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:77 +#, python-format +msgid "" +"Analytic policy is set to 'Posted moves' with account %s '%s' but the " +"analytic account is missing in the account move line with label '%s'." +msgstr "" + +#. module: account_analytic_required +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Group By" +msgstr "" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Item" +msgstr "Elemento del Libro" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "" + +#. module: account_analytic_required +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +msgid "Policy for analytic account" +msgstr "" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Posted moves" +msgstr "" + +#. module: account_analytic_required +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +msgid "" +"Set the policy for analytic accounts : if you select 'Optional', the " +"accountant is free to put an analytic account on an account move line with " +"this type of account ; if you select 'Always', the accountant will get an " +"error message if there is no analytic account ; if you select 'Posted " +"moves', the accountant will get an error message if no analytic account is " +"defined when the move is posted ; if you select 'Never', the accountant will" +" get an error message if an analytic account is present." +msgstr "" diff --git a/account_analytic_required/i18n/fr.po b/account_analytic_required/i18n/fr.po index 2676610b6..c406160c9 100644 --- a/account_analytic_required/i18n/fr.po +++ b/account_analytic_required/i18n/fr.po @@ -3,14 +3,16 @@ # * account_analytic_required # # Translators: -# OCA Transbot , 2017 +# OCA Transbot , 2018 +# Quentin THEURET , 2018 +# Nicolas JEUDY , 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-25 08:50+0000\n" -"PO-Revision-Date: 2017-04-25 08:50+0000\n" -"Last-Translator: OCA Transbot , 2017\n" +"POT-Creation-Date: 2018-02-02 23:18+0000\n" +"PO-Revision-Date: 2018-02-02 23:18+0000\n" +"Last-Translator: Nicolas JEUDY , 2018\n" "Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -18,59 +20,103 @@ msgstr "" "Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +msgid "Account Entry" +msgstr "Ecriture comptable" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" msgstr "Type de compte" +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "Toujours" + #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" -msgstr "" +msgstr "Stratégie analytique" #. module: account_analytic_required -#: code:addons/account_analytic_required/models/account.py:52 +#: code:addons/account_analytic_required/models/account.py:59 #, python-format msgid "" "Analytic policy is set to 'Always' with account %s '%s' but the analytic " "account is missing in the account move line with label '%s'." msgstr "" +"La règle analytique est définie sur 'Toujours' pour le compte%s'%s'mais le " +"compte analytique est absent de l'écriture ayant libellé '%s'." #. module: account_analytic_required -#: code:addons/account_analytic_required/models/account.py:60 +#: code:addons/account_analytic_required/models/account.py:67 #, python-format msgid "" "Analytic policy is set to 'Never' with account %s '%s' but the account move " "line with label '%s' has an analytic account '%s'." msgstr "" +"La règle analytique est définie sur 'Jamais' pour le compte %s '%s' mais " +"l'écriture avec le libellé '%s' a un compte analytique de définit '%s'." + +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:77 +#, python-format +msgid "" +"Analytic policy is set to 'Posted moves' with account %s '%s' but the " +"analytic account is missing in the account move line with label '%s'." +msgstr "" +"La règle analytique est définie à 'Ecritures comptabilisées' pour le compte " +"%s '%s' mais le compte analytique est absent de l'écriture ayant le libellé " +"'%s'." #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" -msgstr "" +msgstr "Grouper par" #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line msgid "Journal Item" -msgstr "" +msgstr "Écriture du journal" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "Jamais" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "Facultatif" #. module: account_analytic_required #: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy msgid "Policy for analytic account" msgstr "Politique pour les comptes analytiques" +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Posted moves" +msgstr "Ecritures comptabilisées" + #. module: account_analytic_required #: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " "this type of account ; if you select 'Always', the accountant will get an " -"error message if there is no analytic account ; if you select 'Never', the " -"accountant will get an error message if an analytic account is present." +"error message if there is no analytic account ; if you select 'Posted " +"moves', the accountant will get an error message if no analytic account is " +"defined when the move is posted ; if you select 'Never', the accountant will" +" get an error message if an analytic account is present." msgstr "" -"Configurez la politique pour les comptes analytiques : si vous sélectionnez " -"'Optionnel', le comptable est libre de saisir ou non un compte analytique " -"sur une ligne comptable avec ce type de compte de comptabilité générale ; si" -" vous sélectionnez 'Toujours', le comptable aura un message d'erreur si il " -"n'y a pas de compte analytique ; si vous sélectionnez 'Jamais', le comptable" -" aura un message d'erreur si un compte analytique est présent." +"Définissez la règle pour les comptes analytiques: si vous sélectionnez " +"'Facultatif', le comptable est libre de mettre un compte analytique sur une " +"écriture comptable avec ce type de compte; si vous sélectionnez 'Toujours', " +"le comptable recevra un message d'erreur s'il n' y a pas de compte " +"analytique; Si vous sélectionnez \"Ecritures comptabilisées\", le comptable " +"recevra un message d'erreur si aucun compte analytique n'est défini lors de " +"la comptabilisation de l'écriture; si vous sélectionnez \"Jamais\", le " +"comptable recevra un message d'erreur si un compte analytique est présent." diff --git a/account_analytic_required/i18n/hr_HR.po b/account_analytic_required/i18n/hr_HR.po index 4e53712eb..8ed78fa89 100644 --- a/account_analytic_required/i18n/hr_HR.po +++ b/account_analytic_required/i18n/hr_HR.po @@ -3,15 +3,14 @@ # * account_analytic_required # # Translators: -# OCA Transbot , 2017 -# Bole , 2017 +# OCA Transbot , 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-30 02:40+0000\n" -"PO-Revision-Date: 2017-06-30 02:40+0000\n" -"Last-Translator: Bole , 2017\n" +"POT-Creation-Date: 2018-02-01 03:39+0000\n" +"PO-Revision-Date: 2018-02-01 03:39+0000\n" +"Last-Translator: OCA Transbot , 2018\n" "Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,6 +18,11 @@ msgstr "" "Language: hr_HR\n" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +msgid "Account Entry" +msgstr "" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" @@ -29,23 +33,13 @@ msgstr "Tip konta" msgid "Always" msgstr "Uvijek" -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Always (analytic account or distribution)" -msgstr "Uvjek (analitički konto ili distribucija)" - -#. module: account_analytic_required -#: selection:account.account.type,analytic_policy:0 -msgid "Always (analytic distribution)" -msgstr "Uvjek (analitička distribucija)" - #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" msgstr "Analitička pravila" #. module: account_analytic_required -#: code:addons/account_analytic_required/models/account.py:47 +#: code:addons/account_analytic_required/models/account.py:59 #, python-format msgid "" "Analytic policy is set to 'Always' with account %s '%s' but the analytic " @@ -55,7 +49,7 @@ msgstr "" "analitički konto nedostaje u stavci temeljnice sa naslovom '%s'." #. module: account_analytic_required -#: code:addons/account_analytic_required/models/account.py:55 +#: code:addons/account_analytic_required/models/account.py:67 #, python-format msgid "" "Analytic policy is set to 'Never' with account %s '%s' but the account move " @@ -64,6 +58,14 @@ msgstr "" "Analitičko pravilo je postavljeno na 'Nikada' za konto %s '%s' ali na stavci" " temeljnice sa oznakom '%s' postoji analitički konto '%s'." +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:77 +#, python-format +msgid "" +"Analytic policy is set to 'Posted moves' with account %s '%s' but the " +"analytic account is missing in the account move line with label '%s'." +msgstr "" + #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" @@ -89,17 +91,19 @@ msgstr "Opcionalno" msgid "Policy for analytic account" msgstr "Pravila za analitička konta" +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Posted moves" +msgstr "" + #. module: account_analytic_required #: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " "this type of account ; if you select 'Always', the accountant will get an " -"error message if there is no analytic account ; if you select 'Never', the " -"accountant will get an error message if an analytic account is present." +"error message if there is no analytic account ; if you select 'Posted " +"moves', the accountant will get an error message if no analytic account is " +"defined when the move is posted ; if you select 'Never', the accountant will" +" get an error message if an analytic account is present." msgstr "" -"Postavite pravila za analitička konta: ako odaberete 'Opcionalno', " -"knjigovođa može slobodno birati hoće li postaviti analitički konto na stavke" -" temeljnice ovog tipa konta, ako odaberete 'Uvijek', knjigovođa će dobiti " -"upozorenje o grešci ako ga nema, i ako odaberete 'Nikad' knjigovođa će " -"dobiti upozorenje o greški ako postoji analitički konto." diff --git a/account_analytic_required/i18n/nl.po b/account_analytic_required/i18n/nl.po index fec3e3ffd..ff2a81e30 100644 --- a/account_analytic_required/i18n/nl.po +++ b/account_analytic_required/i18n/nl.po @@ -3,14 +3,14 @@ # * account_analytic_required # # Translators: -# OCA Transbot , 2017 +# OCA Transbot , 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-05-24 09:51+0000\n" -"PO-Revision-Date: 2017-05-24 09:51+0000\n" -"Last-Translator: OCA Transbot , 2017\n" +"POT-Creation-Date: 2018-02-01 03:39+0000\n" +"PO-Revision-Date: 2018-02-01 03:39+0000\n" +"Last-Translator: OCA Transbot , 2018\n" "Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -18,6 +18,11 @@ msgstr "" "Language: nl\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +msgid "Account Entry" +msgstr "" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" @@ -34,7 +39,7 @@ msgid "Analytic Policy" msgstr "" #. module: account_analytic_required -#: code:addons/account_analytic_required/models/account.py:47 +#: code:addons/account_analytic_required/models/account.py:59 #, python-format msgid "" "Analytic policy is set to 'Always' with account %s '%s' but the analytic " @@ -44,13 +49,21 @@ msgstr "" "'%s', maar deze ontbreekt in de boekingsregel met de omschrijving '%s'." #. module: account_analytic_required -#: code:addons/account_analytic_required/models/account.py:55 +#: code:addons/account_analytic_required/models/account.py:67 #, python-format msgid "" "Analytic policy is set to 'Never' with account %s '%s' but the account move " "line with label '%s' has an analytic account '%s'." msgstr "" +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:77 +#, python-format +msgid "" +"Analytic policy is set to 'Posted moves' with account %s '%s' but the " +"analytic account is missing in the account move line with label '%s'." +msgstr "" + #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" @@ -76,17 +89,19 @@ msgstr "" msgid "Policy for analytic account" msgstr "Kostenplaatsenbeleid" +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Posted moves" +msgstr "" + #. module: account_analytic_required #: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " "this type of account ; if you select 'Always', the accountant will get an " -"error message if there is no analytic account ; if you select 'Never', the " -"accountant will get an error message if an analytic account is present." +"error message if there is no analytic account ; if you select 'Posted " +"moves', the accountant will get an error message if no analytic account is " +"defined when the move is posted ; if you select 'Never', the accountant will" +" get an error message if an analytic account is present." msgstr "" -"Stel het beleid in voor kostenplaatsen: bij 'Altijd' is het opgeven van een " -"kostenplaats verplicht bij rekeningen van dit type. 'Nooit': er treedt een " -"foutmelding op als er bij een boeking een kostenplaats wordt opgegeven. " -"'Optioneel': het staat de medewerker vrij om al dan niet een kostenplaats op" -" te geven." diff --git a/account_analytic_required/i18n/pt_BR.po b/account_analytic_required/i18n/pt_BR.po index 285b0d5ae..27149191e 100644 --- a/account_analytic_required/i18n/pt_BR.po +++ b/account_analytic_required/i18n/pt_BR.po @@ -3,14 +3,14 @@ # * account_analytic_required # # Translators: -# Rodrigo de Almeida Sottomaior Macedo , 2017 +# OCA Transbot , 2018 msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-13 09:51+0000\n" -"PO-Revision-Date: 2017-06-13 09:51+0000\n" -"Last-Translator: Rodrigo de Almeida Sottomaior Macedo , 2017\n" +"POT-Creation-Date: 2018-02-01 03:39+0000\n" +"PO-Revision-Date: 2018-02-01 03:39+0000\n" +"Last-Translator: OCA Transbot , 2018\n" "Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -18,6 +18,11 @@ msgstr "" "Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +msgid "Account Entry" +msgstr "" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" @@ -34,7 +39,7 @@ msgid "Analytic Policy" msgstr "Política Analítica" #. module: account_analytic_required -#: code:addons/account_analytic_required/models/account.py:47 +#: code:addons/account_analytic_required/models/account.py:59 #, python-format msgid "" "Analytic policy is set to 'Always' with account %s '%s' but the analytic " @@ -44,7 +49,7 @@ msgstr "" " analítica está faltando na linha de mudança de conta com o rótulo '%s'." #. module: account_analytic_required -#: code:addons/account_analytic_required/models/account.py:55 +#: code:addons/account_analytic_required/models/account.py:67 #, python-format msgid "" "Analytic policy is set to 'Never' with account %s '%s' but the account move " @@ -53,6 +58,14 @@ msgstr "" "A política analítica é definida como \"Nunca\" com conta%s '%s' mas a linha " "de movimento da conta com o rótulo '%s' tem uma conta analítica '%s'." +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:77 +#, python-format +msgid "" +"Analytic policy is set to 'Posted moves' with account %s '%s' but the " +"analytic account is missing in the account move line with label '%s'." +msgstr "" + #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" @@ -78,18 +91,19 @@ msgstr "Opcional" msgid "Policy for analytic account" msgstr "Política para conta analítica" +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Posted moves" +msgstr "" + #. module: account_analytic_required #: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " "this type of account ; if you select 'Always', the accountant will get an " -"error message if there is no analytic account ; if you select 'Never', the " -"accountant will get an error message if an analytic account is present." +"error message if there is no analytic account ; if you select 'Posted " +"moves', the accountant will get an error message if no analytic account is " +"defined when the move is posted ; if you select 'Never', the accountant will" +" get an error message if an analytic account is present." msgstr "" -"Defina a política para contas analíticas: se você selecionar \"Opcional\", o" -" contador é livre para colocar uma conta analítica em uma linha de mudança " -"de conta com esse tipo de conta; Se você selecionar 'Sempre', o contador " -"receberá uma mensagem de erro se não houver uma conta analítica; Se você " -"selecionar 'Nunca', o contador receberá uma mensagem de erro se uma conta " -"analítica estiver presente." From 7e9fbb2e2b6dd88e9350a3c207ab6eb169f3a5dc Mon Sep 17 00:00:00 2001 From: oca-travis Date: Sat, 23 Jun 2018 10:15:31 +0000 Subject: [PATCH 27/69] [UPD] Update account_analytic_required.pot --- .../i18n/account_analytic_required.pot | 88 +++++++++++++++++++ account_analytic_required/i18n/ar.po | 11 +-- account_analytic_required/i18n/ca.po | 8 +- account_analytic_required/i18n/de.po | 26 ++++-- account_analytic_required/i18n/es.po | 8 +- account_analytic_required/i18n/es_CO.po | 14 +-- account_analytic_required/i18n/fr.po | 8 +- account_analytic_required/i18n/hr_HR.po | 18 ++-- account_analytic_required/i18n/nl.po | 8 +- account_analytic_required/i18n/pt_BR.po | 15 ++-- 10 files changed, 153 insertions(+), 51 deletions(-) create mode 100644 account_analytic_required/i18n/account_analytic_required.pot diff --git a/account_analytic_required/i18n/account_analytic_required.pot b/account_analytic_required/i18n/account_analytic_required.pot new file mode 100644 index 000000000..40ded4f54 --- /dev/null +++ b/account_analytic_required/i18n/account_analytic_required.pot @@ -0,0 +1,88 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_analytic_required +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \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_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +msgid "Account Entry" +msgstr "" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_account_type +msgid "Account Type" +msgstr "" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Always" +msgstr "" + +#. module: account_analytic_required +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Analytic Policy" +msgstr "" + +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:59 +#, python-format +msgid "Analytic policy is set to 'Always' with account %s '%s' but the analytic account is missing in the account move line with label '%s'." +msgstr "" + +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:67 +#, python-format +msgid "Analytic policy is set to 'Never' with account %s '%s' but the account move line with label '%s' has an analytic account '%s'." +msgstr "" + +#. module: account_analytic_required +#: code:addons/account_analytic_required/models/account.py:77 +#, python-format +msgid "Analytic policy is set to 'Posted moves' with account %s '%s' but the analytic account is missing in the account move line with label '%s'." +msgstr "" + +#. module: account_analytic_required +#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +msgid "Group By" +msgstr "" + +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move_line +msgid "Journal Item" +msgstr "" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Never" +msgstr "" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Optional" +msgstr "" + +#. module: account_analytic_required +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +msgid "Policy for analytic account" +msgstr "" + +#. module: account_analytic_required +#: selection:account.account.type,analytic_policy:0 +msgid "Posted moves" +msgstr "" + +#. module: account_analytic_required +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +msgid "Set the policy for analytic accounts : if you select 'Optional', the accountant is free to put an analytic account on an account move line with this type of account ; if you select 'Always', the accountant will get an error message if there is no analytic account ; if you select 'Posted moves', the accountant will get an error message if no analytic account is defined when the move is posted ; if you select 'Never', the accountant will get an error message if an analytic account is present." +msgstr "" + diff --git a/account_analytic_required/i18n/ar.po b/account_analytic_required/i18n/ar.po index eba8068ea..79215b306 100644 --- a/account_analytic_required/i18n/ar.po +++ b/account_analytic_required/i18n/ar.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_analytic_required -# +# # Translators: # OCA Transbot , 2018 msgid "" @@ -12,11 +12,12 @@ msgstr "" "PO-Revision-Date: 2018-02-01 03:39+0000\n" "Last-Translator: OCA Transbot , 2018\n" "Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n" +"Language: ar\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: ar\n" -"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move @@ -100,6 +101,6 @@ msgid "" "this type of account ; if you select 'Always', the accountant will get an " "error message if there is no analytic account ; if you select 'Posted " "moves', the accountant will get an error message if no analytic account is " -"defined when the move is posted ; if you select 'Never', the accountant will" -" get an error message if an analytic account is present." +"defined when the move is posted ; if you select 'Never', the accountant will " +"get an error message if an analytic account is present." msgstr "" diff --git a/account_analytic_required/i18n/ca.po b/account_analytic_required/i18n/ca.po index 7463f5dc0..a53150890 100644 --- a/account_analytic_required/i18n/ca.po +++ b/account_analytic_required/i18n/ca.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_analytic_required -# +# # Translators: # OCA Transbot , 2018 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2018-02-01 03:39+0000\n" "Last-Translator: OCA Transbot , 2018\n" "Language-Team: Catalan (https://www.transifex.com/oca/teams/23907/ca/)\n" +"Language: ca\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: ca\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_analytic_required @@ -100,6 +100,6 @@ msgid "" "this type of account ; if you select 'Always', the accountant will get an " "error message if there is no analytic account ; if you select 'Posted " "moves', the accountant will get an error message if no analytic account is " -"defined when the move is posted ; if you select 'Never', the accountant will" -" get an error message if an analytic account is present." +"defined when the move is posted ; if you select 'Never', the accountant will " +"get an error message if an analytic account is present." msgstr "" diff --git a/account_analytic_required/i18n/de.po b/account_analytic_required/i18n/de.po index dd78e8bf3..b59b31b76 100644 --- a/account_analytic_required/i18n/de.po +++ b/account_analytic_required/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_analytic_required -# +# # Translators: # Ricardo Gross , 2018 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2018-03-16 23:08+0000\n" "Last-Translator: Ricardo Gross , 2018\n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_analytic_required @@ -56,8 +56,8 @@ msgid "" "Analytic policy is set to 'Never' with account %s '%s' but the account move " "line with label '%s' has an analytic account '%s'." msgstr "" -"Die Analytic-Richtlinie ist auf \"Nie\" eingestellt mit Konto %s ' %s' aber" -" die Buchungslinie mit Marke ' %s ' hat ein anlaytisches Konto ' %s '. " +"Die Analytic-Richtlinie ist auf \"Nie\" eingestellt mit Konto %s ' %s' aber " +"die Buchungslinie mit Marke ' %s ' hat ein anlaytisches Konto ' %s '. " #. module: account_analytic_required #: code:addons/account_analytic_required/models/account.py:77 @@ -66,8 +66,10 @@ msgid "" "Analytic policy is set to 'Posted moves' with account %s '%s' but the " "analytic account is missing in the account move line with label '%s'." msgstr "" -"Die Analytic-Richtlinie ist auf \"Posted moves\" eingestellt mit dem Konto \n" -"%s ' %s ' aber das analytische Konto fehlt in der Buchungslinie mit dem Label ' %s'." +"Die Analytic-Richtlinie ist auf \"Posted moves\" eingestellt mit dem " +"Konto \n" +"%s ' %s ' aber das analytische Konto fehlt in der Buchungslinie mit dem " +"Label ' %s'." #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search @@ -107,8 +109,14 @@ msgid "" "this type of account ; if you select 'Always', the accountant will get an " "error message if there is no analytic account ; if you select 'Posted " "moves', the accountant will get an error message if no analytic account is " -"defined when the move is posted ; if you select 'Never', the accountant will" -" get an error message if an analytic account is present." +"defined when the move is posted ; if you select 'Never', the accountant will " +"get an error message if an analytic account is present." msgstr "" "Legen Sie die Richtlinie für analytische Konten fest: \n" -"Wenn Sie \"Optional\" auswählen, kann der Buchhalter ein analytisches Konto in einer Kontobewegungslinie mit diesem Kontotyp anlegen. Wenn Sie \"Immer\" auswählen, erhält der Buchhalter eine Fehlermeldung, wenn kein analytisches Konto vorhanden ist. Wenn Sie \"Posted moves\" auswählen, erhält der Buchhalter eine Fehlermeldung, wenn bei der Buchung kein analytisches Konto definiert wurde. Wenn Sie \"Nie\" auswählen, erhält der Buchhalter eine Fehlermeldung, wenn ein analytisches Konto vorhanden ist." +"Wenn Sie \"Optional\" auswählen, kann der Buchhalter ein analytisches Konto " +"in einer Kontobewegungslinie mit diesem Kontotyp anlegen. Wenn Sie \"Immer\" " +"auswählen, erhält der Buchhalter eine Fehlermeldung, wenn kein analytisches " +"Konto vorhanden ist. Wenn Sie \"Posted moves\" auswählen, erhält der " +"Buchhalter eine Fehlermeldung, wenn bei der Buchung kein analytisches Konto " +"definiert wurde. Wenn Sie \"Nie\" auswählen, erhält der Buchhalter eine " +"Fehlermeldung, wenn ein analytisches Konto vorhanden ist." diff --git a/account_analytic_required/i18n/es.po b/account_analytic_required/i18n/es.po index a1847cef8..917631f82 100644 --- a/account_analytic_required/i18n/es.po +++ b/account_analytic_required/i18n/es.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_analytic_required -# +# # Translators: # OCA Transbot , 2018 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2018-02-01 03:39+0000\n" "Last-Translator: OCA Transbot , 2018\n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"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_analytic_required @@ -100,6 +100,6 @@ msgid "" "this type of account ; if you select 'Always', the accountant will get an " "error message if there is no analytic account ; if you select 'Posted " "moves', the accountant will get an error message if no analytic account is " -"defined when the move is posted ; if you select 'Never', the accountant will" -" get an error message if an analytic account is present." +"defined when the move is posted ; if you select 'Never', the accountant will " +"get an error message if an analytic account is present." msgstr "" diff --git a/account_analytic_required/i18n/es_CO.po b/account_analytic_required/i18n/es_CO.po index ffde03b5b..59edc6133 100644 --- a/account_analytic_required/i18n/es_CO.po +++ b/account_analytic_required/i18n/es_CO.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_analytic_required -# +# # Translators: # JOSE ALEJANDRO ECHEVERRI VALENCIA , 2018 msgid "" @@ -10,12 +10,14 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-02-01 03:39+0000\n" "PO-Revision-Date: 2018-02-01 03:39+0000\n" -"Last-Translator: JOSE ALEJANDRO ECHEVERRI VALENCIA , 2018\n" -"Language-Team: Spanish (Colombia) (https://www.transifex.com/oca/teams/23907/es_CO/)\n" +"Last-Translator: JOSE ALEJANDRO ECHEVERRI VALENCIA , 2018\n" +"Language-Team: Spanish (Colombia) (https://www.transifex.com/oca/teams/23907/" +"es_CO/)\n" +"Language: es_CO\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: es_CO\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_analytic_required @@ -100,6 +102,6 @@ msgid "" "this type of account ; if you select 'Always', the accountant will get an " "error message if there is no analytic account ; if you select 'Posted " "moves', the accountant will get an error message if no analytic account is " -"defined when the move is posted ; if you select 'Never', the accountant will" -" get an error message if an analytic account is present." +"defined when the move is posted ; if you select 'Never', the accountant will " +"get an error message if an analytic account is present." msgstr "" diff --git a/account_analytic_required/i18n/fr.po b/account_analytic_required/i18n/fr.po index c406160c9..b1e7bb226 100644 --- a/account_analytic_required/i18n/fr.po +++ b/account_analytic_required/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_analytic_required -# +# # Translators: # OCA Transbot , 2018 # Quentin THEURET , 2018 @@ -14,10 +14,10 @@ msgstr "" "PO-Revision-Date: 2018-02-02 23:18+0000\n" "Last-Translator: Nicolas JEUDY , 2018\n" "Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: account_analytic_required @@ -109,8 +109,8 @@ msgid "" "this type of account ; if you select 'Always', the accountant will get an " "error message if there is no analytic account ; if you select 'Posted " "moves', the accountant will get an error message if no analytic account is " -"defined when the move is posted ; if you select 'Never', the accountant will" -" get an error message if an analytic account is present." +"defined when the move is posted ; if you select 'Never', the accountant will " +"get an error message if an analytic account is present." msgstr "" "Définissez la règle pour les comptes analytiques: si vous sélectionnez " "'Facultatif', le comptable est libre de mettre un compte analytique sur une " diff --git a/account_analytic_required/i18n/hr_HR.po b/account_analytic_required/i18n/hr_HR.po index 8ed78fa89..2f07673c6 100644 --- a/account_analytic_required/i18n/hr_HR.po +++ b/account_analytic_required/i18n/hr_HR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_analytic_required -# +# # Translators: # OCA Transbot , 2018 msgid "" @@ -11,12 +11,14 @@ msgstr "" "POT-Creation-Date: 2018-02-01 03:39+0000\n" "PO-Revision-Date: 2018-02-01 03:39+0000\n" "Last-Translator: OCA Transbot , 2018\n" -"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n" +"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/" +"hr_HR/)\n" +"Language: hr_HR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: hr_HR\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move @@ -55,8 +57,8 @@ msgid "" "Analytic policy is set to 'Never' with account %s '%s' but the account move " "line with label '%s' has an analytic account '%s'." msgstr "" -"Analitičko pravilo je postavljeno na 'Nikada' za konto %s '%s' ali na stavci" -" temeljnice sa oznakom '%s' postoji analitički konto '%s'." +"Analitičko pravilo je postavljeno na 'Nikada' za konto %s '%s' ali na stavci " +"temeljnice sa oznakom '%s' postoji analitički konto '%s'." #. module: account_analytic_required #: code:addons/account_analytic_required/models/account.py:77 @@ -104,6 +106,6 @@ msgid "" "this type of account ; if you select 'Always', the accountant will get an " "error message if there is no analytic account ; if you select 'Posted " "moves', the accountant will get an error message if no analytic account is " -"defined when the move is posted ; if you select 'Never', the accountant will" -" get an error message if an analytic account is present." +"defined when the move is posted ; if you select 'Never', the accountant will " +"get an error message if an analytic account is present." msgstr "" diff --git a/account_analytic_required/i18n/nl.po b/account_analytic_required/i18n/nl.po index ff2a81e30..0654705b4 100644 --- a/account_analytic_required/i18n/nl.po +++ b/account_analytic_required/i18n/nl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_analytic_required -# +# # Translators: # OCA Transbot , 2018 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2018-02-01 03:39+0000\n" "Last-Translator: OCA Transbot , 2018\n" "Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" +"Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: nl\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_analytic_required @@ -102,6 +102,6 @@ msgid "" "this type of account ; if you select 'Always', the accountant will get an " "error message if there is no analytic account ; if you select 'Posted " "moves', the accountant will get an error message if no analytic account is " -"defined when the move is posted ; if you select 'Never', the accountant will" -" get an error message if an analytic account is present." +"defined when the move is posted ; if you select 'Never', the accountant will " +"get an error message if an analytic account is present." msgstr "" diff --git a/account_analytic_required/i18n/pt_BR.po b/account_analytic_required/i18n/pt_BR.po index 27149191e..03ca2b940 100644 --- a/account_analytic_required/i18n/pt_BR.po +++ b/account_analytic_required/i18n/pt_BR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_analytic_required -# +# # Translators: # OCA Transbot , 2018 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2018-02-01 03:39+0000\n" "PO-Revision-Date: 2018-02-01 03:39+0000\n" "Last-Translator: OCA Transbot , 2018\n" -"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" +"teams/23907/pt_BR/)\n" +"Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: account_analytic_required @@ -45,8 +46,8 @@ msgid "" "Analytic policy is set to 'Always' with account %s '%s' but the analytic " "account is missing in the account move line with label '%s'." msgstr "" -"A política analítica é definida como \"Sempre\" com conta%s '%s' Mas a conta" -" analítica está faltando na linha de mudança de conta com o rótulo '%s'." +"A política analítica é definida como \"Sempre\" com conta%s '%s' Mas a conta " +"analítica está faltando na linha de mudança de conta com o rótulo '%s'." #. module: account_analytic_required #: code:addons/account_analytic_required/models/account.py:67 @@ -104,6 +105,6 @@ msgid "" "this type of account ; if you select 'Always', the accountant will get an " "error message if there is no analytic account ; if you select 'Posted " "moves', the accountant will get an error message if no analytic account is " -"defined when the move is posted ; if you select 'Never', the accountant will" -" get an error message if an analytic account is present." +"defined when the move is posted ; if you select 'Never', the accountant will " +"get an error message if an analytic account is present." msgstr "" From f2acfa071bcfcdea206b163759b291eda7ca8310 Mon Sep 17 00:00:00 2001 From: Rodrigo Macedo Date: Thu, 28 Jun 2018 13:59:25 +0000 Subject: [PATCH 28/69] =?UTF-8?q?Translated=20using=20Weblate=20(Portugu?= =?UTF-8?q?=C3=AAs=20(Brasil))?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 100,0% (14 of 14 strings) Translation: account-analytic-11.0/account-analytic-11.0-account_analytic_required Translate-URL: https://translation.odoo-community.org/projects/account-analytic-11-0/account-analytic-11-0-account_analytic_required/pt_BR/ --- account_analytic_required/i18n/pt_BR.po | 26 ++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/account_analytic_required/i18n/pt_BR.po b/account_analytic_required/i18n/pt_BR.po index 03ca2b940..5666d4abf 100644 --- a/account_analytic_required/i18n/pt_BR.po +++ b/account_analytic_required/i18n/pt_BR.po @@ -9,20 +9,21 @@ msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-02-01 03:39+0000\n" -"PO-Revision-Date: 2018-02-01 03:39+0000\n" -"Last-Translator: OCA Transbot , 2018\n" -"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" -"teams/23907/pt_BR/)\n" +"PO-Revision-Date: 2018-06-28 14:00+0000\n" +"Last-Translator: Rodrigo Macedo \n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/" +"23907/pt_BR/)\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.0.1\n" #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move msgid "Account Entry" -msgstr "" +msgstr "Entrada de conta" #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type @@ -66,6 +67,9 @@ msgid "" "Analytic policy is set to 'Posted moves' with account %s '%s' but the " "analytic account is missing in the account move line with label '%s'." msgstr "" +"A política analítica está definida como 'Movimentos Publicados' com a conta %" +"s '%s', mas a conta analítica está ausente na linha de movimentação da conta " +"com o rótulo '%s'." #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search @@ -95,7 +99,7 @@ msgstr "Política para conta analítica" #. module: account_analytic_required #: selection:account.account.type,analytic_policy:0 msgid "Posted moves" -msgstr "" +msgstr "Movimentos publicados" #. module: account_analytic_required #: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy @@ -108,3 +112,11 @@ msgid "" "defined when the move is posted ; if you select 'Never', the accountant will " "get an error message if an analytic account is present." msgstr "" +"Defina a política para contas analíticas: se você selecionar \"Opcional\", o " +"contador terá a liberdade de colocar uma conta analítica em uma linha de " +"movimentação de conta com esse tipo de conta; se você selecionar 'Sempre', o " +"contador receberá uma mensagem de erro se não houver uma conta analítica; se " +"você selecionar 'Movimentos Publicados', o contador receberá uma mensagem de " +"erro se nenhuma conta analítica for definida quando a movimentação for " +"lançada; se você selecionar \"Nunca\", o contador receberá uma mensagem de " +"erro se uma conta analítica estiver presente." From 3bd4cdb94b89a7b25ac30f2320ef6d42122033ae Mon Sep 17 00:00:00 2001 From: Osoul Date: Thu, 28 Jun 2018 04:41:40 +0000 Subject: [PATCH 29/69] Translated using Weblate (Arabic) Currently translated at 85.7% (12 of 14 strings) Translation: account-analytic-11.0/account-analytic-11.0-account_analytic_required Translate-URL: https://translation.odoo-community.org/projects/account-analytic-11-0/account-analytic-11-0-account_analytic_required/ar/ --- account_analytic_required/i18n/ar.po | 35 +++++++++++++++++++--------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/account_analytic_required/i18n/ar.po b/account_analytic_required/i18n/ar.po index 79215b306..9768794a0 100644 --- a/account_analytic_required/i18n/ar.po +++ b/account_analytic_required/i18n/ar.po @@ -9,20 +9,21 @@ msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-02-01 03:39+0000\n" -"PO-Revision-Date: 2018-02-01 03:39+0000\n" -"Last-Translator: OCA Transbot , 2018\n" +"PO-Revision-Date: 2018-09-20 17:01+0000\n" +"Last-Translator: yaseentai \n" "Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n" "Language: ar\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " -"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" +"&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n" +"X-Generator: Weblate 3.1.1\n" #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move msgid "Account Entry" -msgstr "" +msgstr "قيد الحساب" #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type @@ -32,12 +33,12 @@ msgstr "نوع الحساب" #. module: account_analytic_required #: selection:account.account.type,analytic_policy:0 msgid "Always" -msgstr "" +msgstr "دائماً" #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" -msgstr "" +msgstr "سياسة الحسابات التحليلية" #. module: account_analytic_required #: code:addons/account_analytic_required/models/account.py:59 @@ -46,6 +47,8 @@ msgid "" "Analytic policy is set to 'Always' with account %s '%s' but the analytic " "account is missing in the account move line with label '%s'." msgstr "" +"سياسة الحسابات التحليلية هي ’دائماً‘ للحساب %s ’%s‘ ولكن الحساب التحليلي " +"فارغ في عنصر اليومية باسم ’%s‘." #. module: account_analytic_required #: code:addons/account_analytic_required/models/account.py:67 @@ -54,6 +57,8 @@ msgid "" "Analytic policy is set to 'Never' with account %s '%s' but the account move " "line with label '%s' has an analytic account '%s'." msgstr "" +"سياسة الحسابات التحليلية هي ’ممنوع‘ للحساب %s ’%s‘ ولكن في عنصر اليومية باسم " +"’%s‘ تم تحديد حساب التحليلي ’%s‘ ." #. module: account_analytic_required #: code:addons/account_analytic_required/models/account.py:77 @@ -62,26 +67,28 @@ msgid "" "Analytic policy is set to 'Posted moves' with account %s '%s' but the " "analytic account is missing in the account move line with label '%s'." msgstr "" +"سياسة الحسابات التحليلية هي ’القيود المرحّلة‘ للحساب %s ’%s‘ ولكن الحساب " +"التحليلي فارغ في عنصر اليومية باسم ’%s‘." #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" -msgstr "" +msgstr "تجميع حسب" #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line msgid "Journal Item" -msgstr "" +msgstr "عنصر اليومية" #. module: account_analytic_required #: selection:account.account.type,analytic_policy:0 msgid "Never" -msgstr "" +msgstr "ممنوع" #. module: account_analytic_required #: selection:account.account.type,analytic_policy:0 msgid "Optional" -msgstr "" +msgstr "إختياري" #. module: account_analytic_required #: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy @@ -91,7 +98,7 @@ msgstr "سياسة للحسابات التحليلية" #. module: account_analytic_required #: selection:account.account.type,analytic_policy:0 msgid "Posted moves" -msgstr "" +msgstr "القيود المرحّلة" #. module: account_analytic_required #: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy @@ -104,3 +111,9 @@ msgid "" "defined when the move is posted ; if you select 'Never', the accountant will " "get an error message if an analytic account is present." msgstr "" +"قم بإختيار السياسات للحسابات التحليلية: اذا قم بإختيار \"إختياري\"، للمحاسب " +"الحرية في اختيار حساب التحليلي ام لا في حركة القيد المحسابي مع هذا النوع من " +"الحساب; و إن قمت بإختيار \"دائما\"، ستظهر للمحاسب رسالة خطأ ان كان لا يوجد " +"حساب تحليلي; و ان قمت بإختيار \"قيويد مرحلة\" ستظهر للمحاسب رسالة خطأ اذا لم " +"يحدد حساب تحليلي في ترحيل القيود; و إن اخترت \"ابداً\\نهائي\"، ستظهر للمحاسب " +"رسالة خطأ اذا تم تحديد حساب تحليلي." From 85e4bb6facbc61a4f0d5e807b8ba0c236bba13e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Lodeiros?= Date: Sat, 22 Sep 2018 12:24:09 +0000 Subject: [PATCH 30/69] Translated using Weblate (Spanish) Currently translated at 28.6% (4 of 14 strings) Translation: account-analytic-11.0/account-analytic-11.0-account_analytic_required Translate-URL: https://translation.odoo-community.org/projects/account-analytic-11-0/account-analytic-11-0-account_analytic_required/es/ --- account_analytic_required/i18n/es.po | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/account_analytic_required/i18n/es.po b/account_analytic_required/i18n/es.po index 917631f82..916387473 100644 --- a/account_analytic_required/i18n/es.po +++ b/account_analytic_required/i18n/es.po @@ -9,14 +9,15 @@ msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-02-01 03:39+0000\n" -"PO-Revision-Date: 2018-02-01 03:39+0000\n" -"Last-Translator: OCA Transbot , 2018\n" +"PO-Revision-Date: 2018-09-23 13:08+0000\n" +"Last-Translator: Darío Lodeiros \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.1.1\n" #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move @@ -31,7 +32,7 @@ msgstr "Tipo de cuenta" #. module: account_analytic_required #: selection:account.account.type,analytic_policy:0 msgid "Always" -msgstr "" +msgstr "Siempre" #. module: account_analytic_required #: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search From e650424c7f58a829946412a0123cd0cbe98f13e0 Mon Sep 17 00:00:00 2001 From: Raf Ven Date: Tue, 2 Oct 2018 10:21:49 +0200 Subject: [PATCH 31/69] [MIG] account_analytic_required: Migration to 12.0 --- account_analytic_required/README.rst | 82 ++-- account_analytic_required/__manifest__.py | 2 +- .../readme/CONFIGURE.rst | 6 + .../readme/CONTRIBUTORS.rst | 8 + .../readme/DESCRIPTION.rst | 2 + account_analytic_required/readme/USAGE.rst | 0 .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 436 ++++++++++++++++++ .../tests/test_account_analytic_required.py | 7 +- 9 files changed, 512 insertions(+), 31 deletions(-) create mode 100644 account_analytic_required/readme/CONFIGURE.rst create mode 100644 account_analytic_required/readme/CONTRIBUTORS.rst create mode 100644 account_analytic_required/readme/DESCRIPTION.rst create mode 100644 account_analytic_required/readme/USAGE.rst create mode 100644 account_analytic_required/static/description/icon.png create mode 100644 account_analytic_required/static/description/index.html diff --git a/account_analytic_required/README.rst b/account_analytic_required/README.rst index 25b5de718..bd6b31c13 100644 --- a/account_analytic_required/README.rst +++ b/account_analytic_required/README.rst @@ -1,43 +1,69 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License - ========================= Account Analytic Required ========================= +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github + :target: https://github.com/OCA/account-analytic/tree/12.0/account_analytic_required + :alt: OCA/account-analytic +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/account-analytic-12-0/account-analytic-12-0-account_analytic_required + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/87/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + This module adds an option *analytic policy* on account types. -You have the choice between 4 policies : *always*, *never*, *posted moves* and -*optional*. +You have the choice between 4 policies : *always*, *never*, *posted moves* and *optional*. + +**Table of contents** + +.. contents:: + :local: Configuration ============= -For example, if you want to have an analytic account on all your expenses, -set the policy to *always* for the account type *expense* ; then, if you -try to save an account move line with an account of type *expense* -without analytic account, you will get an error message. - -Usage -===== +Example: -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/87/11.0 +If you want to have an analytic account on all your *expenses*, +set the policy to *always* for the account type *expense* +If you try to save an account move line with an account of type *expense* +without analytic account, you will get an error message. Bug Tracker =========== -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed feedback. +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= +Authors +~~~~~~~ + +* Akretion + Contributors ------------- +~~~~~~~~~~~~ + * Alexis de Lattre * Stéphane Bidoul * Stefan Rijnhart @@ -45,17 +71,21 @@ Contributors * Luc De Meyer, Noviat * Yannick Vaucher * Akim Juillerat +* Raf Ven + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. -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 https://odoo-community.org. +This module is part of the `OCA/account-analytic `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_analytic_required/__manifest__.py b/account_analytic_required/__manifest__.py index acd5f3ed0..4a4c90669 100644 --- a/account_analytic_required/__manifest__.py +++ b/account_analytic_required/__manifest__.py @@ -3,7 +3,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) { 'name': 'Account Analytic Required', - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'category': 'Analytic Accounting', 'license': 'AGPL-3', 'author': "Akretion, Odoo Community Association (OCA)", diff --git a/account_analytic_required/readme/CONFIGURE.rst b/account_analytic_required/readme/CONFIGURE.rst new file mode 100644 index 000000000..3937a62f1 --- /dev/null +++ b/account_analytic_required/readme/CONFIGURE.rst @@ -0,0 +1,6 @@ +Example: + +If you want to have an analytic account on all your *expenses*, +set the policy to *always* for the account type *expense* +If you try to save an account move line with an account of type *expense* +without analytic account, you will get an error message. diff --git a/account_analytic_required/readme/CONTRIBUTORS.rst b/account_analytic_required/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..909a48ba8 --- /dev/null +++ b/account_analytic_required/readme/CONTRIBUTORS.rst @@ -0,0 +1,8 @@ +* Alexis de Lattre +* Stéphane Bidoul +* Stefan Rijnhart +* Laetitia Gangloff +* Luc De Meyer, Noviat +* Yannick Vaucher +* Akim Juillerat +* Raf Ven diff --git a/account_analytic_required/readme/DESCRIPTION.rst b/account_analytic_required/readme/DESCRIPTION.rst new file mode 100644 index 000000000..0f312f48f --- /dev/null +++ b/account_analytic_required/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module adds an option *analytic policy* on account types. +You have the choice between 4 policies : *always*, *never*, *posted moves* and *optional*. diff --git a/account_analytic_required/readme/USAGE.rst b/account_analytic_required/readme/USAGE.rst new file mode 100644 index 000000000..e69de29bb diff --git a/account_analytic_required/static/description/icon.png b/account_analytic_required/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2&DmGFW_9kP&%?X4}+xWi)( z;)z%wI5>D4a*5XwD)P--sPkoY(a~WBw;E~AW`Yue4kFa^LM3X`8x|}ZUeMnqr}>kH zG%WWW>3ml$Yez?i%)2pbKPI7?5o?hydokgQyZsNEr{a|mLdt;X2TX(#B1j35xPnPW z*bMSSOauW>o;*=kO8ojw91VX!qoOQb)zHJ!odWB}d+*K?#sY_jqPdg{Sm2HdYzdEx zOGVPhVRTGPtv0o}RfVP;Nd(|CB)I;*t&QO8h zFfekr30S!-LHmV_Su-W+rEwYXJ^;6&3|L$mMC8*bQptyOo9;>Qb9Q9`ySe3%V$A*9 zeKEe+b0{#KWGp$F+tga)0RtI)nhMa-K@JS}2krK~n8vJ=Ngm?R!9G<~RyuU0d?nz# z-5EK$o(!F?hmX*2Yt6+coY`6jGbb7tF#6nHA zuKk=GGJ;ZwON1iAfG$E#Y7MnZVmrY|j0eVI(DN_MNFJmyZ|;w4tf@=CCDZ#5N_0K= z$;R~bbk?}TpfDjfB&aiQ$VA}s?P}xPERJG{kxk5~R`iRS(SK5d+Xs9swCozZISbnS zk!)I0>t=A<-^z(cmSFz3=jZ23u13X><0b)P)^1T_))Kr`e!-pb#q&J*Q`p+B6la%C zuVl&0duN<;uOsB3%T9Fp8t{ED108<+W(nOZd?gDnfNBC3>M8WE61$So|P zVvqH0SNtDTcsUdzaMDpT=Ty0pDHHNL@Z0w$Y`XO z2M-_r1S+GaH%pz#Uy0*w$Vdl=X=rQXEzO}d6J^R6zjM1u&c9vYLvLp?W7w(?np9x1 zE_0JSAJCPB%i7p*Wvg)pn5T`8k3-uR?*NT|J`eS#_#54p>!p(mLDvmc-3o0mX*mp_ zN*AeS<>#^-{S%W<*mz^!X$w_2dHWpcJ6^j64qFBft-o}o_Vx80o0>}Du;>kLts;$8 zC`7q$QI(dKYG`Wa8#wl@V4jVWBRGQ@1dr-hstpQL)Tl+aqVpGpbSfN>5i&QMXfiZ> zaA?T1VGe?rpQ@;+pkrVdd{klI&jVS@I5_iz!=UMpTsa~mBga?1r}aRBm1WS;TT*s0f0lY=JBl66Upy)-k4J}lh=P^8(SXk~0xW=T9v*B|gzIhN z>qsO7dFd~mgxAy4V?&)=5ieYq?zi?ZEoj)&2o)RLy=@hbCRcfT5jigwtQGE{L*8<@Yd{zg;CsL5mvzfDY}P-wos_6PfprFVaeqNE%h zKZhLtcQld;ZD+>=nqN~>GvROfueSzJD&BE*}XfU|H&(FssBqY=hPCt`d zH?@s2>I(|;fcW&YM6#V#!kUIP8$Nkdh0A(bEVj``-AAyYgwY~jB zT|I7Bf@%;7aL7Wf4dZ%VqF$eiaC38OV6oy3Z#TER2G+fOCd9Iaoy6aLYbPTN{XRPz z;U!V|vBf%H!}52L2gH_+j;`bTcQRXB+y9onc^wLm5wi3-Be}U>k_u>2Eg$=k!(l@I zcCg+flakT2Nej3i0yn+g+}%NYb?ta;R?(g5SnwsQ49U8Wng8d|{B+lyRcEDvR3+`O{zfmrmvFrL6acVP%yG98X zo&+VBg@px@i)%o?dG(`T;n*$S5*rnyiR#=wW}}GsAcfyQpE|>a{=$Hjg=-*_K;UtD z#z-)AXwSRY?OPefw^iI+ z)AXz#PfEjlwTes|_{sB?4(O@fg0AJ^g8gP}ex9Ucf*@_^J(s_5jJV}c)s$`Myn|Kd z$6>}#q^n{4vN@+Os$m7KV+`}c%4)4pv@06af4-x5#wj!KKb%caK{A&Y#Rfs z-po?Dcb1({W=6FKIUirH&(yg=*6aLCekcKwyfK^JN5{wcA3nhO(o}SK#!CINhI`-I z1)6&n7O&ZmyFMuNwvEic#IiOAwNkR=u5it{B9n2sAJV5pNhar=j5`*N!Na;c7g!l$ z3aYBqUkqqTJ=Re-;)s!EOeij=7SQZ3Hq}ZRds%IM*PtM$wV z@;rlc*NRK7i3y5BETSKuumEN`Xu_8GP1Ri=OKQ$@I^ko8>H6)4rjiG5{VBM>B|%`&&s^)jS|-_95&yc=GqjNo{zFkw%%HHhS~e=s zD#sfS+-?*t|J!+ozP6KvtOl!R)@@-z24}`9{QaVLD^9VCSR2b`b!KC#o;Ki<+wXB6 zx3&O0LOWcg4&rv4QG0)4yb}7BFSEg~=IR5#ZRj8kg}dS7_V&^%#Do==#`u zpy6{ox?jWuR(;pg+f@mT>#HGWHAJRRDDDv~@(IDw&R>9643kK#HN`!1vBJHnC+RM&yIh8{gG2q zA%e*U3|N0XSRa~oX-3EAneep)@{h2vvd3Xvy$7og(sayr@95+e6~Xvi1tUqnIxoIH zVWo*OwYElb#uyW{Imam6f2rGbjR!Y3`#gPqkv57dB6K^wRGxc9B(t|aYDGS=m$&S!NmCtrMMaUg(c zc2qC=2Z`EEFMW-me5B)24AqF*bV5Dr-M5ig(l-WPS%CgaPzs6p_gnCIvTJ=Y<6!gT zVt@AfYCzjjsMEGi=rDQHo0yc;HqoRNnNFeWZgcm?f;cp(6CNylj36DoL(?TS7eU#+ z7&mfr#y))+CJOXQKUMZ7QIdS9@#-}7y2K1{8)cCt0~-X0O!O?Qx#E4Og+;A2SjalQ zs7r?qn0H044=sDN$SRG$arw~n=+T_DNdSrarmu)V6@|?1-ZB#hRn`uilTGPJ@fqEy zGt(f0B+^JDP&f=r{#Y_wi#AVDf-y!RIXU^0jXsFpf>=Ji*TeqSY!H~AMbJdCGLhC) zn7Rx+sXw6uYj;WRYrLd^5IZq@6JI1C^YkgnedZEYy<&4(z%Q$5yv#Boo{AH8n$a zhb4Y3PWdr269&?V%uI$xMcUrMzl=;w<_nm*qr=c3Rl@i5wWB;e-`t7D&c-mcQl7x! zZWB`UGcw=Y2=}~wzrfLx=uet<;m3~=8I~ZRuzvMQUQdr+yTV|ATf1Uuomr__nDf=X zZ3WYJtHp_ri(}SQAPjv+Y+0=fH4krOP@S&=zZ-t1jW1o@}z;xk8 z(Nz1co&El^HK^NrhVHa-_;&88vTU>_J33=%{if;BEY*J#1n59=07jrGQ#IP>@u#3A z;!q+E1Rj3ZJ+!4bq9F8PXJ@yMgZL;>&gYA0%_Kbi8?S=XGM~dnQZQ!yBSgcZhY96H zrWnU;k)qy`rX&&xlDyA%(a1Hhi5CWkmg(`Gb%m(HKi-7Z!LKGRP_B8@`7&hdDy5n= z`OIxqxiVfX@OX1p(mQu>0Ai*v_cTMiw4qRt3~NBvr9oBy0)r>w3p~V0SCm=An6@3n)>@z!|o-$HvDK z|3D2ZMJkLE5loMKl6R^ez@Zz%S$&mbeoqH5`Bb){Ei21q&VP)hWS2tjShfFtGE+$z zzCR$P#uktu+#!w)cX!lWN1XU%K-r=s{|j?)Akf@q#3b#{6cZCuJ~gCxuMXRmI$nGtnH+-h z+GEi!*X=AP<|fG`1>MBdTb?28JYc=fGvAi2I<$B(rs$;eoJCyR6_bc~p!XR@O-+sD z=eH`-ye})I5ic1eL~TDmtfJ|8`0VJ*Yr=hNCd)G1p2MMz4C3^Mj?7;!w|Ly%JqmuW zlIEW^Ft%z?*|fpXda>Jr^1noFZEwFgVV%|*XhH@acv8rdGxeEX{M$(vG{Zw+x(ei@ zmfXb22}8-?Fi`vo-YVrTH*C?a8%M=Hv9MqVH7H^J$KsD?>!SFZ;ZsvnHr_gn=7acz z#W?0eCdVhVMWN12VV^$>WlQ?f;P^{(&pYTops|btm6aj>_Uz+hqpGwB)vWp0Cf5y< zft8-je~nn?W11plq}N)4A{l8I7$!ks_x$PXW-2XaRFswX_BnF{R#6YIwMhAgd5F9X zGmwdadS6(a^fjHtXg8=l?Rc0Sm%hk6E9!5cLVloEy4eh(=FwgP`)~I^5~pBEWo+F6 zSf2ncyMurJN91#cJTy_u8Y}@%!bq1RkGC~-bV@SXRd4F{R-*V`bS+6;W5vZ(&+I<9$;-V|eNfLa5n-6% z2(}&uGRF;p92eS*sE*oR$@pexaqr*meB)VhmIg@h{uzkk$9~qh#cHhw#>O%)b@+(| z^IQgqzuj~Sk(J;swEM-3TrJAPCq9k^^^`q{IItKBRXYe}e0Tdr=Huf7da3$l4PdpwWDop%^}n;dD#K4s#DYA8SHZ z&1!riV4W4R7R#C))JH1~axJ)RYnM$$lIR%6fIVA@zV{XVyx}C+a-Dt8Y9M)^KU0+H zR4IUb2CJ{Hg>CuaXtD50jB(_Tcx=Z$^WYu2u5kubqmwp%drJ6 z?Fo40g!Qd<-l=TQxqHEOuPX0;^z7iX?Ke^a%XT<13TA^5`4Xcw6D@Ur&VT&CUe0d} z1GjOVF1^L@>O)l@?bD~$wzgf(nxX1OGD8fEV?TdJcZc2KoUe|oP1#=$$7ee|xbY)A zDZq+cuTpc(fFdj^=!;{k03C69lMQ(|>uhRfRu%+!k&YOi-3|1QKB z z?n?eq1XP>p-IM$Z^C;2L3itnbJZAip*Zo0aw2bs8@(s^~*8T9go!%dHcAz2lM;`yp zD=7&xjFV$S&5uDaiScyD?B-i1ze`+CoRtz`Wn+Zl&#s4&}MO{@N!ufrzjG$B79)Y2d3tBk&)TxUTw@QS0TEL_?njX|@vq?Uz(nBFK5Pq7*xj#u*R&i|?7+6# z+|r_n#SW&LXhtheZdah{ZVoqwyT{D>MC3nkFF#N)xLi{p7J1jXlmVeb;cP5?e(=f# zuT7fvjSbjS781v?7{)-X3*?>tq?)Yd)~|1{BDS(pqC zC}~H#WXlkUW*H5CDOo<)#x7%RY)A;ShGhI5s*#cRDA8YgqG(HeKDx+#(ZQ?386dv! zlXCO)w91~Vw4AmOcATuV653fa9R$fyK8ul%rG z-wfS zihugoZyr38Im?Zuh6@RcF~t1anQu7>#lPpb#}4cOA!EM11`%f*07RqOVkmX{p~KJ9 z^zP;K#|)$`^Rb{rnHGH{~>1(fawV0*Z#)}M`m8-?ZJV<+e}s9wE# z)l&az?w^5{)`S(%MRzxdNqrs1n*-=jS^_jqE*5XDrA0+VE`5^*p3CuM<&dZEeCjoz zR;uu_H9ZPZV|fQq`Cyw4nscrVwi!fE6ciMmX$!_hN7uF;jjKG)d2@aC4ropY)8etW=xJvni)8eHi`H$%#zn^WJ5NLc-rqk|u&&4Z6fD_m&JfSI1Bvb?b<*n&sfl0^t z=HnmRl`XrFvMKB%9}>PaA`m-fK6a0(8=qPkWS5bb4=v?XcWi&hRY?O5HdulRi4?fN zlsJ*N-0Qw+Yic@s0(2uy%F@ib;GjXt01Fmx5XbRo6+n|pP(&nodMoap^z{~q ziEeaUT@Mxe3vJSfI6?uLND(CNr=#^W<1b}jzW58bIfyWTDle$mmS(|x-0|2UlX+9k zQ^EX7Nw}?EzVoBfT(-LT|=9N@^hcn-_p&sqG z&*oVs2JSU+N4ZD`FhCAWaS;>|wH2G*Id|?pa#@>tyxX`+4HyIArWDvVrX)2WAOQff z0qyHu&-S@i^MS-+j--!pr4fPBj~_8({~e1bfcl0wI1kaoN>mJL6KUPQm5N7lB(ui1 zE-o%kq)&djzWJ}ob<-GfDlkB;F31j-VHKvQUGQ3sp`CwyGJk_i!y^sD0fqC@$9|jO zOqN!r!8-p==F@ZVP=U$qSpY(gQ0)59P1&t@y?5rvg<}E+GB}26NYPp4f2YFQrQtot5mn3wu_qprZ=>Ig-$ zbW26Ws~IgY>}^5w`vTB(G`PTZaDiGBo5o(tp)qli|NeV( z@H_=R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/account_analytic_required/static/description/index.html b/account_analytic_required/static/description/index.html new file mode 100644 index 000000000..ffaf31e34 --- /dev/null +++ b/account_analytic_required/static/description/index.html @@ -0,0 +1,436 @@ + + + + + + +Account Analytic Required + + + +
+

Account Analytic Required

+ + +

Beta License: AGPL-3 OCA/account-analytic Translate me on Weblate Try me on Runbot

+

This module adds an option analytic policy on account types. +You have the choice between 4 policies : always, never, posted moves and optional.

+

Table of contents

+ +
+

Configuration

+

Example:

+

If you want to have an analytic account on all your expenses, +set the policy to always for the account type expense +If you try to save an account move line with an account of type expense +without analytic account, you will get an error message.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Akretion
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

This module is part of the OCA/account-analytic project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/account_analytic_required/tests/test_account_analytic_required.py b/account_analytic_required/tests/test_account_analytic_required.py index b5cc8c845..e25e41236 100644 --- a/account_analytic_required/tests/test_account_analytic_required.py +++ b/account_analytic_required/tests/test_account_analytic_required.py @@ -12,26 +12,25 @@ class TestAccountAnalyticRequired(common.SavepointCase): def setUpClass(cls): super(TestAccountAnalyticRequired, cls).setUpClass() cls.account_obj = cls.env['account.account'] - cls.account_type_obj = cls.env['account.account.type'] cls.move_obj = cls.env['account.move'] cls.move_line_obj = cls.env['account.move.line'] cls.analytic_account_obj = cls.env['account.analytic.account'] cls.analytic_account = cls.analytic_account_obj.create( {'name': 'test aa'}) - cls.account_sales = cls.env['account.account'].create({ + cls.account_sales = cls.account_obj.create({ 'code': "X1020", 'name': "Product Sales - (test)", 'user_type_id': cls.env.ref( 'account.data_account_type_revenue').id }) - cls.account_recv = cls.env['account.account'].create({ + cls.account_recv = cls.account_obj.create({ 'code': "X11002", 'name': "Debtors - (test)", 'reconcile': True, 'user_type_id': cls.env.ref( 'account.data_account_type_receivable').id }) - cls.account_exp = cls.env['account.account'].create({ + cls.account_exp = cls.account_obj.create({ 'code': "X2110", 'name': "Expenses - (test)", 'user_type_id': cls.env.ref( From bf8779ea120efd7764e9600434c8d380cfb5f4f3 Mon Sep 17 00:00:00 2001 From: Raf Ven Date: Tue, 15 Jan 2019 16:16:05 +0100 Subject: [PATCH 32/69] [FIX] TypeError: post() got an unexpected keyword argument 'invoice' --- .../i18n/account_analytic_required.pot | 20 +++++------ account_analytic_required/i18n/ar.po | 27 ++++++++------- account_analytic_required/i18n/ca.po | 18 +++++----- account_analytic_required/i18n/de.po | 23 ++++++++----- account_analytic_required/i18n/es.po | 20 ++++++----- account_analytic_required/i18n/es_CO.po | 20 ++++++----- account_analytic_required/i18n/fr.po | 23 ++++++++----- account_analytic_required/i18n/hr_HR.po | 20 ++++++----- account_analytic_required/i18n/nl.po | 18 +++++----- account_analytic_required/i18n/pt_BR.po | 33 +++++++++++-------- account_analytic_required/models/account.py | 4 +-- 11 files changed, 126 insertions(+), 100 deletions(-) diff --git a/account_analytic_required/i18n/account_analytic_required.pot b/account_analytic_required/i18n/account_analytic_required.pot index 40ded4f54..d7142a0d3 100644 --- a/account_analytic_required/i18n/account_analytic_required.pot +++ b/account_analytic_required/i18n/account_analytic_required.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -13,11 +13,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move -msgid "Account Entry" -msgstr "" - #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" @@ -29,7 +24,7 @@ msgid "Always" msgstr "" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" msgstr "" @@ -52,10 +47,15 @@ msgid "Analytic policy is set to 'Posted moves' with account %s '%s' but the ana msgstr "" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" msgstr "" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +msgid "Journal Entries" +msgstr "" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line msgid "Journal Item" @@ -72,7 +72,7 @@ msgid "Optional" msgstr "" #. module: account_analytic_required -#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type__analytic_policy msgid "Policy for analytic account" msgstr "" @@ -82,7 +82,7 @@ msgid "Posted moves" msgstr "" #. module: account_analytic_required -#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type__analytic_policy msgid "Set the policy for analytic accounts : if you select 'Optional', the accountant is free to put an analytic account on an account move line with this type of account ; if you select 'Always', the accountant will get an error message if there is no analytic account ; if you select 'Posted moves', the accountant will get an error message if no analytic account is defined when the move is posted ; if you select 'Never', the accountant will get an error message if an analytic account is present." msgstr "" diff --git a/account_analytic_required/i18n/ar.po b/account_analytic_required/i18n/ar.po index 9768794a0..47b145bc0 100644 --- a/account_analytic_required/i18n/ar.po +++ b/account_analytic_required/i18n/ar.po @@ -20,11 +20,6 @@ msgstr "" "&& n%100<=10 ? 3 : n%100>=11 ? 4 : 5;\n" "X-Generator: Weblate 3.1.1\n" -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move -msgid "Account Entry" -msgstr "قيد الحساب" - #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" @@ -36,7 +31,7 @@ msgid "Always" msgstr "دائماً" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" msgstr "سياسة الحسابات التحليلية" @@ -47,8 +42,8 @@ msgid "" "Analytic policy is set to 'Always' with account %s '%s' but the analytic " "account is missing in the account move line with label '%s'." msgstr "" -"سياسة الحسابات التحليلية هي ’دائماً‘ للحساب %s ’%s‘ ولكن الحساب التحليلي " -"فارغ في عنصر اليومية باسم ’%s‘." +"سياسة الحسابات التحليلية هي ’دائماً‘ للحساب %s ’%s‘ ولكن الحساب التحليلي فارغ " +"في عنصر اليومية باسم ’%s‘." #. module: account_analytic_required #: code:addons/account_analytic_required/models/account.py:67 @@ -71,10 +66,17 @@ msgstr "" "التحليلي فارغ في عنصر اليومية باسم ’%s‘." #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" msgstr "تجميع حسب" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +#, fuzzy +#| msgid "Journal Item" +msgid "Journal Entries" +msgstr "عنصر اليومية" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line msgid "Journal Item" @@ -91,7 +93,7 @@ msgid "Optional" msgstr "إختياري" #. module: account_analytic_required -#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type__analytic_policy msgid "Policy for analytic account" msgstr "سياسة للحسابات التحليلية" @@ -101,7 +103,7 @@ msgid "Posted moves" msgstr "القيود المرحّلة" #. module: account_analytic_required -#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type__analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " @@ -117,3 +119,6 @@ msgstr "" "حساب تحليلي; و ان قمت بإختيار \"قيويد مرحلة\" ستظهر للمحاسب رسالة خطأ اذا لم " "يحدد حساب تحليلي في ترحيل القيود; و إن اخترت \"ابداً\\نهائي\"، ستظهر للمحاسب " "رسالة خطأ اذا تم تحديد حساب تحليلي." + +#~ msgid "Account Entry" +#~ msgstr "قيد الحساب" diff --git a/account_analytic_required/i18n/ca.po b/account_analytic_required/i18n/ca.po index a53150890..b09fab0eb 100644 --- a/account_analytic_required/i18n/ca.po +++ b/account_analytic_required/i18n/ca.po @@ -18,11 +18,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move -msgid "Account Entry" -msgstr "" - #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" @@ -34,7 +29,7 @@ msgid "Always" msgstr "" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" msgstr "" @@ -63,10 +58,15 @@ msgid "" msgstr "" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" msgstr "" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +msgid "Journal Entries" +msgstr "" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line msgid "Journal Item" @@ -83,7 +83,7 @@ msgid "Optional" msgstr "" #. module: account_analytic_required -#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type__analytic_policy msgid "Policy for analytic account" msgstr "Política per als comptes analítics" @@ -93,7 +93,7 @@ msgid "Posted moves" msgstr "" #. module: account_analytic_required -#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type__analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " diff --git a/account_analytic_required/i18n/de.po b/account_analytic_required/i18n/de.po index b59b31b76..af95316fc 100644 --- a/account_analytic_required/i18n/de.po +++ b/account_analytic_required/i18n/de.po @@ -18,11 +18,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move -msgid "Account Entry" -msgstr "Kontoeintrag" - #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" @@ -34,7 +29,7 @@ msgid "Always" msgstr "Immer" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" msgstr "Analytische Richtlinie" @@ -72,10 +67,17 @@ msgstr "" "Label ' %s'." #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" msgstr "Gruppe Von" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +#, fuzzy +#| msgid "Journal Item" +msgid "Journal Entries" +msgstr "Tageseintrag" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line msgid "Journal Item" @@ -92,7 +94,7 @@ msgid "Optional" msgstr "Wahlweise" #. module: account_analytic_required -#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type__analytic_policy msgid "Policy for analytic account" msgstr "Richtlinie für analytisches Konto" @@ -102,7 +104,7 @@ msgid "Posted moves" msgstr "Buchungen" #. module: account_analytic_required -#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type__analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " @@ -120,3 +122,6 @@ msgstr "" "Buchhalter eine Fehlermeldung, wenn bei der Buchung kein analytisches Konto " "definiert wurde. Wenn Sie \"Nie\" auswählen, erhält der Buchhalter eine " "Fehlermeldung, wenn ein analytisches Konto vorhanden ist." + +#~ msgid "Account Entry" +#~ msgstr "Kontoeintrag" diff --git a/account_analytic_required/i18n/es.po b/account_analytic_required/i18n/es.po index 916387473..af75a85af 100644 --- a/account_analytic_required/i18n/es.po +++ b/account_analytic_required/i18n/es.po @@ -19,11 +19,6 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 3.1.1\n" -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move -msgid "Account Entry" -msgstr "" - #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" @@ -35,7 +30,7 @@ msgid "Always" msgstr "Siempre" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" msgstr "" @@ -64,10 +59,17 @@ msgid "" msgstr "" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" msgstr "" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +#, fuzzy +#| msgid "Journal Item" +msgid "Journal Entries" +msgstr "Apunte contable" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line msgid "Journal Item" @@ -84,7 +86,7 @@ msgid "Optional" msgstr "" #. module: account_analytic_required -#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type__analytic_policy msgid "Policy for analytic account" msgstr "Política para las cuentas analíticas" @@ -94,7 +96,7 @@ msgid "Posted moves" msgstr "" #. module: account_analytic_required -#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type__analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " diff --git a/account_analytic_required/i18n/es_CO.po b/account_analytic_required/i18n/es_CO.po index 59edc6133..47bfa7374 100644 --- a/account_analytic_required/i18n/es_CO.po +++ b/account_analytic_required/i18n/es_CO.po @@ -20,11 +20,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move -msgid "Account Entry" -msgstr "" - #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" @@ -36,7 +31,7 @@ msgid "Always" msgstr "Siempre" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" msgstr "" @@ -65,10 +60,17 @@ msgid "" msgstr "" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" msgstr "" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +#, fuzzy +#| msgid "Journal Item" +msgid "Journal Entries" +msgstr "Elemento del Libro" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line msgid "Journal Item" @@ -85,7 +87,7 @@ msgid "Optional" msgstr "" #. module: account_analytic_required -#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type__analytic_policy msgid "Policy for analytic account" msgstr "" @@ -95,7 +97,7 @@ msgid "Posted moves" msgstr "" #. module: account_analytic_required -#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type__analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " diff --git a/account_analytic_required/i18n/fr.po b/account_analytic_required/i18n/fr.po index b1e7bb226..2e0357168 100644 --- a/account_analytic_required/i18n/fr.po +++ b/account_analytic_required/i18n/fr.po @@ -20,11 +20,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move -msgid "Account Entry" -msgstr "Ecriture comptable" - #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" @@ -36,7 +31,7 @@ msgid "Always" msgstr "Toujours" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" msgstr "Stratégie analytique" @@ -72,10 +67,17 @@ msgstr "" "'%s'." #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" msgstr "Grouper par" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +#, fuzzy +#| msgid "Journal Item" +msgid "Journal Entries" +msgstr "Écriture du journal" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line msgid "Journal Item" @@ -92,7 +94,7 @@ msgid "Optional" msgstr "Facultatif" #. module: account_analytic_required -#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type__analytic_policy msgid "Policy for analytic account" msgstr "Politique pour les comptes analytiques" @@ -102,7 +104,7 @@ msgid "Posted moves" msgstr "Ecritures comptabilisées" #. module: account_analytic_required -#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type__analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " @@ -120,3 +122,6 @@ msgstr "" "recevra un message d'erreur si aucun compte analytique n'est défini lors de " "la comptabilisation de l'écriture; si vous sélectionnez \"Jamais\", le " "comptable recevra un message d'erreur si un compte analytique est présent." + +#~ msgid "Account Entry" +#~ msgstr "Ecriture comptable" diff --git a/account_analytic_required/i18n/hr_HR.po b/account_analytic_required/i18n/hr_HR.po index 2f07673c6..11e63e273 100644 --- a/account_analytic_required/i18n/hr_HR.po +++ b/account_analytic_required/i18n/hr_HR.po @@ -20,11 +20,6 @@ msgstr "" "Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move -msgid "Account Entry" -msgstr "" - #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" @@ -36,7 +31,7 @@ msgid "Always" msgstr "Uvijek" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" msgstr "Analitička pravila" @@ -69,10 +64,17 @@ msgid "" msgstr "" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" msgstr "Grupiraj po" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +#, fuzzy +#| msgid "Journal Item" +msgid "Journal Entries" +msgstr "Stavka dnevnika" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line msgid "Journal Item" @@ -89,7 +91,7 @@ msgid "Optional" msgstr "Opcionalno" #. module: account_analytic_required -#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type__analytic_policy msgid "Policy for analytic account" msgstr "Pravila za analitička konta" @@ -99,7 +101,7 @@ msgid "Posted moves" msgstr "" #. module: account_analytic_required -#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type__analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " diff --git a/account_analytic_required/i18n/nl.po b/account_analytic_required/i18n/nl.po index 0654705b4..408656bf8 100644 --- a/account_analytic_required/i18n/nl.po +++ b/account_analytic_required/i18n/nl.po @@ -18,11 +18,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move -msgid "Account Entry" -msgstr "" - #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" @@ -34,7 +29,7 @@ msgid "Always" msgstr "" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" msgstr "" @@ -65,10 +60,15 @@ msgid "" msgstr "" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" msgstr "" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +msgid "Journal Entries" +msgstr "" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line msgid "Journal Item" @@ -85,7 +85,7 @@ msgid "Optional" msgstr "" #. module: account_analytic_required -#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type__analytic_policy msgid "Policy for analytic account" msgstr "Kostenplaatsenbeleid" @@ -95,7 +95,7 @@ msgid "Posted moves" msgstr "" #. module: account_analytic_required -#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type__analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " diff --git a/account_analytic_required/i18n/pt_BR.po b/account_analytic_required/i18n/pt_BR.po index 5666d4abf..971560b89 100644 --- a/account_analytic_required/i18n/pt_BR.po +++ b/account_analytic_required/i18n/pt_BR.po @@ -11,8 +11,8 @@ msgstr "" "POT-Creation-Date: 2018-02-01 03:39+0000\n" "PO-Revision-Date: 2018-06-28 14:00+0000\n" "Last-Translator: Rodrigo Macedo \n" -"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/" -"23907/pt_BR/)\n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" +"teams/23907/pt_BR/)\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,11 +20,6 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 3.0.1\n" -#. module: account_analytic_required -#: model:ir.model,name:account_analytic_required.model_account_move -msgid "Account Entry" -msgstr "Entrada de conta" - #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type msgid "Account Type" @@ -36,7 +31,7 @@ msgid "Always" msgstr "Sempre" #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" msgstr "Política Analítica" @@ -67,15 +62,22 @@ msgid "" "Analytic policy is set to 'Posted moves' with account %s '%s' but the " "analytic account is missing in the account move line with label '%s'." msgstr "" -"A política analítica está definida como 'Movimentos Publicados' com a conta %" -"s '%s', mas a conta analítica está ausente na linha de movimentação da conta " -"com o rótulo '%s'." +"A política analítica está definida como 'Movimentos Publicados' com a conta " +"%s '%s', mas a conta analítica está ausente na linha de movimentação da " +"conta com o rótulo '%s'." #. module: account_analytic_required -#: model:ir.ui.view,arch_db:account_analytic_required.view_account_type_search +#: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" msgstr "Agrupar por" +#. module: account_analytic_required +#: model:ir.model,name:account_analytic_required.model_account_move +#, fuzzy +#| msgid "Journal Item" +msgid "Journal Entries" +msgstr "Item diário" + #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line msgid "Journal Item" @@ -92,7 +94,7 @@ msgid "Optional" msgstr "Opcional" #. module: account_analytic_required -#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type__analytic_policy msgid "Policy for analytic account" msgstr "Política para conta analítica" @@ -102,7 +104,7 @@ msgid "Posted moves" msgstr "Movimentos publicados" #. module: account_analytic_required -#: model:ir.model.fields,help:account_analytic_required.field_account_account_type_analytic_policy +#: model:ir.model.fields,help:account_analytic_required.field_account_account_type__analytic_policy msgid "" "Set the policy for analytic accounts : if you select 'Optional', the " "accountant is free to put an analytic account on an account move line with " @@ -120,3 +122,6 @@ msgstr "" "erro se nenhuma conta analítica for definida quando a movimentação for " "lançada; se você selecionar \"Nunca\", o contador receberá uma mensagem de " "erro se uma conta analítica estiver presente." + +#~ msgid "Account Entry" +#~ msgstr "Entrada de conta" diff --git a/account_analytic_required/models/account.py b/account_analytic_required/models/account.py index 280b3108f..8dd826a08 100644 --- a/account_analytic_required/models/account.py +++ b/account_analytic_required/models/account.py @@ -32,8 +32,8 @@ class AccountMove(models.Model): _inherit = "account.move" @api.multi - def post(self): - res = super(AccountMove, self).post() + def post(self, *args, **kwargs): + res = super(AccountMove, self).post(*args, **kwargs) self.mapped('line_ids')._check_analytic_required() return res From bf5612057035c4e0b278637c403f0cbea1b1796c Mon Sep 17 00:00:00 2001 From: Josep M Date: Mon, 22 Jul 2019 17:46:42 +0000 Subject: [PATCH 33/69] Translated using Weblate (Spanish) Currently translated at 100.0% (14 of 14 strings) Translation: account-analytic-12.0/account-analytic-12.0-account_analytic_required Translate-URL: https://translation.odoo-community.org/projects/account-analytic-12-0/account-analytic-12-0-account_analytic_required/es/ --- account_analytic_required/i18n/es.po | 39 +++++++++++++++++++--------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/account_analytic_required/i18n/es.po b/account_analytic_required/i18n/es.po index af75a85af..6b9c1d65a 100644 --- a/account_analytic_required/i18n/es.po +++ b/account_analytic_required/i18n/es.po @@ -9,15 +9,15 @@ msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-02-01 03:39+0000\n" -"PO-Revision-Date: 2018-09-23 13:08+0000\n" -"Last-Translator: Darío Lodeiros \n" +"PO-Revision-Date: 2019-07-22 19:43+0000\n" +"Last-Translator: Josep M \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.1.1\n" +"X-Generator: Weblate 3.7.1\n" #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_account_type @@ -32,7 +32,7 @@ msgstr "Siempre" #. module: account_analytic_required #: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Analytic Policy" -msgstr "" +msgstr "Política Analítica" #. module: account_analytic_required #: code:addons/account_analytic_required/models/account.py:59 @@ -41,6 +41,9 @@ msgid "" "Analytic policy is set to 'Always' with account %s '%s' but the analytic " "account is missing in the account move line with label '%s'." msgstr "" +"La política analítica está configurada como \"Siempre\" para la cuenta %s '%" +"s' pero falta la cuenta análitica en la línea de movimiento de la cuenta con " +"la etiqueta '%s'." #. module: account_analytic_required #: code:addons/account_analytic_required/models/account.py:67 @@ -49,6 +52,9 @@ msgid "" "Analytic policy is set to 'Never' with account %s '%s' but the account move " "line with label '%s' has an analytic account '%s'." msgstr "" +"La política analítica está configurada como \"Nunca\" para la cuenta %s '%s' " +"pero la línea de movimiento de la cuenta con la etiqueta '%s' tiene una " +"cuenta analítica '%s'." #. module: account_analytic_required #: code:addons/account_analytic_required/models/account.py:77 @@ -57,18 +63,19 @@ msgid "" "Analytic policy is set to 'Posted moves' with account %s '%s' but the " "analytic account is missing in the account move line with label '%s'." msgstr "" +"La política analítica está configurada como \"Movimientos publicados\" para " +"la cuenta %s '%s' pero falta la cuenta análitica en la línea de movimiento " +"de la cuenta con la etiqueta '%s'." #. module: account_analytic_required #: model_terms:ir.ui.view,arch_db:account_analytic_required.view_account_type_search msgid "Group By" -msgstr "" +msgstr "Agrupar por" #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move -#, fuzzy -#| msgid "Journal Item" msgid "Journal Entries" -msgstr "Apunte contable" +msgstr "Apuntes contables" #. module: account_analytic_required #: model:ir.model,name:account_analytic_required.model_account_move_line @@ -78,22 +85,22 @@ msgstr "Apunte contable" #. module: account_analytic_required #: selection:account.account.type,analytic_policy:0 msgid "Never" -msgstr "" +msgstr "Nunca" #. module: account_analytic_required #: selection:account.account.type,analytic_policy:0 msgid "Optional" -msgstr "" +msgstr "Opcional" #. module: account_analytic_required #: model:ir.model.fields,field_description:account_analytic_required.field_account_account_type__analytic_policy msgid "Policy for analytic account" -msgstr "Política para las cuentas analíticas" +msgstr "Política para la cuenta analítica" #. module: account_analytic_required #: selection:account.account.type,analytic_policy:0 msgid "Posted moves" -msgstr "" +msgstr "Movimientos públicados" #. module: account_analytic_required #: model:ir.model.fields,help:account_analytic_required.field_account_account_type__analytic_policy @@ -106,3 +113,11 @@ msgid "" "defined when the move is posted ; if you select 'Never', the accountant will " "get an error message if an analytic account is present." msgstr "" +"Establezca la política para las cuentas analíticas: si selecciona " +"'Opcional', el contable es libre de poner una cuenta analítica en una línea " +"de movimiento de una cuenta con este tipo de cuenta; si selecciona " +"'Siempre', el contable recibirá un mensaje de error si no hay una cuenta " +"analítica; si selecciona 'Movimientos publicados', el contable recibirá un " +"mensaje de error si no se define una cuenta analítica cuando se publica el " +"movimiento; si selecciona 'Nunca', el contable recibirá un mensaje de error " +"si hay una cuenta analítica presente." From 9a9ac25d421713b7e16b301a4a475c310a75a42b Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 29 Jul 2019 02:31:47 +0000 Subject: [PATCH 34/69] [UPD] README.rst --- account_analytic_required/static/description/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_analytic_required/static/description/index.html b/account_analytic_required/static/description/index.html index ffaf31e34..13df94128 100644 --- a/account_analytic_required/static/description/index.html +++ b/account_analytic_required/static/description/index.html @@ -3,7 +3,7 @@ - + Account Analytic Required