[CLEAN] stock: cleaned subtypes.
bzr revid: tde@openerp.com-20120919115156-mi80hp8jprnag506
This commit is contained in:
parent
f59a9a83bb
commit
4fa322cfe5
|
@ -1379,13 +1379,13 @@ class stock_picking(osv.osv):
|
|||
|
||||
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)), subtype_xml_id="stock_in_subtype_new", context=context)
|
||||
self.message_post(cr, uid, [obj.id], body=_("%s has been <b>created</b>.") % (self._get_document_type(obj.type)), subtype_xml_id="mt_stock_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), 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), subtype_xml_id="stock_in_subtype_new", context=context)
|
||||
return self.message_post(cr, uid, ids, body=_("Back order <em>%s</em> has been <b>created</b>.") % (back_name), subtype_xml_id="mt_stock_new", context=context)
|
||||
|
||||
def ship_done_send_note(self, cr, uid, ids, context=None):
|
||||
type_dict = {
|
||||
|
@ -1394,19 +1394,15 @@ class stock_picking(osv.osv):
|
|||
'internal': 'moved',
|
||||
}
|
||||
xml_id_dict = {
|
||||
'out':'stock_out_subtype_delivered',
|
||||
'in' : 'stock_in_subtype_received'
|
||||
'out': 'mt_stock_delivered',
|
||||
'in': 'mt_stock_received'
|
||||
}
|
||||
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')), subtype_xml_id=xml_id_dict.get(obj.type), context=context)
|
||||
|
||||
def ship_cancel_send_note(self, cr, uid, ids, context=None):
|
||||
xml_id_dict = {
|
||||
'out':'stock_out_subtype_cancelled',
|
||||
'in' : 'stock_in_subtype_cancelled'
|
||||
}
|
||||
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_xml_id=xml_id_dict.get(obj.type), context=context)
|
||||
self.message_post(cr, uid, [obj.id], body=_("%s has been <b>cancelled</b>.") % (self._get_document_type(obj.type)), context=context)
|
||||
|
||||
|
||||
stock_picking()
|
||||
|
|
|
@ -167,30 +167,18 @@ watch your stock valuation, and track production lots upstream and downstream (b
|
|||
<field name="lot_output_id" ref="stock_location_output"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Mail: mail.message.subtype
|
||||
-->
|
||||
<record id="mail.stock_in_subtype_new" model="mail.message.subtype">
|
||||
<field name="name">new</field>
|
||||
<!-- Mail: mail.message.subtype -->
|
||||
<record id="mail.mt_stock_new" model="mail.message.subtype">
|
||||
<field name="name">created</field>
|
||||
<field name="res_model">stock.picking.in</field>
|
||||
</record>
|
||||
<record id="mail.stock_out_subtype_delivered" model="mail.message.subtype">
|
||||
<record id="mail.mt_stock_delivered" model="mail.message.subtype">
|
||||
<field name="name">delivered</field>
|
||||
<field name="res_model">stock.picking.out</field>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.stock_in_subtype_received" model="mail.message.subtype">
|
||||
<record id="mail.mt_stock_received" model="mail.message.subtype">
|
||||
<field name="name">received</field>
|
||||
<field name="res_model">stock.picking.in</field>
|
||||
<field name="default" eval="False"/>
|
||||
</record>
|
||||
<record id="mail.stock_in_subtype_cancelled" model="mail.message.subtype">
|
||||
<field name="name">cancelled</field>
|
||||
<field name="res_model">stock.picking.in</field>
|
||||
</record>
|
||||
<record id="mail.stock_out_subtype_cancelled" model="mail.message.subtype">
|
||||
<field name="name">cancelled</field>
|
||||
<field name="res_model">stock.picking.out</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue