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
882f0022
Commit
882f0022
authored
Oct 27, 2016
by
Kazuhiko Shiozaki
Committed by
Vincent Pelletier
Dec 09, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! Use PAS API.
parent
09ddeb1c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
8 deletions
+5
-8
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/query_workflow/scripts/notifyOwner.py
...tem/portal_workflow/query_workflow/scripts/notifyOwner.py
+3
-4
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/PersonModule_newEvent.py
...mplateItem/portal_skins/erp5_crm/PersonModule_newEvent.py
+1
-2
bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov_widget_library/EGov_getAllowedApplicationTypeList.py
...egov_widget_library/EGov_getAllowedApplicationTypeList.py
+1
-2
No files found.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/query_workflow/scripts/notifyOwner.py
View file @
882f0022
...
...
@@ -17,8 +17,7 @@ owner = object.getViewPermissionOwner()
owner_value
=
portal_catalog
.
getResultValue
(
portal_type
=
'Person'
,
reference
=
owner
)
# Get the authenticated user
user
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserName
()
user_value
=
portal_catalog
.
getResultValue
(
portal_type
=
'Person'
,
reference
=
user
)
user_value
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
# If users are not defined, we need to log and return
if
not
owner
or
owner_value
is
None
:
...
...
@@ -26,7 +25,7 @@ if not owner or owner_value is None:
# can do (preventing answers is even worse)
log
(
"ERP5 Query Workflow"
,
"No owner defined"
)
return
if
not
user
or
user_value
is
None
:
if
user_value
is
None
:
# We keep a trace because this is the best we
# can do (preventing answers is even worse)
log
(
"ERP5 Query Workflow"
,
"Current user is not defined"
)
...
...
@@ -54,4 +53,4 @@ msg = translateString(msg,
# We can now notify the owner through the notification tool
portal
.
portal_notifications
.
sendMessage
(
sender
=
user
,
recipient
=
owner
,
subject
=
subject
,
message
=
msg
)
sender
=
user
_value
,
recipient
=
owner
,
subject
=
subject
,
message
=
msg
)
bt5/erp5_crm/SkinTemplateItem/portal_skins/erp5_crm/PersonModule_newEvent.py
View file @
882f0022
...
...
@@ -11,8 +11,7 @@ if not person_list:
person_list
=
context
.
portal_selections
.
callSelectionFor
(
selection_name
)
# Find authenticated user
user
=
context
.
portal_membership
.
getAuthenticatedMember
()
user_person
=
context
.
portal_catalog
.
getResultValue
(
portal_type
=
'Person'
,
reference
=
str
(
user
))
user_person
=
context
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
event_list
=
[]
# For every person, create an event
...
...
bt5/erp5_egov/SkinTemplateItem/portal_skins/erp5_egov_widget_library/EGov_getAllowedApplicationTypeList.py
View file @
882f0022
...
...
@@ -19,8 +19,7 @@ portal = context.getPortalObject()
# Be sure that the company haven't submitted the current form yet
# If not do not permit to submit another one
portal_type
=
'Declaration TVA'
user_name
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserName
()
user_obj
=
portal
.
ERP5Site_getPersonObjectFromUserName
(
user_name
)
user_obj
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
if
user_obj
:
vat_code
=
user_obj
.
getCareerSubordinationValue
().
getVatCode
()
if
len
(
vat_code
)
==
7
:
...
...
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