difference b/w api.depends and compute and tell me what they can do actually
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
Hi, Please find the difference below,
Computed:
A Computed field can be simply defined as a field for which the value is computed using a method rather than directly reading from the user. This may be a Basic field or Relational field with an additional attribute ‘compute’ within the field definition. Consider a business model to manage Rental orders, where the total rent amount is calculated from the duration and price for the unit duration. For this purpose let us define a monetary field total_rent as in the following code which is a computed field where the value of this field is computed using the value of another field or more than one field.
Depends:
The Depends function depends(*args) returns a decorator that specifies the field dependencies of a “compute” function. For the depends() decorator each argument must be a string and it is also possible to pass a single method as an argument. In such cases, the dependencies are set by calling the defined method.
For more information refer the blog:
https://www.cybrosys.com/blog/difference-between-compute-and-onchange-fields-odoo
Hope it helps
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
1
Agu 19
|
5605 | ||
|
1
Nov 24
|
1317 | ||
|
1
Sep 24
|
2710 | ||
|
1
Jun 24
|
1346 | ||
|
1
Mei 24
|
2668 |