Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Accounting Periods
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo modules
Accounting Periods
Merge requests
!14
Topic/13.0/tg 204
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Topic/13.0/tg 204
topic/13.0/TG-204
into
branch/13.0
Overview
0
Commits
4
Pipelines
2
Changes
1
Closed
Etienne Ferriere
requested to merge
topic/13.0/TG-204
into
branch/13.0
2 years ago
Overview
0
Commits
4
Pipelines
2
Changes
1
Expand
0
0
Merge request reports
Viewing commit
8d483ede
Prev
Next
Show latest version
1 file
+
1
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
8d483ede
Added tag 13.0.1.2.1 for changeset
27a7b6c0244e
· 8d483ede
Etienne Ferriere
authored
2 years ago
models/account_fiscalyear.py
+
12
−
10
Options
@@ -104,17 +104,19 @@ class AccountFiscalyear(models.Model):
if
not
config_fy_day
and
not
config_fy_month
:
return
ed
=
self
.
date_stop
if
str
(
ed
.
month
)
!=
config_fy_month
or
ed
.
day
!=
config_fy_day
:
raise
ValidationError
(
_
(
"
The end date must match the fiscal
"
"
year general config (%s/%s)
"
for
fy
in
self
:
ed
=
fy
.
date_stop
if
str
(
ed
.
month
)
!=
config_fy_month
or
ed
.
day
!=
config_fy_day
:
raise
ValidationError
(
_
(
"
The end date must match the fiscal
"
"
year general config (%s/%s)
"
)
%
(
config_fy_month
,
config_fy_day
)
)
%
(
config_fy_month
,
config_fy_day
)
)
def
create_period
(
self
):
def
create_period
(
self
,
code
=
"
%s
"
):
"""
Call by the
"
Create Periods
"
Button.
This function use
"
date_stop
"
field to generate
@@ -137,7 +139,7 @@ class AccountFiscalyear(models.Model):
0
,
{
"
name
"
:
sd
.
strftime
(
"
%m/%Y
"
),
"
code
"
:
sd
.
strftime
(
"
%m/%Y
"
),
"
code
"
:
code
%
sd
.
strftime
(
"
%m/%Y
"
),
"
date_start
"
:
sd
,
"
date_stop
"
:
period_ed
,
},
Loading