From 888e06ffbbd801cfac45e55fc0eb656aa9957b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Gil=20Sorribes?= Date: Tue, 4 Dec 2018 10:11:14 +0100 Subject: [PATCH] [12.0][MIG] Migrate module account_mass_reconcile to v12 --- account_mass_reconcile/README.rst | 66 ++- account_mass_reconcile/__manifest__.py | 8 +- .../models/mass_reconcile.py | 3 +- .../models/mass_reconcile_history.py | 1 + account_mass_reconcile/models/res_config.py | 1 + .../readme/CONTRIBUTORS.rst | 18 + account_mass_reconcile/readme/DESCRIPTION.rst | 18 + account_mass_reconcile/readme/USAGE.rst | 3 + .../static/description/index.html | 439 ++++++++++++++++++ .../tests/test_scenario_reconcile.py | 2 +- .../views/mass_reconcile.xml | 14 +- .../views/mass_reconcile_history_view.xml | 8 +- .../views/res_config_view.xml | 2 +- 13 files changed, 545 insertions(+), 38 deletions(-) create mode 100644 account_mass_reconcile/readme/CONTRIBUTORS.rst create mode 100644 account_mass_reconcile/readme/DESCRIPTION.rst create mode 100644 account_mass_reconcile/readme/USAGE.rst create mode 100644 account_mass_reconcile/static/description/index.html diff --git a/account_mass_reconcile/README.rst b/account_mass_reconcile/README.rst index 3e74b07c..56ac4215 100644 --- a/account_mass_reconcile/README.rst +++ b/account_mass_reconcile/README.rst @@ -1,11 +1,30 @@ -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png - :target: https://www.gnu.org/licenses/agpl - :alt: License: AGPL-3 - ====================== Account Mass Reconcile ====================== +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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--reconcile-lightgray.png?logo=github + :target: https://github.com/OCA/account-reconcile/tree/12.0/account_mass_reconcile + :alt: OCA/account-reconcile +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/account-reconcile-12-0/account-reconcile-12-0-account_mass_reconcile + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/98/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + This is a shared work between Akretion and Camptocamp in order to provide: @@ -25,35 +44,40 @@ on 2 lines (1 debit / 1 credit) and do not allow partial reconciliation, they also match on 1 key, partner or Journal item name. +**Table of contents** + +.. contents:: + :local: + Usage ===== -Go to 'Invoicing / Adviser / Mass Automatic Reconcile' to start a new mass +Give the user permissions to view full accounting features, then go to +'Invoicing / Accounting / Mass Automatic Reconcile' to start a new mass reconcile. -.. 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 smashing it by providing a detailed and welcomed feedback. +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 ======= -Images ------- +Authors +~~~~~~~ -* Odoo Community Association: `Icon `_. +* Akretion +* Camptocamp Contributors ------------- +~~~~~~~~~~~~ + * Sébastien Beau * Guewen Baconnier * Vincent Renaville @@ -73,17 +97,19 @@ Contributors * Akim Juillerat * Mykhailo Panarin -Maintainer ----------- +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. 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-reconcile `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_mass_reconcile/__manifest__.py b/account_mass_reconcile/__manifest__.py index 1c1fd407..6a996f51 100644 --- a/account_mass_reconcile/__manifest__.py +++ b/account_mass_reconcile/__manifest__.py @@ -4,18 +4,18 @@ { "name": "Account Mass Reconcile", - "version": "11.0.1.0.0", + "version": "12.0.1.0.0", "depends": [ - "account_invoicing", + "account", ], "author": "Akretion,Camptocamp,Odoo Community Association (OCA)", "website": "https://github.com/OCA/account-reconcile", "category": "Finance", "data": [ - "views/mass_reconcile.xml", - "views/mass_reconcile_history_view.xml", "security/ir_rule.xml", "security/ir.model.access.csv", + "views/mass_reconcile.xml", + "views/mass_reconcile_history_view.xml", "views/res_config_view.xml", ], 'license': 'AGPL-3', diff --git a/account_mass_reconcile/models/mass_reconcile.py b/account_mass_reconcile/models/mass_reconcile.py index 5f202f98..a9d86c6a 100644 --- a/account_mass_reconcile/models/mass_reconcile.py +++ b/account_mass_reconcile/models/mass_reconcile.py @@ -21,6 +21,7 @@ class MassReconcileOptions(models.AbstractModel): wizards and allows to launch the wizards alone """ _name = 'mass.reconcile.options' + _description = 'Options of a reconciliation profile' @api.model def _get_rec_base_date(self): @@ -319,7 +320,7 @@ class AccountMassReconcile(models.Model): """ def _get_date(reconcile): if reconcile.last_history.date: - return fields.Datetime.from_string(reconcile.last_history.date) + return fields.Datetime.to_datetime(reconcile.last_history.date) else: return datetime.min diff --git a/account_mass_reconcile/models/mass_reconcile_history.py b/account_mass_reconcile/models/mass_reconcile_history.py index d6d9898e..80a29df5 100644 --- a/account_mass_reconcile/models/mass_reconcile_history.py +++ b/account_mass_reconcile/models/mass_reconcile_history.py @@ -10,6 +10,7 @@ class MassReconcileHistory(models.Model): Each history stores the list of reconciliations done """ _name = 'mass.reconcile.history' + _description = 'Store an history of the runs per profile' _rec_name = 'mass_reconcile_id' _order = 'date DESC' diff --git a/account_mass_reconcile/models/res_config.py b/account_mass_reconcile/models/res_config.py index aa6f20c4..5fe00af8 100644 --- a/account_mass_reconcile/models/res_config.py +++ b/account_mass_reconcile/models/res_config.py @@ -11,6 +11,7 @@ class AccountConfigSettings(models.TransientModel): related="company_id.reconciliation_commit_every", string="How often to commit when performing automatic reconciliation.", help="Leave zero to commit only at the end of the process.", + readonly=False, ) diff --git a/account_mass_reconcile/readme/CONTRIBUTORS.rst b/account_mass_reconcile/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..36a3d934 --- /dev/null +++ b/account_mass_reconcile/readme/CONTRIBUTORS.rst @@ -0,0 +1,18 @@ +* Sébastien Beau +* Guewen Baconnier +* Vincent Renaville +* Alexandre Fayolle +* Joël Grand-Guillaume +* Nicolas Bessi +* Pedro M.Baeza +* Matthieu Dietrich +* Leonardo Pistone +* Ecino +* Yannick Vaucher +* Rudolf Schnapka +* Florian Dacosta +* Laetitia Gangloff +* Frédéric Clémenti +* Damien Crier +* Akim Juillerat +* Mykhailo Panarin diff --git a/account_mass_reconcile/readme/DESCRIPTION.rst b/account_mass_reconcile/readme/DESCRIPTION.rst new file mode 100644 index 00000000..1d4b694a --- /dev/null +++ b/account_mass_reconcile/readme/DESCRIPTION.rst @@ -0,0 +1,18 @@ +This is a shared work between Akretion and Camptocamp +in order to provide: + +- Reconciliation facilities for big volume of transactions. +- Setup different profiles of reconciliation by account. +- Each profile can use many methods of reconciliation. +- This module is also a base to create others + reconciliation methods which can plug in the profiles. +- A profile a reconciliation can be run manually + or by a cron. +- Monitoring of reconciliation runs with an history + which keep track of the reconciled Journal items. + +2 simple reconciliation methods are integrated +in this module, the simple reconciliations works +on 2 lines (1 debit / 1 credit) and do not allow +partial reconciliation, they also match on 1 key, +partner or Journal item name. diff --git a/account_mass_reconcile/readme/USAGE.rst b/account_mass_reconcile/readme/USAGE.rst new file mode 100644 index 00000000..30e97af5 --- /dev/null +++ b/account_mass_reconcile/readme/USAGE.rst @@ -0,0 +1,3 @@ +Give the user permissions to view full accounting features, then go to +'Invoicing / Accounting / Mass Automatic Reconcile' to start a new mass +reconcile. diff --git a/account_mass_reconcile/static/description/index.html b/account_mass_reconcile/static/description/index.html new file mode 100644 index 00000000..ce3d14bc --- /dev/null +++ b/account_mass_reconcile/static/description/index.html @@ -0,0 +1,439 @@ + + + + + + +Account Mass Reconcile + + + +
+

Account Mass Reconcile

+ + +

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

+

This is a shared work between Akretion and Camptocamp +in order to provide:

+
    +
  • Reconciliation facilities for big volume of transactions.
  • +
  • Setup different profiles of reconciliation by account.
  • +
  • Each profile can use many methods of reconciliation.
  • +
  • This module is also a base to create others +reconciliation methods which can plug in the profiles.
  • +
  • A profile a reconciliation can be run manually +or by a cron.
  • +
  • Monitoring of reconciliation runs with an history +which keep track of the reconciled Journal items.
  • +
+

2 simple reconciliation methods are integrated +in this module, the simple reconciliations works +on 2 lines (1 debit / 1 credit) and do not allow +partial reconciliation, they also match on 1 key, +partner or Journal item name.

+

Table of contents

+ +
+

Usage

+

Give the user permissions to view full accounting features, then go to +‘Invoicing / Accounting / Mass Automatic Reconcile’ to start a new mass +reconcile.

+
+
+

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
  • +
  • Camptocamp
  • +
+
+
+

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-reconcile project on GitHub.

+

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

+
+
+
+ + diff --git a/account_mass_reconcile/tests/test_scenario_reconcile.py b/account_mass_reconcile/tests/test_scenario_reconcile.py index 9bbf4c7e..ff74a473 100644 --- a/account_mass_reconcile/tests/test_scenario_reconcile.py +++ b/account_mass_reconcile/tests/test_scenario_reconcile.py @@ -134,7 +134,7 @@ class TestScenarioReconcile(common.SavepointCase): def test_scenario_reconcile_currency(self): # create currency rate self.env['res.currency.rate'].create({ - 'name': fields.Date.today() + ' 00:00:00', + 'name': fields.Date.today().strftime('%Y-%m-%d') + ' 00:00:00', 'currency_id': self.ref('base.USD'), 'rate': 1.5, }) diff --git a/account_mass_reconcile/views/mass_reconcile.xml b/account_mass_reconcile/views/mass_reconcile.xml index 0a5ebf4a..a374c883 100644 --- a/account_mass_reconcile/views/mass_reconcile.xml +++ b/account_mass_reconcile/views/mass_reconcile.xml @@ -45,19 +45,19 @@ - @@ -81,7 +81,7 @@ The lines should have the same partner, and the credit entry ref. is matched wit -