Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Filesystem Storage Backend

Entity: fs.storage

Compute Method: _compute_model_ids

View 19.0
Inputs Method Outputs
  • model_xmlids
+ """
+         Use the char field (containing all model xmlids) to fulfill the o2m field.
+         """
+ for rec in self:
+             xmlids = (
+                 rec.model_xmlids.split(",") if isinstance(rec.model_xmlids, str) else []
+             )
+             model_ids = []
+             for xmlid in xmlids:
+                 # Method returns False if no model is found for this xmlid
+                 model_id = self.env["ir.model.data"]._xmlid_to_res_id(xmlid)
+                 if model_id:
+                     model_ids.append(model_id)
+             rec.model_ids = [(6, 0, model_ids)]
  • model_ids

Back to entity