[IMP] improve code
authorForam Katharotiya (OpenERP) <fka@tinyerp.com>
Fri, 31 Aug 2012 10:58:55 +0000 (16:28 +0530)
committerForam Katharotiya (OpenERP) <fka@tinyerp.com>
Fri, 31 Aug 2012 10:58:55 +0000 (16:28 +0530)
bzr revid: fka@tinyerp.com-20120831105855-crs13rnqi2uztgha

addons/purchase/purchase.py
addons/purchase/purchase_data.xml

index 81b851e..16b827c 100644 (file)
@@ -766,7 +766,7 @@ class purchase_order(osv.osv):
 
     def 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=_("Purchase Order for <em>%s</em> <b>cancelled</b>.") % (obj.partner_id.name), subtype="cancel", context=context)
+            self.message_post(cr, uid, [obj.id], body=_("Purchase Order for <em>%s</em> <b>cancelled</b>.") % (obj.partner_id.name), subtype="cancelled", context=context)
 
 purchase_order()
 
index 1cc3b3b..a84564b 100644 (file)
@@ -67,8 +67,8 @@ You can also manage purchase requisitions, see also the Purchase Settings.</fiel
             <field name="name">received</field>
             <field name="model_ids" eval="[(4,ref('purchase.model_purchase_order'))]"/>
         </record>
-        <record id="mail.mail_subtype_cancel" model="mail.message.subtype">
-            <field name="name">cancel</field>
+        <record id="mail.mail_subtype_cancelled" model="mail.message.subtype">
+            <field name="name">cancelled</field>
             <field name="model_ids" eval="[(4,ref('purchase.model_purchase_order'))]"/>
             <field name="default" eval="False"/>
         </record>