Help

data noupdate="0" & "1" in Security.xml

Closed
Avatar
priyankahdp

The question has been closed

by
priyankahdp
on 04/30/2013 10:26:14

Please explain the mean of below stattements and state the difference between them. i go through forum posts but not got clear idea from those and doc also not mention those stuffs.

i got below code from sale_security.xml file

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="0">

and

<data noupdate="1">
Avatar
Discard
2 Answers
19
Best Answer

The noupdate parameter is used to indicate if the values in the xml file must be re-imported when a module in updated.

For example, if we have a file with demo datas and we use noupdate="1", if we delete a demo record and update the module, the deleted data not will be imported again. With noupdate="0", instead, the record will be reimported again if it doesn't exist in the db.

3 Comments
Avatar
Discard
Avatar
priyankahdp
-

thanks Francesco very helpful explanation.can u please tell me wat abt 'ir.rule' records in ...security.xml files & those have which relation with 'res.groups' records

Avatar
Francesco OpenCode
-

Yeah, thanks for the precision. ;)

Avatar
priyankahdp
-

thanks so much Dear Olivier

20
Avatar
Nathan Beck
Best Answer

Francesco, the example you gave is not 100% correct. This behavior is actually driven by 2 things: the noupdate flag on the data element, and the forcecreate attribute of each record. The latter defaults to "True" and determines whether a record that has been deleted will be re-created during an update, even if it is in a noupdate section. So by default noupdate will prevent synchronizing module data at each update (so you can customize it), but will not prevent the re-creation of deleted data. Set forcecreate="0" on individual records if you want that behavior as well.

1 Comment
Avatar
Discard
Avatar
PY
-

Thanks ! +1