Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

Reporting > Sales Details fails with error message (point_of_sale.report_saledetails)

Naroči se

Get notified when there's activity on this post

This question has been flagged
posreport
2 Odgovori
2440 Prikazi
Avatar
SB - MvB e.V.

Hi,

could you please help us?

We just try to create a sales report via: Reporting > Sales Details

But fails with the following error message.

BR + Thank you

Stefan



Traceback (most recent call last):
  File "", line 4968, in template_1072
  File "", line 4950, in template_1072_content
  File "", line 4929, in template_1072_t_call_0
  File "", line 3751, in template_1072_t_call_1
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 2456, in _get_widget
    content = converter.value_to_html(value, field_options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb_fields.py", line 189, in value_to_html
    value = float_utils.float_round(value, precision_digits=precision)
  File "/usr/lib/python3/dist-packages/odoo/tools/float_utils.py", line 75, in float_round
    normalized_value = value / rounding_factor # normalize
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/report.py", line 120, in report_download
    response = self.report_routes(reportname, converter=converter, context=context, **data)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 741, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/report.py", line 42, in report_routes
    pdf = report.with_context(context)._render_qweb_pdf(reportname, docids, data=data)[0]
  File "/usr/lib/python3/dist-packages/odoo/addons/account/models/ir_actions_report.py", line 61, in _render_qweb_pdf
    return super()._render_qweb_pdf(report_ref, res_ids=res_ids, data=data)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 899, in _render_qweb_pdf
    collected_streams = self._render_qweb_pdf_prepare_streams(report_ref, data, res_ids=res_ids)
  File "/usr/lib/python3/dist-packages/odoo/addons/account/models/ir_actions_report.py", line 20, in _render_qweb_pdf_prepare_streams
    return super()._render_qweb_pdf_prepare_streams(report_ref, data, res_ids=res_ids)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 749, in _render_qweb_pdf_prepare_streams
    html = self.with_context(**additional_context)._render_qweb_html(report_ref, all_res_ids_wo_stream, data=data)[0]
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 949, in _render_qweb_html
    return self._render_template(report.report_name, data), 'html'
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 669, in _render_template
    return view_obj._render_template(template, values).encode()
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 2051, in _render_template
    return self.env['ir.qweb']._render(template, values)
  File "/usr/lib/python3/dist-packages/odoo/tools/profiler.py", line 292, in _tracked_method_render
    return method_render(self, template, values, **options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 599, in _render
    result = ''.join(rendering)
  File "", line 4974, in template_1072
odoo.addons.base.models.ir_qweb.QWebException: Error while render the template
TypeError: unsupported operand type(s) for /: 'NoneType' and 'float'
Template: point_of_sale.report_saledetails
Path: /t/t[2]/t/t[2]/table[1]/tbody/tr[2]/td[2]/span[1]/span[1]
Node: 

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    RPC_ERROR
        at makeErrorFromResponse (http://192.168.16.99:8069/web/assets/8e0d905/web.assets_web.min.js:2886:163)
        at decoder.onload (http://192.168.16.99:8069/web/assets/8e0d905/web.assets_web.min.js:2872:7)





0
Avatar
Opusti
Avatar
SB - MvB e.V.
Avtor Best Answer

Hi,

thank you for your reply.
This is no "custom" report. It is the standard sales report.
Could this happen, if we add a product like banana and our sales price is 0€?

Otherwise I can not explain it to me, as there is and there was no modification from our side.

Especially not for report_saledetails.


BR
schtebo

0
Avatar
Opusti
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,

The error is related to a TypeError occurring when trying to perform a division operation. One of the operands is None (NoneType, not NullType) and the other is a float. This typically happens when a field expected to contain a numeric value is empty or null. To address this, make sure fields in your sales orders have proper numeric values. The error points to the template 'point_of_sale.report_saledetails'. Review this template, particularly the section mentioned in the error:

/t/t[2]/t/t[2]/table[1]/tbody/tr[2]/td[2]/span[1]/span[1]

You could use a default value or a conditional statement to avoid the division by zero error.


Hope it helps

0
Avatar
Opusti
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Prijavi
Related Posts Odgovori Prikazi Aktivnost
Add filter on reporting -> orders -> pivot view
pos report
Avatar
Avatar
1
jul. 25
1686
how to change product_qty field data type from integer to float
pos report
Avatar
Avatar
Avatar
2
avg. 20
8085
POS Report Sale Details
sales pos report
Avatar
Avatar
1
jan. 20
5448
Is there a report containing returns in Point-Of-Sale Odoo 10?
pos report returns
Avatar
0
apr. 17
3335
Odoo pos report printing blank even when I see the preview fine
pos print report
Avatar
0
jan. 17
4887
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now