[IMP] account_journal_lock_date: pre-commit auto fixes

This commit is contained in:
Luis Rodriguez
2024-03-12 11:47:28 +01:00
parent 9b20141b23
commit 65560ae576
15 changed files with 82 additions and 80 deletions

View File

@@ -17,13 +17,13 @@ Account Journal Lock Date
: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/16.0/account_journal_lock_date
:target: https://github.com/OCA/account-financial-tools/tree/17.0/account_journal_lock_date
: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-16-0/account-financial-tools-16-0-account_journal_lock_date
:target: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-account_journal_lock_date
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-tools&target_branch=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-tools&target_branch=17.0
:alt: Try me on Runboat
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -34,7 +34,8 @@ In addition to the lock dates provided by standard Odoo, this module
provides a 'Lock Date' and a 'Lock Date for Non-Advisers' per journal.
This module also adds a wizard that allows you to update the 'Lock Date'
and the 'Lock Date for Non-Advisers' for several Journals at the same time.
and the 'Lock Date for Non-Advisers' for several Journals at the same
time.
**Table of contents**
@@ -46,29 +47,30 @@ Configuration
To configure this module, you need to:
#. Go to *Invoicing > Configuration > Journals*
#. Open a Journal and set the 'Lock Date' and the 'Lock Date for Non-Advisers'
in the' Advanced Settings' tab of the form view or select several
Journals in the list view and click on the action menu
1. Go to *Invoicing > Configuration > Journals*
2. Open a Journal and set the 'Lock Date' and the 'Lock Date for
Non-Advisers' in the' Advanced Settings' tab of the form view or
select several Journals in the list view and click on the action menu
'Update journals lock dates' to update those dates for the selected
journals at the same time.
Usage
=====
If the logged-in user has the access group 'Adviser', he/she will
not be able to create a journal entry if the 'Lock Date' of the
journal is greater than or equal to the journal entry.
If the logged-in user has the access group 'Adviser', he/she will not be
able to create a journal entry if the 'Lock Date' of the journal is
greater than or equal to the journal entry.
If the logged-in user has not the access group 'Adviser', he/she will
not be able to create a journal entry if the 'Lock Date for Non-Advisers'
of the journal is greater than or equal to the journal entry.
not be able to create a journal entry if the 'Lock Date for
Non-Advisers' of the journal is greater than or equal to the journal
entry.
Known issues / Roadmap
======================
* the module does not check that all moves prior the lock date are posted, this could be
made as part of the wizard
- the module does not check that all moves prior the lock date are
posted, this could be made as part of the wizard
Bug Tracker
===========
@@ -76,7 +78,7 @@ 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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_journal_lock_date%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_journal_lock_date%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Do not contact contributors directly about support or help with technical issues.
@@ -84,32 +86,32 @@ Credits
=======
Authors
~~~~~~~
-------
* ACSONE SA/NV
* Tecnativa
Contributors
~~~~~~~~~~~~
------------
* `Akretion <https://www.akretion.com>`_:
- `Akretion <https://www.akretion.com>`__:
* Benoît GUILLOT <benoit.guillot@akretion.com>
* Chafique DELLI <chafique.delli@akretion.com>
* Alexis de Lattre <alexis.delattre@akretion.com>
* Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
- Benoît GUILLOT <benoit.guillot@akretion.com>
- Chafique DELLI <chafique.delli@akretion.com>
- Alexis de Lattre <alexis.delattre@akretion.com>
- Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
* `Tecnativa <https://www.tecnativa.com>`_:
- `Tecnativa <https://www.tecnativa.com>`__:
* Pedro M. Baeza
* Ernesto Tejeda
- Pedro M. Baeza
- Ernesto Tejeda
* `Factor Libre <https://www.factorlibre.com>`_:
- `Factor Libre <https://www.factorlibre.com>`__:
* Rodrigo Bonilla Martinez <rodrigo.bonilla@factorlibre.com>
- Rodrigo Bonilla Martinez <rodrigo.bonilla@factorlibre.com>
Maintainers
~~~~~~~~~~~
-----------
This module is maintained by the OCA.
@@ -121,6 +123,6 @@ 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 <https://github.com/OCA/account-financial-tools/tree/16.0/account_journal_lock_date>`_ project on GitHub.
This module is part of the `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/17.0/account_journal_lock_date>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -5,7 +5,6 @@ from odoo import fields, models
class AccountJournal(models.Model):
_inherit = "account.journal"
fiscalyear_lock_date = fields.Date(

View File

@@ -7,7 +7,6 @@ from odoo.tools.misc import format_date
class AccountMove(models.Model):
_inherit = "account.move"
def _check_fiscalyear_lock_date(self):

View File

@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"

View File

@@ -0,0 +1,8 @@
To configure this module, you need to:
1. Go to *Invoicing \> Configuration \> Journals*
2. Open a Journal and set the 'Lock Date' and the 'Lock Date for
Non-Advisers' in the' Advanced Settings' tab of the form view or
select several Journals in the list view and click on the action
menu 'Update journals lock dates' to update those dates for the
selected journals at the same time.

View File

@@ -1,8 +0,0 @@
To configure this module, you need to:
#. Go to *Invoicing > Configuration > Journals*
#. Open a Journal and set the 'Lock Date' and the 'Lock Date for Non-Advisers'
in the' Advanced Settings' tab of the form view or select several
Journals in the list view and click on the action menu
'Update journals lock dates' to update those dates for the selected
journals at the same time.

View File

@@ -0,0 +1,10 @@
- [Akretion](https://www.akretion.com):
- Benoît GUILLOT \<<benoit.guillot@akretion.com>\>
- Chafique DELLI \<<chafique.delli@akretion.com>\>
- Alexis de Lattre \<<alexis.delattre@akretion.com>\>
- Mourad EL HADJ MIMOUNE \<<mourad.elhadj.mimoune@akretion.com>\>
- [Tecnativa](https://www.tecnativa.com):
- Pedro M. Baeza
- Ernesto Tejeda
- [Factor Libre](https://www.factorlibre.com):
- Rodrigo Bonilla Martinez \<<rodrigo.bonilla@factorlibre.com>\>

View File

@@ -1,15 +0,0 @@
* `Akretion <https://www.akretion.com>`_:
* Benoît GUILLOT <benoit.guillot@akretion.com>
* Chafique DELLI <chafique.delli@akretion.com>
* Alexis de Lattre <alexis.delattre@akretion.com>
* Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
* `Tecnativa <https://www.tecnativa.com>`_:
* Pedro M. Baeza
* Ernesto Tejeda
* `Factor Libre <https://www.factorlibre.com>`_:
* Rodrigo Bonilla Martinez <rodrigo.bonilla@factorlibre.com>

View File

@@ -4,4 +4,5 @@ In addition to the lock dates provided by standard Odoo, this module
provides a 'Lock Date' and a 'Lock Date for Non-Advisers' per journal.
This module also adds a wizard that allows you to update the 'Lock Date'
and the 'Lock Date for Non-Advisers' for several Journals at the same time.
and the 'Lock Date for Non-Advisers' for several Journals at the same
time.

View File

@@ -0,0 +1,2 @@
- the module does not check that all moves prior the lock date are
posted, this could be made as part of the wizard

View File

@@ -1,2 +0,0 @@
* the module does not check that all moves prior the lock date are posted, this could be
made as part of the wizard

View File

@@ -0,0 +1,8 @@
If the logged-in user has the access group 'Adviser', he/she will not be
able to create a journal entry if the 'Lock Date' of the journal is
greater than or equal to the journal entry.
If the logged-in user has not the access group 'Adviser', he/she will
not be able to create a journal entry if the 'Lock Date for
Non-Advisers' of the journal is greater than or equal to the journal
entry.

View File

@@ -1,7 +0,0 @@
If the logged-in user has the access group 'Adviser', he/she will
not be able to create a journal entry if the 'Lock Date' of the
journal is greater than or equal to the journal entry.
If the logged-in user has not the access group 'Adviser', he/she will
not be able to create a journal entry if the 'Lock Date for Non-Advisers'
of the journal is greater than or equal to the journal entry.

View File

@@ -369,12 +369,13 @@ ul.auto-toc {
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:de6ca1ab6d2fa831b79721ddb7431eb213da77e8a2c701d157964ef58c224205
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-financial-tools/tree/16.0/account_journal_lock_date"><img alt="OCA/account-financial-tools" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-tools-16-0/account-financial-tools-16-0-account_journal_lock_date"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-tools&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/account-financial-tools/tree/17.0/account_journal_lock_date"><img alt="OCA/account-financial-tools" src="https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-account_journal_lock_date"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/account-financial-tools&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Lock each accounting journal independently.</p>
<p>In addition to the lock dates provided by standard Odoo, this module
provides a Lock Date and a Lock Date for Non-Advisers per journal.</p>
<p>This module also adds a wizard that allows you to update the Lock Date
and the Lock Date for Non-Advisers for several Journals at the same time.</p>
and the Lock Date for Non-Advisers for several Journals at the same
time.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
@@ -395,27 +396,28 @@ and the Lock Date for Non-Advisers for several Journals at the same time.<
<p>To configure this module, you need to:</p>
<ol class="arabic simple">
<li>Go to <em>Invoicing &gt; Configuration &gt; Journals</em></li>
<li>Open a Journal and set the Lock Date and the Lock Date for Non-Advisers
in the Advanced Settings tab of the form view or select several
Journals in the list view and click on the action menu
<li>Open a Journal and set the Lock Date and the Lock Date for
Non-Advisers in the Advanced Settings tab of the form view or
select several Journals in the list view and click on the action menu
Update journals lock dates to update those dates for the selected
journals at the same time.</li>
</ol>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<p>If the logged-in user has the access group Adviser, he/she will
not be able to create a journal entry if the Lock Date of the
journal is greater than or equal to the journal entry.</p>
<p>If the logged-in user has the access group Adviser, he/she will not be
able to create a journal entry if the Lock Date of the journal is
greater than or equal to the journal entry.</p>
<p>If the logged-in user has not the access group Adviser, he/she will
not be able to create a journal entry if the Lock Date for Non-Advisers
of the journal is greater than or equal to the journal entry.</p>
not be able to create a journal entry if the Lock Date for
Non-Advisers of the journal is greater than or equal to the journal
entry.</p>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h1>
<ul class="simple">
<li>the module does not check that all moves prior the lock date are posted, this could be
made as part of the wizard</li>
<li>the module does not check that all moves prior the lock date are
posted, this could be made as part of the wizard</li>
</ul>
</div>
<div class="section" id="bug-tracker">
@@ -423,7 +425,7 @@ made as part of the wizard</li>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-financial-tools/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_journal_lock_date%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_journal_lock_date%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
@@ -463,7 +465,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-tools/tree/16.0/account_journal_lock_date">OCA/account-financial-tools</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-tools/tree/17.0/account_journal_lock_date">OCA/account-financial-tools</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>

View File

@@ -12,7 +12,7 @@ from odoo.addons.account.tests import common
@tagged("post_install", "-at_install")
class TestJournalLockDate(common.AccountTestInvoicingCommon):
def setUp(self):
super(TestJournalLockDate, self).setUp()
super().setUp()
self.account_move_obj = self.env["account.move"]
self.account_move_line_obj = self.env["account.move.line"]
self.company_id = self.ref("base.main_company")