[IMP]changed in mrp_repair for subtype
bzr revid: sgo@tinyerp.com-20120913072005-cmlf91arfwpxnv6o
This commit is contained in:
parent
fa5f1e174e
commit
2e7de7cf6f
|
@ -571,40 +571,40 @@ class mrp_repair(osv.osv):
|
|||
def create_send_note(self, cr, uid, ids, context=None):
|
||||
for repair in self.browse(cr, uid, ids, context):
|
||||
message = _("Repair Order for <em>%s</em> has been <b>created</b>." % (repair.product_id.name))
|
||||
self.message_post(cr, uid, [repair.id], body=message, subtype="new", context=context)
|
||||
self.message_post(cr, uid, [repair.id], body=message, subtype_xml_id="mrp_repair_subtype_new", context=context)
|
||||
return True
|
||||
|
||||
def set_start_send_note(self, cr, uid, ids, context=None):
|
||||
for repair in self.browse(cr, uid, ids, context):
|
||||
message = _("Repair Order for <em>%s</em> has been <b>started</b>." % (repair.product_id.name))
|
||||
self.message_post(cr, uid, [repair.id], body=message, subtype="started", context=context)
|
||||
self.message_post(cr, uid, [repair.id], body=message, subtype_xml_id="mrp_repair_subtype_started", context=context)
|
||||
return True
|
||||
|
||||
def set_toinvoiced_send_note(self, cr, uid, ids, context=None):
|
||||
for repair in self.browse(cr, uid, ids, context):
|
||||
message = _("Draft Invoice of %s %s <b>waiting for validation</b>.") % (repair.invoice_id.amount_total, repair.invoice_id.currency_id.symbol)
|
||||
self.message_post(cr, uid, [repair.id], body=message, subtype="pending", context=context)
|
||||
self.message_post(cr, uid, [repair.id], body=message, subtype_xml_id="mrp_repair_subtype_pending", context=context)
|
||||
return True
|
||||
|
||||
def set_confirm_send_note(self, cr, uid, ids, context=None):
|
||||
for repair in self.browse(cr, uid, ids, context):
|
||||
message = _( "Repair Order for <em>%s</em> has been <b>accepted</b>." % (repair.product_id.name))
|
||||
self.message_post(cr, uid, [repair.id], body=message, subtype="accepted", context=context)
|
||||
self.message_post(cr, uid, [repair.id], body=message, subtype_xml_id="mrp_repair_subtype_accepted", context=context)
|
||||
return True
|
||||
|
||||
def set_cancel_send_note(self, cr, uid, ids, context=None):
|
||||
message = _("Repair has been <b>cancelled</b>.")
|
||||
self.message_post(cr, uid, ids, body=message, subtype="cancelled", context=context)
|
||||
self.message_post(cr, uid, ids, body=message, subtype_xml_id="mrp_repair_subtype_cancelled", context=context)
|
||||
return True
|
||||
|
||||
def set_ready_send_note(self, cr, uid, ids, context=None):
|
||||
message = _("Repair Order is now <b>ready</b> to repair.")
|
||||
self.message_post(cr, uid, ids, body=message, subtype="ready", context=context)
|
||||
self.message_post(cr, uid, ids, body=message, subtype_xml_id="mrp_repair_subtype_ready", context=context)
|
||||
return True
|
||||
|
||||
def set_done_send_note(self, cr, uid, ids, context=None):
|
||||
message = _("Repair Order is <b>closed</b>.")
|
||||
self.message_post(cr, uid, ids, body=message, subtype="closed", context=context)
|
||||
self.message_post(cr, uid, ids, body=message, subtype_xml_id="mrp_repair_subtype_closed", context=context)
|
||||
return True
|
||||
|
||||
mrp_repair()
|
||||
|
|
|
@ -1,47 +1,38 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record id="mail.mail_subtype_new" model="mail.message.subtype">
|
||||
<record id="mail.mrp_repair_subtype_new" model="mail.message.subtype">
|
||||
<field name="name">new</field>
|
||||
<field name="model_ids" eval="[(4,ref('mrp_repair.model_mrp_repair'))]"/>
|
||||
<field name="res_model">mrp.repair</field>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_started" model="mail.message.subtype">
|
||||
<record id="mail.mrp_repair_subtype_started" model="mail.message.subtype">
|
||||
<field name="name">started</field>
|
||||
<field name="model_ids" eval="[(4,ref('mrp_repair.model_mrp_repair'))]"/>
|
||||
<field name="res_model">mrp.repair</field>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_ready" model="mail.message.subtype">
|
||||
<record id="mail.mrp_repair_subtype_ready" model="mail.message.subtype">
|
||||
<field name="name">ready</field>
|
||||
<field name="model_ids" eval="[(4,ref('mrp_repair.model_mrp_repair'))]"/>
|
||||
<field name="res_model">mrp.repair</field>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_pending" model="mail.message.subtype">
|
||||
<record id="mail.mrp_repair_subtype_pending" model="mail.message.subtype">
|
||||
<field name="name">pending</field>
|
||||
<field name="model_ids" eval="[(4,ref('mrp_repair.model_mrp_repair'))]"/>
|
||||
<field name="res_model">mrp.repair</field>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_accepted" model="mail.message.subtype">
|
||||
<record id="mail.mrp_repair_subtype_accepted" model="mail.message.subtype">
|
||||
<field name="name">accepted</field>
|
||||
<field name="model_ids" eval="[(4,ref('mrp_repair.model_mrp_repair'))]"/>
|
||||
<field name="res_model">mrp.repair</field>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_cancelled" model="mail.message.subtype">
|
||||
<record id="mail.mrp_repair_subtype_cancelled" model="mail.message.subtype">
|
||||
<field name="name">cancelled</field>
|
||||
<field name="model_ids" eval="[(4,ref('mrp_repair.model_mrp_repair'))]"/>
|
||||
<field name="res_model">mrp.repair</field>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_closed" model="mail.message.subtype">
|
||||
<record id="mail.mrp_repair_subtype_closed" model="mail.message.subtype">
|
||||
<field name="name">closed</field>
|
||||
<field name="model_ids" eval="[(4,ref('mrp_repair.model_mrp_repair'))]"/>
|
||||
<field name="res_model">mrp.repair</field>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_email" model="mail.message.subtype">
|
||||
<field name="model_ids" eval="[(4,ref('mrp_repair.model_mrp_repair'))]"/>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_comment" model="mail.message.subtype">
|
||||
<field name="model_ids" eval="[(4,ref('mrp_repair.model_mrp_repair'))]"/>
|
||||
</record>
|
||||
<record id="mail.mail_subtype_other" model="mail.message.subtype">
|
||||
<field name="model_ids" eval="[(4,ref('mrp_repair.model_mrp_repair'))]"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue