Jigar Amin  (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-862168-jam into 
lp:openobject-addons.

Requested reviews:
  Bhumika (OpenERP) (sbh-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-862168-jam/+merge/77875

Changes : Bug-Fix and Removed use of address_id in res.users
  - Bug #862168 - when tried to move on next stage of answer in Applicant 
  - Removed usage of the address_id from res.users model.
- With this merge proposal, Fix of the Bug # lp:862344 also need to merged to 
make it work completely 
Kindly Review this.
Thank You

-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-862168-jam/+merge/77875
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-862168-jam.
=== modified file 'survey/wizard/survey_answer.py'
--- survey/wizard/survey_answer.py	2011-09-27 20:28:43 +0000
+++ survey/wizard/survey_answer.py	2011-10-03 09:10:28 +0000
@@ -406,18 +406,8 @@
                         attachments[survey_data.title + ".pdf"] = file_data
                         file.close()
                         os.remove(addons.get_module_resource('survey', 'report') + survey_data.title + ".pdf")
-                        user_email = False
-                        resp_email = False
-
-                        address_id = user_obj.browse(cr, uid, uid).address_id.id
-                        if address_id:
-                            cr.execute("select email from res_partner_address where id =%s", (address_id,))
-                            user_email = cr.fetchone()[0]
-                        resp_id = survey_data.responsible_id.address_id
-
-                        if resp_id:
-                            cr.execute("select email from res_partner_address where id =%s", (resp_id.id,))
-                            resp_email = cr.fetchone()[0]
+                        user_email= user_obj.browse(cr, uid, uid, context).user_email or False
+                        resp_email = survey_data.responsible_id.user_email or False
                         if user_email and resp_email:
                             user_name = user_obj.browse(cr, uid, uid, context=context).name
                             mail = "Hello " + survey_data.responsible_id.name + ",\n\n " + str(user_name) + " Give Response Of " + survey_data.title + " Survey.\n\n Thanks,"
@@ -980,8 +970,7 @@
 
                 if que_rec['type'] in ['multiple_choice_only_one_ans','single_textbox','comment'] and  que_rec['is_require_answer'] and select_count <= 0:
                     raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
-
-        return True
+        return super(survey_question_wiz, self).create(cr, uid, vals, context=context)
 
     def action_new_question(self,cr, uid, ids, context=None):
         """

_______________________________________________
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

Reply via email to