Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
8595 Widoki

Hello,

I have a problem in inheriting a custom model created from Odoo interface, where I cannot append a new field from a custom module (addons-custom/mycustom)

Here is step by step :

1- create a model from settings-> model:   x_check_y

2- develop a custom module in order to add a field to the model:

class CheckY(models.Model):
    _inherit = 'x_check_y'   
    temp = fields.Char("temp")

3- restart Odoo:  Model x_check_y  does not exist in registry

  raise TypeError("Model %r does not exist in registry." % name)
TypeError: Model 'x_check_y' does not exist in registry.


Note that the inheritance is working on OpenAcademy module where I have added a new field on courses from this custom module.

Odoo 10 Enterprise / Ubuntu

Awatar
Odrzuć
Najlepsza odpowiedź
In your custom module, update 'depends' parameter value as 'manual' in the manifest file. It'll solve your problems...

In __manifest__.py add 
'depends': ['manual'],

But it'll create an issue while upgrading model... As you developed custom module so I would recommend you instead of creating a model from UI add that model in your custom module...
Awatar
Odrzuć
Autor

I have added manual as following: 'depends': ['base','openacademy','manual'], then try to upgrade the module and I got: "You try to upgrade the module check_send_payments that depends on the module: manual.

But this module is not available in your system."

Powiązane posty Odpowiedzi Widoki Czynność
0
kwi 17
2803
2
sty 25
15670
1
kwi 23
4053
0
cze 21
1775
0
kwi 20
1749