Skip to Content
Menu
This question has been flagged
1 Reply
1012 Views

hi.

i have a model with 2  submodels connected by one2many. it is basically a purchase model and one order_lines and one cost_center_lines. in short there is a amount_total computed from the order lines and a amount_total for the cost_centers. the amount taken by each cost center derives from a percentage of the amount_total of the order lines. they make up the cost center amount_total.

now when the record is created it all works nice. but when editing a existing order the total amount of the order lines is working ok but the cost centers do not update when a change in the order lines.

i have a onchange on the amount_total of the order in which i am directly calling the compute method of the cost center single amount which makes a amount from the given percentage.

the amount_totals's are computed.

on a saved record the cost center lines are not updating and the amount_total of all cost centers is also not working.

im trying for hours now. thanks in advance.

Avatar
Discard
Author Best Answer

solved it myself.

the percentage and the amount of the cost center lines were to compute each other. that did not work the way i did it.

Avatar
Discard