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
Leo Le Bouter
erp5
Commits
f68df8ce
Commit
f68df8ce
authored
Oct 27, 2016
by
Kazuhiko Shiozaki
Committed by
Vincent Pelletier
Dec 23, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_configurator: migrate to ERP5 Login authentication.
parent
c194772a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
8 deletions
+15
-8
bt5/erp5_configurator_standard/TestTemplateItem/portal_components/test.erp5.testStandardConfigurationWorkflow.py
...components/test.erp5.testStandardConfigurationWorkflow.py
+9
-6
product/ERP5Configurator/Document/PersonConfiguratorItem.py
product/ERP5Configurator/Document/PersonConfiguratorItem.py
+6
-2
No files found.
bt5/erp5_configurator_standard/TestTemplateItem/portal_components/test.erp5.testStandardConfigurationWorkflow.py
View file @
f68df8ce
...
...
@@ -225,7 +225,6 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
person
.
getFirstName
())
self
.
assertEqual
(
user_info
[
"field_your_last_name"
],
person
.
getLastName
())
self
.
assertNotEquals
(
person
.
getPassword
(),
None
)
self
.
assertEqual
(
user_info
[
"field_your_function"
],
person
.
getFunction
())
self
.
assertEqual
(
user_info
[
"field_your_default_email_text"
],
...
...
@@ -236,6 +235,9 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
assignment_list
=
person
.
contentValues
(
portal_type
=
'Assignment'
)
self
.
assertEqual
(
len
(
assignment_list
),
1
)
self
.
assertEqual
(
'my_group'
,
assignment_list
[
0
].
getGroup
())
login_list
=
person
.
contentValues
(
portal_type
=
'ERP5 Login'
)
self
.
assertEqual
(
len
(
login_list
),
1
)
self
.
assertNotEquals
(
login_list
[
0
].
getPassword
(),
None
)
def
stepCheckSocialTitleCategory
(
self
,
sequence
=
None
,
sequence_list
=
None
,
**
kw
):
"""Check that the social title category is configured.
...
...
@@ -406,18 +408,18 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
def
stepCheckEventResourceItemList
(
self
,
sequence
=
None
,
sequence_list
=
None
):
self
.
assertTrue
(
self
.
all_username_list
)
for
user
name
in
self
.
all_username_list
:
for
user
_id
in
self
.
_getUserIdList
(
self
.
all_username_list
)
:
for
event_type
in
(
'Visit'
,
'Web Message'
,
'Letter'
,
'Note'
,
'Phone Call'
,
'Mail Message'
,
'Fax Message'
):
self
.
_loginAsUser
(
user
name
)
self
.
_loginAsUser
(
user
_id
)
event
=
self
.
portal
.
event_module
.
newContent
(
portal_type
=
event_type
)
self
.
assertTrue
((
'Complaint'
,
'service_module/event_complaint'
)
in
event
.
Event_getResourceItemList
())
def
stepCheckTicketResourceItemList
(
self
,
sequence
=
None
,
sequence_list
=
None
):
self
.
assertTrue
(
self
.
all_username_list
)
for
user
name
in
self
.
all_username_list
:
self
.
_loginAsUser
(
user
name
)
for
user
_id
in
self
.
_getUserIdList
(
self
.
all_username_list
)
:
self
.
_loginAsUser
(
user
_id
)
ticket
=
self
.
portal
.
support_request_module
.
newContent
(
portal_type
=
'Support Request'
)
self
.
assertTrue
((
'Financial Support'
,
'service_module/support_financial'
)
...
...
@@ -1000,7 +1002,8 @@ class StandardConfigurationMixin(TestLiveConfiguratorWorkflowMixin):
# stepPlanSaleOrders
self
.
assertEqual
(
order
.
getSimulationState
(),
'draft'
)
self
.
_loginAsUser
(
self
.
sales_manager_reference
)
sales_manager_id
,
=
self
.
_getUserIdList
([
self
.
sales_manager_reference
])
self
.
_loginAsUser
(
sales_manager_id
)
self
.
portal
.
portal_workflow
.
doActionFor
(
order
,
'plan_action'
)
self
.
tic
()
self
.
assertEqual
(
order
.
getSimulationState
(),
'planned'
)
...
...
product/ERP5Configurator/Document/PersonConfiguratorItem.py
View file @
f68df8ce
...
...
@@ -87,7 +87,6 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
'career_function'
:
self
.
getFunction
(),
'last_name'
:
self
.
getLastName
(),
'reference'
:
self
.
getReference
(),
'password'
:
self
.
getPassword
(),
})
assignment
=
person
.
newContent
(
portal_type
=
"Assignment"
,
...
...
@@ -95,6 +94,10 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
group
=
group_id
,
site
=
site_id
)
login
=
person
.
newContent
(
portal_type
=
'ERP5 Login'
,
reference
=
self
.
getReference
(),
password
=
self
.
getPassword
())
# Set dates are required to create valid assigments.
now
=
DateTime
()
assignment
.
setStartDate
(
now
)
...
...
@@ -102,9 +105,10 @@ class PersonConfiguratorItem(XMLObject, ConfiguratorItemMixin):
# Define valid for 10 years.
assignment
.
setStopDate
(
now
+
(
365
*
10
))
# Validate the Person
and Assigment
# Validate the Person
, Assigment and Login
person
.
validate
(
comment
=
translateString
(
"Validated by Configurator"
))
assignment
.
open
(
comment
=
translateString
(
"Open by Configuration"
))
login
.
validate
(
comment
=
translateString
(
"Validated by Configurator"
))
## add to customer template
business_configuration
=
self
.
getBusinessConfigurationValue
()
...
...
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