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
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
42f2d392
Commit
42f2d392
authored
Feb 12, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builder log
parent
c89d861d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.py
...TemplateItem/portal_components/mixin.erp5.BuilderMixin.py
+20
-0
No files found.
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.py
View file @
42f2d392
...
@@ -110,6 +110,10 @@ class BuilderMixin(XMLObject, Amount, Predicate):
...
@@ -110,6 +110,10 @@ class BuilderMixin(XMLObject, Amount, Predicate):
restrict selection to a given root Applied Rule caused by a single Order
restrict selection to a given root Applied Rule caused by a single Order
or to Simulation Movements related to a limited set of existing
or to Simulation Movements related to a limited set of existing
"""
"""
import
datetime
import
logging
logger
=
logging
.
getLogger
(
"%s(%s)"
%
(
__name__
,
self
.
getRelativeUrl
()))
total_start
=
datetime
.
datetime
.
now
()
# Parameter initialization
# Parameter initialization
if
delivery_relative_url_list
is
None
:
if
delivery_relative_url_list
is
None
:
delivery_relative_url_list
=
[]
delivery_relative_url_list
=
[]
...
@@ -133,19 +137,35 @@ class BuilderMixin(XMLObject, Amount, Predicate):
...
@@ -133,19 +137,35 @@ class BuilderMixin(XMLObject, Amount, Predicate):
kw
[
'causality_uid'
]
=
[
link_value
.
getUid
()
for
link_value
in
business_link_value_list
]
kw
[
'causality_uid'
]
=
[
link_value
.
getUid
()
for
link_value
in
business_link_value_list
]
if
applied_rule_uid
is
not
None
:
if
applied_rule_uid
is
not
None
:
kw
[
'applied_rule_uid'
]
=
applied_rule_uid
kw
[
'applied_rule_uid'
]
=
applied_rule_uid
start
=
datetime
.
datetime
.
now
()
movement_list
=
self
.
searchMovementList
(
**
kw
)
movement_list
=
self
.
searchMovementList
(
**
kw
)
logger
.
info
(
'Found %s movements in %s'
,
len
(
movement_list
),
datetime
.
datetime
.
now
()
-
start
)
if
not
movement_list
:
if
not
movement_list
:
logger
.
info
(
'No movement found'
)
return
[]
return
[]
# Collect
# Collect
start
=
datetime
.
datetime
.
now
()
root_group_node
=
self
.
collectMovement
(
movement_list
,
merge_delivery
=
merge_delivery
)
root_group_node
=
self
.
collectMovement
(
movement_list
,
merge_delivery
=
merge_delivery
)
logger
.
info
(
'Collected in %s'
,
datetime
.
datetime
.
now
()
-
start
)
# Build
# Build
start
=
datetime
.
datetime
.
now
()
delivery_list
=
self
.
buildDeliveryList
(
delivery_list
=
self
.
buildDeliveryList
(
root_group_node
,
root_group_node
,
delivery_relative_url_list
=
delivery_relative_url_list
,
delivery_relative_url_list
=
delivery_relative_url_list
,
movement_list
=
movement_list
,
activate_kw
=
activate_kw
,
movement_list
=
movement_list
,
activate_kw
=
activate_kw
,
merge_delivery
=
merge_delivery
,
**
kw
)
merge_delivery
=
merge_delivery
,
**
kw
)
logger
.
info
(
'Built %s deliveries in %s'
,
len
(
delivery_list
),
datetime
.
datetime
.
now
()
-
start
)
# Call a script after building
# Call a script after building
start
=
datetime
.
datetime
.
now
()
self
.
callAfterBuildingScript
(
delivery_list
,
movement_list
,
**
kw
)
self
.
callAfterBuildingScript
(
delivery_list
,
movement_list
,
**
kw
)
logger
.
info
(
'callAfterBuildingScript in %s'
,
datetime
.
datetime
.
now
()
-
start
)
logger
.
info
(
'Total build() time for %s deliveries in %s'
,
len
(
delivery_list
),
datetime
.
datetime
.
now
()
-
total_start
)
return
delivery_list
return
delivery_list
def
getRelatedBusinessLinkValueList
(
self
):
def
getRelatedBusinessLinkValueList
(
self
):
...
...
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