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
Vincent Bechu
erp5
Commits
ae1c3380
Commit
ae1c3380
authored
9 years ago
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make solve functions of solvers private and unrestricted
parent
ba66c108
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
35 additions
and
2 deletions
+35
-2
product/ERP5/Document/AcceptSolver.py
product/ERP5/Document/AcceptSolver.py
+9
-1
product/ERP5/Document/AdoptSolver.py
product/ERP5/Document/AdoptSolver.py
+9
-1
product/ERP5/Document/ItemListSplitSolver.py
product/ERP5/Document/ItemListSplitSolver.py
+3
-0
product/ERP5/Document/MovementSplitSolver.py
product/ERP5/Document/MovementSplitSolver.py
+2
-0
product/ERP5/Document/QuantitySplitSolver.py
product/ERP5/Document/QuantitySplitSolver.py
+3
-0
product/ERP5/Document/SolverTypeInformation.py
product/ERP5/Document/SolverTypeInformation.py
+3
-0
product/ERP5/Document/TradeModelSolver.py
product/ERP5/Document/TradeModelSolver.py
+3
-0
product/ERP5/Document/UnifySolver.py
product/ERP5/Document/UnifySolver.py
+3
-0
No files found.
product/ERP5/Document/AcceptSolver.py
View file @
ae1c3380
...
...
@@ -27,6 +27,9 @@
#
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
from
Products.ERP5.mixin.solver
import
ConfigurablePropertySolverMixin
class
AcceptSolver
(
ConfigurablePropertySolverMixin
):
...
...
@@ -35,8 +38,13 @@ class AcceptSolver(ConfigurablePropertySolverMixin):
meta_type
=
'ERP5 Accept Solver'
portal_type
=
'Accept Solver'
# Declarative security
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
# ISolver Implementation
# XXX-Leo: Needs security declaration! It's currently public.
security
.
declarePrivate
(
'solve'
)
@
UnrestrictedMethod
def
solve
(
self
,
activate_kw
=
None
):
"""
Adopt new property to simulation movements, with keeping the
...
...
This diff is collapsed.
Click to expand it.
product/ERP5/Document/AdoptSolver.py
View file @
ae1c3380
...
...
@@ -27,6 +27,9 @@
#
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
from
Products.ERP5.mixin.solver
import
ConfigurablePropertySolverMixin
class
AdoptSolver
(
ConfigurablePropertySolverMixin
):
...
...
@@ -35,8 +38,13 @@ class AdoptSolver(ConfigurablePropertySolverMixin):
meta_type
=
'ERP5 Adopt Solver'
portal_type
=
'Adopt Solver'
# Declarative security
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
# ISolver Implementation
# XXX-Leo: Needs security declaration! It's currently public.
security
.
declarePrivate
(
'solve'
)
@
UnrestrictedMethod
def
solve
(
self
,
activate_kw
=
None
):
"""
Adopt new property to movements or deliveries.
...
...
This diff is collapsed.
Click to expand it.
product/ERP5/Document/ItemListSplitSolver.py
View file @
ae1c3380
...
...
@@ -31,6 +31,7 @@ import zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Acquisition
import
aq_base
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5.mixin.solver
import
SolverMixin
from
Products.ERP5.mixin.configurable
import
ConfigurableMixin
...
...
@@ -65,6 +66,8 @@ class ItemListSplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
)
# ISolver Implementation
security
.
declarePrivate
(
'solve'
)
@
UnrestrictedMethod
def
solve
(
self
,
activate_kw
=
None
):
"""This method create new movement based on difference of aggregate sets.
It supports only removed items.
...
...
This diff is collapsed.
Click to expand it.
product/ERP5/Document/MovementSplitSolver.py
View file @
ae1c3380
...
...
@@ -59,6 +59,8 @@ class MovementSplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
)
# ISolver Implementation
security
.
declarePrivate
(
'solve'
)
@
UnrestrictedMethod
def
solve
(
self
,
activate_kw
=
None
):
"""
This method splits a Delivery and move movements in to a new
...
...
This diff is collapsed.
Click to expand it.
product/ERP5/Document/QuantitySplitSolver.py
View file @
ae1c3380
...
...
@@ -31,6 +31,7 @@ import zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Acquisition
import
aq_base
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.Globals
import
PersistentMapping
from
Products.ERP5.mixin.solver
import
SolverMixin
...
...
@@ -66,6 +67,8 @@ class QuantitySplitSolver(SolverMixin, ConfigurableMixin, XMLObject):
)
# ISolver Implementation
security
.
declarePrivate
(
'solve'
)
@
UnrestrictedMethod
def
solve
(
self
,
activate_kw
=
None
):
"""
"""
...
...
This diff is collapsed.
Click to expand it.
product/ERP5/Document/SolverTypeInformation.py
View file @
ae1c3380
...
...
@@ -30,6 +30,7 @@ from AccessControl import ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.ERP5Type
import
ERP5TypeInformation
from
Products.ERP5Type.Core.Predicate
import
Predicate
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
class
SolverTypeInformation
(
Predicate
,
ERP5TypeInformation
):
"""
...
...
@@ -214,6 +215,8 @@ class SolverTypeInformation(Predicate, ERP5TypeInformation):
method
=
getattr
(
solver
,
method_id
)
return
method
()
security
.
declarePrivate
(
'solve'
)
@
UnrestrictedMethod
def
solve
(
self
,
delivery_list
=
None
,
configuration_dict
=
None
,
activate_kw
=
None
,
**
kw
):
if
delivery_list
is
None
:
...
...
This diff is collapsed.
Click to expand it.
product/ERP5/Document/TradeModelSolver.py
View file @
ae1c3380
...
...
@@ -29,6 +29,7 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
from
Products.ERP5.Document.AcceptSolver
import
AcceptSolver
class
TradeModelSolver
(
AcceptSolver
):
...
...
@@ -58,6 +59,8 @@ class TradeModelSolver(AcceptSolver):
zope
.
interface
.
implements
(
interfaces
.
ISolver
,)
# ISolver Implementation
security
.
declarePrivate
(
'solve'
)
@
UnrestrictedMethod
def
solve
(
self
,
activate_kw
=
None
):
"""
Adopt new values to simulation movements, with keeping the original
...
...
This diff is collapsed.
Click to expand it.
product/ERP5/Document/UnifySolver.py
View file @
ae1c3380
...
...
@@ -30,6 +30,7 @@
import
zope.interface
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
,
interfaces
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
from
Products.ERP5.Document.AcceptSolver
import
AcceptSolver
class
UnifySolver
(
AcceptSolver
):
...
...
@@ -90,6 +91,8 @@ class UnifySolver(AcceptSolver):
return
simulation_movement_list
# ISolver Implementation
security
.
declarePrivate
(
'solve'
)
@
UnrestrictedMethod
def
solve
(
self
,
activate_kw
=
None
):
"""
Adopt new property value to simulation movements and their deliveries,
...
...
This diff is collapsed.
Click to expand it.
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