Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
third-party
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-foodcoops
third-party
Commits
c0243ebb
Commit
c0243ebb
authored
Nov 19, 2024
by
Yvon Kerdoncuff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not try to convert to string a None float value
parent
6bb941fe
Pipeline
#3944
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
views.py
outils/views.py
+2
-2
No files found.
outils/views.py
View file @
c0243ebb
...
...
@@ -204,7 +204,7 @@ class ExportPOS(View):
# p['name'] is a sequence generated string
# Test order is important as CHEQDEJ contains CHEQ for ex.
# p['journal'] could be used but easier to change in Odoo interface
sub_amount
=
round
(
float
(
p
[
'total_amount'
]),
2
)
sub_amount
=
round
(
float
(
p
[
'total_amount'
]),
2
)
if
p
[
'total_amount'
]
else
0.00
if
'CSH'
in
p
[
'name'
]:
csh
=
sub_amount
elif
'CHEQDEJ'
in
p
[
'name'
]:
...
...
@@ -317,7 +317,7 @@ class ExportPOS(View):
totals
=
{}
for
r
in
res
:
if
(
float
(
r
[
'total_amount'
])
>
0
)
:
if
r
[
'total_amount'
]
and
float
(
r
[
'total_amount'
])
>
0
:
# d = time.strptime(r['min_date'], tf)
# date = str(d.tm_mday) + '-' + str(d.tm_mon) + '-' + str(d.tm_year)
date
,
hours
=
r
[
'min_date'
]
.
split
(
' '
)
...
...
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