Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
3ac98024
Commit
3ac98024
authored
Feb 16, 2022
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core: formatting fixes in Base_generateYearDomain
- Remove trailing whitespaces - Follow guidelines - Fixup types
parent
b8e53d65
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateYearDomain.py
...ateItem/portal_skins/erp5_core/Base_generateYearDomain.py
+15
-15
No files found.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_generateYearDomain.py
View file @
3ac98024
...
@@ -27,17 +27,17 @@ if depth == 0:
...
@@ -27,17 +27,17 @@ if depth == 0:
count
=
0
count
=
0
while
count
<
12
:
while
count
<
12
:
# Create one Temp Object
# Create one Temp Object
o
=
newTempBase
(
portal
,
id
=
'year'
,
uid
=
'new_%s'
%
zfill
(
'year'
,
4
))
o
=
newTempBase
(
portal
,
id
=
'year'
,
uid
=
'new_%s'
%
zfill
(
'year'
,
4
))
# Set
ing delimiter
# Set
ting delimiter
if
current_date
.
month
()
in
[
1
,
7
]:
if
current_date
.
month
()
in
[
1
,
7
]:
o
.
setProperty
(
'delimiter_type'
,
1
)
o
.
setProperty
(
'delimiter_type'
,
1
)
else
:
else
:
o
.
setProperty
(
'delimiter_type'
,
0
)
o
.
setProperty
(
'delimiter_type'
,
0
)
# Setting Axis Dates start and stop
# Setting Axis Dates start and stop
o
.
setProperty
(
'start'
,
current_date
)
o
.
setProperty
(
'start'
,
current_date
)
if
current_date
.
month
()
!=
12
:
if
current_date
.
month
()
!=
12
:
stop_date
=
DateTime
(
current_date
.
year
(),
current_date
.
month
()
+
1
,
1
)
stop_date
=
DateTime
(
current_date
.
year
(),
current_date
.
month
()
+
1
,
1
)
else
:
else
:
stop_date
=
DateTime
(
year
+
1
,
1
,
1
)
stop_date
=
DateTime
(
year
+
1
,
1
,
1
)
o
.
setProperty
(
'stop'
,
stop_date
)
o
.
setProperty
(
'stop'
,
stop_date
)
...
@@ -50,7 +50,7 @@ if depth == 0:
...
@@ -50,7 +50,7 @@ if depth == 0:
o
.
setProperty
(
'title'
,
title
)
o
.
setProperty
(
'title'
,
title
)
# Defining Link
# Defining Link
link
=
'%s&bound_start=%s&lane_path=base_month_domain'
%
(
default_link_url
,
url_quote
(
str
(
current_date
)))
link
=
'%s&bound_start=%s&lane_path=base_month_domain'
%
(
default_link_url
,
url_quote
(
str
(
current_date
)))
o
.
setProperty
(
'link'
,
link
)
o
.
setProperty
(
'link'
,
link
)
category_list
.
append
(
o
)
category_list
.
append
(
o
)
...
@@ -61,11 +61,11 @@ else:
...
@@ -61,11 +61,11 @@ else:
for
category
in
category_list
:
for
category
in
category_list
:
domain
=
parent
.
generateTempDomain
(
id
=
'sub'
+
category
.
getProperty
(
'id'
))
domain
=
parent
.
generateTempDomain
(
id
=
'sub'
+
category
.
getProperty
(
'id'
))
domain
.
edit
(
title
=
category
.
getTitle
(),
domain
.
edit
(
title
=
category
.
getTitle
(),
membership_criterion_base_category
=
(
'parent'
,
),
membership_criterion_base_category
=
(
'parent'
,
),
membership_criterion_category
=
(
category
,
),
membership_criterion_category
=
(
category
,
),
domain_generator_method_id
=
script
.
id
,
domain_generator_method_id
=
script
.
id
,
uid
=
category
.
getUid
())
uid
=
category
.
getUid
())
domain_list
.
append
(
domain
)
domain_list
.
append
(
domain
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment