Hi,
I am trying to add a calculated field into the sale order line. What i need to accomplish is to have calculated the quantities delivered of the order line.
I tried with this code, but is not making the operation properly:
for record in self:
if record.sale_order.line.qty_delivered > 0:
record['x_studio_subtotal_entregado'] = (record.qty_delivered * record.price_unit)
else:
result = 0
and in the dependencies, added the fields.
Am i missing something?
Thanks.!
Would you please tell us how it is not working? Are you getting an error or is it not giving you the expected result?
Which fields did you add in the dependencies?