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

Hello everybody!!!

Can anyone explain to me how can i inherit a view and preserve the original one In Odoo?

Thanks a lot in advance.

Best Regards.

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

Hi @Drees Far

You need to set the field mode for the view record with value primary, like:

<field name="mode">primary</field>

Read the help of that field here:

'mode': fields.selection(

[('primary', "Base view"), ('extension', "Extension View")],

string="View inheritance mode", required=True,

help="""Only applies if this view inherits from an other one (inherit_id is not False/Null).

* if extension (default), if this view is requested the closest primary view

is looked up (via inherit_id), then all views inheriting from it with this

view's model are applied

* if primary, the closest primary view is fully resolved (even if it uses a

different model than this one), then this view's inheritance specs

(<xpath/>) are applied, and the result is used as if it were this view's

actual arch.

"""),

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

No comments or activity here? One more dropped bullet

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يونيو 18
7066
0
أغسطس 17
3962
0
يوليو 17
3541
0
مايو 16
3067
1
مارس 22
7309