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
    • 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
    Producție
    • 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
  • 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

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

Abonare

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

Această întrebare a fost marcată
pythonhelpdeskodoohelpforumv14
2 Răspunsuri
8683 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
alfik
Autor

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>

Imagine profil
Muhammad Ihza Putra Handayani
Cel mai bun răspuns

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
Imagine profil
Abandonează
Imagine profil
Waleed Mohsen (CorTex IT Solutions)
Cel mai bun răspuns

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
Imagine profil
Abandonează
alfik
Autor

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'

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
Element cannot be located in parent view. odoo 14
error helpdesk odoo helpforum v14
Imagine profil
Imagine profil
Imagine profil
2
mai 23
7939
index error: list index out of range
csv helpdesk odoo helpforum v14
Imagine profil
0
mar. 22
101
How to raise a warning like "Your DOB is should be less then today date"? Rezolvat
helpdesk date.time odoo helpforum v14
Imagine profil
Imagine profil
Imagine profil
2
feb. 22
4258
psycopg2.ProgrammingError: can't adapt type 'NewId' in odoo 14
python odoo NewId v14
Imagine profil
Imagine profil
1
iun. 23
6281
Odoo 14 - Send Email Contact Form URL Rezolvat
python python3 odoo v14
Imagine profil
1
mar. 23
3299
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