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

stock.inventory has no create method.

If I wanted to auto populate the Inventory Reference field (name) then how would I do this?

Super to osv.create somehow?

The write method is too late for me - I want the user to see the auto populated name.

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

What is the problem? You can override create or write method as you have done it for other objects.

أفضل إجابة

The create method is part of Model (if I am correct), which is inherited by stock.inventory. All object do have the create method

So you can override the method, just make sure you use the same input-parameters as other objects.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 16
5893
4
مارس 15
11393
2
يوليو 25
4150
3
نوفمبر 22
7409
1
مارس 15
7941