Skip to content

Commit 9aeb9a2

Browse files
committed
[FIX] util.update_record_from_xml: skip models
Some records, like the mail templates, refer to model via the `base.model_*` xmlids, which doesn't exists in data files. Skip them. Part-of: #36
1 parent 37a78bc commit 9aeb9a2

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
@@ -770,6 +770,8 @@ def __update_record_from_xml(
770770
)
771771
if cr.rowcount:
772772
model, res_id, noupdate = cr.fetchone()
773+
if model == "ir.model":
774+
return
773775
elif not force_create:
774776
_logger.warning("Record %r not found in database. Skip update.", xmlid)
775777
return

0 commit comments

Comments
 (0)