[IMP] Add data of subtype in procurement

bzr revid: fka@tinyerp.com-20120831091206-196wzqlatj7lryi0
This commit is contained in:
Foram Katharotiya (OpenERP)
2012-08-31 14:42:06 +05:30
parent 91c022497b
commit ca22d79a21
2 changed files with 40 additions and 6 deletions
+6 -6
View File
@@ -496,22 +496,22 @@ class procurement_order(osv.osv):
return obj_id
def create_send_note(self, cr, uid, ids, context=None):
self.message_post(cr, uid, ids, body=_("Procurement has been <b>created</b>."), context=context)
self.message_post(cr, uid, ids, body=_("Procurement has been <b>created</b>."), subtype="new", context=context)
def confirm_send_note(self, cr, uid, ids, context=None):
self.message_post(cr, uid, ids, body=_("Procurement has been <b>confirmed</b>."), context=context)
self.message_post(cr, uid, ids, body=_("Procurement has been <b>confirmed</b>."), subtype="confirmed", context=context)
def running_send_note(self, cr, uid, ids, context=None):
self.message_post(cr, uid, ids, body=_("Procurement has been set to <b>running</b>."), context=context)
self.message_post(cr, uid, ids, body=_("Procurement has been set to <b>running</b>."), subtype="running", context=context)
def ready_send_note(self, cr, uid, ids, context=None):
self.message_post(cr, uid, ids, body=_("Procurement has been set to <b>ready</b>."), context=context)
self.message_post(cr, uid, ids, body=_("Procurement has been set to <b>ready</b>."), subtype="ready", context=context)
def cancel_send_note(self, cr, uid, ids, context=None):
self.message_post(cr, uid, ids, body=_("Procurement has been <b>cancelled</b>."), context=context)
self.message_post(cr, uid, ids, body=_("Procurement has been <b>cancelled</b>."), subtype="cancel", context=context)
def done_send_note(self, cr, uid, ids, context=None):
self.message_post(cr, uid, ids, body=_("Procurement has been <b>done</b>."), context=context)
self.message_post(cr, uid, ids, body=_("Procurement has been <b>done</b>."), subtype="close", context=context)
procurement_order()
+34
View File
@@ -28,5 +28,39 @@
<field name="number_next">1</field>
<field name="number_increment">1</field>
</record>
<!--
Mail: mail.message.subtype
-->
<record id="mail.mail_subtype_new" model="mail.message.subtype">
<field name="model_ids" eval="[(4,ref('procurement.model_procurement_order'))]"/>
</record>
<record id="mail.mail_subtype_confirmed" model="mail.message.subtype">
<field name="name">confirmed</field>
<field name="model_ids" eval="[(4,ref('procurement.model_procurement_order'))]"/>
</record>
<record id="mail.mail_subtype_ready" model="mail.message.subtype">
<field name="name">ready</field>
<field name="model_ids" eval="[(4,ref('procurement.model_procurement_order'))]"/>
</record>
<record id="mail.mail_subtype_ready" model="mail.message.subtype">
<field name="name">running</field>
<field name="model_ids" eval="[(4,ref('procurement.model_procurement_order'))]"/>
</record>
<record id="mail.mail_subtype_cancel" model="mail.message.subtype">
<field name="model_ids" eval="[(4,ref('procurement.model_procurement_order'))]"/>
</record>
<record id="mail.mail_subtype_close" model="mail.message.subtype">
<field name="model_ids" eval="[(4,ref('procurement.model_procurement_order'))]"/>
</record>
<record id="mail.mail_subtype_email" model="mail.message.subtype">
<field name="model_ids" eval="[(4,ref('procurement.model_procurement_order'))]"/>
</record>
<record id="mail.mail_subtype_comment" model="mail.message.subtype">
<field name="model_ids" eval="[(4,ref('procurement.model_procurement_order'))]"/>
</record>
<record id="mail.mail_subtype_other" model="mail.message.subtype">
<field name="model_ids" eval="[(4,ref('procurement.model_procurement_order'))]"/>
</record>
</data>
</openerp>