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

Hello Can anyone explain what are the retrun type of odoo base methods like, create,write,search,search_read,compute,inverse,_search, onchange, name_get etc.....

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

Hello, let me explain in short:

  1. create() : returns the created record(s)
  2. write() : returns True if the update was successful, generally returns boolean(true,false) value
  3. search() : returns matching record(s)
  4. seach_read() : return list of dictionaries with selected fields.
  5. onchange() : return dictionary of field changes
  6. name_get(): returns list of tuples with id and display name
  7. compute() : don't return anything (only computes field values)

    


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

Hi, let me share some

  1. Create -> Object
  2. Write -> Boolean
  3. Search -> Object
  4. computational don't have return
  5. onchange can have return, example return of notification tag

further you can check here
https://www.odoo.com/documentation/18.0/developer/reference/backend/orm.html

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

Hi,


Here's a concise breakdown of Odoo base methods and their return types, which are essential when developing custom modules or understanding model behavior in Odoo (e.g., create, write, search, etc).




Hope it helps

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
2
أغسطس 25
2547
1
يوليو 25
961
1
أغسطس 25
1151
0
مايو 25
1403
2
أبريل 25
3593