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
Georgios Dagkakis
erp5
Commits
26d1f5dd
Commit
26d1f5dd
authored
May 10, 2019
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AccountingTransaction_guessGroupedLines: Trivial simplification.
parent
1456d6a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_guessGroupedLines.py
...rp5_accounting/AccountingTransaction_guessGroupedLines.py
+3
-5
No files found.
bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_guessGroupedLines.py
View file @
26d1f5dd
...
@@ -77,12 +77,10 @@ for (node, section, mirror_section, _), line_info_list in lines_per_node.items()
...
@@ -77,12 +77,10 @@ for (node, section, mirror_section, _), line_info_list in lines_per_node.items()
continue
continue
total_price
=
sum
([
l
[
'total_price'
]
for
l
in
line_info_list
])
total_price
=
sum
([
l
[
'total_price'
]
for
l
in
line_info_list
])
# get the currency rounding for this section
# get the currency rounding for this section
default_currency
=
None
if
section
:
if
section
:
section_obj
=
portal
.
restrictedTraverse
(
section
)
default_currency
=
portal
.
restrictedTraverse
(
section
).
getPriceCurrencyValue
()
default_currency
=
section_obj
.
getPriceCurrencyValue
()
if
default_currency
is
not
None
:
if
default_currency
is
not
None
:
total_price
=
round
(
total_price
,
default_currency
.
getQuantityPrecision
())
total_price
=
round
(
total_price
,
default_currency
.
getQuantityPrecision
())
if
total_price
==
0
or
allow_grouping_with_different_quantity
:
if
total_price
==
0
or
allow_grouping_with_different_quantity
:
# we should include mirror node in the id_group, but this would reset
# we should include mirror node in the id_group, but this would reset
# id generators and generate grouping references that were already used.
# id generators and generate grouping references that were already used.
...
...
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