Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • 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 Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and 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
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Help

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Quotation report crashes when adding 2 products

Odoberať

Get notified when there's activity on this post

This question has been flagged
reportquotationreportsStudioodoo16features
1427 Zobrazenia
Avatar
Lluc Espina

I have a modified quotation report that works perfectly if theres only one product but when i add another it stops working. This is the for each expression i am using

This is the error it gives when trying to do the quotation with +1 items.

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 5129, in ensure_one
    _id, = self._ids
ValueError: too many values to unpack (expected 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 2068, in template_1643
  File "", line 2050, in template_1643_content
  File "", line 273, in template_1643_t_call_0
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb.py", line 2376, in _get_field
    content = converter.record_to_html(record, field_name, field_options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb_fields.py", line 198, in record_to_html
    return super(FloatConverter, self).record_to_html(record, field_name, options)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_qweb_fields.py", line 120, in record_to_html
    value = record.with_context(**self.env.context)[field_name]
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 5868, in __getitem__
    return self._fields[key].__get__(self, type(self))
  File "/usr/lib/python3/dist-packages/odoo/fields.py", line 1153, in __get__
    record.ensure_one()
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 5132, in ensure_one
    raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: sale.order.line(51, 52)

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

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1584, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 133, in retrying
    result = func()
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1611, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 1815, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/mnt/custom-addons/website/website_require_login/models/ir_http.py", line 17, in _dispatch
    return super()._dispatch(endpoint)
  File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
    response = super()._dispatch(endpoint)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
    result = endpoint(**request.params)
  File "/usr/lib/python3/dist-packages/odoo/http.py", line 697, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 42, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 461, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 448, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 6502, in onchange
    record._onchange_eval(name, field_onchange[name], result)
  File "/usr/lib/python3/dist-packages/odoo/models.py", line 6213, in _onchange_eval
    method_res = method(self)
  File "/usr/lib/python3/dist-packages/odoo/addons/mail/wizard/mail_compose_message.py", line 177, in _onchange_template_id_wrapper
    values = self._onchange_template_id(self.template_id.id, self.composition_mode, self.model, self.res_id)['value']
  File "/usr/lib/python3/dist-packages/odoo/addons/mail/wizard/mail_compose_message.py", line 589, in _onchange_template_id
    values = self.generate_email_for_composer(
  File "/usr/lib/python3/dist-packages/odoo/addons/mail/wizard/mail_compose_message.py", line 719, in generate_email_for_composer
    template_values = self.env['mail.template'].with_context(tpl_partners_only=True).browse(template_id).generate_email(res_ids, fields)
  File "/usr/lib/python3/dist-packages/odoo/addons/account_edi/models/mail_template.py", line 39, in generate_email
    res = super().generate_email(res_ids, fields)
  File "/usr/lib/python3/dist-packages/odoo/addons/mail/models/mail_template.py", line 286, in generate_email
    result, report_format = self.env['ir.actions.report']._render_qweb_pdf(report, [res_id])
  File "/usr/lib/python3/dist-packages/odoo/addons/account/models/ir_actions_report.py", line 57, 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 807, 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_edi_ubl_cii/models/ir_actions_report.py", line 58, in _render_qweb_pdf_prepare_streams
    collected_streams = super()._render_qweb_pdf_prepare_streams(report_ref, data, res_ids=res_ids)
  File "/usr/lib/python3/dist-packages/odoo/addons/account_edi/models/ir_actions_report.py", line 14, in _render_qweb_pdf_prepare_streams
    collected_streams = super()._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 708, in _render_qweb_pdf_prepare_streams
    html = self.with_context(**additional_context)._render_qweb_html(report_ref, res_ids_wo_stream, data=data)[0]
  File "/mnt/extra-addons/web_studio/models/ir_actions_report.py", line 19, in _render_qweb_html
    return super(IrActionsReport, self)._render_qweb_html(report_ref, docids, data)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_actions_report.py", line 884, 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 623, in _render_template
    return view_obj._render_template(template, values).encode()
  File "/usr/lib/python3/dist-packages/odoo/addons/website/models/ir_ui_view.py", line 418, in _render_template
    return super()._render_template(template, values=values)
  File "/usr/lib/python3/dist-packages/odoo/addons/base/models/ir_ui_view.py", line 2128, 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 580, in _render
    result = ''.join(rendering)
  File "", line 80, in template_1644
  File "", line 62, in template_1644_content
  File "", line 50, in template_1644_t_call_0
  File "", line 2074, in template_1643
odoo.addons.base.models.ir_qweb.QWebException: Error while render the template
ValueError: Expected singleton: sale.order.line(51, 52)
Template: sale.report_saleorder_document
Path: /t/t/div/div[5]/div/span[2]/span
Node: 

The above server error caused the following client error:
null


0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
Error while render the template KeyError: 'name' Template: product_matrix.matrix Path: /t/t/table/tbody/tr/t/td[1]/strong Node: <strong t-esc="cell[\'name\']"/> Solved
qweb report quotation odoo16features
Avatar
Avatar
2
jan 24
2275
Edit invoice document (report) - Odoo16
invoice invoices report reports odoo16features
Avatar
Avatar
Avatar
3
mar 24
4535
Empty reports randomly generated in Odoo 17
quotation reports
Avatar
Avatar
1
apr 25
2373
Odoo Studio Error
Studio odoo16features
Avatar
Avatar
Avatar
2
feb 24
8297
ValueError: External ID not found in the system:
report odoo16features
Avatar
Avatar
1
feb 24
4050
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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