[MIG] account_credit_control_dunning_fees: Migration to 10.0

This commit is contained in:
Akim Juillerat
2017-05-24 13:35:32 +02:00
parent debfc1945b
commit 4e070263cf
15 changed files with 147 additions and 302 deletions

View File

@@ -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
<https://github.com/OCA/account-financial-tools/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 <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
Contributors
------------
* Nicolas Bessi (Camptocamp)
* Guewen Baconnier <guewen.baconnier@camptocamp.com>
* Adrien Peiffer (acsone)
* Akim Juillerat <akim.juillerat@camptocamp.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit https://odoo-community.org.

View File

@@ -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 <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import model
from . import wizard

View File

@@ -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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{'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
}

View File

@@ -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 <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import line
from . import policy
from . import run

View File

@@ -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 <http://www.gnu.org/licenses/>.
#
##############################################################################
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):

View File

@@ -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 <http://www.gnu.org/licenses/>.
#
##############################################################################
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):

View File

@@ -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 <http://www.gnu.org/licenses/>.
#
##############################################################################
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):

View File

@@ -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 <http://www.gnu.org/licenses/>.
#
##############################################################################
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):

View File

@@ -1,22 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="report_credit_control_summary_document_fees"
inherit_id="account_credit_control.report_credit_control_summary_document">
<xpath expr="//table[@id='summary_table']/thead/tr/th[last()]" position="before">
<th class="text-right">Fees</th>
</xpath>
<xpath expr="//table[@id='summary_table']/tbody/tr/td[last()]" position="before">
<td class="text-right">
<span t-field="l.dunning_fees_amount"/>
</td>
</xpath>
<xpath expr="//span[@t-field='l.balance_due']" position="replace">
<span t-field="l.balance_due_total"
t-field-options='{"widget": "monetary",
"display_currency": "l.currency_id or l.company_id.currency_id"}'/>
</xpath>
</template>
<odoo>
<template id="report_credit_control_summary_document_fees"
inherit_id="account_credit_control.report_credit_control_summary_document">
<xpath expr="//table[@id='summary_table']/thead/tr/th[last()]" position="before">
<th class="text-right">Fees</th>
</xpath>
<xpath expr="//table[@id='summary_table']/tbody/tr/td[last()]" position="before">
<td class="text-right">
<span t-field="l.dunning_fees_amount"/>
</td>
</xpath>
<xpath expr="//span[@t-field='l.balance_due']" position="replace">
<span t-field="l.balance_due_total"
t-field-options='{"widget": "monetary",
"display_currency": "l.currency_id or l.company_id.currency_id"}'/>
</xpath>
</template>
</data>
</openerp>
</odoo>

View File

@@ -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 <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import test_fees_generation

View File

@@ -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 <http://www.gnu.org/licenses/>.
#
##############################################################################
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):

View File

@@ -1,30 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<odoo>
<record id="add_fees_on_credit_control_line" model="ir.ui.view">
<field name="name">add fees on credit control line</field>
<field name="model">credit.control.line</field>
<field name="inherit_id" ref="account_credit_control.credit_control_line_tree" />
<field name="arch" type="xml">
<field name="balance_due" position="after">
<field name="dunning_fees_amount"
attrs="{'readonly': [('state', '!=', 'draft')]}"/>
</field>
<record id="add_fees_on_credit_control_line" model="ir.ui.view">
<field name="name">add fees on credit control line</field>
<field name="model">credit.control.line</field>
<field name="inherit_id" ref="account_credit_control.credit_control_line_tree" />
<field name="arch" type="xml">
<field name="balance_due" position="after">
<field name="dunning_fees_amount"
attrs="{'readonly': [('state', '!=', 'draft')]}"/>
</field>
</record>
</field>
</record>
<record id="add_fees_on_credit_control_line_from" model="ir.ui.view">
<field name="name">add fees on credit control line form</field>
<field name="model">credit.control.line</field>
<field name="inherit_id" ref="account_credit_control.credit_control_line_form"/>
<field name="arch" type="xml">
<field name="balance_due" position="after">
<field name="dunning_fees_amount"
attrs="{'readonly': [('state', '!=', 'draft')]}"/>
</field>
<record id="add_fees_on_credit_control_line_from" model="ir.ui.view">
<field name="name">add fees on credit control line form</field>
<field name="model">credit.control.line</field>
<field name="inherit_id" ref="account_credit_control.credit_control_line_form"/>
<field name="arch" type="xml">
<field name="balance_due" position="after">
<field name="dunning_fees_amount"
attrs="{'readonly': [('state', '!=', 'draft')]}"/>
</field>
</record>
</field>
</record>
</data>
</openerp>
</odoo>

View File

@@ -1,24 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="add_dunning_fees_on_policy" model="ir.ui.view">
<field name="name">add dunning fees on policy</field>
<field name="model">credit.control.policy</field>
<field name="inherit_id" ref="account_credit_control.credit_control_policy_form" />
<field name="arch" type="xml">
<page string="Mail and reporting" position="after">
<page string="Fees">
<odoo>
<record id="add_dunning_fees_on_policy" model="ir.ui.view">
<field name="name">add dunning fees on policy</field>
<field name="model">credit.control.policy</field>
<field name="inherit_id" ref="account_credit_control.credit_control_policy_form" />
<field name="arch" type="xml">
<xpath expr="//notebook//notebook/page[//field[@name='email_template_id']]" position="after">
<page string="Fees">
<group>
<group>
<group>
<field name="dunning_fixed_amount"/>
<field name="dunning_product_id"/>
<field name="dunning_currency_id"/>
</group>
<field name="dunning_fixed_amount"/>
<field name="dunning_product_id"/>
<field name="dunning_currency_id"/>
</group>
</page>
</group>
</page>
</field>
</record>
</xpath>
</field>
</record>
</data>
</openerp>
</odoo>

View File

@@ -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 <http://www.gnu.org/licenses/>.
#
##############################################################################
from . import credit_control_communication

View File

@@ -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 <http://www.gnu.org/licenses/>.
#
##############################################################################
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):