Hi guys,
Currently I have some struggle since the client needs the Amount to be fixed regardless of the Item Rate. (on most of the Related Documents like Sales Order, Delivery Note, Sales Invoice)
So basically I tried to:
- Unlock the Amount Field
- Override the function calculate_item_values in client script like so: https://gist.github.com/nathando/efc9ef532e2142b574855
This successfully set the rate in client side. But the moment I press Save, it revert back to what it was… In the screenshot, Rate has been calculated by Amount and Amount has been fixed until Save is pressed.
I also checked the POST data, it actually POST wrong amount 99.96 instead of 100.
Before
After
Do you have any suggestions ?