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

Hi there

I have two different modules. How can I add a field from the first module in a view of the second module?

I don't get the whole inheritance part somehow, could somebody please explain it to me?

Thank you

الصورة الرمزية
إهمال
أفضل إجابة

The inheritance mechanism has not changed. You can use:

class MyModelExtended(Model):
     _inherit = 'a.model'                       # direct heritage
     _inherit = ['a.model, 'a.other.model']     # direct heritage
     _inherits = {'a.model': 'field_name'}      # polymorphic heritage

For more details about inheritance please have a look at

http://odoo-new-api-guide-line.readthedocs.io/en/latest/environment.html?highlight=_inherits #inheritance


الصورة الرمزية
إهمال
الكاتب أفضل إجابة

Thank you, I will have a look at it. (Not yet 8karma, so I can't comment on your post, sorry)

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
أكتوبر 17
9566
2
يناير 20
15286
16
أغسطس 19
10235
1
يناير 19
5493
3
يوليو 18
3889