I'm currently looking at stored server actions in XML. Here is an example of one, from the crm addon:
<record id="action_mark_as_lost" model="ir.actions.server">
<field name="name">Mark As Lost</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="state">code</field>
<field name="code">
if context.get('active_model') == 'crm.lead' and context.get('active_ids'):
self.case_mark_lost(cr, uid, context['active_ids'], context=context)
</field>
</record>
What is "model_crm_lead?" Odoo generally refers to models by the name defined in the model, so it's referring to the crm.lead model, shouldn't the tag be:
<field name="model_id" ref="crm.lead"/>
I thought perhaps it is using the class name instead of the internal model name (for some reason), and prefacing it with "model_<MODEL_CLASS_NAME>" but I'm only guessing and don't really know how this field works or where it is explained.
Edit: Is it "model_<MODEL_TABLE_NAME>"? It's that isn't it?