Paramjit Singh Sahota(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-imp-openchatter-message-psa into 
lp:~openerp-dev/openobject-addons/trunk-improve-openchatter-useability-bth.

Requested reviews:
  OpenERP R&D Team (openerp-dev)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-imp-openchatter-message-psa/+merge/146800

Hello,

Added logs in Purchase Order. 
>Purchase Order 
>>Product Received 
>>Invoice Received 
>>Invoice paid

  Thankz YoU.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-imp-openchatter-message-psa/+merge/146800
Your team OpenERP R&D Team is requested to review the proposed merge of 
lp:~openerp-dev/openobject-addons/trunk-imp-openchatter-message-psa into 
lp:~openerp-dev/openobject-addons/trunk-improve-openchatter-useability-bth.
=== modified file 'purchase/purchase.py'
--- purchase/purchase.py	2012-12-21 16:48:08 +0000
+++ purchase/purchase.py	2013-02-06 08:48:22 +0000
@@ -561,6 +561,7 @@
 
     def invoice_done(self, cr, uid, ids, context=None):
         self.write(cr, uid, ids, {'state':'approved'}, context=context)
+        self.message_post(cr, uid, ids, body=_("Invoice <b>Paid.</b>"), context=context)
         return True
 
     def has_stockable_product(self, cr, uid, ids, *args):
@@ -679,6 +680,7 @@
 
     def picking_done(self, cr, uid, ids, context=None):
         self.write(cr, uid, ids, {'shipped':1,'state':'approved'}, context=context)
+        self.message_post(cr, uid, ids, body=_("Product <b>Received.</b>"), context=context)
         return True
 
     def copy(self, cr, uid, id, default=None, context=None):
@@ -1196,4 +1198,13 @@
             wf_service.trg_validate(uid, 'purchase.order', context['default_res_id'], 'send_rfq', cr)
         return super(mail_compose_message, self).send_mail(cr, uid, ids, context=context)
 
+class account_invoice(osv.Model):
+    _inherit = 'account.invoice'
+    
+    def invoice_validate(self, cr, uid, ids, context=None):
+        po_ids = self.pool.get('purchase.order').search(cr,uid,[('invoice_ids','in',ids)],context)
+        res = super(account_invoice, self).invoice_validate(cr, uid, ids, context=None)
+        self.pool.get('purchase.order').message_post(cr, uid, po_ids, body=_("Invoice <b>Received.</b>"), context=context)
+        return res 
+
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : openerp-dev-gtk@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to