From 4eb3bdbb5caa2045e1363d0f1c49bd3d9d6af6de Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 17 Oct 2014 15:13:00 +0200 Subject: [PATCH] Add module account_fiscal_position_translate --- account_fiscal_position_translate/__init__.py | 23 ++++++++++ .../__openerp__.py | 43 +++++++++++++++++++ account_fiscal_position_translate/account.py | 32 ++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 account_fiscal_position_translate/__init__.py create mode 100644 account_fiscal_position_translate/__openerp__.py create mode 100644 account_fiscal_position_translate/account.py diff --git a/account_fiscal_position_translate/__init__.py b/account_fiscal_position_translate/__init__.py new file mode 100644 index 0000000..c930e87 --- /dev/null +++ b/account_fiscal_position_translate/__init__.py @@ -0,0 +1,23 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account Fiscal Position Translate module for OpenERP +# Copyright (C) 2014 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 . +# +############################################################################## + +from . import account diff --git a/account_fiscal_position_translate/__openerp__.py b/account_fiscal_position_translate/__openerp__.py new file mode 100644 index 0000000..c56079a --- /dev/null +++ b/account_fiscal_position_translate/__openerp__.py @@ -0,0 +1,43 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account Fiscal Position Translate module for OpenERP +# Copyright (C) 2014 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 Fiscal Position Translate', + 'version': '0.1', + 'category': 'Accounting & Finance', + 'license': 'AGPL-3', + 'summary': 'Make the Notes field on fiscal position translatable', + 'description': """ +Account Fiscal Position Translate +================================= + +Makes the Notes field on the fiscal position translatable (it was native on 7.0, but it is not on 8.0). + +Please contact Alexis de Lattre from Akretion for any help or question about this module. + """, + 'author': 'Akretion', + 'website': 'http://www.akretion.com', + 'depends': ['account'], + 'data': [], + 'installable': True, +} diff --git a/account_fiscal_position_translate/account.py b/account_fiscal_position_translate/account.py new file mode 100644 index 0000000..1724e5c --- /dev/null +++ b/account_fiscal_position_translate/account.py @@ -0,0 +1,32 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Account Fiscal Position Translate module for OpenERP +# Copyright (C) 2014 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 . +# +############################################################################## + +from openerp.osv import orm, fields + + +class account_fiscal_position(orm.Model): + _inherit = 'account.fiscal.position' + + _columns = { + # add translate=True + 'note': fields.text('Notes', translate=True), + }