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

I just finished the Studio tutorial and I didn't see any compute field examples. It is possible to do it through Studio, or in that case if development is required.

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

Hi,

Yes, you can create compute field using odoo studio module please refer to our below documentation

Odoo 15 Studio Book - Define Compute Method For a Field

Odoo 16 Studio Book - DEFINE COMPUTE METHOD


Hope it helps


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

Yes, it is possible to create computed fields with Odoo Studio. Computed fields are fields that are calculated based on the values of other fields. They are useful for displaying calculated values or for performing calculations on the fly.

To create a computed field in Odoo Studio, you can follow these steps:

  1. Open the Odoo Studio.
  2. Go to the model that you want to create the computed field in.
  3. Click on the "Fields" tab.
  4. Click on the "Add" button and select "Computed Field".
  5. Enter a name for the computed field.
  6. Enter the formula for the computed field. The formula can use the values of other fields in the model.
  7. Click on the "Save" button.

The computed field will be created and will be displayed in the list of fields.

Here is an example of a computed field that calculates the total amount of a sale order:

total_amount = sum(order_line.price_unit * order_line.quantity)

This formula uses the sum() function to calculate the sum of the price_unit and quantity fields of the order_line child model.

I hope this helps!

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

There is no such item "Computed Field" in v16. Which version are you talking about?

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
سبتمبر 24
1513
2
يوليو 24
1655
1
أبريل 24
4632
0
يناير 24
1293
0
أكتوبر 23
1288