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
67cb642b
Commit
67cb642b
authored
Jun 28, 2021
by
Xiaowu Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_base: check more tax condition and display correcly cell resource reference
parent
ac36a0d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Delivery_getODTDataDict.py
...ateItem/portal_skins/erp5_base/Delivery_getODTDataDict.py
+6
-3
No files found.
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Delivery_getODTDataDict.py
View file @
67cb642b
...
...
@@ -94,7 +94,8 @@ def getTaxLineList(order):
order
.
contentValues
(
portal_type
=
order
.
getPortalTaxMovementTypeList
())
if
line
.
getTotalPrice
()]
for
line
in
order
.
Base_getSpecialisedAggregatedAmountList
():
if
any
(
line
.
isMemberOf
(
tax_use
)
for
tax_use
in
tax_use_list
):
#if any(line.isMemberOf(tax_use) for tax_use in tax_use_list):
if
any
(
line
.
isMemberOf
(
tax_use
)
for
tax_use
in
tax_use_list
)
or
line
.
getTradePhase
()
==
"trade/tax"
:
tax_line_list
.
append
(
line
)
tax_line_list
.
sort
(
key
=
lambda
line
:
line
.
getTitle
())
return
tax_line_list
...
...
@@ -146,12 +147,15 @@ for line in getSubLineList(context):
'specialise_title'
:
''
,
}
else
:
line_reference
=
line
.
getResource
()
and
line
.
getResourceValue
().
getReference
()
or
''
if
line
.
getPortalType
().
endswith
(
'Cell'
):
display_id
=
'translated_title'
if
request
.
get
(
'international_form'
):
display_id
=
'title'
variation_description
=
', '
.
join
([
x
[
0
]
for
x
in
line
.
getVariationCategoryItemList
(
display_id
=
display_id
)])
desc
=
(
'%s %s'
%
(
desc
[
0
],
variation_description
),
)
if
line
.
getVariation
()
and
line
.
getVariationValue
().
getReference
():
line_reference
=
line
.
getVariationValue
().
getReference
()
is_tax
=
any
(
line
.
isMemberOf
(
tax_use
)
for
tax_use
in
tax_use_list
)
#set the not_tax_line with the tax_number and the tax_line with the tax_name
...
...
@@ -176,8 +180,7 @@ for line in getSubLineList(context):
'right_style_name'
:
'Table_20_Contents_20_Right'
,
'index'
:
line
.
getReference
()
or
line
.
getIntIndex
(),
'source_reference'
:
getSourceReference
(
line
),
'reference'
:
line
.
getResource
()
is
not
None
\
and
line
.
getResourceValue
().
getReference
()
or
''
,
'reference'
:
line_reference
,
'description'
:
desc
,
'base_contribution'
:
line
.
getBaseContribution
()
or
None
,
'use_type'
:
line
.
getResourceValue
().
getUse
()
or
''
,
...
...
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