I try to display a message after create a product object that tell user product with product.name is created successful This is the code:
def log_prod(self, cr,
def log_prod(self, cr, uid, ids, context=None):
product=self.pool.get('product.product').browse(cr, uid, ids)
msg=_("Product %s has been created") % product.name
self.message_post(cr, uid, ids, body=msg, context=context)
return True
def create(self, cr, uid, data, context=None):
new_id = super(product_product,self).create(cr, uid, data, context)
self.log_prod(cr,uid,new_id,context)
return new_id
Like this code try.
Hope this will help you. :)