Hi, I am having issue with saving a newly created record when using raise UserWarning in the validate method on the tryton server.
Using sao client, the record will be saved after confirming on the popup but the client still prompt me on modified changes when I try to leave the view. (no issue on tryton client).
Tried on 5.0 and 5.8 still having the same issue. Thank you.
This is because the read data has a value that is not canonical and so the client see it as a change. This happen often with Function field returning incorrect value like a Decimal with too much digits.
I tried adding just the warning without any other fields or logic but the following code in Sao.Record.save() will always catch when the warning pop up (before selecting yes/no)
its just that the raise user warning for creating new record does reflect correctly in sao than raise user warning for editing an existing record. I will take a look at it again as what you had suggested earlier. thank you
When I click on save record, it prompt the user warning that I added. After confirming that I would want to continue to save, it does not show that my record has been saved. And when I leave the page, it prompt “This record has been modified do you want to save it?” (even though I did not change anything after pressing the save button)
If I click on “Yes” to save, it will prompt me my user warning again and the process repeats itself. The sao client does show that the record has been saved.