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
Paul Graydon
erp5
Commits
a5555719
Commit
a5555719
authored
Feb 22, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_payroll_l10n_fr: Update script to create Holiday Acquisition
Use a form, so we do not have to hardcode the resource.
parent
c9b30aad
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
300 additions
and
19 deletions
+300
-19
bt5/erp5_payroll_l10n_fr/ActionTemplateItem/portal_types/Pay%20Sheet%20Transaction/add_holiday_acquisition.xml
...pes/Pay%20Sheet%20Transaction/add_holiday_acquisition.xml
+1
-1
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/LeaveRequest_getRelatedPaySheetTransaction.xml
...ll_l10n_fr/LeaveRequest_getRelatedPaySheetTransaction.xml
+6
-6
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/LeaveRequest_view.xml
...m/portal_skins/erp5_payroll_l10n_fr/LeaveRequest_view.xml
+6
-2
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_addHolidayAcquisition.py
...roll_l10n_fr/PaySheetTransaction_addHolidayAcquisition.py
+8
-3
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_addHolidayAcquisition.xml
...oll_l10n_fr/PaySheetTransaction_addHolidayAcquisition.xml
+7
-7
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_viewAddHolidayAcquisitionDialog.xml
...r/PaySheetTransaction_viewAddHolidayAcquisitionDialog.xml
+146
-0
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_viewAddHolidayAcquisitionDialog/your_resource.xml
...saction_viewAddHolidayAcquisitionDialog/your_resource.xml
+126
-0
No files found.
bt5/erp5_payroll_l10n_fr/ActionTemplateItem/portal_types/Pay%20Sheet%20Transaction/add_holiday_acquisition.xml
View file @
a5555719
...
...
@@ -79,7 +79,7 @@
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/PaySheetTransaction_
addHolidayAcquisition
</string>
</value>
<value>
<string>
string:${object_url}/PaySheetTransaction_
viewAddHolidayAcquisitionDialog
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/LeaveRequest_getRelatedPaySheetTransaction.xml
View file @
a5555719
...
...
@@ -6,18 +6,18 @@
</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
"
/>
<global
name=
"
_reconstructor"
module=
"copy_reg
"
/>
</klass>
<tuple/>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<dictionary>
<item>
...
...
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/LeaveRequest_view.xml
View file @
a5555719
...
...
@@ -11,9 +11,13 @@
<value>
<object>
<klass>
<global
name=
"
NameAssignments"
module=
"Shared.DC.Scripts.Bindings
"
/>
<global
name=
"
_reconstructor"
module=
"copy_reg
"
/>
</klass>
<tuple/>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<dictionary>
<item>
...
...
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_addHolidayAcquisition.py
View file @
a5555719
...
...
@@ -6,7 +6,11 @@ employee = context.getSourceSectionValue()
stop_date
=
context
.
getStopDate
()
holiday_per_hour
=
float
(
25
)
/
12
/
151.67
work_hour
=
context
.
getWorkTimeAnnotationLineQuantity
()
work_hour
=
context
.
getWorkTimeAnnotationLineQuantity
(
0
)
if
work_hour
is
None
:
return
context
.
Base_redirect
(
'view'
,
context
.
Base_translateString
(
'Cannot create a Holiday Acquisition without set work time.'
))
holiday_acquisition
=
context
.
holiday_acquisition_module
.
newContent
(
portal_type
=
"Holiday Acquisition"
,
...
...
@@ -15,9 +19,10 @@ holiday_acquisition = context.holiday_acquisition_module.newContent(
stop_date
=
stop_date
,
title
=
"Holiday %s For %s "
%
(
stop_date
.
strftime
(
'%Y%m'
),
employee
.
getTitle
()),
destination_value
=
employee
,
resource
=
"service_module/hr_leave_standard"
,
resource
=
resource
,
causality
=
context
.
getRelativeUrl
()
)
holiday_acquisition
.
plan
()
return
holiday_acquisition
.
Base_redirect
(
'view'
,
context
.
Base_translateString
(
'Holiday Acquisition is created'
))
return
holiday_acquisition
.
Base_redirect
(
'view'
,
context
.
Base_translateString
(
'Holiday Acquisition is created'
))
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_addHolidayAcquisition.xml
View file @
a5555719
...
...
@@ -6,18 +6,18 @@
</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
"
/>
<global
name=
"
_reconstructor"
module=
"copy_reg
"
/>
</klass>
<tuple/>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<dictionary>
<item>
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
**kw
</string>
</value>
<value>
<string>
resource,
**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_viewAddHolidayAcquisitionDialog.xml
0 → 100644
View file @
a5555719
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
PaySheetTransaction_addHolidayAcquisition
</string>
</value>
</item>
<item>
<key>
<string>
action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string>
multipart/form-data
</string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
left
</string>
<string>
right
</string>
<string>
bottom
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
your_resource
</string>
</list>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
PaySheetTransaction_viewAddHolidayAcquisitionDialog
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
PaySheetTransaction_viewAddHolidayAcquisitionDialog
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_dialog
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Add Holiday Acquisition
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
update_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
update_action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_payroll_l10n_fr/SkinTemplateItem/portal_skins/erp5_payroll_l10n_fr/PaySheetTransaction_viewAddHolidayAcquisitionDialog/your_resource.xml
0 → 100644
View file @
a5555719
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
items
</string>
<string>
required
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_resource
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
<item>
<key>
<unicode>
required_not_found
</unicode>
</key>
<value>
<string>
Input is required but no input given.
</string>
</value>
</item>
<item>
<key>
<unicode>
unknown_selection
</unicode>
</key>
<value>
<string>
You selected an item that was not in the list.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_absence_resource
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Calendar_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: [("","")] + [ (x.getTitle(), x.getRelativeUrl()) for x in context.portal_catalog(portal_type=\'Service\', use_relative_url="use/hr/leave")]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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