Skip to Content
Menu
This question has been flagged
3594 Views

I've got a custom module that has relations to other models, but they are mostly for selection fields and a few get filtered when the others are changed.

When I create the record, fill/select all the fields and try to save I get the popup "The record has been modified, your changes will be discarded. Are you sure you want to leave this page ?".

I'm not setting any values on other models, so I don't know why I'm getting this popup. 

Does any one know how to figure out what is causing this popup to appear?

EDIT:

When I'm using the administrator the popup does not appear. Haw logging set to debug and I don't see anything in the log that could help me figure out what is causing the popup message.

EDIT2:

Can someone help me how to log to console why it throws this popup. The code is in addons\web\static\src\js\views\form_view.js 

The function is "can_be_discarded". I removed required from every field and still get the popup.

Avatar
Discard

have you tracked log?

i think this is happening due to required fields not filled or wrong value filled.

when you save record it will raise error in log

Yeah, this happens when you have an empty required field in O2M.

Author

I've got logging enabled, but there is no error in the log. Only a few INFO but they haven't anything useful.

Author

Have changed the logging to debug and still no record that could tell me why this message is appearing. The related fields are looking to have correct data and have no required fields. So there is no way to figure out why this happens?!

Related Posts Replies Views Activity
2
Jul 25
4406
2
Dec 24
7599
2
Nov 24
28365
2
May 24
7345
3
Mar 24
6767