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
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
a2131c79
Commit
a2131c79
authored
Nov 08, 2017
by
Cédric Le Ninivin
Committed by
Cédric Le Ninivin
May 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AcceptSover: Only applies Solver if it has been defined on the rule
parent
b04c0512
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
bt5/erp5_simulation/DocumentTemplateItem/portal_components/document.erp5.AcceptSolver.py
...plateItem/portal_components/document.erp5.AcceptSolver.py
+6
-1
No files found.
bt5/erp5_simulation/DocumentTemplateItem/portal_components/document.erp5.AcceptSolver.py
View file @
a2131c79
...
@@ -50,6 +50,7 @@ class AcceptSolver(ConfigurablePropertySolverMixin):
...
@@ -50,6 +50,7 @@ class AcceptSolver(ConfigurablePropertySolverMixin):
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
solved_property_list
=
self
.
getConfigurationPropertyDict
()
\
solved_property_list
=
self
.
getConfigurationPropertyDict
()
\
.
get
(
'tested_property_list'
)
.
get
(
'tested_property_list'
)
solver_portal_type_relative_url
=
self
.
getPortalTypeValue
().
getRelativeUrl
()
if
solved_property_list
is
None
:
if
solved_property_list
is
None
:
solved_property_list
=
\
solved_property_list
=
\
portal
.
portal_types
.
getTypeInfo
(
self
).
getTestedPropertyList
()
portal
.
portal_types
.
getTypeInfo
(
self
).
getTestedPropertyList
()
...
@@ -60,7 +61,11 @@ class AcceptSolver(ConfigurablePropertySolverMixin):
...
@@ -60,7 +61,11 @@ class AcceptSolver(ConfigurablePropertySolverMixin):
divergence_list
=
movement
.
getDivergenceList
()
divergence_list
=
movement
.
getDivergenceList
()
for
divergence
in
divergence_list
:
for
divergence
in
divergence_list
:
solved_property
=
divergence
.
getProperty
(
'tested_property'
)
solved_property
=
divergence
.
getProperty
(
'tested_property'
)
if
solved_property
not
in
solved_property_list
:
# Only apply solver if it has been defined on the Tester
if
(
solved_property
not
in
solved_property_list
)
or
\
(
not
solver_portal_type_relative_url
\
in
portal
.
restrictedTraverse
(
divergence
.
getProperty
(
'tester_relative_url'
)).
getSolverList
()):
continue
continue
new_value
=
divergence
.
getProperty
(
'decision_value'
)
new_value
=
divergence
.
getProperty
(
'decision_value'
)
# XXX hard coded
# XXX hard coded
...
...
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