Always forbid modification of XML data
For now before updating an XML record, there is a complex system that compare the value in the database and the expected value (the last value that was written by the XML converter). This leads sometimes to XML record not being updated and the user has to manually force the update in the administration menu. For example, when a new field is added with a default value and an XML record set the value of this field to the default value, the warning about record having been modified is raised.
This feature was useful before because we imported data like the countries or currencies via XML and we needed to allow the user to modify them. But we stopped to use XML to import such kind of data.
I propose to remove the storage of the data and just keep the list of field being written by XML (to forbid their modification).
Also to make ModelStorage.check_xml_record
private so it can no more be skipped. For the models that were using it, we need to set their XML data as noupdate
instead.
Thus the XML convert will always overwrite the content of the XML record even if they were modified.