Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Conocimientos
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar 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
  • Proyecto
  • 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

how to use model inheritance on the existing Product model to add some field for my new module ?

Suscribirse

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

Se marcó esta pregunta
inheritanceproduct.productModuleodoo12.0
4 Respuestas
9285 Vistas
Avatar
Daquin Sylar

Hello everyone !

I created a inheritance on the existing model partner of odoo 12, and it worked successfully. however, when I tried to create an inheritance on the existing product model of odoo 12, in order to add a necessary field for the operation of my new module, it failed.And the server shows me the following error:

2019-04-13 13:30:05,483 26274 INFO pers_io_money odoo.modules.loading: loading pers_io_money/views/partner.xml 

2019-04-13 13:30:05,507 26274 INFO pers_io_money odoo.modules.loading: loading pers_io_money/views/product.xml 

2019-04-13 13:30:05,512 26274 WARNING pers_io_money odoo.modules.loading: Transient module states were reset 

2019-04-13 13:30:05,512 26274 ERROR pers_io_money odoo.modules.registry: Failed to load registry 

Traceback (most recent call last):

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/cache.py", line 88, in lookup

    r = d[key]

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/func.py", line 69, in wrapper

    return func(self, *args, **kwargs)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/lru.py", line 44, in __getitem__

    a = self.d[obj].me

KeyError: ('ir.model.data', <function IrModelData.xmlid_lookup at 0x7f7ee53e8510>, 'pers_io_money.product_template_search_form_view_stock')


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 757, in parse

    self._tags[rec.tag](rec, de, mode=mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 649, in _tag_record

    f_val = self.id_get(f_ref)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 740, in id_get

    res = self.model_id_get(id_str, raise_if_not_found)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 746, in model_id_get

    return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1380, in xmlid_to_res_model_res_id

    return self.xmlid_lookup(xmlid)[1:3]

  File "<decorator-gen-25>", line 2, in xmlid_lookup

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/cache.py", line 93, in lookup

    value = d[key] = self.method(*args, **kwargs)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1369, in xmlid_lookup

    raise ValueError('External ID not found in the system: %s' % xmlid)

ValueError: External ID not found in the system: pers_io_money.product_template_search_form_view_stock


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/registry.py", line 86, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 417, in load_modules

    force, status, report, loaded_modules, update_module, models_to_check)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 313, in load_marked_modules

    perform_checks=perform_checks, models_to_check=models_to_check

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 222, in load_module_graph

    load_data(cr, idref, mode, kind='data', package=package, report=report)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 68, in load_data

    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 801, in convert_file

    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 864, in convert_xml_import

    obj.parse(doc.getroot(), mode=mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 754, in parse

    self.parse(rec, mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 763, in parse

    exc_info[2]

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/pycompat.py", line 86, in reraise

    raise value.with_traceback(tb)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 757, in parse

    self._tags[rec.tag](rec, de, mode=mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 649, in _tag_record

    f_val = self.id_get(f_ref)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 740, in id_get

    res = self.model_id_get(id_str, raise_if_not_found)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 746, in model_id_get

    return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1380, in xmlid_to_res_model_res_id

    return self.xmlid_lookup(xmlid)[1:3]

  File "<decorator-gen-25>", line 2, in xmlid_lookup

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/cache.py", line 93, in lookup

    value = d[key] = self.method(*args, **kwargs)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1369, in xmlid_lookup

    raise ValueError('External ID not found in the system: %s' % xmlid)

odoo.tools.convert.ParseError: "External ID not found in the system: pers_io_money.product_template_search_form_view_stock" while parsing /home/kaly-7/odoo -dev/odoo-12.0/addons/pers_io_money/views/product.xml:5, near

<record id="product_template_list_actions" model="ir.actions.act_window">

        <field name="name">Products</field>

        <field name="type">ir.actions.act_window</field>

        <field name="res_model">product.template</field>

        <field name="view_mode">tree,form</field>

        <field name="view_type">form</field>

         

        <field name="search_view_id" ref="product_template_search_form_view_stock"/>

        <field name="context">{"search_default_consumable": 1, 'default_type': 'product'}</field>

        

        <field name="help" type="html">

            <p class="o_view_nocontent_smiling_face">

                Create a new product

            </p>

        </field>

    </record>

2019-04-13 13:30:05,554 26274 CRITICAL pers_io_money odoo.service.server: Failed to initialize database `pers_io_money`. 

Traceback (most recent call last):

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/cache.py", line 88, in lookup

    r = d[key]

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/func.py", line 69, in wrapper

    return func(self, *args, **kwargs)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/lru.py", line 44, in __getitem__

    a = self.d[obj].me

KeyError: ('ir.model.data', <function IrModelData.xmlid_lookup at 0x7f7ee53e8510>, 'pers_io_money.product_template_search_form_view_stock')


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 757, in parse

    self._tags[rec.tag](rec, de, mode=mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 649, in _tag_record

    f_val = self.id_get(f_ref)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 740, in id_get

    res = self.model_id_get(id_str, raise_if_not_found)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 746, in model_id_get

    return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1380, in xmlid_to_res_model_res_id

    return self.xmlid_lookup(xmlid)[1:3]

  File "<decorator-gen-25>", line 2, in xmlid_lookup

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/cache.py", line 93, in lookup

    value = d[key] = self.method(*args, **kwargs)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1369, in xmlid_lookup

    raise ValueError('External ID not found in the system: %s' % xmlid)

ValueError: External ID not found in the system: pers_io_money.product_template_search_form_view_stock


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/service/server.py", line 1055, in preload_registries

    registry = Registry.new(dbname, update_module=update_module)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/registry.py", line 86, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 417, in load_modules

    force, status, report, loaded_modules, update_module, models_to_check)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 313, in load_marked_modules

    perform_checks=perform_checks, models_to_check=models_to_check

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 222, in load_module_graph

    load_data(cr, idref, mode, kind='data', package=package, report=report)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 68, in load_data

    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 801, in convert_file

    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 864, in convert_xml_import

    obj.parse(doc.getroot(), mode=mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 754, in parse

    self.parse(rec, mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 763, in parse

    exc_info[2]

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/pycompat.py", line 86, in reraise

    raise value.with_traceback(tb)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 757, in parse

    self._tags[rec.tag](rec, de, mode=mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 649, in _tag_record

    f_val = self.id_get(f_ref)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 740, in id_get

    res = self.model_id_get(id_str, raise_if_not_found)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 746, in model_id_get

    return self.env['ir.model.data'].xmlid_to_res_model_res_id(id_str, raise_if_not_found=raise_if_not_found)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1380, in xmlid_to_res_model_res_id

    return self.xmlid_lookup(xmlid)[1:3]

  File "<decorator-gen-25>", line 2, in xmlid_lookup

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/cache.py", line 93, in lookup

    value = d[key] = self.method(*args, **kwargs)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_model.py", line 1369, in xmlid_lookup

    raise ValueError('External ID not found in the system: %s' % xmlid)

odoo.tools.convert.ParseError: "External ID not found in the system: pers_io_money.product_template_search_form_view_stock" while parsing /home/kaly-7/odoo -dev/odoo-12.0/addons/pers_io_money/views/product.xml:5, near

<record id="product_template_list_actions" model="ir.actions.act_window">

        <field name="name">Products</field>

        <field name="type">ir.actions.act_window</field>

        <field name="res_model">product.template</field>

        <field name="view_mode">tree,form</field>

        <field name="view_type">form</field>

         

        <field name="search_view_id" ref="product_template_search_form_view_stock"/>

        <field name="context">{"search_default_consumable": 1, 'default_type': 'product'}</field>

        

        <field name="help" type="html">

            <p class="o_view_nocontent_smiling_face">

                Create a new product

            </p>

        </field>

    </record>


Please help 
0
Avatar
Descartar
Sehrish

Check your answer solution in: https://old.reddit.com/r/learnopenerp/

Daquin Sylar
Autor

Hi ! I finally solved my problem. I just had to add the product module in the dependency section of the __manifest__.py file

Thank you

Daquin Sylar
Autor

Hi ! I finally solved my problem. I just had to add the product module in the dependency section of the __manifest__.py file

Thank you

Avatar
Niyas Raphy (Walnut Software Solutions)
Mejor respuesta

Hi,

The error message says that there is no record named product_template_search_form_view_stock in your module pers_io_money .

In the of your module the above record is used in the search view id, so make sure that such a record is necessary to define in your model, if you forget to define the record it,  or if you refer this record to existing record in  original module, update the ID given in the search view id as original_module_name.ID

Thanks


0
Avatar
Descartar
Avatar
Akhil P Sivan
Mejor respuesta

Hi, try like this:

<record id="product_template_list_actions" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_mode">tree,form</field>
<field name="view_type">form</field>
<field name="search_view_id" ref="stock.product_template_search_form_view_stock"/>
<field name="context">{"search_default_consumable": 1, 'default_type': 'product'}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new product
</p>
</field>
</record>

And also add the stock module dependency in your __manifest__.py file.

0
Avatar
Descartar
Avatar
Daquin Sylar
Autor Mejor respuesta

Hello!  I do not want to integrate the stock application into my module.  I just want to exploit the existing product model

This is an error that I received before:

2019-04-16 11:22:08,574 13302 WARNING pers_io_money odoo.modules.loading: Transient module states were reset 

2019-04-16 11:22:08,574 13302 ERROR pers_io_money odoo.modules.registry: Failed to load registry 

Traceback (most recent call last):

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 757, in parse

    self._tags[rec.tag](rec, de, mode=mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 662, in _tag_record

    record = model.with_context(rec_context)._load_records([data], self.mode == 'update')

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3838, in _load_records

    records = self._load_records_create([data['values'] for data in to_create])

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3752, in _load_records_create

    return self.create(values)

  File "<decorator-gen-37>", line 2, in create

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/api.py", line 452, in _model_create_multi

    return create(self, arg)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_actions.py", line 238, in create

    return super(IrActionsActWindow, self).create(vals_list)

  File "<decorator-gen-35>", line 2, in create

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/api.py", line 452, in _model_create_multi

    return create(self, arg)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_actions.py", line 59, in create

    res = super(IrActions, self).create(vals_list)

  File "<decorator-gen-3>", line 2, in create

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/api.py", line 452, in _model_create_multi

    return create(self, arg)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3533, in create

    records = self._create(data_list)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3665, in _create

    records._validate_fields(name for data in data_list for name in data['stored'])

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 1108, in _validate_fields

    check(self)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_actions.py", line 141, in _check_model

    raise ValidationError(_('Invalid model name %r in action definition.') % action.res_model)

odoo.exceptions.ValidationError: ("Invalid model name 'product.product' in action definition.", None)


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/registry.py", line 86, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 417, in load_modules

    force, status, report, loaded_modules, update_module, models_to_check)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 313, in load_marked_modules

    perform_checks=perform_checks, models_to_check=models_to_check

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 222, in load_module_graph

    load_data(cr, idref, mode, kind='data', package=package, report=report)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 68, in load_data

    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 801, in convert_file

    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 864, in convert_xml_import

    obj.parse(doc.getroot(), mode=mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 754, in parse

    self.parse(rec, mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 763, in parse

    exc_info[2]

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/pycompat.py", line 86, in reraise

    raise value.with_traceback(tb)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 757, in parse

    self._tags[rec.tag](rec, de, mode=mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 662, in _tag_record

    record = model.with_context(rec_context)._load_records([data], self.mode == 'update')

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3838, in _load_records

    records = self._load_records_create([data['values'] for data in to_create])

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3752, in _load_records_create

    return self.create(values)

  File "<decorator-gen-37>", line 2, in create

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/api.py", line 452, in _model_create_multi

    return create(self, arg)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_actions.py", line 238, in create

    return super(IrActionsActWindow, self).create(vals_list)

  File "<decorator-gen-35>", line 2, in create

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/api.py", line 452, in _model_create_multi

    return create(self, arg)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_actions.py", line 59, in create

    res = super(IrActions, self).create(vals_list)

  File "<decorator-gen-3>", line 2, in create

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/api.py", line 452, in _model_create_multi

    return create(self, arg)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3533, in create

    records = self._create(data_list)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3665, in _create

    records._validate_fields(name for data in data_list for name in data['stored'])

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 1108, in _validate_fields

    check(self)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_actions.py", line 141, in _check_model

    raise ValidationError(_('Invalid model name %r in action definition.') % action.res_model)

odoo.tools.convert.ParseError: "Invalid model name 'product.product' in action definition.

None" while parsing /home/kaly-7/odoo -dev/odoo-12.0/addons/pers_io_money/views/product.xml:5, near

<record model="ir.actions.act_window" id="product_list_action">

            <field name="name">Products</field>

            <field name="res_model">product.product</field>

            <field name="view_mode">tree,form</field>

        </record>

2019-04-16 11:22:08,577 13302 CRITICAL pers_io_money odoo.service.server: Failed to initialize database `pers_io_money`. 

Traceback (most recent call last):

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 757, in parse

    self._tags[rec.tag](rec, de, mode=mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 662, in _tag_record

    record = model.with_context(rec_context)._load_records([data], self.mode == 'update')

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3838, in _load_records

    records = self._load_records_create([data['values'] for data in to_create])

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3752, in _load_records_create

    return self.create(values)

  File "<decorator-gen-37>", line 2, in create

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/api.py", line 452, in _model_create_multi

    return create(self, arg)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_actions.py", line 238, in create

    return super(IrActionsActWindow, self).create(vals_list)

  File "<decorator-gen-35>", line 2, in create

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/api.py", line 452, in _model_create_multi

    return create(self, arg)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_actions.py", line 59, in create

    res = super(IrActions, self).create(vals_list)

  File "<decorator-gen-3>", line 2, in create

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/api.py", line 452, in _model_create_multi

    return create(self, arg)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3533, in create

    records = self._create(data_list)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3665, in _create

    records._validate_fields(name for data in data_list for name in data['stored'])

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 1108, in _validate_fields

    check(self)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_actions.py", line 141, in _check_model

    raise ValidationError(_('Invalid model name %r in action definition.') % action.res_model)

odoo.exceptions.ValidationError: ("Invalid model name 'product.product' in action definition.", None)


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/service/server.py", line 1055, in preload_registries

    registry = Registry.new(dbname, update_module=update_module)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/registry.py", line 86, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 417, in load_modules

    force, status, report, loaded_modules, update_module, models_to_check)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 313, in load_marked_modules

    perform_checks=perform_checks, models_to_check=models_to_check

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 222, in load_module_graph

    load_data(cr, idref, mode, kind='data', package=package, report=report)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/modules/loading.py", line 68, in load_data

    tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind, report)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 801, in convert_file

    convert_xml_import(cr, module, fp, idref, mode, noupdate, report)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 864, in convert_xml_import

    obj.parse(doc.getroot(), mode=mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 754, in parse

    self.parse(rec, mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 763, in parse

    exc_info[2]

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/pycompat.py", line 86, in reraise

    raise value.with_traceback(tb)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 757, in parse

    self._tags[rec.tag](rec, de, mode=mode)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/tools/convert.py", line 662, in _tag_record

    record = model.with_context(rec_context)._load_records([data], self.mode == 'update')

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3838, in _load_records

    records = self._load_records_create([data['values'] for data in to_create])

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3752, in _load_records_create

    return self.create(values)

  File "<decorator-gen-37>", line 2, in create

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/api.py", line 452, in _model_create_multi

    return create(self, arg)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_actions.py", line 238, in create

    return super(IrActionsActWindow, self).create(vals_list)

  File "<decorator-gen-35>", line 2, in create

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/api.py", line 452, in _model_create_multi

    return create(self, arg)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_actions.py", line 59, in create

    res = super(IrActions, self).create(vals_list)

  File "<decorator-gen-3>", line 2, in create

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/api.py", line 452, in _model_create_multi

    return create(self, arg)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3533, in create

    records = self._create(data_list)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 3665, in _create

    records._validate_fields(name for data in data_list for name in data['stored'])

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/models.py", line 1108, in _validate_fields

    check(self)

  File "/home/kaly-7/odoo -dev/odoo-12.0/odoo/addons/base/models/ir_actions.py", line 141, in _check_model

    raise ValidationError(_('Invalid model name %r in action definition.') % action.res_model)

odoo.tools.convert.ParseError: "Invalid model name 'product.product' in action definition.

None" while parsing /home/kaly-7/odoo -dev/odoo-12.0/addons/pers_io_money/views/product.xml:5, near

<record model="ir.actions.act_window" id="product_list_action">

            <field name="name">Products</field>

            <field name="res_model">product.product</field>

            <field name="view_mode">tree,form</field>

        </record>


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

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

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
Inherit a method without copy/paste full original code Resuelto
inheritance odoo12.0
Avatar
Avatar
1
sept 19
4523
How to inherit view and add widget in Odoo 12CE ? Resuelto
form inheritance odoo12.0
Avatar
1
ago 23
6657
Inherit partner_id from account.payment with different domain. How to do it? Resuelto
inheritance payments odoo12.0
Avatar
Avatar
Avatar
2
jun 23
6785
Create Module on Odoo 12 won't to show link to access Resuelto
Module odoo12 odoo12.0 Odoo12.0
Avatar
Avatar
Avatar
5
nov 18
9027
Product customization & inheritance Resuelto
inheritance customization product.product odooV8
Avatar
Avatar
Avatar
2
mar 16
5401
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información 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 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