[IMP] improve code
authorForam Katharotiya (OpenERP) <fka@tinyerp.com>
Fri, 31 Aug 2012 10:54:22 +0000 (16:24 +0530)
committerForam Katharotiya (OpenERP) <fka@tinyerp.com>
Fri, 31 Aug 2012 10:54:22 +0000 (16:24 +0530)
bzr revid: fka@tinyerp.com-20120831105422-m2unzh8mezt4oan4

addons/stock/stock.py
addons/stock/stock_data.xml

index 5e8b5df..3011fc6 100644 (file)
@@ -1398,7 +1398,7 @@ class stock_picking(osv.osv):
 
     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)), subtype="cancel", 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()
index a24502a..976c89a 100644 (file)
@@ -181,7 +181,7 @@ watch your stock valuation, and track production lots upstream and downstream (b
             <field name="name">close</field>
             <field name="model_ids" eval="[(4,ref('stock.model_stock_picking'))]"/>
         </record>
-        <record id="mail.mail_subtype_cancel" model="mail.message.subtype">
+        <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">