Victor Tabuenca (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/7.0-fix_share-vta into 
lp:openobject-addons/7.0.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-fix_share-vta/+merge/141352

Fix traceback in has_share method of share module, cause by an unused parameter 
in the method.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/7.0-fix_share-vta/+merge/141352
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/7.0-fix_share-vta.
=== modified file 'share/wizard/share_wizard.py'
--- share/wizard/share_wizard.py	2012-12-17 14:43:06 +0000
+++ share/wizard/share_wizard.py	2012-12-27 14:24:15 +0000
@@ -69,7 +69,7 @@
             return False
         return group_id in self.pool.get('res.users').read(cr, uid, uid, ['groups_id'], context=context)['groups_id']
 
-    def has_share(self, cr, uid, unused_param, context=None):
+    def has_share(self, cr, uid, context=None):
         return self.has_group(cr, uid, module='share', group_xml_id='group_share_user', context=context)
 
     def _user_type_selection(self, cr, uid, context=None):
@@ -453,7 +453,7 @@
            ``model`` is the browse_record of a reachable ir.model, and ``field`` is
            the dot-notation reverse relationship path coming from that model to obj0,
            or None if there is no reverse path.
-           
+
            :return: ([obj0], [obj1], [obj2], [obj3])
            """
         # obj0 class and its parents
@@ -703,7 +703,7 @@
         model_obj = self.pool.get('ir.model')
         model_id = model_obj.search(cr, uid, [('model','=', wizard_data.action_id.res_model)])[0]
         model = model_obj.browse(cr, uid, model_id, context=context)
-        
+
         # ACCESS RIGHTS
         # We have several classes of objects that should receive different access rights:
         # Let:
@@ -753,7 +753,7 @@
 
         # refresh wizard_data
         wizard_data = self.browse(cr, uid, ids[0], context=context)
-        
+
         # EMAILS AND NOTIFICATIONS
         #  A. Not invite: as before
         #     -> send emails to destination users
@@ -763,7 +763,7 @@
         #     -> send a notification to all users; users allowing to receive
         #        emails in preferences will receive it
         #        new users by default receive all notifications by email
-        
+
         # A.
         if not wizard_data.invite:
             self.send_emails(cr, uid, wizard_data, context=context)
@@ -780,11 +780,11 @@
             self.pool.get(model.model).message_subscribe(cr, uid, [res_id], new_ids + existing_ids, context=context)
             # self.send_invite_email(cr, uid, wizard_data, context=context)
             # self.send_invite_note(cr, uid, model.model, res_id, wizard_data, context=context)
-        
+
         # CLOSE
         #  A. Not invite: as before
         #  B. Invite: skip summary screen, get back to the record
-        
+
         # A.
         if not wizard_data.invite:
             dummy, step2_form_view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'share', 'share_step2_form')
@@ -810,7 +810,7 @@
                 'views': [(False, 'form'), (False, 'tree'), (False, 'calendar'), (False, 'graph')],
                 'type': 'ir.actions.act_window',
             }
-            
+
 
     def send_invite_note(self, cr, uid, model_name, res_id, wizard_data, context=None):
         subject = _('Invitation')
@@ -824,7 +824,7 @@
                 body += ' and'
         body += '.'
         return self.pool.get(model_name).message_post(cr, uid, [res_id], body=body, context=context)
-    
+
     def send_invite_email(self, cr, uid, wizard_data, context=None):
         # TDE Note: not updated because will disappear
         message_obj = self.pool.get('mail.message')
@@ -832,7 +832,7 @@
         user = self.pool.get('res.users').browse(cr, UID_ROOT, uid)
         if not user.email:
             raise osv.except_osv(_('Email required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.'))
-        
+
         # TODO: also send an HTML version of this mail
         for result_line in wizard_data.result_line_ids:
             email_to = result_line.user_id.email
@@ -856,14 +856,14 @@
                       "It is open source and can be found on http://www.openerp.com.";)
             msg_id = message_obj.schedule_with_attach(cr, uid, user.email, [email_to], subject, body, model='', context=context)
             notification_obj.create(cr, uid, {'user_id': result_line.user_id.id, 'message_id': msg_id}, context=context)
-    
+
     def send_emails(self, cr, uid, wizard_data, context=None):
         _logger.info('Sending share notifications by email...')
         mail_mail = self.pool.get('mail.mail')
         user = self.pool.get('res.users').browse(cr, UID_ROOT, uid)
         if not user.email:
             raise osv.except_osv(_('Email required'), _('The current user must have an email address configured in User Preferences to be able to send outgoing emails.'))
-        
+
         # TODO: also send an HTML version of this mail
         mail_ids = []
         for result_line in wizard_data.result_line_ids:

_______________________________________________
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