From 107123d1a6bb19c5b5541a9a46d3d0a772bb3aec Mon Sep 17 00:00:00 2001 From: Elouan Le Bars Date: Wed, 23 Oct 2019 15:47:48 +0200 Subject: [PATCH] [MIG] account_permanent_lock_move: Migration to 12.0 --- account_permanent_lock_move/README.rst | 67 ++- account_permanent_lock_move/__manifest__.py | 2 +- .../readme/CONFIGURE.rst | 4 + .../readme/CONTRIBUTORS.rst | 2 + .../readme/DESCRIPTION.rst | 4 + .../static/description/index.html | 432 ++++++++++++++++++ .../tests/test_permanent_lock.py | 5 +- .../wizard/permanent_lock_date_wizard.xml | 3 +- 8 files changed, 492 insertions(+), 27 deletions(-) create mode 100644 account_permanent_lock_move/readme/CONFIGURE.rst create mode 100644 account_permanent_lock_move/readme/CONTRIBUTORS.rst create mode 100644 account_permanent_lock_move/readme/DESCRIPTION.rst create mode 100644 account_permanent_lock_move/static/description/index.html diff --git a/account_permanent_lock_move/README.rst b/account_permanent_lock_move/README.rst index c3bc54e27..90e2c1c11 100644 --- a/account_permanent_lock_move/README.rst +++ b/account_permanent_lock_move/README.rst @@ -1,16 +1,40 @@ -.. 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 - =================== Permanent Lock Move =================== +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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--financial--tools-lightgray.png?logo=github + :target: https://github.com/OCA/account-financial-tools/tree/12.0/account_permanent_lock_move + :alt: OCA/account-financial-tools +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_permanent_lock_move + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/92/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + This module extends the functionality of the basic "lock date" functionality in invoicing, in order to add a more definitive lock date (which cannot be empty or set in the past, and only accepts unposted moves) +**Table of contents** + +.. contents:: + :local: + Configuration ============= @@ -19,42 +43,43 @@ To configure this module, you need to: #. Go to Invoicing -> Settings #. Set the Permanent Lock Date. -.. 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 smashing it by providing a detailed and welcomed feedback. +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 ======= -Images ------- +Authors +~~~~~~~ -* Odoo Community Association: `Icon `_. +* Camptocamp Contributors ------------- +~~~~~~~~~~~~ * Matthieu Dietrich +* Elouan Le Bars -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-financial-tools `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_permanent_lock_move/__manifest__.py b/account_permanent_lock_move/__manifest__.py index 613a235aa..48d640c02 100644 --- a/account_permanent_lock_move/__manifest__.py +++ b/account_permanent_lock_move/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Permanent Lock Move", - "version": "11.0.1.0.0", + "version": "12.0.1.0.0", "depends": ["account"], "author": "Camptocamp,Odoo Community Association (OCA)", "website": 'https://github.com/OCA/account-financial-tools', diff --git a/account_permanent_lock_move/readme/CONFIGURE.rst b/account_permanent_lock_move/readme/CONFIGURE.rst new file mode 100644 index 000000000..c83f95d65 --- /dev/null +++ b/account_permanent_lock_move/readme/CONFIGURE.rst @@ -0,0 +1,4 @@ +To configure this module, you need to: + +#. Go to Invoicing -> Settings +#. Set the Permanent Lock Date. diff --git a/account_permanent_lock_move/readme/CONTRIBUTORS.rst b/account_permanent_lock_move/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..3b2f722fa --- /dev/null +++ b/account_permanent_lock_move/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Matthieu Dietrich +* Elouan Le Bars diff --git a/account_permanent_lock_move/readme/DESCRIPTION.rst b/account_permanent_lock_move/readme/DESCRIPTION.rst new file mode 100644 index 000000000..e8e3fa9b7 --- /dev/null +++ b/account_permanent_lock_move/readme/DESCRIPTION.rst @@ -0,0 +1,4 @@ +This module extends the functionality of the basic "lock date" +functionality in invoicing, in order to add a more definitive +lock date (which cannot be empty or set in the past, and only +accepts unposted moves) diff --git a/account_permanent_lock_move/static/description/index.html b/account_permanent_lock_move/static/description/index.html new file mode 100644 index 000000000..cc5b1b9ea --- /dev/null +++ b/account_permanent_lock_move/static/description/index.html @@ -0,0 +1,432 @@ + + + + + + +Permanent Lock Move + + + +
+

Permanent Lock Move

+ + +

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

+

This module extends the functionality of the basic “lock date” +functionality in invoicing, in order to add a more definitive +lock date (which cannot be empty or set in the past, and only +accepts unposted moves)

+

Table of contents

+ +
+

Configuration

+

To configure this module, you need to:

+
    +
  1. Go to Invoicing -> Settings
  2. +
  3. Set the Permanent Lock Date.
  4. +
+
+
+

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

+
    +
  • 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-financial-tools project on GitHub.

+

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

+
+
+
+ + diff --git a/account_permanent_lock_move/tests/test_permanent_lock.py b/account_permanent_lock_move/tests/test_permanent_lock.py index 7572973e1..f5b599340 100644 --- a/account_permanent_lock_move/tests/test_permanent_lock.py +++ b/account_permanent_lock_move/tests/test_permanent_lock.py @@ -79,10 +79,7 @@ class PermanentLock(common.TransactionCase): # Try to lock the day before raised_lock_error = False try: - yesterday = fields.Date.to_string( - fields.Date.from_string( - fields.Date.today()) + - datetime.timedelta(days=-1)) + yesterday = fields.Date.today() + datetime.timedelta(days=-1) self.wizard = self.wizard_obj.create({ 'company_id': self.company_id, 'lock_date': yesterday diff --git a/account_permanent_lock_move/wizard/permanent_lock_date_wizard.xml b/account_permanent_lock_move/wizard/permanent_lock_date_wizard.xml index 5192c58bf..363904c5c 100644 --- a/account_permanent_lock_move/wizard/permanent_lock_date_wizard.xml +++ b/account_permanent_lock_move/wizard/permanent_lock_date_wizard.xml @@ -5,7 +5,8 @@ form
-