← Back to team overview

savoirfairelinux-openerp team mailing list archive

[Merge] lp:~savoirfairelinux-openerp/openerp-mgmtsystem/bug-1267840 into lp:openerp-mgmtsystem

 

Sandy Carter (http://www.savoirfairelinux.com) has proposed merging lp:~savoirfairelinux-openerp/openerp-mgmtsystem/bug-1267840 into lp:openerp-mgmtsystem.

Requested reviews:
  OpenERP Management System Core Editors (openerp-mgmtsystem-core-editors)

For more details, see:
https://code.launchpad.net/~savoirfairelinux-openerp/openerp-mgmtsystem/bug-1267840/+merge/201992

Adding values parametter to message_auto_subscribe
-- 
https://code.launchpad.net/~savoirfairelinux-openerp/openerp-mgmtsystem/bug-1267840/+merge/201992
Your team Savoir-faire Linux' OpenERP is subscribed to branch lp:~savoirfairelinux-openerp/openerp-mgmtsystem/bug-1267840.
=== modified file 'mgmtsystem_action/mgmtsystem_action.py'
--- mgmtsystem_action/mgmtsystem_action.py	2013-10-01 16:44:25 +0000
+++ mgmtsystem_action/mgmtsystem_action.py	2014-01-16 20:17:59 +0000
@@ -51,11 +51,11 @@
         }, context=context)
         return super(mgmtsystem_action, self).create(cr, uid, vals, context=context)
 
-    def message_auto_subscribe(self, cr, uid, ids, updated_fields, context=None):
+    def message_auto_subscribe(self, cr, uid, ids, updated_fields, context=None, values=None):
         """Automatically add the responsible user to the follow list."""
         for o in self.browse(cr, uid, ids, context=context):
             self.message_subscribe_users(cr, uid, ids, user_ids=[o.user_id.id], subtype_ids=None, context=context)
-        return super(mgmtsystem_action, self).message_auto_subscribe(cr, uid, ids, updated_fields, context=context)
+        return super(mgmtsystem_action, self).message_auto_subscribe(cr, uid, ids, updated_fields, context=context, values=values)
 
     def case_close(self, cr, uid, ids, context=None):
         """When Action is closed, post a message on the related NC's chatter"""

=== modified file 'mgmtsystem_audit/mgmtsystem_audit.py'
--- mgmtsystem_audit/mgmtsystem_audit.py	2013-10-01 16:44:25 +0000
+++ mgmtsystem_audit/mgmtsystem_audit.py	2014-01-16 20:17:59 +0000
@@ -56,21 +56,21 @@
         vals.update({
             'reference': self.pool.get('ir.sequence').get(cr, uid, 'mgmtsystem.audit')
         })
-        return super(mgmtsystem_audit, self).create(cr, uid, vals, context)
+        return super(mgmtsystem_audit, self).create(cr, uid, vals, context=context)
 
     def button_close(self, cr, uid, ids, context=None):
         """When Audit is closed, post a message to followers' chatter."""
         self.message_post(cr, uid, ids, _("Audit closed"), context=context)
         return self.write(cr, uid, ids, {'state': 'done'})
 
-    def message_auto_subscribe(self, cr, uid, ids, updated_fields, context=None):
+    def message_auto_subscribe(self, cr, uid, ids, updated_fields, context=None, values=None):
         """Automatically add the Auditors, Auditees and Audit Manager to the follow list"""
         for o in self.browse(cr, uid, ids, context=context):
             user_ids = [o.user_id.id]
             user_ids += [a.id for a in o.auditor_user_ids]
             user_ids += [a.id for a in o.auditee_user_ids]
             self.message_subscribe_users(cr, uid, ids, user_ids=user_ids, subtype_ids=None, context=context)
-        return super(mgmtsystem_audit, self).message_auto_subscribe(cr, uid, ids, updated_fields, context=context)
+        return super(mgmtsystem_audit, self).message_auto_subscribe(cr, uid, ids, updated_fields, context=context, values=values)
 
     def get_audit_url(self, cr, uid, ids, context=None):
         """

=== modified file 'mgmtsystem_nonconformity/mgmtsystem_nonconformity.py'
--- mgmtsystem_nonconformity/mgmtsystem_nonconformity.py	2013-10-01 16:44:25 +0000
+++ mgmtsystem_nonconformity/mgmtsystem_nonconformity.py	2014-01-16 20:17:59 +0000
@@ -198,12 +198,12 @@
         })
         return super(mgmtsystem_nonconformity, self).create(cr, uid, vals, context)
 
-    def message_auto_subscribe(self, cr, uid, ids, updated_fields, context=None):
+    def message_auto_subscribe(self, cr, uid, ids, updated_fields, context=None, values=None):
         """Add the reponsible, manager and OpenChatter follow list."""
         o = self.browse(cr, uid, ids, context=context)[0]
         user_ids = [o.responsible_user_id.id, o.manager_user_id.id, o.author_user_id.id]
         self.message_subscribe_users(cr, uid, ids, user_ids=user_ids, subtype_ids=None, context=context)
-        return super(mgmtsystem_nonconformity, self).message_auto_subscribe(cr, uid, ids, updated_fields=updated_fields, context=context)
+        return super(mgmtsystem_nonconformity, self).message_auto_subscribe(cr, uid, ids, updated_fields=updated_fields, context=context, values=values)
 
     def case_send_note(self, cr, uid, ids, text, data=None, context=None):
         for id in ids:

=== modified file 'mgmtsystem_nonconformity_deptm/mgmtsystem_nonconformity.py'
--- mgmtsystem_nonconformity_deptm/mgmtsystem_nonconformity.py	2013-09-17 22:08:14 +0000
+++ mgmtsystem_nonconformity_deptm/mgmtsystem_nonconformity.py	2014-01-16 20:17:59 +0000
@@ -38,11 +38,11 @@
                 result['superior_user_id'] = deptm.parent_id.manager_id.user_id.id
         return {'value': result}
 
-    def message_auto_subscribe(self, cr, uid, ids, updated_fields, context=None):
+    def message_auto_subscribe(self, cr, uid, ids, updated_fields, context=None, values=None):
         """Add the Top Manager to OpenChatter follow list."""
         o = self.browse(cr, uid, ids, context=context)[0]
         user_ids = [o.superior_user_id.id]
         self.message_subscribe_users(cr, uid, ids, user_ids=user_ids, subtype_ids=None, context=context)
-        return super(mgmtsystem_nonconformity, self).message_auto_subscribe(cr, uid, ids, updated_fields=updated_fields, context=context)
+        return super(mgmtsystem_nonconformity, self).message_auto_subscribe(cr, uid, ids, updated_fields=updated_fields, context=context, values=values)
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:


Follow ups