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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
ca81bb3d
Commit
ca81bb3d
authored
Oct 25, 2022
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_travel_expense&calendar: set correctly effective date for cross month
parent
d270d3fb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
160 additions
and
1 deletion
+160
-1
bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_interaction_workflow/interaction_LeaveRequest_setLeaveRequestPeriodDate.xml
...ow/interaction_LeaveRequest_setLeaveRequestPeriodDate.xml
+72
-0
bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_interaction_workflow/script_LeaveRequest_setLeaveRequestPeriodDate.py
...workflow/script_LeaveRequest_setLeaveRequestPeriodDate.py
+8
-0
bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_interaction_workflow/script_LeaveRequest_setLeaveRequestPeriodDate.xml
...orkflow/script_LeaveRequest_setLeaveRequestPeriodDate.xml
+76
-0
bt5/erp5_travel_expense/SkinTemplateItem/portal_skins/erp5_hr_record/LeaveRequestRecord_updateRelatedTicket.py
.../erp5_hr_record/LeaveRequestRecord_updateRelatedTicket.py
+4
-1
No files found.
bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_interaction_workflow/interaction_LeaveRequest_setLeaveRequestPeriodDate.xml
0 → 100644
View file @
ca81bb3d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Interaction Workflow Interaction"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
after_script/portal_workflow/leave_request_interaction_workflow/script_LeaveRequest_setLeaveRequestPeriodDate
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
interaction_LeaveRequest_setLeaveRequestPeriodDate
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Interaction Workflow Interaction
</string>
</value>
</item>
<item>
<key>
<string>
portal_type_filter
</string>
</key>
<value>
<tuple>
<string>
Leave Request
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
portal_type_group_filter
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
temporary_document_disallowed
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
LeaveRequest_setLeaveRequestPeriodDate
</string>
</value>
</item>
<item>
<key>
<string>
trigger_method_id
</string>
</key>
<value>
<tuple>
<string>
_setEffectiveDate
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
trigger_once_per_transaction
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_interaction_workflow/script_LeaveRequest_setLeaveRequestPeriodDate.py
0 → 100644
View file @
ca81bb3d
leave_request
=
state_change
[
'object'
]
effective_date
=
leave_request
.
getEffectiveDate
()
for
leave_request_period
in
leave_request
.
objectValues
(
portal_type
=
'Leave Request Period'
):
if
leave_request_period
.
getStartDate
()
>
effective_date
:
leave_request_period
.
setEffectiveDate
(
leave_request_period
.
getStartDate
())
else
:
leave_request_period
.
setEffectiveDate
(
effective_date
)
bt5/erp5_calendar/WorkflowTemplateItem/portal_workflow/leave_request_interaction_workflow/script_LeaveRequest_setLeaveRequestPeriodDate.xml
0 → 100644
View file @
ca81bb3d
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
script_LeaveRequest_setLeaveRequestPeriodDate
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Script
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
LeaveRequest_setLeaveRequestPeriodDate
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_travel_expense/SkinTemplateItem/portal_skins/erp5_hr_record/LeaveRequestRecord_updateRelatedTicket.py
View file @
ca81bb3d
...
...
@@ -64,7 +64,8 @@ if not line_list:
line_list
=
[]
for
_
in
range
(
months
):
line_list
.
append
(
ticket
.
newContent
(
portal_type
=
"Leave Request Period"
portal_type
=
"Leave Request Period"
,
effective_date
=
start_date
))
...
...
@@ -87,6 +88,8 @@ for line in line_list:
resource
=
record
.
getResource
(),
quantity
=
quantity
)
if
line
.
getEffectiveDate
()
<
start_date
:
line
.
edit
(
effective_date
=
start_date
)
total_quantity
-=
quantity
if
total_quantity
<
0
:
...
...
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