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
ef5c7747
Commit
ef5c7747
authored
May 20, 2021
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_trade: add ean13 code column
parent
09dd7750
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/OrderModule_getOrderReportSectionList.py
...skins/erp5_trade/OrderModule_getOrderReportSectionList.py
+2
-2
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/OrderModule_getOrderStatList.py
...m/portal_skins/erp5_trade/OrderModule_getOrderStatList.py
+9
-3
No files found.
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/OrderModule_getOrderReportSectionList.py
View file @
ef5c7747
...
...
@@ -72,14 +72,14 @@ if group_by == "client":
total_stat_list
=
[(
'total amount'
,
'total amount'
),]
else
:
if
group_by
==
"product"
:
selection_columns
=
[(
'product_reference'
,
"Product Reference"
,
),
(
'product'
,
"Product"
)]
selection_columns
=
[(
'product_reference'
,
"Product Reference"
,
),
(
'product'
,
"Product"
)
,
(
'ean13_code'
,
'Ean13 code'
)
]
stat_columns
=
[(
'product'
,
"product"
)]
elif
group_by
==
"function"
:
function_title
=
context
.
AccountingTransactionLine_getFunctionBaseCategoryTitle
()
selection_columns
=
[(
'product'
,
function_title
)]
stat_columns
=
[(
'product'
,
"product"
)]
else
:
selection_columns
=
[(
'client'
,
"Client"
),
(
'product_reference'
,
"Product Reference"
,
),
(
'product'
,
"Product"
)]
selection_columns
=
[(
'client'
,
"Client"
),
(
'product_reference'
,
"Product Reference"
,
),
(
'product'
,
"Product"
)
,
(
'ean13_code'
,
'Ean13 code'
)
]
stat_columns
=
[(
'client'
,
"client"
),
(
'product'
,
"product"
)]
for
x
in
interval_list
:
interval_column_list
.
extend
([(
"Amount %s"
%
x
,
"Amount %s"
%
x
),
(
"Quantity %s"
%
x
,
"Quantity %s"
%
x
)])
...
...
bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/OrderModule_getOrderStatList.py
View file @
ef5c7747
...
...
@@ -139,7 +139,10 @@ for result in result_list:
else
:
product_title
=
line
.
getResourceTitle
()
resource_value
=
line
.
getResourceValue
()
resource_title_dict
[
product_title
]
=
resource_value
.
getReference
()
resource_title_dict
[
product_title
]
=
{
'reference'
:
resource_value
.
getReference
(),
'ean13_code'
:
resource_value
.
getEan13Code
()
}
if
price_type
==
'sale_price'
:
total_price
=
line
.
getTotalPrice
()
...
...
@@ -205,7 +208,9 @@ if len(client_dict):
for
product_title
in
line_product_dict
.
keys
():
obj
=
Object
(
uid
=
"new_"
)
obj
[
'product'
]
=
product_title
obj
[
'product_reference'
]
=
resource_title_dict
.
get
(
product_title
)
obj
[
'product_reference'
]
=
resource_title_dict
.
get
(
product_title
)[
'reference'
]
obj
[
'ean13_code'
]
=
resource_title_dict
.
get
(
product_title
)[
'ean13_code'
]
line_total_amount
=
0
line_total_quantity
=
0
for
period
in
period_list
:
...
...
@@ -257,7 +262,8 @@ else:
for
product_title
in
product_dict
.
keys
():
obj
=
Object
(
uid
=
"new_"
)
obj
[
'product'
]
=
product_title
obj
[
'product_reference'
]
=
resource_title_dict
.
get
(
product_title
)
obj
[
'product_reference'
]
=
resource_title_dict
.
get
(
product_title
)[
'reference'
]
obj
[
'ean13_code'
]
=
resource_title_dict
.
get
(
product_title
)[
'ean13_code'
]
line_total_amount
=
0
line_total_quantity
=
0
...
...
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