Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

AttributeError: 'str' object has no attribute 'get' odoo14

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
pythonhelpdeskodoohelpforumv14
2 Risposte
8731 Visualizzazioni
Avatar
alfik

Im getting this error while refreshing my custom made wizard model

The code

from odoo import fields, models, api

class CreateExam(models.TransientModel):
_name = 'exam.wizards'
_description = 'Create exams'

std_wiz = fields.Many2one(
comodel_name='std.record',
string='Student',
required=False)
std_subject = fields.Many2one('std.subject',string="Subject")
std_marks=fields.Float(string="Marks")

def save_btn(self):
print("saved")
return True



0
Avatar
Abbandona
alfik
Autore

my xml
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="examwiz_view_form" model="ir.ui.view">
<field name="name">exam_view_form</field>
<field name="model">exam.wizards</field>
<field name="arch" type="xml">
<form string="exam form">
<sheet>
<group>
<field name="std_wiz"/>
<field name="std_subject"/>
<field name="std_marks"/>

</group>
</sheet>
<footer>
<button name="save_btn" string="save" type="object" class="btn-primary"/>
<button string="Cancel" class="btn-secondary" special="cancel"/>
</footer>
</form>
</field>
</record>
<record id="examwiz_action" model="ir.actions.act_window">
<field name="name"></field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">exam.wizards</field>
<field name="view_mode">form</field>
<field name="view_id" ref="examwiz_view_form"/>
<field name="target">new</field>
</record>
<!-- This Menu Item must have a parent and an action -->
<menuitem id="examwiz_categ" name="Create Exam" parent="school_root_menu" action="examwiz_action" sequence="5"/>

</data>
</odoo>

Avatar
Muhammad Ihza Putra Handayani
Risposta migliore

this error is mostly caused by changing previous type field with perhaps is the same name, i suggest to uninstall the module that related to it or just make a new field with different name and different type

0
Avatar
Abbandona
Avatar
Waleed Mohsen (CorTex IT Solutions)
Risposta migliore

You don't have any issue in your code as I can see. Check the log file to see more details about the error and which line cause this issue.

0
Avatar
Abbandona
alfik
Autore

This is my log file. kindly check this out
ERROR: couldn't create the logfile directory. Logging to the standard output.
2022-02-20 16:22:48,158 5752 INFO ? odoo: Odoo version 14.0-20211201
2022-02-20 16:22:48,158 5752 INFO ? odoo: Using configuration file at C:\Users\alfik\PycharmProjects\pythonProject\odoo11\odoo.conf
2022-02-20 16:22:48,158 5752 INFO ? odoo: addons paths: ['C:\\Users\\alfik\\PycharmProjects\\pythonProject\\odoo11\\odoo\\addons', 'c:\\users\\alfik\\appdata\\local\\openerp s.a\\odoo\\addons\\14.0', 'c:\\users\\alfik\\pycharmprojects\\pythonproject\\odoo11\\odoo\\addons', 'c:\\users\\alfik\\pycharmprojects\\pythonproject\\custom_addons']
2022-02-20 16:22:48,158 5752 INFO ? odoo: database: admin@localhost:5432
2022-02-20 16:22:48,784 5752 INFO ? odoo.addons.base.models.ir_actions_report: Will use the Wkhtmltopdf binary at C:\Program Files\odoo14\thirdparty\wkhtmltopdf.exe
2022-02-20 16:22:49,104 5752 INFO ? odoo.service.server: HTTP service (werkzeug) running on DESKTOP-6UI91MB.bbrouter:8069
2022-02-20 16:22:49,163 5752 INFO alfikodoo odoo.modules.loading: loading 1 modules...
2022-02-20 16:22:49,179 5752 INFO alfikodoo odoo.modules.loading: 1 modules loaded in 0.02s, 0 queries (+0 extra)
2022-02-20 16:22:49,285 5752 INFO alfikodoo odoo.modules.loading: updating modules list
2022-02-20 16:22:49,304 5752 INFO alfikodoo odoo.addons.base.models.ir_module: ALLOW access to module.update_list on [] to user __system__ #1 via n/a
2022-02-20 16:22:50,790 5752 INFO alfikodoo odoo.addons.base.models.ir_module: ALLOW access to module.button_upgrade on ['student'] to user __system__ #1 via n/a
2022-02-20 16:22:50,790 5752 INFO alfikodoo odoo.addons.base.models.ir_module: ALLOW access to module.update_list on ['student'] to user __system__ #1 via n/a
2022-02-20 16:22:51,894 5752 INFO alfikodoo odoo.addons.base.models.ir_module: ALLOW access to module.button_install on [] to user __system__ #1 via n/a
2022-02-20 16:22:52,002 5752 INFO alfikodoo odoo.modules.loading: loading 79 modules...
2022-02-20 16:22:52,049 5752 WARNING alfikodoo odoo.addons.attachment_indexation.models.ir_attachment: Attachment indexation of PDF documents is unavailable because the 'pdfminer' Python library cannot be found on the system. You may install it from https://pypi.org/project/pdfminer.six/ (e.g. `pip3 install pdfminer.six`)
2022-02-20 16:22:52,782 5752 INFO alfikodoo odoo.modules.loading: Loading module student (42/79)
2022-02-20 16:22:53,164 5752 INFO alfikodoo odoo.modules.registry: module student: creating or updating database tables
2022-02-20 16:22:53,482 5752 INFO alfikodoo odoo.modules.loading: loading student/views/studentrecord.xml
2022-02-20 16:22:53,607 5752 INFO alfikodoo odoo.modules.loading: loading student/security/ir.model.access.csv
2022-02-20 16:22:53,663 5752 INFO alfikodoo odoo.modules.loading: loading student/views/studentclass.xml
2022-02-20 16:22:53,704 5752 INFO alfikodoo odoo.modules.loading: loading student/security/security.xml
2022-02-20 16:22:53,724 5752 INFO alfikodoo odoo.modules.loading: loading student/views/teacher.xml
2022-02-20 16:22:53,775 5752 INFO alfikodoo odoo.modules.loading: loading student/views/teacherdetails.xml
2022-02-20 16:22:53,789 5752 INFO alfikodoo odoo.modules.loading: loading student/wizard/exam_wizard.xml
2022-02-20 16:22:53,835 5752 INFO alfikodoo odoo.modules.loading: Module student loaded in 1.05s, 424 queries
2022-02-20 16:22:54,764 5752 INFO alfikodoo odoo.modules.loading: 79 modules loaded in 2.76s, 424 queries (+0 extra)
2022-02-20 16:22:55,518 5752 INFO alfikodoo odoo.addons.base.models.ir_model: Deleting 1427@ir.model.fields.selection (student.selection__exam_wizards__std_subject__english)
2022-02-20 16:22:55,521 5752 WARNING alfikodoo odoo.modules.loading: Transient module states were reset
2022-02-20 16:22:55,533 5752 ERROR alfikodoo odoo.modules.registry: Failed to load registry
2022-02-20 16:22:55,533 5752 CRITICAL alfikodoo odoo.service.server: Failed to initialize database `alfikodoo`.
Traceback (most recent call last):
File "C:\Users\alfik\PycharmProjects\pythonProject\odoo11\odoo\service\server.py", line 1199, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "C:\Users\alfik\PycharmProjects\pythonProject\odoo11\odoo\modules\registry.py", line 89, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "C:\Users\alfik\PycharmProjects\pythonProject\odoo11\odoo\modules\loading.py", line 503, in load_modules
env['ir.model.data']._process_end(processed_modules)
File "C:\Users\alfik\PycharmProjects\pythonProject\odoo11\odoo\addons\base\models\ir_model.py", line 2296, in _process_end
record.unlink()
File "C:\Users\alfik\PycharmProjects\pythonProject\odoo11\odoo\addons\base\models\ir_model.py", line 1370, in unlink
self._process_ondelete()
File "C:\Users\alfik\PycharmProjects\pythonProject\odoo11\odoo\addons\base\models\ir_model.py", line 1418, in _process_ondelete
ondelete = (field.ondelete or {}).get(selection.value)
AttributeError: 'str' object has no attribute 'get'

Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
Element cannot be located in parent view. odoo 14
error helpdesk odoo helpforum v14
Avatar
Avatar
Avatar
2
mag 23
7981
index error: list index out of range
csv helpdesk odoo helpforum v14
Avatar
0
mar 22
101
How to raise a warning like "Your DOB is should be less then today date"? Risolto
helpdesk date.time odoo helpforum v14
Avatar
Avatar
Avatar
2
feb 22
4262
psycopg2.ProgrammingError: can't adapt type 'NewId' in odoo 14
python odoo NewId v14
Avatar
Avatar
1
giu 23
6319
Odoo 14 - Send Email Contact Form URL Risolto
python python3 odoo v14
Avatar
1
mar 23
3324
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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