def create_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
- self.message_post(cr, uid, [obj.id], body=_("%s has been <b>created</b>.") % (self._get_document_type(obj.type)), context=context)
+ self.message_post(cr, uid, [obj.id], body=_("%s has been <b>created</b>.") % (self._get_document_type(obj.type)), subtype="new", context=context)
def scrap_send_note(self, cr, uid, ids, quantity, uom, name, context=None):
- return self.message_post(cr, uid, ids, body= _("%s %s %s has been <b>moved to</b> scrap.") % (quantity, uom, name), context=context)
+ return self.message_post(cr, uid, ids, body= _("%s %s %s has been <b>moved to</b> scrap.") % (quantity, uom, name), subtype="moved", context=context)
def back_order_send_note(self, cr, uid, ids, back_name, context=None):
- return self.message_post(cr, uid, ids, body=_("Back order <em>%s</em> has been <b>created</b>.") % (back_name), context=context)
+ return self.message_post(cr, uid, ids, body=_("Back order <em>%s</em> has been <b>created</b>.") % (back_name), subtype="new", context=context)
def ship_done_send_note(self, cr, uid, ids, context=None):
type_dict = {
'internal': 'moved',
}
for obj in self.browse(cr, uid, ids, context=context):
- self.message_post(cr, uid, [obj.id], body=_("Products have been <b>%s</b>.") % (type_dict.get(obj.type, 'move done')), context=context)
+ self.message_post(cr, uid, [obj.id], body=_("Products have been <b>%s</b>.") % (type_dict.get(obj.type, 'move done')), subtype="closed", context=context)
def ship_cancel_send_note(self, cr, uid, ids, context=None):
for obj in self.browse(cr, uid, ids, context=context):
- self.message_post(cr, uid, [obj.id], body=_("%s has been <b>cancelled</b>.") % (self._get_document_type(obj.type)), context=context)
+ self.message_post(cr, uid, [obj.id], body=_("%s has been <b>cancelled</b>.") % (self._get_document_type(obj.type)), subtype="cancelled", context=context)
stock_picking()
<field name="lot_stock_id" ref="stock_location_stock"/>
<field name="lot_output_id" ref="stock_location_output"/>
</record>
+
+ <!--
+ Mail: mail.message.subtype
+ -->
+ <record id="mail.mail_subtype_new" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('stock.model_stock_picking'))]"/>
+ </record>
+ <record id="mail.mail_subtype_moved" model="mail.message.subtype">
+ <field name="name">moved</field>
+ <field name="model_ids" eval="[(4,ref('stock.model_stock_picking'))]"/>
+ </record>
+ <record id="mail.mail_subtype_closed" model="mail.message.subtype">
+ <field name="name">closed</field>
+ <field name="model_ids" eval="[(4,ref('stock.model_stock_picking'))]"/>
+ </record>
+ <record id="mail.mail_subtype_cancelled" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('stock.model_stock_picking'))]"/>
+ </record>
+ <record id="mail.mail_subtype_email" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('stock.model_stock_picking')), (4,ref('stock.model_stock_move'))]"/>
+ </record>
+ <record id="mail.mail_subtype_comment" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('stock.model_stock_picking')), (4,ref('stock.model_stock_move'))]"/>
+ </record>
+ <record id="mail.mail_subtype_other" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('stock.model_stock_picking')), (4,ref('stock.model_stock_move'))]"/>
+ </record>
</data>
</openerp>