Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4492 มุมมอง

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?


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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.
อวตาร
ละทิ้ง
ผู้เขียน

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

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ก.พ. 23
2484
0
ก.ค. 19
3063
2
ก.ย. 20
8609
0
ธ.ค. 19
4086
1
เม.ย. 24
9457