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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
a9942b09
Commit
a9942b09
authored
Nov 25, 2024
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core: fix fullInventory case
check only date of Inventory in this case
parent
60860972
Pipeline
#38228
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.Inventory.py
...TemplateItem/portal_components/document.erp5.Inventory.py
+13
-9
No files found.
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.Inventory.py
View file @
a9942b09
...
@@ -155,17 +155,21 @@ class Inventory(Delivery):
...
@@ -155,17 +155,21 @@ class Inventory(Delivery):
to_delete_stock_uid_add
=
to_delete_stock_uid_set
.
add
to_delete_stock_uid_add
=
to_delete_stock_uid_set
.
add
to_delete_list
=
[]
to_delete_list
=
[]
to_delete_list_append
=
to_delete_list
.
append
to_delete_list_append
=
to_delete_list
.
append
inventory_id
=
self
.
getId
()
for
inventory_calculation_dict
in
default_inventory_calculation_list
:
for
inventory_calculation_dict
in
default_inventory_calculation_list
:
stop_date_list
=
[]
stop_date_list
=
[]
list_method
=
inventory_calculation_dict
[
'list_method'
]
if
self
.
isFullInventory
():
method
=
getattr
(
self
,
list_method
)
stop_date_list
.
append
(
self
.
getStopDate
())
for
movement
in
method
():
else
:
if
(
movement
.
getResourceValue
()
is
not
None
)
and
(
movement
.
getInventoriatedQuantity
()
not
in
(
None
,
''
)):
list_method
=
inventory_calculation_dict
[
'list_method'
]
stop_date
=
movement
.
getStopDate
()
method
=
getattr
(
self
,
list_method
)
if
stop_date
not
in
stop_date_list
:
for
movement
in
method
():
stop_date_list
.
append
(
stop_date
)
if
(
movement
.
getResourceValue
()
is
not
None
)
and
(
movement
.
getInventoriatedQuantity
()
not
in
(
None
,
''
)):
stop_date_list
=
sorted
(
stop_date_list
)
stop_date
=
movement
.
getStopDate
()
if
stop_date
not
in
stop_date_list
:
stop_date_list
.
append
(
stop_date
)
stop_date_list
=
sorted
(
stop_date_list
)
for
stop_date
in
stop_date_list
:
for
stop_date
in
stop_date_list
:
# build a dict containing all inventory for this node
# build a dict containing all inventory for this node
...
@@ -205,7 +209,7 @@ class Inventory(Delivery):
...
@@ -205,7 +209,7 @@ class Inventory(Delivery):
not_used_inventory_dict
=
current_inventory_dict
not_used_inventory_dict
=
current_inventory_dict
else
:
else
:
not_used_inventory_dict
=
{}
not_used_inventory_dict
=
{}
inventory_id
=
self
.
getId
()
#
inventory_id = self.getId()
list_method
=
inventory_calculation_dict
[
'list_method'
]
list_method
=
inventory_calculation_dict
[
'list_method'
]
method
=
getattr
(
self
,
list_method
)
method
=
getattr
(
self
,
list_method
)
...
...
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