تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3860 أدوات العرض

Hello there, 
I'm newbie in here, so my question is how can I add new relational fields One2many inside my existing inherit model??
Thank you.

الصورة الرمزية
إهمال

Are you not able to do it by defining new fields in the inherited model like this

class A(models.Model):

field1

field2

class B(models.Model):

_inherit="A"

one2many_field = fields.One2many(codmodel, inverse_name)

many2many_field = fields.Many2many(comodel)

??

Would have been nicer if you could add more information about the problem you're facing.

الكاتب

@Karan BK, hey there I've found the solution. What I have done wrong is not mentioned inverse relation in my main module, after doing this things works well, anyway thanks for response. Thanks

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
يوليو 24
1588
1
سبتمبر 15
5196
1
يوليو 22
5372
2
فبراير 21
12746
3
أبريل 20
10907