Skip to Content
Menu
This question has been flagged
2 Replies
2364 Views

In purchase agreement it now has quantity and ordered quantity.

I would like to have a calculated field that shows the remaing quantity: quantity - ordered quantity.

I made a decimal field and put this in calculation:

for record in self:
record[("x_studio_remaining_1")] = record.product_qty - record.qty_ordered

It does nothing and gives an error creating a new order from the purchase agreement. Can anybody point me in the right direction?

Avatar
Discard
Author

yes i have: product_qty, qty_ordered

Perhaps if you post details of the error, it might help readers pinpoint the problem?