Problem Description:
I am building a form using Odoo Studio. The form has two section (Similar to sales form). In the top section I have three fields namely:
- L
- W
- A (This is computed field = L x W)
The Value of A is calculated successfully. Below that I have a list (similar to order lines in sales order). The list has Five fields as follows:
- Material (a text field, manual input)
- MPA (decimal field, manual input similar to price in sales order line)
- TM (decimal field, calculated = MPA x A)
As evident, the calculation of TM uses a field A which belongs to a different model. I am unable to perform this calculation.
How I have Tried to Solve It
I have used Odoo Studio and adopted the following approach:
In the compute of TM field I have added the following code:
for record in self:
record['TM'] = record.A * record.MPA
Version Information
Odoo Online Version 16.04+e(Enterprise)
Any help to resolve this issue will be much appreciated.
Regards.