Commits

Raimon Esteve (Zikzakmedia)  committed c9162e1

get_resource method version 2.6

  • Participants
  • Parent commits d8cd818

Comments (0)

Files changed (1)

File party_event.py

     @classmethod
     def get_resource(cls):
         res = super(PartyEvent, cls).get_resource()
-        Model = Pool().get('ir.model')
-        model_ids = Model.search([
+        pool = Pool()
+        Model = pool.get('ir.model')
+        models = Model.search([
             ('model', '=', 'electronic.mail'),
-            ])
-        for model in Model.browse(model_ids):
+        ])
+        for model in models:
             res.append([model.model, model.name])
         return res
-