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
8bc689c8
Commit
8bc689c8
authored
Jan 25, 2024
by
Xiaowu Zhang
Committed by
Cédric Le Ninivin
May 02, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_base: check force create even if total quantity is 0
maybe just use property of delivery instead of script
parent
ca60c9ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.py
...TemplateItem/portal_components/mixin.erp5.BuilderMixin.py
+9
-2
No files found.
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.py
View file @
8bc689c8
...
...
@@ -902,9 +902,16 @@ class BuilderMixin(XMLObject, Amount, Predicate):
# if total quantity is 0 no need to create anything
total_quantity
=
0
for
movement
in
movement_group_node
.
getMovementList
():
movement_list
=
movement_group_node
.
getMovementList
()
for
movement
in
movement_list
:
total_quantity
+=
abs
(
movement
.
getQuantity
())
if
total_quantity
==
0
:
force_create
=
False
check_force_method
=
getattr
(
self
,
'Delivery_isForceCreate'
,
None
)
if
check_force_method
:
force_create
=
check_force_method
(
movement_list
)
if
total_quantity
==
0
and
(
not
force_create
):
return
delivery_list
delivery
=
self
.
_createDelivery
(
delivery_module
,
...
...
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