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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
4575983a
Commit
4575983a
authored
Mar 01, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
erp5_core: Expand simulation with priority 3
See merge request
!1887
parents
040dc8f0
46e5b5c3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.Delivery.py
...tTemplateItem/portal_components/document.erp5.Delivery.py
+3
-2
product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.SimulableMixin.py
...mplateItem/portal_components/mixin.erp5.SimulableMixin.py
+6
-2
No files found.
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.Delivery.py
View file @
4575983a
...
@@ -41,7 +41,8 @@ from Products.ERP5Type.XMLObject import XMLObject
...
@@ -41,7 +41,8 @@ from Products.ERP5Type.XMLObject import XMLObject
from
erp5.component.document.ImmobilisationDelivery
import
ImmobilisationDelivery
from
erp5.component.document.ImmobilisationDelivery
import
ImmobilisationDelivery
from
erp5.component.mixin.AmountGeneratorMixin
import
AmountGeneratorMixin
from
erp5.component.mixin.AmountGeneratorMixin
import
AmountGeneratorMixin
from
erp5.component.mixin.CompositionMixin
import
CompositionMixin
from
erp5.component.mixin.CompositionMixin
import
CompositionMixin
from
erp5.component.mixin.SimulableMixin
import
SimulableMixin
from
erp5.component.mixin.SimulableMixin
import
SimulableMixin
,
\
SIMULATION_PRIORITY
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
,
\
from
Products.ERP5Type.UnrestrictedMethod
import
UnrestrictedMethod
,
\
unrestricted_apply
unrestricted_apply
from
erp5.component.interface.IMovementCollection
import
IMovementCollection
from
erp5.component.interface.IMovementCollection
import
IMovementCollection
...
@@ -669,7 +670,7 @@ class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin,
...
@@ -669,7 +670,7 @@ class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin,
# XXX: Previous implementation waited for expand activities of related
# XXX: Previous implementation waited for expand activities of related
# documents and even suggested to look at explanation tree,
# documents and even suggested to look at explanation tree,
# instead of causalities. Is it required ?
# instead of causalities. Is it required ?
kw
=
{
'priority'
:
3
}
kw
=
{
'priority'
:
SIMULATION_PRIORITY
}
kw
.
update
(
activity_kw
)
kw
.
update
(
activity_kw
)
after_tag
=
kw
.
pop
(
'after_tag'
,
None
)
after_tag
=
kw
.
pop
(
'after_tag'
,
None
)
if
isinstance
(
after_tag
,
basestring
):
if
isinstance
(
after_tag
,
basestring
):
...
...
product/ERP5/bootstrap/erp5_core/MixinTemplateItem/portal_components/mixin.erp5.SimulableMixin.py
View file @
4575983a
...
@@ -35,6 +35,8 @@ from Products.ERP5Type.Base import Base
...
@@ -35,6 +35,8 @@ from Products.ERP5Type.Base import Base
from
Products.ERP5Type.TransactionalVariable
import
getTransactionalVariable
from
Products.ERP5Type.TransactionalVariable
import
getTransactionalVariable
from
Products.ERP5Type.Errors
import
SimulationError
from
Products.ERP5Type.Errors
import
SimulationError
SIMULATION_PRIORITY
=
3
class
SimulableMixin
(
Base
):
class
SimulableMixin
(
Base
):
security
=
ClassSecurityInfo
()
security
=
ClassSecurityInfo
()
...
@@ -69,7 +71,7 @@ class SimulableMixin(Base):
...
@@ -69,7 +71,7 @@ class SimulableMixin(Base):
activity
=
'SQLQueue'
,
activity
=
'SQLQueue'
,
group_method_id
=
'portal_rules/updateSimulation'
,
group_method_id
=
'portal_rules/updateSimulation'
,
tag
=
'build:'
+
path
,
tag
=
'build:'
+
path
,
priority
=
3
,
priority
=
SIMULATION_PRIORITY
,
).
_updateSimulation
(
**
kw
)
).
_updateSimulation
(
**
kw
)
del
tv
[
key
]
del
tv
[
key
]
ignore
.
update
(
kw
)
ignore
.
update
(
kw
)
...
@@ -97,7 +99,9 @@ class SimulableMixin(Base):
...
@@ -97,7 +99,9 @@ class SimulableMixin(Base):
if
applied_rule
is
None
:
if
applied_rule
is
None
:
applied_rule
=
self
.
_createRootAppliedRule
()
applied_rule
=
self
.
_createRootAppliedRule
()
expand_root
=
applied_rule
is
not
None
expand_root
=
applied_rule
is
not
None
activate_kw
=
{
'tag'
:
'build:'
+
self
.
getPath
()}
activate_kw
=
{
'tag'
:
'build:'
+
self
.
getPath
(),
'priority'
:
SIMULATION_PRIORITY
}
if
expand_root
:
if
expand_root
:
applied_rule
.
expand
(
activate_kw
=
activate_kw
)
applied_rule
.
expand
(
activate_kw
=
activate_kw
)
else
:
else
:
...
...
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