Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Artificial Intelligence
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Supermarché
    • Quincaillerie
    • Magasin de jouets
    Restauration & Hôtellerie
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brasserie
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Commerce
    • Homme à tout faire
    • Matériel informatique & support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Parcourir toutes les industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenir partenaire
    • Services pour partenaires
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

ValueError: Expected singleton: account.report()

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
odoo16features
2 Réponses
3577 Vues
Avatar
Carlos Castillo

Hello everyone, I am currently migrating a report module to odoo 16 but I am encountering an error not in the installation but when trying to view the report, the error is as follows: 

Traceback (most recent call last):
  File "/odoo/odoo-server/odoo/models.py", line 5112, in ensure_one
    _id, = self._ids
ValueError: not enough values to unpack (expected 1, got 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/odoo/odoo-server/odoo/models.py", line 5112, in ensure_one
_id, = self._ids
ValueError: not enough values to unpack (expected 1, got 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/odoo/odoo-server/odoo/http.py", line 1579, in _serve_db
return service_model.retrying(self._serve_ir_http, self.env)
File "/odoo/odoo-server/odoo/service/model.py", line 134, in retrying
result = func()
File "/odoo/odoo-server/odoo/http.py", line 1608, in _serve_ir_http
response = self.dispatcher.dispatch(rule.endpoint, args)
File "/odoo/odoo-server/odoo/http.py", line 1805, in dispatch
result = self.request.registry['ir.http']._dispatch(endpoint)
File "/odoo/odoo-server/odoo/addons/base/models/ir_http.py", line 144, in _dispatch
result = endpoint(**request.params)
File "/odoo/odoo-server/odoo/http.py", line 698, in route_wrapper
result = endpoint(self, *args, **params_ok)
File "/odoo/odoo-server/addons/web/controllers/dataset.py", line 42, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/odoo/odoo-server/addons/web/controllers/dataset.py", line 33, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 461, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/odoo/odoo-server/odoo/api.py", line 448, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/odoo/enterprise/addons/account_reports/models/account_report.py", line 3427, in get_report_informations
self.ensure_one()
File "/odoo/odoo-server/odoo/models.py", line 5115, in ensure_one
raise ValueError("Expected singleton: %s" % self)
ValueError: Expected singleton: account.report()

The above server error caused the following client error:
null

and this is my code to generate the query: 
classAccountReportSar(models.Model):
_name='account.report.sar'
_description='Reporte de libros contables SAR'
_auto=False
fecha= fields.Date(readonly=True)
empresa= fields.Char(readonly=True)
rtn= fields.Char(readonly=True)
state= fields.Selection([       
('draft', 'Unposted'), ('posted', 'Posted'), ('cancel', 'Cancelled')], 'Status', readonly=True)
factura= fields.Char(readonly=True)
no_tax_def= fields.Monetary(readonly=True, string='Sin Ind. Impuesto', currency_field='company_currency_id')isvimp= fields.Monetary(readonly=True, string='isvimp', currency_field='company_currency_id')exeimp= fields.Monetary(readonly=True, string='', currency_field='company_currency_id')isvr10= fields.Monetary(readonly=True, string='', currency_field='company_currency_id')exento= fields.Monetary(readonly=True, string='Importe Exento', currency_field='company_currency_id')exonerado= fields.Monetary(readonly=True, string='Importe Exonerado', currency_field='company_currency_id')gravado= fields.Monetary(readonly=True, currency_field='company_currency_id')gravado15= fields.Monetary(readonly=True, string='Gravado 15%', currency_field='company_currency_id')gravado18= fields.Monetary(readonly=True, string='Gravado 18%', currency_field='company_currency_id')impuesto15= fields.Monetary(readonly=True, string='Impuesto 15%', currency_field='company_currency_id')impuesto18= fields.Monetary(readonly=True, string='Impuesto 18%', currency_field='company_currency_id')impuesto= fields.Monetary(readonly=True, string='Impuesto Total', currency_field='company_currency_id')total= fields.Monetary(readonly=True, currency_field='company_currency_id')type= fields.Char(readonly=True)journal_id= fields.Many2one('account.journal', readonly=True, auto_join=True)company_id= fields.Many2one('res.company', readonly=True, auto_join=True)company_currency_id= fields.Many2one(related='company_id.currency_id', readonly=True)move_id= fields.Many2one('account.move', string='Entry', auto_join=True)
_depends= {'account.move':['id','move_type','invoice_date','name','state','journal_id','company_id','amount_total_signed','amount_total','date','currency_id','partner_id','l10n_latam_document_type_id'],'res.currency':['currency_id'],
'res.partner':['name','vat'],
'account.move.line':['id','price_subtotal','account_id','move_id'],
'account.move.line.account.tax.rel':['account_move_line_id'],
'account.tax':['id','name'],
'res.currency.rate':['rate','currency_id','name'],
'res.company':['id'],
'account.journal':['id','name']    }
definit(self):
cr=self._cr       
tools.drop_view_if_exists(cr, self._table)
query="""my query"""
sql="""CREATE or REPLACE VIEW %s as (%s)"""% (self._table, query)
cr.execute(sql)


Could you tell me what I'm doing wrong?
the code is for version 16.

Thank you in advance for your help
0
Avatar
Ignorer
Avatar
Cheima Elkhadim
Meilleure réponse

Any solution ?  i have the same problem

0
Avatar
Ignorer
Avatar
Niyas Raphy (Walnut Software Solutions)
Meilleure réponse

Hi,

From the shared traceback it seems the error is coming from the module named:  iwesabe_account_reports , the issue is that, the code is expecting a recordset of account.report model, but it is coming as empty recordset and thus the error is raised.


You have to go through the code and analyze more about the issue.

Thanks

0
Avatar
Ignorer
Carlos Castillo
Auteur

no, that application is not the problem, I uninstalled it and even so, the error continues when trying to generate the report

Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
DeprecationWarning: The longpolling-port is a deprecated alias to the gevent-port option, please use the latter Résolu
odoo16features
Avatar
Avatar
Avatar
Avatar
Avatar
5
sept. 25
27639
How to Add wizard under print button inside the form view.
odoo16features
Avatar
Avatar
Avatar
Avatar
3
août 25
4691
How to add @api.onchange in _get_view() method odoo 16
odoo16features
Avatar
Avatar
1
mai 25
4472
get all partners which are internal users or portal users odoo16
odoo16features
Avatar
Avatar
1
avr. 25
5427
How to add decoration color green with bold to a record with a single conditon
odoo16features
Avatar
Avatar
1
avr. 25
6314
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenir partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة 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 Svenska ภาษาไทย Türkçe українська Tiếng Việt

Odoo est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

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