Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

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

Subscriure's

Get notified when there's activity on this post

This question has been flagged
inheritanceproduct.productModuleodoo12.0
4 Respostes
9283 Vistes
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)
Best Answer

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
Best Answer

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 Best Answer

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
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
Inherit a method without copy/paste full original code Solved
inheritance odoo12.0
Avatar
Avatar
1
de set. 19
4522
How to inherit view and add widget in Odoo 12CE ? Solved
form inheritance odoo12.0
Avatar
1
d’ag. 23
6656
Inherit partner_id from account.payment with different domain. How to do it? Solved
inheritance payments odoo12.0
Avatar
Avatar
Avatar
2
de juny 23
6784
Create Module on Odoo 12 won't to show link to access Solved
Module odoo12 odoo12.0 Odoo12.0
Avatar
Avatar
Avatar
5
de nov. 18
9027
Product customization & inheritance Solved
inheritance customization product.product odooV8
Avatar
Avatar
Avatar
2
de març 16
5400
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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