From 6e91ad5df172d36b54bbd0b5a9a635f7eba297ef Mon Sep 17 00:00:00 2001 From: Kitti U Date: Thu, 25 Apr 2019 12:27:57 +0700 Subject: [PATCH] [12.0][MIG] account_lock_date_update --- account_lock_date_update/README.rst | 76 +-- account_lock_date_update/__manifest__.py | 2 +- .../readme/CONTRIBUTORS.rst | 3 + .../readme/DESCRIPTION.rst | 2 + account_lock_date_update/readme/USAGE.rst | 4 + .../static/description/index.html | 431 ++++++++++++++++++ .../tests/test_account_lock_date_update.py | 9 +- 7 files changed, 493 insertions(+), 34 deletions(-) create mode 100644 account_lock_date_update/readme/CONTRIBUTORS.rst create mode 100644 account_lock_date_update/readme/DESCRIPTION.rst create mode 100644 account_lock_date_update/readme/USAGE.rst create mode 100644 account_lock_date_update/static/description/index.html diff --git a/account_lock_date_update/README.rst b/account_lock_date_update/README.rst index 095988b3b..61021f6f4 100644 --- a/account_lock_date_update/README.rst +++ b/account_lock_date_update/README.rst @@ -1,70 +1,84 @@ -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png - :target: https://www.gnu.org/licenses/agpl - :alt: License: AGPL-3 - ======================== Account Lock Date Update ======================== +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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_lock_date_update + :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_lock_date_update + :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| + Allow an Account adviser to update locking date without having access to all technical settings. -Installation -============ +**Table of contents** -Just install it. - -Configuration -============= - -No configuration needed. +.. contents:: + :local: Usage ===== To use this module, you need to be an account adviser and go to: -* Accounting -> Adviser -> Actions -> Update accounting lock dates +* Invoicing -> Accounting -> Actions -> Update accounting lock dates * Change values and click on update button -.. 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/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. +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 `_. +* ACSONE SA/NV Contributors ------------- +~~~~~~~~~~~~ * Benjamin Willig * Fekete Mihai +* Kitti Upariphutthiphong -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_lock_date_update/__manifest__.py b/account_lock_date_update/__manifest__.py index f5be8bc31..bb59d6e71 100644 --- a/account_lock_date_update/__manifest__.py +++ b/account_lock_date_update/__manifest__.py @@ -6,7 +6,7 @@ 'summary': """ Allow an Account adviser to update locking date without having access to all technical settings""", - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'license': 'AGPL-3', 'author': 'ACSONE SA/NV, Odoo Community Association (OCA)', 'website': 'https://github.com/OCA/account-financial-tools', diff --git a/account_lock_date_update/readme/CONTRIBUTORS.rst b/account_lock_date_update/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..747686959 --- /dev/null +++ b/account_lock_date_update/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Benjamin Willig +* Fekete Mihai +* Kitti Upariphutthiphong diff --git a/account_lock_date_update/readme/DESCRIPTION.rst b/account_lock_date_update/readme/DESCRIPTION.rst new file mode 100644 index 000000000..646086d67 --- /dev/null +++ b/account_lock_date_update/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +Allow an Account adviser to update locking date without having +access to all technical settings. diff --git a/account_lock_date_update/readme/USAGE.rst b/account_lock_date_update/readme/USAGE.rst new file mode 100644 index 000000000..944df6e69 --- /dev/null +++ b/account_lock_date_update/readme/USAGE.rst @@ -0,0 +1,4 @@ +To use this module, you need to be an account adviser and go to: + +* Invoicing -> Accounting -> Actions -> Update accounting lock dates +* Change values and click on update button diff --git a/account_lock_date_update/static/description/index.html b/account_lock_date_update/static/description/index.html new file mode 100644 index 000000000..b986262ea --- /dev/null +++ b/account_lock_date_update/static/description/index.html @@ -0,0 +1,431 @@ + + + + + + +Account Lock Date Update + + + +
+

Account Lock Date Update

+ + +

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

+

Allow an Account adviser to update locking date without having +access to all technical settings.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to be an account adviser and go to:

+
    +
  • Invoicing -> Accounting -> Actions -> Update accounting lock dates
  • +
  • Change values and click on update button
  • +
+
+
+

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

+
    +
  • ACSONE SA/NV
  • +
+
+
+

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_lock_date_update/tests/test_account_lock_date_update.py b/account_lock_date_update/tests/test_account_lock_date_update.py index 139e86e8d..2bdedadb2 100644 --- a/account_lock_date_update/tests/test_account_lock_date_update.py +++ b/account_lock_date_update/tests/test_account_lock_date_update.py @@ -1,6 +1,7 @@ # Copyright 2017 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import fields from odoo.tests.common import TransactionCase from odoo.exceptions import UserError @@ -43,5 +44,9 @@ class TestAccountLockDateUpdate(TransactionCase): 'groups_id': [(4, self.adviser_group.id)], }) wizard.sudo(self.demo_user.id).execute() - self.assertEqual(self.company.period_lock_date, '2000-02-01') - self.assertEqual(self.company.fiscalyear_lock_date, '2000-01-01') + self.assertEqual( + fields.Date.to_string(self.company.period_lock_date), + '2000-02-01') + self.assertEqual( + fields.Date.to_string(self.company.fiscalyear_lock_date), + '2000-01-01')