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
daa11512
Commit
daa11512
authored
Jul 25, 2023
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_base: use price currency and use destination decision to check stock
parent
0884ab1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.py
...TemplateItem/portal_components/mixin.erp5.BuilderMixin.py
+4
-3
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.xml
...emplateItem/portal_components/mixin.erp5.BuilderMixin.xml
+3
-3
No files found.
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.py
View file @
daa11512
...
@@ -462,6 +462,7 @@ class BuilderMixin(XMLObject, Amount, Predicate):
...
@@ -462,6 +462,7 @@ class BuilderMixin(XMLObject, Amount, Predicate):
resource_value
=
resource_value
,
resource_value
=
resource_value
,
# Hardcoded price for optimization
# Hardcoded price for optimization
price
=
0
,
price
=
0
,
price_currency
=
supply
.
getPriceCurrency
(),
destination_value
=
supply
.
getDestinationValue
(),
destination_value
=
supply
.
getDestinationValue
(),
destination_section_value
=
supply
.
getDestinationSectionValue
(),
destination_section_value
=
supply
.
getDestinationSectionValue
(),
source_value
=
supply
.
getSourceValue
(),
source_value
=
supply
.
getSourceValue
(),
...
@@ -509,7 +510,7 @@ class BuilderMixin(XMLObject, Amount, Predicate):
...
@@ -509,7 +510,7 @@ class BuilderMixin(XMLObject, Amount, Predicate):
# Prepare history list to work with
# Prepare history list to work with
history_list
=
resource_value
.
Resource_getInventoryHistoryList
(
history_list
=
resource_value
.
Resource_getInventoryHistoryList
(
from_date
=
from_date
,
from_date
=
from_date
,
node_uid
=
supply
.
get
Destinat
ionUidList
()
node_uid
=
supply
.
get
ParentValue
().
getDestinationDecis
ionUidList
()
# XXX This should be bound to a stard and stop date
# XXX This should be bound to a stard and stop date
)
)
#self.log("history_list len: %s" % len(history_list))
#self.log("history_list len: %s" % len(history_list))
...
@@ -542,14 +543,14 @@ class BuilderMixin(XMLObject, Amount, Predicate):
...
@@ -542,14 +543,14 @@ class BuilderMixin(XMLObject, Amount, Predicate):
future_inventory_to_date
=
portal
.
portal_simulation
.
getFutureInventory
(
future_inventory_to_date
=
portal
.
portal_simulation
.
getFutureInventory
(
to_date
=
limit_date_list
[
0
],
to_date
=
limit_date_list
[
0
],
resource_uid
=
resource_value
.
getUid
(),
resource_uid
=
resource_value
.
getUid
(),
node_uid
=
supply
.
get
Destinat
ionUidList
(),
node_uid
=
supply
.
get
ParentValue
().
getDestinationDecis
ionUidList
(),
)
)
# We update history_list to include movements from the initial inventory date
# We update history_list to include movements from the initial inventory date
history_list
=
resource_value
.
Resource_getInventoryHistoryList
(
history_list
=
resource_value
.
Resource_getInventoryHistoryList
(
from_date
=
limit_date_list
[
0
],
from_date
=
limit_date_list
[
0
],
to_date
=
history_list
[
0
][
0
],
to_date
=
history_list
[
0
][
0
],
node_uid
=
supply
.
get
Destinat
ionUidList
()
node_uid
=
supply
.
get
ParentValue
().
getDestinationDecis
ionUidList
()
)
+
history_list
)
+
history_list
next_period_history_list
=
[]
next_period_history_list
=
[]
...
...
bt5/erp5_base/MixinTemplateItem/portal_components/mixin.erp5.BuilderMixin.xml
View file @
daa11512
...
@@ -44,11 +44,11 @@
...
@@ -44,11 +44,11 @@
<key>
<string>
text_content_warning_message
</string>
</key>
<key>
<string>
text_content_warning_message
</string>
</key>
<value>
<value>
<tuple>
<tuple>
<string>
W:52
0
, 35: Unused variable \'portal_type\' (unused-variable)
</string>
<string>
W:52
1
, 35: Unused variable \'portal_type\' (unused-variable)
</string>
<string>
W:66
3
, 18: Unused variable \'total_inventory\' (unused-variable)
</string>
<string>
W:66
4
, 18: Unused variable \'total_inventory\' (unused-variable)
</string>
<string>
W:421, 4: Unused variable \'original_min_stock_value\' (unused-variable)
</string>
<string>
W:421, 4: Unused variable \'original_min_stock_value\' (unused-variable)
</string>
<string>
W:422, 4: Unused variable \'original_factor\' (unused-variable)
</string>
<string>
W:422, 4: Unused variable \'original_factor\' (unused-variable)
</string>
<string>
W:52
0
, 14: Unused variable \'inventory\' (unused-variable)
</string>
<string>
W:52
1
, 14: Unused variable \'inventory\' (unused-variable)
</string>
</tuple>
</tuple>
</value>
</value>
</item>
</item>
...
...
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