Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Assertion Error, "Field is without Selection"

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
fieldsselectionassertionerrorv15
4 Răspunsuri
7669 Vizualizări
Imagine profil
Jugert Mucoimaj

Hello, during a custom module upgrade I'm facing a weird error.

Traceback (most recent call last):
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/http.py", line 687, in dispatch
    result = self._call_function(**self.params)
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/http.py", line 348, in checked_call
    result = self.endpoint(*a, **kw)
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/http.py", line 916, in __call__
    return self.method(*args, **kw)
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/http.py", line 535, in response_wrap
    response = f(*args, **kw)
  File "/home/thecowmilk/dev/odoo15/odoo/addons/web/controllers/main.py", line 1351, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/home/thecowmilk/dev/odoo15/odoo/addons/web/controllers/main.py", line 1339, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/api.py", line 464, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/api.py", line 451, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "", line 2, in button_immediate_install
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/addons/base/models/ir_module.py", line 74, in check_and_log
    return method(self, *args, **kwargs)
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/addons/base/models/ir_module.py", line 483, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/addons/base/models/ir_module.py", line 600, in _button_immediate_function
    registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/modules/registry.py", line 87, in new
    odoo.modules.load_modules(registry, force_demo, status, update_module)
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/modules/loading.py", line 474, in load_modules
    processed_modules += load_marked_modules(cr, graph,
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/modules/loading.py", line 363, in load_marked_modules
    loaded, processed = load_module_graph(
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/modules/loading.py", line 198, in load_module_graph
    registry.setup_models(cr)
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/modules/registry.py", line 290, in setup_models
    model._setup_fields()
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/models.py", line 3049, in _setup_fields
    field.setup(self)
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/fields.py", line 464, in setup
    self.setup_nonrelated(model)
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/fields.py", line 2370, in setup_nonrelated
    assert self.selection is not None, "Field %s without selection" % self
Exception

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

Traceback (most recent call last):
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/http.py", line 643, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/home/thecowmilk/dev/odoo15/odoo/odoo/http.py", line 301, in _handle_exception
    raise exception.with_traceback(None) from new_cause
AssertionError: Field res.partner.user_is without selection


I don't understand what does "field .... without selection" means. How to fix this ?? Thanks!

0
Imagine profil
Abandonează
Imagine profil
Cybrosys Techno Solutions Pvt.Ltd
Cel mai bun răspuns

Hi,

The error message "AssertionError: Field res.partner.user_is without selection" usually occurs when you are trying to create a new field without specifying a selection list.

Here are the steps to resolve this error:

  1. Check if you have defined the "user_is" field in the "res.partner" model. If you have not defined this field yet, you can add it to the model as follows:

python:-

from odoo import fields, models

class ResPartner(models.Model):
_inherit = 'res.partner'

user_is = fields.Selection([
('true', 'True'),
('false', 'False')
], string="User is", default='false')

In this example, we have added a new field called "user_is" to the "res.partner" model with a selection list of two options ('true' and 'false').

  1. If you have already defined the "user_is" field, make sure that you have specified a selection list. For example:

user_is = fields.Selection(selection=[
('true', 'True'),
('false', 'False'),
], string="User is", default='false')

Regards

0
Imagine profil
Abandonează
Imagine profil
Iman Sulaiman
Cel mai bun răspuns

The "Field is without Selection" error occur when you have a Selection field with only one selection:

Bad:

​customer_type = fields.Selection([('silver','Silver')], string='Customer Type')​ <==only one option

Good:

​customer_type = fields.Selection([('silver','Silver'),('gold','Gold')], string='Customer Type')​ <==two options


0
Imagine profil
Abandonează
Imagine profil
Fazal Haleem
Cel mai bun răspuns

Probably you created a field named user_is on res.partner model of type selection with no selection option given. add some selection options and default value to the field definition i.e



    user_is = fields.Selection([        ('super_admin', 'Super Admin'),        ('admin', 'Admin'),        ('visitor', 'Visitor'),        ('portal_user', "Portal User")    ], string='User Is',default='super_admin')
0
Imagine profil
Abandonează
Imagine profil
Vikas Maharana
Cel mai bun răspuns

I'm also having the same problem and am unable solve to this answer. plz help

0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

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

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
how can I make a one2many field a selection field in view Rezolvat
fields selection
Imagine profil
Imagine profil
Imagine profil
3
oct. 25
18330
Time field
fields v15
Imagine profil
Imagine profil
2
iul. 22
5475
how to show department field value from hr.department model? Rezolvat
fields v15
Imagine profil
Imagine profil
Imagine profil
3
dec. 21
5440
How to pass values to a method that defines selection for multiple fields?
fields selection
Imagine profil
0
apr. 15
4908
How To Change Field Value According To Selection Field Openerp?
fields selection
Imagine profil
Imagine profil
1
mar. 15
10362
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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