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
dd35e740
Commit
dd35e740
authored
Oct 28, 2020
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_hr&test: change operators as list and add link field
parent
f3ce2cd5
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
342 additions
and
10 deletions
+342
-10
bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/PositionApplicationModule_addPositionApplication.py
...p5_hr/PositionApplicationModule_addPositionApplication.py
+11
-3
bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/PositionApplicationModule_addPositionApplication.xml
...5_hr/PositionApplicationModule_addPositionApplication.xml
+1
-1
bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/PositionApplicationModule_viewPositionApplicationFastInputDialog.xml
...licationModule_viewPositionApplicationFastInputDialog.xml
+2
-1
bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/PositionApplicationModule_viewPositionApplicationFastInputDialog/your_link.xml
...dule_viewPositionApplicationFastInputDialog/your_link.xml
+272
-0
bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/PositionApplicationModule_viewPositionApplicationFastInputDialog/your_source_trade_list.xml
...tionApplicationFastInputDialog/your_source_trade_list.xml
+42
-5
bt5/erp5_hr_test/TestTemplateItem/portal_components/test.erp5.testPosition.py
...tTemplateItem/portal_components/test.erp5.testPosition.py
+14
-0
No files found.
bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/PositionApplicationModule_addPositionApplication.py
View file @
dd35e740
...
...
@@ -9,8 +9,16 @@ if not requester:
requester
=
context
.
person_module
.
newContent
(
portal_type
=
'Person'
,
first_name
=
first_name
,
last_name
=
last_name
,
default_email_coordinate_text
=
email
)
last_name
=
last_name
)
if
email
and
requester
.
getDefaultEmailCoordinateText
()
!=
email
:
requester
.
edit
(
default_email_coordinate_text
=
email
)
if
link
:
if
not
requester
.
has_key
(
'default_link'
):
requester
.
newContent
(
portal_type
=
'Link'
,
id
=
'default_link'
)
if
requester
.
default_link
.
getUrlString
()
!=
link
:
requester
.
default_link
.
edit
(
url_string
=
link
)
position_application
=
context
.
position_application_module
.
newContent
(
portal_type
=
'Position Application'
,
...
...
@@ -20,7 +28,7 @@ position_application = context.position_application_module.newContent(
aggregate
=
position_announcement
,
source
=
source
,
source_decision
=
source_decision
,
source_trade
=
source_trade
)
source_trade
_list
=
source_trade_list
)
if
web_message_date
or
web_message_text
or
web_message_title
:
if
not
web_message_date
:
...
...
bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/PositionApplicationModule_addPositionApplication.xml
View file @
dd35e740
...
...
@@ -50,7 +50,7 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
destination_section=None, email=None, first_name=None, last_name=None,
position=None, position_announcement=None,response_template=None,source=None,source_decision=None,source_trade
=None,web_message_date=None, web_message_text=None, web_message_title=None,listbox=(),batch=None,**kw
</string>
</value>
<value>
<string>
destination_section=None, email=None, first_name=None, last_name=None,
link=None, position=None, position_announcement=None,response_template=None,source=None,source_decision=None,source_trade_list
=None,web_message_date=None, web_message_text=None, web_message_title=None,listbox=(),batch=None,**kw
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
...
...
bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/PositionApplicationModule_viewPositionApplicationFastInputDialog.xml
View file @
dd35e740
...
...
@@ -85,7 +85,7 @@
<string>
your_position_announcement
</string>
<string>
your_destination_section
</string>
<string>
your_source_decision
</string>
<string>
your_source_trade
</string>
<string>
your_source_trade
_list
</string>
<string>
your_source
</string>
</list>
</value>
...
...
@@ -96,6 +96,7 @@
<list>
<string>
your_first_name
</string>
<string>
your_last_name
</string>
<string>
your_link
</string>
<string>
your_email
</string>
<string>
your_web_message_title
</string>
<string>
your_web_message_text
</string>
...
...
bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/PositionApplicationModule_viewPositionApplicationFastInputDialog/your_link.xml
0 → 100644
View file @
dd35e740
This diff is collapsed.
Click to expand it.
bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/PositionApplicationModule_viewPositionApplicationFastInputDialog/your_source_trade.xml
→
bt5/erp5_hr/SkinTemplateItem/portal_skins/erp5_hr/PositionApplicationModule_viewPositionApplicationFastInputDialog/your_source_trade
_list
.xml
View file @
dd35e740
...
...
@@ -11,14 +11,16 @@
<value>
<list>
<string>
items
</string>
<string>
required
</string>
<string>
size
</string>
<string>
title
</string>
<string>
view_separator
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
your_source_trade
</string>
</value>
<value>
<string>
your_source_trade
_list
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
...
...
@@ -65,13 +67,23 @@
</value>
</item>
<item>
<key>
<string>
size
</string>
</key>
<key>
<string>
required
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
size
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
view_separator
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -81,7 +93,7 @@
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_list_field
</string>
</value>
<value>
<string>
my_
multi_
list_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
...
...
@@ -93,13 +105,25 @@
<list/>
</value>
</item>
<item>
<key>
<string>
required
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
size
</string>
</key>
<value>
<int>
1
</int>
</value>
<value>
<int>
5
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Operator
</string>
</value>
<value>
<string>
Operators
</string>
</value>
</item>
<item>
<key>
<string>
view_separator
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<br />
]]>
</string>
</value>
</item>
</dictionary>
</value>
...
...
@@ -120,4 +144,17 @@
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: len(field.get_value(\'items\'))
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_hr_test/TestTemplateItem/portal_components/test.erp5.testPosition.py
View file @
dd35e740
...
...
@@ -52,11 +52,17 @@ class testPosition(ERP5TypeTestCase):
def
test_createSimplePositionApplication
(
self
):
portal
=
self
.
getPortalObject
()
person_url
=
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
).
getRelativeUrl
()
person_url_2
=
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
).
getRelativeUrl
()
person_url_3
=
portal
.
person_module
.
newContent
(
portal_type
=
'Person'
).
getRelativeUrl
()
position
=
portal
.
position_module
.
newContent
(
portal_type
=
'Position'
)
position_announcement
=
portal
.
position_announcement_module
.
newContent
(
portal_type
=
'Position Announcement'
)
position_application
=
portal
.
PositionApplicationModule_addPositionApplication
(
position
=
position
.
getRelativeUrl
(),
position_announcement
=
position_announcement
.
getRelativeUrl
(),
source_trade_list
=
[
person_url
],
source_decision
=
person_url_2
,
source
=
person_url_3
,
first_name
=
'position_test'
,
last_name
=
'user'
,
batch
=
1
)
...
...
@@ -64,15 +70,23 @@ class testPosition(ERP5TypeTestCase):
self
.
assertEqual
(
position_application
.
getFollowUpValue
(
portal_type
=
'Position'
),
position
)
self
.
assertEqual
(
position_application
.
getAggregateValue
(
portal_type
=
'Position Announcement'
),
position_announcement
)
self
.
assertEqual
(
position_application
.
getSimulationState
(),
'suspended'
)
self
.
assertEqual
(
position_application
.
getSourceTradeList
(),
[
person_url
])
self
.
assertEqual
(
position_application
.
getSource
(),
person_url_3
)
self
.
assertEqual
(
position_application
.
getSourceDecision
(),
person_url_2
)
person
=
position_application
.
getDestinationDecision
()
position_application
=
portal
.
PositionApplicationModule_addPositionApplication
(
position
=
position
.
getRelativeUrl
(),
position_announcement
=
position_announcement
.
getRelativeUrl
(),
first_name
=
'position_test'
,
last_name
=
'user'
,
email
=
'xx@info.com'
,
link
=
'xx'
,
batch
=
1
)
self
.
tic
()
self
.
assertEqual
(
person
,
position_application
.
getDestinationDecision
())
person
=
position_application
.
getDestinationDecisionValue
()
self
.
assertEqual
(
person
.
getDefaultEmailCoordinateText
(),
'xx@info.com'
)
self
.
assertEqual
(
person
.
default_link
.
getUrlString
(),
'xx'
)
def
test_createPositionApplicationWithMessage
(
self
):
portal
=
self
.
getPortalObject
()
...
...
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