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
Labels
Merge Requests
139
Merge Requests
139
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
1fdadb53
Commit
1fdadb53
authored
Sep 10, 2021
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_travel_expense: limit number to check
parent
91e832b0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
bt5/erp5_travel_expense/SkinTemplateItem/portal_skins/erp5_hr_record/Alarm_createRepresentativeRecordForExpenseValidationRequest.py
..._createRepresentativeRecordForExpenseValidationRequest.py
+5
-0
bt5/erp5_travel_expense/SkinTemplateItem/portal_skins/erp5_hr_record/Alarm_createRepresentativeRecordForLeaveRequest.py
...record/Alarm_createRepresentativeRecordForLeaveRequest.py
+5
-0
No files found.
bt5/erp5_travel_expense/SkinTemplateItem/portal_skins/erp5_hr_record/Alarm_createRepresentativeRecordForExpenseValidationRequest.py
View file @
1fdadb53
from
Products.ZSQLCatalog.SQLCatalog
import
Query
from
erp5.component.module.DateUtils
import
addToDate
from
DateTime
import
DateTime
portal
=
context
.
getPortalObject
()
portal
.
portal_catalog
.
searchAndActivate
(
portal_type
=
"Expense Validation Request"
,
method_id
=
'ExpenseValidationRequest_createRepresentativeRecord'
,
creation_date
=
Query
(
creation_date
=
addToDate
(
DateTime
(),
to_add
=
{
'day'
:
-
120
}),
range
=
"min"
),
activate_kw
=
{
'tag'
:
tag
},
)
context
.
activate
(
after_tag
=
tag
).
getId
()
bt5/erp5_travel_expense/SkinTemplateItem/portal_skins/erp5_hr_record/Alarm_createRepresentativeRecordForLeaveRequest.py
View file @
1fdadb53
from
Products.ZSQLCatalog.SQLCatalog
import
Query
from
erp5.component.module.DateUtils
import
addToDate
from
DateTime
import
DateTime
portal
=
context
.
getPortalObject
()
portal
.
portal_catalog
.
searchAndActivate
(
portal_type
=
"Leave Request"
,
method_id
=
'LeaveRequest_createRepresentativeRecord'
,
creation_date
=
Query
(
creation_date
=
addToDate
(
DateTime
(),
to_add
=
{
'day'
:
-
90
}),
range
=
"min"
),
activate_kw
=
{
'tag'
:
tag
},
)
context
.
activate
(
after_tag
=
tag
).
getId
()
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