Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

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

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

Odoo.sh upgrade v13-v16 on Branch Staging: AssertionError: Field without selection

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
migrationupgradeassertionerrorodoo16featuresSelection
1 Antworten
3535 Ansichten
Avatar
Admin Samadeva

After having performed successfully a DB upgrade (v13 to v16) using upgrade.odoo.com and imported it on my staging branch in odoo.sh.

When i connect to this odoo16-Staging-branch (neutralized DB) and try to re-install my custom module (extending website_event) in the Apps, i got this error: AssertionError: Field event.event.state without selection

RPC_ERROR
Odoo Server Error
Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/http.py", line 1583, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/home/odoo/src/odoo/odoo/service/model.py", line 134, in retrying
    result = func()
  File "/home/odoo/src/odoo/odoo/http.py", line 1610, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/home/odoo/src/odoo/odoo/http.py", line 1807, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/home/odoo/src/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
    response = super()._dispatch(endpoint)
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
    result = endpoint(**request.params)
  File "/home/odoo/src/odoo/odoo/http.py", line 696, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/home/odoo/src/odoo/addons/web/controllers/dataset.py", line 46, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/home/odoo/src/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/home/odoo/src/odoo/odoo/api.py", line 461, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/home/odoo/src/odoo/odoo/api.py", line 448, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "", line 2, in button_immediate_install
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 76, in check_and_log
    return method(self, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 491, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_module.py", line 615, in _button_immediate_function
    registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "", line 2, in new
  File "/home/odoo/src/odoo/odoo/tools/func.py", line 87, in locked
    return func(inst, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 90, in new
    odoo.modules.load_modules(registry, force_demo, status, update_module)
  File "/home/odoo/src/odoo/odoo/modules/loading.py", line 487, in load_modules
    processed_modules += load_marked_modules(cr, graph,
  File "/home/odoo/src/odoo/odoo/modules/loading.py", line 371, in load_marked_modules
    loaded, processed = load_module_graph(
  File "/home/odoo/src/odoo/odoo/modules/loading.py", line 206, in load_module_graph
    registry.setup_models(cr)
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 297, in setup_models
    model._setup_fields()
  File "/home/odoo/src/odoo/odoo/models.py", line 2803, in _setup_fields
    field.setup(self)
  File "/home/odoo/src/odoo/odoo/fields.py", line 538, in setup
    self.setup_nonrelated(model)
  File "/home/odoo/src/odoo/odoo/fields.py", line 2543, in setup_nonrelated
    assert self.selection is not None, "Field %s without selection" % self
AssertionError: Field event.event.state without selection

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    RPCError@https://samadeva-oerp-brstaging-8109207.dev.odoo.com/web/assets/83758-b7a4b7b/web.assets_backend.min.js:973:274
    makeErrorFromResponse@https://samadeva-oerp-brstaging-8109207.dev.odoo.com/web/assets/83758-b7a4b7b/web.assets_backend.min.js:977:163
    jsonrpc/promise

I have noticed that the original module event.event has some change (https://github.com/OCA/OpenUpgrade/blob/14.0/openupgrade_scripts/scripts/event/14.0.1.3/post-migration.py) concerning the SelectionFields event.event.state which has been turned into a Many2One-Field: event.event.stage_id

def map_event_event_states_to_stages(env):
    def _map_state_to_stage(state, stage_xmlid):
        query = """
            UPDATE event_event event SET stage_id = imd.res_id
            FROM ir_model_data imd
            WHERE imd.module = 'event' AND imd.name = %s AND event.state = %s"""
        openupgrade.logged_query(env.cr, query, (stage_xmlid, state))

    _map_state_to_stage("draft", "event_stage_new")
    _map_state_to_stage("done", "event_stage_done")
    _map_state_to_stage("cancel", "event_stage_cancelled")
    _map_state_to_stage("confirm", "event_stage_announced")

but, i dont manage to fix this error, even after having re-installed the old fieldSelection using another new custom module:

class EventEvent(models.Model):
    _inherit = 'event.event'

    # TRY to fix error on install webtkev on v16: /odoo/fields.py", line 2543, in setup_nonrelated: AssertionError: Field event.event.state without selection
    state = fields.Selection([
        ('draft', 'Unconfirmed'), ('cancel', 'Cancelled'),
        ('confirm', 'Confirmed'), ('done', 'Done')],
        string='Status', default='draft', readonly=True, required=True, copy=False)

Any idea how to fix it ?


0
Avatar
Verwerfen
Justine Ladan

Hi, how long did it take to upgrade from version 13 to version 16?

Thanks!

Avatar
Niyas Raphy (Walnut Software Solutions)
Beste Antwort

Hi,

I hope this has to be handled with migration scripts, incase if this is not solved yet, create a support ticket for the migration in: https://www.odoo.com/help

Thanks

0
Avatar
Verwerfen
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
Odoo migration to v16: Error for standard wizard
migration upgrade odoo13 odoo16features
Avatar
Avatar
2
Sept. 23
4129
Missing assets when upgrading odoo 16 Gelöst
migration cache upgrade assets odoo16features
Avatar
1
Feb. 24
6382
Openupgrade guide for windows user ?
migration upgrade OpenUpgrade v15 odoo16features
Avatar
0
Jan. 24
1856
Field used in context is restricted to certain groups Gelöst
migration odoo16features
Avatar
Avatar
Avatar
3
Juni 24
4126
convert function from odoo14 to odoo 16 with custom updates
upgrade odoo16features
Avatar
0
Juli 23
3157
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Bildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة 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 ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

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