Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

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

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
pythonhelpdeskodoohelpforumv14
2 Respuestas
8740 Vistas
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
Descartar
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>

Avatar
Muhammad Ihza Putra Handayani
Mejor respuesta

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
Descartar
Avatar
Waleed Mohsen (CorTex IT Solutions)
Mejor respuesta

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
Descartar
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'

¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
Element cannot be located in parent view. odoo 14
error helpdesk odoo helpforum v14
Avatar
Avatar
Avatar
2
may 23
7989
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"? Resuelto
helpdesk date.time odoo helpforum v14
Avatar
Avatar
Avatar
2
feb 22
4267
psycopg2.ProgrammingError: can't adapt type 'NewId' in odoo 14
python odoo NewId v14
Avatar
Avatar
1
jun 23
6329
Odoo 14 - Send Email Contact Form URL Resuelto
python python3 odoo v14
Avatar
1
mar 23
3334
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

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