Skip to content

Commit 50c32d7

Browse files
committed
[FIX] util.update_record_from_xml: reset noupdate flag when not found
The `ValueError` raised when the record cannot be found in the data files can be caught by the caller, not failing the upgrade. We should reset the `noupdate` flag of the xmlid if it was set. closes #36 Related: odoo/upgrade#5524 Signed-off-by: Christophe Simonis (chs) <[email protected]>
1 parent 835530b commit 50c32d7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/util/records.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,8 @@ def add_ref(ref):
837837
add_ref(ref_match.group(2))
838838

839839
if not found:
840+
if noupdate:
841+
force_noupdate(cr, xmlid, noupdate=True)
840842
suffix = " in %r module" % from_module if from_module != module else ""
841843
raise ValueError("Cannot find %r%s" % (xmlid, suffix))
842844

0 commit comments

Comments
 (0)