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
Labels
Merge Requests
139
Merge Requests
139
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
f3a5d097
Commit
f3a5d097
authored
Feb 09, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
social_contracts: py3
parent
5de940ea
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
bt5/erp5_social_contracts/SkinTemplateItem/portal_skins/erp5_social_contract/Person_getPartnerCount.py
...rtal_skins/erp5_social_contract/Person_getPartnerCount.py
+3
-3
No files found.
bt5/erp5_social_contracts/SkinTemplateItem/portal_skins/erp5_social_contract/Person_getPartnerCount.py
View file @
f3a5d097
...
@@ -24,11 +24,11 @@ for social_contract in context.getDestinationRelatedValueList(portal_type='Socia
...
@@ -24,11 +24,11 @@ for social_contract in context.getDestinationRelatedValueList(portal_type='Socia
if
getattr
(
social_contract
,
'stop_date'
,
None
)
is
None
or
social_contract
.
stop_date
>=
at_date
:
if
getattr
(
social_contract
,
'stop_date'
,
None
)
is
None
or
social_contract
.
stop_date
>=
at_date
:
social_contract_list
.
append
(
social_contract
)
social_contract_list
.
append
(
social_contract
)
partner_uid_
dict
=
{}
partner_uid_
set
=
set
()
# find all partners from those social contracts
# find all partners from those social contracts
for
social_contract
in
social_contract_list
:
for
social_contract
in
social_contract_list
:
for
partner_uid
in
social_contract
.
getDestinationUidList
(
portal_type
=
'Person'
):
for
partner_uid
in
social_contract
.
getDestinationUidList
(
portal_type
=
'Person'
):
if
partner_uid
!=
context
.
getUid
():
if
partner_uid
!=
context
.
getUid
():
partner_uid_
dict
[
partner_uid
]
=
1
partner_uid_
set
.
add
(
partner_uid
)
return
len
(
partner_uid_dict
.
keys
()
)
return
len
(
partner_uid_set
)
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