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
fb4305ac
Commit
fb4305ac
authored
May 24, 2023
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_core: keep line price
parent
fe231746
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.Inventory.py
...TemplateItem/portal_components/document.erp5.Inventory.py
+2
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Movement_getPriceCalculationOperandDict.py
...kins/erp5_core/Movement_getPriceCalculationOperandDict.py
+3
-1
No files found.
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.Inventory.py
View file @
fb4305ac
...
@@ -211,6 +211,7 @@ class Inventory(Delivery):
...
@@ -211,6 +211,7 @@ class Inventory(Delivery):
movement
.
getInventoriatedQuantity
()
not
in
(
None
,
''
):
movement
.
getInventoriatedQuantity
()
not
in
(
None
,
''
):
movement_quantity
=
movement
.
getInventoriatedQuantity
()
movement_quantity
=
movement
.
getInventoriatedQuantity
()
price
=
movement
.
getPrice
()
# construct key to retrieve inventory into dict
# construct key to retrieve inventory into dict
getter_list
=
[
x
[
'getter'
]
for
x
in
inventory_calculation_dict
[
'first_level'
]]
getter_list
=
[
x
[
'getter'
]
for
x
in
inventory_calculation_dict
[
'first_level'
]]
key_list
=
[]
key_list
=
[]
...
@@ -262,6 +263,7 @@ class Inventory(Delivery):
...
@@ -262,6 +263,7 @@ class Inventory(Delivery):
# before insert but not before delete
# before insert but not before delete
if
diff_quantity
!=
0
:
if
diff_quantity
!=
0
:
kwd
[
'quantity'
]
=
diff_quantity
kwd
[
'quantity'
]
=
diff_quantity
kwd
[
'inventory_line_price'
]
=
price
category_list
=
self
.
getCategoryList
()
category_list
=
self
.
getCategoryList
()
setter_list
=
[
x
[
'setter'
]
for
x
in
inventory_calculation_dict
[
'first_level'
]]
setter_list
=
[
x
[
'setter'
]
for
x
in
inventory_calculation_dict
[
'first_level'
]]
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Movement_getPriceCalculationOperandDict.py
View file @
fb4305ac
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
def
getResourceInternalPriceSortKeyMethod
(
high_priority_supply_line_list
):
def
getResourceInternalPriceSortKeyMethod
(
high_priority_supply_line_list
):
def
resourceInternalPriceSortKeyMethod
(
a
):
def
resourceInternalPriceSortKeyMethod
(
a
):
high_priority_supply_line_list_len
=
len
(
high_priority_supply_line_list
)
high_priority_supply_line_list_len
=
len
(
high_priority_supply_line_list
)
...
@@ -137,6 +136,9 @@ if specialise_set:
...
@@ -137,6 +136,9 @@ if specialise_set:
kw
[
'categories'
]
=
kw
.
get
(
'categories'
,
[])
+
[
'specialise/%s'
%
x
for
x
in
specialise_set
]
kw
[
'categories'
]
=
kw
.
get
(
'categories'
,
[])
+
[
'specialise/%s'
%
x
for
x
in
specialise_set
]
if
resource
is
not
None
:
if
resource
is
not
None
:
line_price
=
getattr
(
context
,
'inventory_line_price'
,
None
)
if
line_price
:
return
{
"price"
:
line_price
}
product_line
=
resource
.
getProductLine
()
product_line
=
resource
.
getProductLine
()
if
product_line
:
if
product_line
:
kw
[
'categories'
]
=
kw
.
get
(
'categories'
,
[])
+
[
'product_line/%s'
%
product_line
]
kw
[
'categories'
]
=
kw
.
get
(
'categories'
,
[])
+
[
'product_line/%s'
%
product_line
]
...
...
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