Ir al contenido
Menú
Se marcó esta pregunta
3602 Vistas

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
Descartar

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.

Autor

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

Autor

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?!

Publicaciones relacionadas Respuestas Vistas Actividad
2
jul 25
4449
2
dic 24
7632
2
nov 24
28406
2
may 24
7369
3
mar 24
6797