From 4e070263cfc5a2c8ed37740bffabc2f927556546 Mon Sep 17 00:00:00 2001 From: Akim Juillerat Date: Wed, 24 May 2017 13:35:32 +0200 Subject: [PATCH] [MIG] account_credit_control_dunning_fees: Migration to 10.0 --- .../README.rst | 76 ++++++++++++++++--- .../__init__.py | 20 ----- .../__manifest__.py | 30 ++------ .../model/__init__.py | 20 ----- .../model/dunning.py | 23 +----- .../model/line.py | 23 +----- .../model/policy.py | 23 +----- .../model/run.py | 23 +----- .../report/report_credit_control_summary.xml | 38 +++++----- .../tests/__init__.py | 20 ----- .../tests/test_fees_generation.py | 23 +----- .../view/line_view.xml | 47 ++++++------ .../view/policy_view.xml | 36 +++++---- .../wizard/__init__.py | 22 ------ .../wizard/credit_control_communication.py | 25 +----- 15 files changed, 147 insertions(+), 302 deletions(-) diff --git a/account_credit_control_dunning_fees/README.rst b/account_credit_control_dunning_fees/README.rst index cf5866f0b..ae9171b00 100644 --- a/account_credit_control_dunning_fees/README.rst +++ b/account_credit_control_dunning_fees/README.rst @@ -1,12 +1,21 @@ -Dunning Fees for Credit Control -=============================== +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 -This extention of credit control adds the notion of dunning fees -on credit control lines. +=========================== +Credit control dunning fees +=========================== + +This module extends the functionality of account_credit_control to add +the notion of dunning fees on credit control lines. + +Installation +============ + +Just install it. Configuration -------------- -For release 0.1 only fixed fees are supported. +============= You can specifiy a fixed fees amount, a product and a currency on the credit control level form. @@ -18,13 +27,60 @@ the credit control line currency. The product is used to compute taxes in reconciliation process. -Run ---- +.. figure:: path/to/local/image.png + :alt: alternative description + :width: 600 px + +Usage +===== + Fees are automatically computed on credit run and saved on the generated credit lines. Fees can be manually edited as long credit line is draft -Credit control Summary report includes a new fees column --------------------------------------------------------- +Credit control Summary report includes a new fees column: Support of fees price list + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/92/10.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 smash it by providing detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Nicolas Bessi (Camptocamp) +* Guewen Baconnier +* Adrien Peiffer (acsone) +* Akim Juillerat + +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_credit_control_dunning_fees/__init__.py b/account_credit_control_dunning_fees/__init__.py index a485290c7..b60c2d2e6 100644 --- a/account_credit_control_dunning_fees/__init__.py +++ b/account_credit_control_dunning_fees/__init__.py @@ -1,22 +1,2 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Author: Nicolas Bessi -# Copyright 2014 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## from . import model from . import wizard diff --git a/account_credit_control_dunning_fees/__manifest__.py b/account_credit_control_dunning_fees/__manifest__.py index 6f0543e18..cf1c289ba 100644 --- a/account_credit_control_dunning_fees/__manifest__.py +++ b/account_credit_control_dunning_fees/__manifest__.py @@ -1,26 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Author: Nicolas Bessi -# Copyright 2014 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## {'name': 'Credit control dunning fees', - 'version': '8.0.0.1.0', - 'author': "Camptocamp,Odoo Community Association (OCA)", + 'version': '10.0.1.0.0', + 'author': "Camptocamp, Odoo Community Association (OCA)", 'maintainer': 'Camptocamp', 'category': 'Accounting', 'complexity': 'normal', @@ -31,9 +12,8 @@ 'report/report_credit_control_summary.xml', 'security/ir.model.access.csv', ], - 'demo': [], - 'test': [], - 'installable': False, + 'installable': True, 'auto_install': False, 'license': 'AGPL-3', - 'application': False} + 'application': False + } diff --git a/account_credit_control_dunning_fees/model/__init__.py b/account_credit_control_dunning_fees/model/__init__.py index c9a69427a..8e647e965 100644 --- a/account_credit_control_dunning_fees/model/__init__.py +++ b/account_credit_control_dunning_fees/model/__init__.py @@ -1,23 +1,3 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Author: Nicolas Bessi -# Copyright 2014 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## from . import line from . import policy from . import run diff --git a/account_credit_control_dunning_fees/model/dunning.py b/account_credit_control_dunning_fees/model/dunning.py index 949ae2d83..02edbc632 100644 --- a/account_credit_control_dunning_fees/model/dunning.py +++ b/account_credit_control_dunning_fees/model/dunning.py @@ -1,24 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Author: Nicolas Bessi -# Copyright 2014 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -from openerp import models, api +# Copyright 2014-2017 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import models, api class FeesComputer(models.BaseModel): diff --git a/account_credit_control_dunning_fees/model/line.py b/account_credit_control_dunning_fees/model/line.py index 23803ebac..aa2a0f52c 100644 --- a/account_credit_control_dunning_fees/model/line.py +++ b/account_credit_control_dunning_fees/model/line.py @@ -1,24 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Author: Nicolas Bessi -# Copyright 2014 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -from openerp import models, fields, api +# Copyright 2014-2017 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import models, fields, api class CreditControlLine(models.Model): diff --git a/account_credit_control_dunning_fees/model/policy.py b/account_credit_control_dunning_fees/model/policy.py index d85c0c16a..03bf64fb0 100644 --- a/account_credit_control_dunning_fees/model/policy.py +++ b/account_credit_control_dunning_fees/model/policy.py @@ -1,24 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Author: Nicolas Bessi -# Copyright 2014 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -from openerp import models, fields +# Copyright 2014-2017 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import models, fields class CreditControlPolicy(models.Model): diff --git a/account_credit_control_dunning_fees/model/run.py b/account_credit_control_dunning_fees/model/run.py index f1d9eb49d..28ea3c23a 100644 --- a/account_credit_control_dunning_fees/model/run.py +++ b/account_credit_control_dunning_fees/model/run.py @@ -1,24 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Author: Nicolas Bessi -# Copyright 2014 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -from openerp import models, api +# Copyright 2014-2017 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import models, api class CreditControlRun(models.Model): diff --git a/account_credit_control_dunning_fees/report/report_credit_control_summary.xml b/account_credit_control_dunning_fees/report/report_credit_control_summary.xml index e58ad2d9b..e4b99b39b 100644 --- a/account_credit_control_dunning_fees/report/report_credit_control_summary.xml +++ b/account_credit_control_dunning_fees/report/report_credit_control_summary.xml @@ -1,22 +1,20 @@ - - - + + - - + diff --git a/account_credit_control_dunning_fees/tests/__init__.py b/account_credit_control_dunning_fees/tests/__init__.py index 2d29024d5..62c86b3f6 100644 --- a/account_credit_control_dunning_fees/tests/__init__.py +++ b/account_credit_control_dunning_fees/tests/__init__.py @@ -1,21 +1 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Author: Nicolas Bessi -# Copyright 2014 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## from . import test_fees_generation diff --git a/account_credit_control_dunning_fees/tests/test_fees_generation.py b/account_credit_control_dunning_fees/tests/test_fees_generation.py index 924451409..0a608c63d 100644 --- a/account_credit_control_dunning_fees/tests/test_fees_generation.py +++ b/account_credit_control_dunning_fees/tests/test_fees_generation.py @@ -1,24 +1,7 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Author: Nicolas Bessi -# Copyright 2014 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -from openerp.tests import common +# Copyright 2014-2017 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo.tests import common class FixedFeesTester(common.TransactionCase): diff --git a/account_credit_control_dunning_fees/view/line_view.xml b/account_credit_control_dunning_fees/view/line_view.xml index 9d4688bd5..9fa46e638 100644 --- a/account_credit_control_dunning_fees/view/line_view.xml +++ b/account_credit_control_dunning_fees/view/line_view.xml @@ -1,30 +1,29 @@ - - + - - add fees on credit control line - credit.control.line - - - - - + + add fees on credit control line + credit.control.line + + + + - + + - - add fees on credit control line form - credit.control.line - - - - - + + add fees on credit control line form + credit.control.line + + + + - + + - - + + diff --git a/account_credit_control_dunning_fees/view/policy_view.xml b/account_credit_control_dunning_fees/view/policy_view.xml index 968b51fa4..5c52ec569 100644 --- a/account_credit_control_dunning_fees/view/policy_view.xml +++ b/account_credit_control_dunning_fees/view/policy_view.xml @@ -1,24 +1,22 @@ - - - - add dunning fees on policy - credit.control.policy - - - - + + + add dunning fees on policy + credit.control.policy + + + + + - - - - - + + + - + - - + + + - - + diff --git a/account_credit_control_dunning_fees/wizard/__init__.py b/account_credit_control_dunning_fees/wizard/__init__.py index b400e6315..99ac21a05 100644 --- a/account_credit_control_dunning_fees/wizard/__init__.py +++ b/account_credit_control_dunning_fees/wizard/__init__.py @@ -1,23 +1 @@ -# -*- coding: utf-8 -*- -# -############################################################################## -# -# Authors: Adrien Peiffer -# Copyright (c) 2015 Acsone SA/NV (http://www.acsone.eu) -# -# 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 credit_control_communication diff --git a/account_credit_control_dunning_fees/wizard/credit_control_communication.py b/account_credit_control_dunning_fees/wizard/credit_control_communication.py index 99669b612..ba1285688 100644 --- a/account_credit_control_dunning_fees/wizard/credit_control_communication.py +++ b/account_credit_control_dunning_fees/wizard/credit_control_communication.py @@ -1,26 +1,7 @@ # -*- coding: utf-8 -*- -# -############################################################################## -# -# Authors: Adrien Peiffer -# Copyright (c) 2015 Acsone SA/NV (http://www.acsone.eu) -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from openerp import models, api +# Copyright 2014-2017 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import models, api class CreditCommunication(models.TransientModel):