Skip to content

Commit 5b055b9

Browse files
[MIG] account_journal_lock_date: Migration to 18.0
1 parent 9dc218b commit 5b055b9

File tree

5 files changed

+43
-29
lines changed

5 files changed

+43
-29
lines changed

account_journal_lock_date/README.rst

+21-17
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Account Journal Lock Date
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github
20-
:target: https://github.com/OCA/account-financial-tools/tree/17.0/account_journal_lock_date
20+
:target: https://github.com/OCA/account-financial-tools/tree/18.0/account_journal_lock_date
2121
:alt: OCA/account-financial-tools
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/account-financial-tools-17-0/account-financial-tools-17-0-account_journal_lock_date
23+
:target: https://translation.odoo-community.org/projects/account-financial-tools-18-0/account-financial-tools-18-0-account_journal_lock_date
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-tools&target_branch=17.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-financial-tools&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -69,16 +69,16 @@ entry.
6969
Known issues / Roadmap
7070
======================
7171

72-
- the module does not check that all moves prior the lock date are
73-
posted, this could be made as part of the wizard
72+
- the module does not check that all moves prior the lock date are
73+
posted, this could be made as part of the wizard
7474

7575
Bug Tracker
7676
===========
7777

7878
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-financial-tools/issues>`_.
7979
In case of trouble, please check there if your issue has already been reported.
8080
If you spotted it first, help us to smash it by providing a detailed and welcomed
81-
`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**>`_.
81+
`feedback <https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_journal_lock_date%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
8282

8383
Do not contact contributors directly about support or help with technical issues.
8484

@@ -94,21 +94,25 @@ Authors
9494
Contributors
9595
------------
9696

97-
- `Akretion <https://www.akretion.com>`__:
97+
- `Akretion <https://www.akretion.com>`__:
9898

99-
- Benoît GUILLOT <benoit.guillot@akretion.com>
100-
- Chafique DELLI <chafique.delli@akretion.com>
101-
- Alexis de Lattre <alexis.delattre@akretion.com>
102-
- Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
99+
- Benoît GUILLOT <benoit.guillot@akretion.com>
100+
- Chafique DELLI <chafique.delli@akretion.com>
101+
- Alexis de Lattre <alexis.delattre@akretion.com>
102+
- Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
103103

104-
- `Tecnativa <https://www.tecnativa.com>`__:
104+
- `Tecnativa <https://www.tecnativa.com>`__:
105105

106-
- Pedro M. Baeza
107-
- Ernesto Tejeda
106+
- Pedro M. Baeza
107+
- Ernesto Tejeda
108108

109-
- `Factor Libre <https://www.factorlibre.com>`__:
109+
- `Factor Libre <https://www.factorlibre.com>`__:
110110

111-
- Rodrigo Bonilla Martinez <rodrigo.bonilla@factorlibre.com>
111+
- Rodrigo Bonilla Martinez <rodrigo.bonilla@factorlibre.com>
112+
113+
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__
114+
115+
- Bhavesh Heliconia
112116

113117
Maintainers
114118
-----------
@@ -123,6 +127,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
123127
mission is to support the collaborative development of Odoo features and
124128
promote its widespread use.
125129

126-
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.
130+
This module is part of the `OCA/account-financial-tools <https://github.com/OCA/account-financial-tools/tree/18.0/account_journal_lock_date>`_ project on GitHub.
127131

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

account_journal_lock_date/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{
55
"name": "Account Journal Lock Date",
66
"summary": "Lock each journal independently",
7-
"version": "17.0.1.0.0",
7+
"version": "18.0.1.0.0",
88
"license": "AGPL-3",
99
"author": "ACSONE SA/NV, Tecnativa, Odoo Community Association (OCA)",
1010
"website": "https://github.com/OCA/account-financial-tools",

account_journal_lock_date/models/account_move.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
class AccountMove(models.Model):
1010
_inherit = "account.move"
1111

12-
def _check_fiscalyear_lock_date(self):
13-
res = super()._check_fiscalyear_lock_date()
12+
def _check_fiscal_lock_dates(self):
13+
res = super()._check_fiscal_lock_dates()
1414
if self.env.context.get("bypass_journal_lock_date"):
1515
return res
1616

1717
date_min = fields.date.min
1818
for move in self:
19-
if self.user_has_groups("account.group_account_manager"):
19+
if self.env.user.has_group("account.group_account_manager"):
2020
lock_date = move.journal_id.fiscalyear_lock_date or date_min
2121
else:
2222
lock_date = max(
@@ -25,7 +25,7 @@ def _check_fiscalyear_lock_date(self):
2525
)
2626
if move.date <= lock_date:
2727
lock_date = format_date(self.env, lock_date)
28-
if self.user_has_groups("account.group_account_manager"):
28+
if self.env.user.has_group("account.group_account_manager"):
2929
message = _(
3030
"You cannot add/modify entries for the journal '%(journal)s' "
3131
"prior to and inclusive of the lock date %(journal_date)s"

account_journal_lock_date/readme/CONTRIBUTORS.md

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88
- Ernesto Tejeda
99
- [Factor Libre](https://www.factorlibre.com):
1010
- Rodrigo Bonilla Martinez \<<rodrigo.bonilla@factorlibre.com>\>
11+
- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
12+
- Bhavesh Heliconia
13+

account_journal_lock_date/static/description/index.html

+14-7
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
/*
1010
:Author: David Goodger (goodger@python.org)
11-
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
11+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
1212
:Copyright: This stylesheet has been placed in the public domain.
1313
1414
Default cascading style sheet for the HTML output of Docutils.
15+
Despite the name, some widely supported CSS2 features are used.
1516
1617
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
1718
customize this style sheet.
@@ -274,7 +275,7 @@
274275
margin-left: 2em ;
275276
margin-right: 2em }
276277

277-
pre.code .ln { color: grey; } /* line numbers */
278+
pre.code .ln { color: gray; } /* line numbers */
278279
pre.code, code { background-color: #eeeeee }
279280
pre.code .comment, code .comment { color: #5C6576 }
280281
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -300,7 +301,7 @@
300301
span.pre {
301302
white-space: pre }
302303

303-
span.problematic {
304+
span.problematic, pre.problematic {
304305
color: red }
305306

306307
span.section-subtitle {
@@ -368,7 +369,7 @@ <h1 class="title">Account Journal Lock Date</h1>
368369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369370
!! source digest: sha256:cd335b11f1bbc561bf62345e5d9d1c702a74199b7dd180df5da89d7be2e42346
370371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371-
<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>
372+
<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/18.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-18-0/account-financial-tools-18-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=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372373
<p>Lock each accounting journal independently.</p>
373374
<p>In addition to the lock dates provided by standard Odoo, this module
374375
provides a ‘Lock Date’ and a ‘Lock Date for Non-Advisers’ per journal.</p>
@@ -424,7 +425,7 @@ <h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
424425
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/account-financial-tools/issues">GitHub Issues</a>.
425426
In case of trouble, please check there if your issue has already been reported.
426427
If you spotted it first, help us to smash it by providing a detailed and welcomed
427-
<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>
428+
<a class="reference external" href="https://github.com/OCA/account-financial-tools/issues/new?body=module:%20account_journal_lock_date%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
428429
<p>Do not contact contributors directly about support or help with technical issues.</p>
429430
</div>
430431
<div class="section" id="credits">
@@ -455,16 +456,22 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
455456
<li>Rodrigo Bonilla Martinez &lt;<a class="reference external" href="mailto:rodrigo.bonilla&#64;factorlibre.com">rodrigo.bonilla&#64;factorlibre.com</a>&gt;</li>
456457
</ul>
457458
</li>
459+
<li><a class="reference external" href="https://www.heliconia.io">Heliconia Solutions Pvt. Ltd.</a><ul>
460+
<li>Bhavesh Heliconia</li>
461+
</ul>
462+
</li>
458463
</ul>
459464
</div>
460465
<div class="section" id="maintainers">
461466
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
462467
<p>This module is maintained by the OCA.</p>
463-
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
468+
<a class="reference external image-reference" href="https://odoo-community.org">
469+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
470+
</a>
464471
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
465472
mission is to support the collaborative development of Odoo features and
466473
promote its widespread use.</p>
467-
<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>
474+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/account-financial-tools/tree/18.0/account_journal_lock_date">OCA/account-financial-tools</a> project on GitHub.</p>
468475
<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>
469476
</div>
470477
</div>

0 commit comments

Comments
 (0)