← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-addons/uco-dev-addons1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons1

 

uco (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/uco-dev-addons1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons1.

Requested reviews:
  OpenERP R&D Team (openerp-dev)
Related bugs:
  #644325 In Lead shows HTML from email rather than plain text
  https://bugs.launchpad.net/bugs/644325
  #655034 Project : Progressbar of project should be updated based on task changes.
  https://bugs.launchpad.net/bugs/655034
  #657688 [trunk] fetchmail services need help text
  https://bugs.launchpad.net/bugs/657688
  #670904 CRM : Create opportunity wizard crashes
  https://bugs.launchpad.net/bugs/670904
  #670914 [6.0] Error when a task is delegated if task's name have an accent
  https://bugs.launchpad.net/bugs/670914
  #676857 [6.0RC1] documents - separation per company 
  https://bugs.launchpad.net/bugs/676857
  #680884 [6.0] fetchmail module should use user_id defined in email.server to do process_email
  https://bugs.launchpad.net/bugs/680884
  #680957 bad tooltip on "Convert to opportunity" button in inbound phone call
  https://bugs.launchpad.net/bugs/680957
  #680961 state changes of all crm object shouldn't be in Email section of partner's history
  https://bugs.launchpad.net/bugs/680961
  #684472 Converting an issue to a task  or create a ne task [V6.0 3977-GTK Client]
  https://bugs.launchpad.net/bugs/684472


* Improvement CRM:
  Task-ID 1865:
  --------------
  Button "Mark won" 
  => proba 100% if box "change probability automatically" change also stage
  and "Mark lost" should modify the stage 
  => proba 0% if box "change probability automatically" change also stage

* [FIX] lp:680884: [6.0] fetchmail module should use user_id defined in email.server to do process_email

* [FIX] lp:684472: Converting an issue to a task or create a ne task [V6.0 3977-GTK Client]
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/uco-dev-addons1/+merge/42821
Your team OpenERP R&D Team is requested to review the proposed merge of lp:~openerp-dev/openobject-addons/uco-dev-addons1 into lp:~openerp-dev/openobject-addons/trunk-dev-addons1.
=== modified file 'crm/crm_opportunity.py'
--- crm/crm_opportunity.py	2010-11-15 12:17:36 +0000
+++ crm/crm_opportunity.py	2010-12-06 10:31:20 +0000
@@ -60,7 +60,11 @@
         @param *args: Tuple Value for additional Params
         """
         res = super(crm_opportunity, self).case_close(cr, uid, ids, args)
-        value = {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')}
+        data_obj = self.pool.get('ir.model.data')
+        data_id = data_obj._get_id(cr, uid, 'crm', 'stage_lead5')
+        stage_id = data_obj.browse(cr, uid, data_id).res_id
+        stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage_id)
+        value = {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S'), 'probability': stage_obj.probability, 'stage_id': stage_id}
 
         self.write(cr, uid, ids, value)
         for (id, name) in self.name_get(cr, uid, ids):
@@ -79,9 +83,13 @@
         @param *args: Tuple Value for additional Params
         """
         res = super(crm_opportunity, self).case_close(cr, uid, ids, args)
-        value = {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')}
+        data_obj = self.pool.get('ir.model.data')
+        data_id = data_obj._get_id(cr, uid, 'crm', 'stage_lead6')
+        stage_id = data_obj.browse(cr, uid, data_id).res_id
+        stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage_id)
+        value = {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S'), 'probability': stage_obj.probability, 'stage_id': stage_id}
 
-        res = self.write(cr, uid, ids, value)
+        self.write(cr, uid, ids, value)
         for (id, name) in self.name_get(cr, uid, ids):
             opp = self.browse(cr, uid, id)
             if opp.type == 'opportunity':
@@ -110,7 +118,7 @@
         @param *args: Tuple Value for additional Params
         """
         res = super(crm_opportunity, self).case_reset(cr, uid, ids, *args)
-        self.write(cr, uid, ids, {'stage_id': False})
+        self.write(cr, uid, ids, {'stage_id': False, 'probability': 0.0})
         return res
    
  

=== modified file 'fetchmail/fetchmail.py'
--- fetchmail/fetchmail.py	2010-11-04 13:21:37 +0000
+++ fetchmail/fetchmail.py	2010-12-06 10:31:20 +0000
@@ -150,6 +150,7 @@
         context.update({'get_server': True})
         for server in self.browse(cr, uid, ids, context):
             count = 0
+            user = server.user_id.id or uid
             try:
                 if server.type == 'imap':
                     imap_server = self.button_confirm_login(cr, uid, [server.id], context=context)
@@ -157,7 +158,7 @@
                     result, data = imap_server.search(None, '(UNSEEN)')
                     for num in data[0].split():
                         result, data = imap_server.fetch(num, '(RFC822)')
-                        res_id = email_tool.process_email(cr, uid, server.object_id.model, data[0][1], attach=server.attach, context=context)
+                        res_id = email_tool.process_email(cr, user, server.object_id.model, data[0][1], attach=server.attach, context=context)
                         if res_id and server.action_id:
                             action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]})
 
@@ -174,7 +175,7 @@
                     for num in range(1, numMsgs + 1):
                         (header, msges, octets) = pop_server.retr(num)
                         msg = '\n'.join(msges)
-                        res_id = email_tool.process_email(cr, uid, server.object_id.model, msg, attach=server.attach, context=context)
+                        res_id = email_tool.process_email(cr, user, server.object_id.model, msg, attach=server.attach, context=context)
                         if res_id and server.action_id:
                             action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]})
 

=== modified file 'fetchmail/fetchmail_view.xml'
--- fetchmail/fetchmail_view.xml	2010-11-04 13:21:37 +0000
+++ fetchmail/fetchmail_view.xml	2010-12-06 10:31:20 +0000
@@ -48,6 +48,7 @@
                             <group col="2" colspan="2">
                                 <separator string="Auto Reply?" colspan="2"/>
                                 <field name="action_id"/>
+                                <field name="user_id"/>
                             </group>
                             <group col="2" colspan="2">
                                 <separator string="Process Parameter" colspan="2"/>

=== modified file 'project/project_view.xml'
--- project/project_view.xml	2010-11-26 16:13:59 +0000
+++ project/project_view.xml	2010-12-06 10:31:20 +0000
@@ -225,6 +225,9 @@
                                     widget="float_time"
                                     attrs="{'readonly':[('state','!=','draft')]}"
                                     on_change="onchange_planned(planned_hours, effective_hours)"/>
+                                <field
+                                    name="effective_hours"
+                                    widget="float_time" invisible="1"/>
                             </group>
                             <group col="3" colspan="2">
                                 <field name="remaining_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" colspan="2"/>


Follow ups