Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
4494 Ansichten

Odoo13 - odoo.sh


I have a custom model made via the UI, called x_custom_thing.

I want to extend that like so:

class XCustomThing(models.Model):
    _inherit = "x_custom_thing"
    
    company_id = fields.Many2one('res.company', 'Company', index=1)
    vendor_id = fields.Many2one('res.company', 'Vendor', index=1)

I get the error that

"TypeError: Model 'x_custom_thing' does not exist in registry".

How do I inherit and extend a custom model made via the UI? Can I?


Avatar
Verwerfen
Beste Antwort

Install this module

x_custom_thing

and this problem will fixed. Such kind of the errors

"TypeError: Model 'x_custom_thing' does not exist in registry".

appear once inherit module not installed.
Avatar
Verwerfen
Autor

And how can I inherit the model x_custom_thing and add fields? That still doesn't work.

Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Feb. 23
2485
0
Juli 19
3064
2
Sept. 20
8611
0
Dez. 19
4086
1
Apr. 24
9457