Foram Katharotiya (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-message-sub-type-apa-stock_data-fka
into lp:~openerp-dev/openobject-addons/trunk-message-sub-type-apa.
Requested reviews:
Amit Patel (OpenERP) (apa-tiny)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-message-sub-type-apa-stock_data-fka/+merge/122193
Hello Sir,
Add data of subtype in stock module.
Thanks,
FKA
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-message-sub-type-apa-stock_data-fka/+merge/122193
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-message-sub-type-apa.
=== modified file 'stock/stock.py'
--- stock/stock.py 2012-08-30 11:24:26 +0000
+++ stock/stock.py 2012-08-31 05:52:18 +0000
@@ -1379,13 +1379,13 @@
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)), context=context)
+ self.message_post(cr, uid, [obj.id], body=_("%s has been <b>created</b>.") % (self._get_document_type(obj.type)), subtype="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), subtype="moved", 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), context=context)
+ return self.message_post(cr, uid, ids, body=_("Back order <em>%s</em> has been <b>created</b>.") % (back_name), subtype="new", context=context)
def ship_done_send_note(self, cr, uid, ids, context=None):
type_dict = {
@@ -1394,11 +1394,11 @@
'internal': 'moved',
}
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')), context=context)
+ self.message_post(cr, uid, [obj.id], body=_("Products have been <b>%s</b>.") % (type_dict.get(obj.type, 'move done')), subtype="close", context=context)
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)), 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)
stock_picking()
=== modified file 'stock/stock_data.xml'
--- stock/stock_data.xml 2012-08-17 11:19:36 +0000
+++ stock/stock_data.xml 2012-08-31 05:52:18 +0000
@@ -164,5 +164,32 @@
<field name="lot_stock_id" ref="stock_location_stock"/>
<field name="lot_output_id" ref="stock_location_output"/>
</record>
+
+ <!--
+ Mail: mail.message.subtype
+ -->
+ <record id="mail.mail_subtype_new" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('stock.model_stock_picking'))]"/>
+ </record>
+ <record id="mail.mail_subtype_moved" model="mail.message.subtype">
+ <field name="name">moved</field>
+ <field name="model_ids" eval="[(4,ref('stock.model_stock_picking'))]"/>
+ </record>
+ <record id="mail.mail_subtype_close" model="mail.message.subtype">
+ <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">
+ <field name="model_ids" eval="[(4,ref('stock.model_stock_picking'))]"/>
+ </record>
+ <record id="mail.mail_subtype_email" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('stock.model_stock_picking')), (4,ref('stock.model_stock_move'))]"/>
+ </record>
+ <record id="mail.mail_subtype_comment" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('stock.model_stock_picking')), (4,ref('stock.model_stock_move'))]"/>
+ </record>
+ <record id="mail.mail_subtype_other" model="mail.message.subtype">
+ <field name="model_ids" eval="[(4,ref('stock.model_stock_picking')), (4,ref('stock.model_stock_move'))]"/>
+ </record>
</data>
</openerp>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp