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

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
9277 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.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
Inherit a method without copy/paste full original code Resuelto
inheritance odoo12.0
Avatar
Avatar
1
sept 19
4518
How to inherit view and add widget in Odoo 12CE ? Resuelto
form inheritance odoo12.0
Avatar
1
ago 23
6650
Inherit partner_id from account.payment with different domain. How to do it? Resuelto
inheritance payments odoo12.0
Avatar
Avatar
Avatar
2
jun 23
6782
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
5400
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