diff --git a/account_reconcile_rule/README.rst b/account_reconcile_rule/README.rst index f5167b57..e69de29b 100644 --- a/account_reconcile_rule/README.rst +++ b/account_reconcile_rule/README.rst @@ -1,117 +0,0 @@ -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png - :target: https://www.gnu.org/licenses/agpl - :alt: License: AGPL-3 - -======================= -Account Reconcile Rules -======================= - -This module complements the Reconciliation of the bank statements. When -the bank statement matches one or more journal entry for a line and -there is a remaining balance, Odoo proposes you to click on buttons that -will generate write-off entries according to pre-configured *Reconciliation -Models*. The aim of this module is to automatically click -for you on these buttons (i.e. create the write-off journal entries) -when some rules are respected, rules that you can configure. - -It contains 2 types of rules (but can be extended with additional rules), -described below: - -Roundings - The most basic rule: when the remaining balance is within a range, 1 - or more operations are applied. - -Currencies - When the remaining balance is within a range and the currency of all - the lines is the same but different from the company's, and the amount - currency is the same, 1 or more operations are applied. - - -Configuration -------------- - -As this module aims to automatize the ``Reconciliation Models``, -you first want to ensure that you have at least one model configured. -You can find them in ``Invoicing > Dashboard > Bank card > More -> Reconciliation Models``. An example of a common operation is: - -=================== ========================== ======= ======== -Account Amount Type Amount Label -=================== ========================== ======= ======== -Depends of the l10n Percentage of open balance 100.0 % Rounding -=================== ========================== ======= ======== - -The configuration of the rules themselves happens in ``Invoicing > -Dashboard > Bank card > More > Reconciliation Rules``. Refer to -the description of the types of rules above in case of doubt. The form -is divided in 2 parts: **Rule** and **Result**. The rule part is where -you will set the conditions and the result part is what operations will -be done if the conditions are valid. - -For the **Roundings** rules, you will set a min. and a max. amount. It -can be negative or positive. The amount is compared to the remaining -balance when lines are matched in the bank statement. Example: if you -want to create a move line in a loss account when you received 1.- not -enough, you can create a rule with an min. amount of -1.0 and a max. -amount of 0.0. - -For the **Currencies** rules, the min. and max. amount have the same -properties, but you will also set the currencies for which the rule -applies. Setting the currency allows to configure different amounts -according to the currencies. - -Only the first rule matching the current situation is used, so if you -have several rules overlapping for some reason, be sure to order them -appropriately in the list view. - -Usage ------ - -When you use the *Reconcile* button of a bank statement, Odoo -automatically proposes you matching journal entries for each statement -line. This module automatically adds journal entries generated from the -*Reconciliation Models* if a rule matches with the current -situation, so there is nothing special to do once the rules are -configured. - -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/98/11.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 ------------- - -* Guewen Baconnier -* Cyril Gaudin -* 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_reconcile_rule/__manifest__.py b/account_reconcile_rule/__manifest__.py index 3e537ccf..51f7b200 100644 --- a/account_reconcile_rule/__manifest__.py +++ b/account_reconcile_rule/__manifest__.py @@ -1,10 +1,10 @@ # Author: Guewen Baconnier -# Copyright 2014-2016 Camptocamp SA +# Copyright 2014-2019 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). {'name': 'Account Reconcile Rules', - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'author': 'Camptocamp, Odoo Community Association (OCA)', 'maintainer': 'Odoo Community Association (OCA)', 'license': 'AGPL-3', diff --git a/account_reconcile_rule/models/account_reconcile_rule.py b/account_reconcile_rule/models/account_reconcile_rule.py index 78d45a5e..bc7a65b1 100644 --- a/account_reconcile_rule/models/account_reconcile_rule.py +++ b/account_reconcile_rule/models/account_reconcile_rule.py @@ -1,5 +1,5 @@ # Author: Guewen Baconnier -# Copyright 2014-2016 Camptocamp SA +# Copyright 2014 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import models, fields, api diff --git a/account_reconcile_rule/models/account_statement_line.py b/account_reconcile_rule/models/account_statement_line.py index 56d1dada..04778072 100644 --- a/account_reconcile_rule/models/account_statement_line.py +++ b/account_reconcile_rule/models/account_statement_line.py @@ -1,5 +1,5 @@ # Author: Guewen Baconnier -# Copyright 2014-2016 Camptocamp SA +# Copyright 2014 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/account_reconcile_rule/readme/CONFIGURE.rst b/account_reconcile_rule/readme/CONFIGURE.rst new file mode 100644 index 00000000..43e606ef --- /dev/null +++ b/account_reconcile_rule/readme/CONFIGURE.rst @@ -0,0 +1,33 @@ +As this module aims to automatize the ``Reconciliation Models``, +you first want to ensure that you have at least one model configured. +You can find them in ``Invoicing > Dashboard > Bank card > More +> Reconciliation Models``. An example of a common operation is: + +=================== ========================== ======= ======== +Account Amount Type Amount Label +=================== ========================== ======= ======== +Depends of the l10n Percentage of open balance 100.0 % Rounding +=================== ========================== ======= ======== + +The configuration of the rules themselves happens in ``Invoicing > +Dashboard > Bank card > More > Reconciliation Rules``. Refer to +the description of the types of rules above in case of doubt. The form +is divided in 2 parts: **Rule** and **Result**. The rule part is where +you will set the conditions and the result part is what operations will +be done if the conditions are valid. + +For the **Roundings** rules, you will set a min. and a max. amount. It +can be negative or positive. The amount is compared to the remaining +balance when lines are matched in the bank statement. Example: if you +want to create a move line in a loss account when you received 1.- not +enough, you can create a rule with an min. amount of -1.0 and a max. +amount of 0.0. + +For the **Currencies** rules, the min. and max. amount have the same +properties, but you will also set the currencies for which the rule +applies. Setting the currency allows to configure different amounts +according to the currencies. + +Only the first rule matching the current situation is used, so if you +have several rules overlapping for some reason, be sure to order them +appropriately in the list view. diff --git a/account_reconcile_rule/readme/CONTRIBUTORS.rst b/account_reconcile_rule/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..297a32e4 --- /dev/null +++ b/account_reconcile_rule/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Guewen Baconnier +* Cyril Gaudin +* Akim Juillerat diff --git a/account_reconcile_rule/readme/DESCRIPTION.rst b/account_reconcile_rule/readme/DESCRIPTION.rst new file mode 100644 index 00000000..6d58ea9c --- /dev/null +++ b/account_reconcile_rule/readme/DESCRIPTION.rst @@ -0,0 +1,19 @@ +This module complements the Reconciliation of the bank statements. When +the bank statement matches one or more journal entry for a line and +there is a remaining balance, Odoo proposes you to click on buttons that +will generate write-off entries according to pre-configured *Reconciliation +Models*. The aim of this module is to automatically click +for you on these buttons (i.e. create the write-off journal entries) +when some rules are respected, rules that you can configure. + +It contains 2 types of rules (but can be extended with additional rules), +described below: + +Roundings + The most basic rule: when the remaining balance is within a range, 1 + or more operations are applied. + +Currencies + When the remaining balance is within a range and the currency of all + the lines is the same but different from the company's, and the amount + currency is the same, 1 or more operations are applied. diff --git a/account_reconcile_rule/readme/USAGE.rst b/account_reconcile_rule/readme/USAGE.rst new file mode 100644 index 00000000..facd59dc --- /dev/null +++ b/account_reconcile_rule/readme/USAGE.rst @@ -0,0 +1,6 @@ +When you use the *Reconcile* button of a bank statement, Odoo +automatically proposes you matching journal entries for each statement +line. This module automatically adds journal entries generated from the +*Reconciliation Models* if a rule matches with the current +situation, so there is nothing special to do once the rules are +configured. diff --git a/account_reconcile_rule/static/src/js/account_widgets.js b/account_reconcile_rule/static/src/js/account_widgets.js index cd0282f4..eb42fef0 100644 --- a/account_reconcile_rule/static/src/js/account_widgets.js +++ b/account_reconcile_rule/static/src/js/account_widgets.js @@ -17,7 +17,7 @@ odoo.define('account_reconcile_rule', function (require) { reconciliation_rule_models: function() { var self = this; // Get the statement line - var line = this.model.getLine(this.handle) + var line = this.model.getLine(this.handle); // Call the models_for_reconciliation through RPC this._rpc({ model: 'account.reconcile.rule', @@ -32,8 +32,8 @@ odoo.define('account_reconcile_rule', function (require) { _.each(rule_models, function (rule_model_id) { self.trigger_up('quick_create_proposition', {'data': rule_model_id}); - }) - }) + }); + }); }, /* * Add the write off entries after the the line renderer is ready diff --git a/account_reconcile_rule/tests/common.py b/account_reconcile_rule/tests/common.py index 2e852a9c..318dd252 100644 --- a/account_reconcile_rule/tests/common.py +++ b/account_reconcile_rule/tests/common.py @@ -1,5 +1,5 @@ # Author: Guewen Baconnier -# Copyright 2014-2016 Camptocamp SA +# Copyright 2014 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.tests.common import SavepointCase diff --git a/account_reconcile_rule/tests/test_rule_currency.py b/account_reconcile_rule/tests/test_rule_currency.py index bb82165c..12552855 100644 --- a/account_reconcile_rule/tests/test_rule_currency.py +++ b/account_reconcile_rule/tests/test_rule_currency.py @@ -1,5 +1,5 @@ # Author: Guewen Baconnier -# Copyright 2014-2016 Camptocamp SA +# Copyright 2014 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from .common import AccountReconciliationModelTestCase diff --git a/account_reconcile_rule/tests/test_rule_rounding.py b/account_reconcile_rule/tests/test_rule_rounding.py index b8d44942..84f96189 100644 --- a/account_reconcile_rule/tests/test_rule_rounding.py +++ b/account_reconcile_rule/tests/test_rule_rounding.py @@ -1,5 +1,5 @@ # Author: Guewen Baconnier -# Copyright 2014-2016 Camptocamp SA +# Copyright 2014 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).