← Back to team overview

openerp-dev-web team mailing list archive

lp:~openerp-dev/openobject-addons/trunk-improve_mailgateway_project_issue-stw into lp:openobject-addons

 

Stephane Wirtel (OpenERP) has proposed merging lp:~openerp-dev/openobject-addons/trunk-improve_mailgateway_project_issue-stw into lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-improve_mailgateway_project_issue-stw/+merge/58816

Fix and improve the gateway and the project.issue object
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-improve_mailgateway_project_issue-stw/+merge/58816
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-improve_mailgateway_project_issue-stw.
=== modified file 'account_analytic_analysis/__init__.py'
--- account_analytic_analysis/__init__.py	2011-01-14 00:11:01 +0000
+++ account_analytic_analysis/__init__.py	2011-04-22 13:59:38 +0000
@@ -20,6 +20,7 @@
 ##############################################################################
 
 import account_analytic_analysis
+import cron_account_analytic_account
 
 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
 

=== modified file 'account_analytic_analysis/__openerp__.py'
--- account_analytic_analysis/__openerp__.py	2011-03-18 14:06:18 +0000
+++ account_analytic_analysis/__openerp__.py	2011-04-22 13:59:38 +0000
@@ -41,6 +41,7 @@
                     "security/ir.model.access.csv",
                     "account_analytic_analysis_view.xml",
                     "account_analytic_analysis_menu.xml",
+                    "account_analytic_analysis_cron.xml",
                     ],
     'demo_xml'  : [],
     'installable': True,

=== modified file 'account_analytic_analysis/account_analytic_analysis.py'
--- account_analytic_analysis/account_analytic_analysis.py	2011-02-03 05:28:27 +0000
+++ account_analytic_analysis/account_analytic_analysis.py	2011-04-22 13:59:38 +0000
@@ -374,7 +374,25 @@
             res[id] = round(res.get(id, 0.0),2)
         return res
 
-    _columns ={
+    def _is_overdue_quantity(self, cr, uid, ids, fieldnames, args, context=None):
+        result = dict.fromkeys(ids, 0)
+
+        for record in self.browse(cr, uid, ids, context=context):
+            result[record.id] = int(record.quantity >= record.quantity_max)
+
+        return result
+
+    def _get_analytic_account(self, cr, uid, ids, context=None):
+        result = set()
+        for line in self.pool.get('account.analytic.line').browse(cr, uid, ids, context=context):
+            result.add(line.account_id.id)
+        return list(result)
+
+    _columns = {
+        'is_overdue_quantity' : fields.function(_is_overdue_quantity, method=True, type='boolean', string='Overdue Quantity',
+                                                store={
+                                                    'account.analytic.line' : (_get_analytic_account, None, 20),
+                                                }),
         'ca_invoiced': fields.function(_ca_invoiced_calc, method=True, type='float', string='Invoiced Amount',
             help="Total customer invoiced amount for this account.",
             digits_compute=dp.get_precision('Account')),

=== added file 'account_analytic_analysis/account_analytic_analysis_cron.xml'
--- account_analytic_analysis/account_analytic_analysis_cron.xml	1970-01-01 00:00:00 +0000
+++ account_analytic_analysis/account_analytic_analysis_cron.xml	2011-04-22 13:59:38 +0000
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding='UTF-8'?>
+<openerp>
+    <data>
+        <record model="ir.cron" id="account_analytic_cron">
+            <field name="name">Analytic Account Report for Sales</field>
+            <field name="interval_number">1</field>
+            <field name="interval_type">weeks</field>
+            <field name="numbercall">-1</field>
+            <field eval="False" name="doall"/>
+            <field eval="'account.analytic.account'" name="model"/>
+            <field eval="cron_account_analytic_account" name="function"/>
+            <field eval="'()'" name="args"/>
+        </record>
+    </data>
+</openerp>

=== modified file 'account_analytic_analysis/account_analytic_analysis_menu.xml'
--- account_analytic_analysis/account_analytic_analysis_menu.xml	2011-01-14 00:11:01 +0000
+++ account_analytic_analysis/account_analytic_analysis_menu.xml	2011-04-22 13:59:38 +0000
@@ -21,5 +21,65 @@
             <field name="domain">[('date','&lt;=',time.strftime('%Y-%m-%d')),('state','=','open')]</field>
         </record>
         <menuitem action="action_account_analytic_managed_overpassed" id="menu_action_account_analytic_managed_overpassed" sequence="50" parent="menu_invoicing" groups="base.group_extended"/>
+
+        <record id="view_account_analytic_account_overdue_search" model="ir.ui.view">
+            <field name="name">account.analytic.account.search</field>
+            <field name="model">account.analytic.account</field>
+            <field name="type">search</field>
+            <field name="arch" type="xml">
+                <search string="Analytic Account">
+                    <group col="8" colspan="4">
+                        <filter icon="terp-check" name="current" string="Current" domain="[('state', 'not in', ('closed', 'cancelled')]" help="Current Accounts" />
+                        <filter icon="terp-camera_test" string="Open" domain="[('state','=','open')]" help="Open Accounts"/>
+                        <filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
+                        <separator orientation="vertical"/>
+                        <filter icon="terp-go-today" string="To Renew" domain="['|', '&amp;', ('date', '!=', False), ('date', '&lt;', time.strftime('%%Y-%%m-%%d')), ('is_overdue_quantity', '=', True)]"
+                            help="The contracts to be renewed because the deadline is passed or the working hours are higher than the allocated hours" />
+                        <filter icon="terp-go-month"
+                             string=" +1 Month"
+                             domain="[('date','&lt;=', (datetime.date.today() + relativedelta(months=1)).strftime('%%Y-%%m-%%d')),('date','>=', time.strftime('%%Y-%%m-%%d'))]"
+                             help="Analytic Accounts with a past deadline in one month." />
+
+                        <separator orientation="vertical"/>
+                        <field name="name" select="1"/>
+                        <field name="code" select="1"/>
+                        <field name="partner_id" select="1">
+                            <filter string="Has Partner" name="has_partner" domain="[('partner_id', '!=', False)]" icon="terp-partner" />
+                            <filter string="Has No Partner" name="has_no_partner" domain="[('partner_id', '=', False)]" icon="terp-partner" />
+                        </field>
+                        <field name="user_id">
+                            <filter string="My Accounts" domain="[('user_id','=',uid)]" icon="terp-personal" name="my_accounts" />
+                            <filter string="No Account Manager" domain="[('user_id', '=', False)]" icon="terp-personal-" />
+                        </field>
+
+                    </group>
+                    <newline/>
+                    <group expand="0" string="Group By...">
+                        <filter string="Manager" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
+                        <filter string="Associated Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
+                        <separator orientation="vertical"/>
+                        <filter string="Parent" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
+                        <!--
+                        <filter string="Start Date" icon="terp-go-month" domain="[]" context="{'group_by' : 'date_start'}" />
+                        -->
+                        <filter string="End Date" icon="terp-go-month" domain="[]" context="{'group_by' : 'date'}" />
+                    </group>
+                </search>
+            </field>
+        </record>
+
+
+        <record id="action_account_analytic_overdue" model="ir.actions.act_window">
+            <field name="name">Overdue Accounts</field>
+            <field name="res_model">account.analytic.account</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form,graph</field>
+            <field name="context">{'search_default_has_partner' : 1, 'search_default_my_accounts' : 1, 'search_default_current' : 1}</field>
+            <field name="search_view_id" ref="view_account_analytic_account_overdue_search"/>
+            <field name="help">You will find here the contracts to be renewed because the deadline is passed or the working hours are higher than the allocated hours. OpenERP automatically sets these analytic accounts to the pending state, in order to raise a warning during the timesheets recording. Salesmen should review all pending accounts and reopen or close the according to the negotiation with the customer.</field>
+        </record>
+
+        <menuitem action="action_account_analytic_overdue" id="menu_action_account_analytic_overdue" sequence="50" parent="sale.menu_invoiced" groups="base.group_extended"/>
+
     </data>
 </openerp>

=== added file 'account_analytic_analysis/cron_account_analytic_account.py'
--- account_analytic_analysis/cron_account_analytic_account.py	1970-01-01 00:00:00 +0000
+++ account_analytic_analysis/cron_account_analytic_account.py	2011-04-22 13:59:38 +0000
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+from osv import osv
+from mako.template import Template
+import time
+try:
+    import cStringIO as StringIO
+except ImportError:
+    import StringIO
+
+import tools
+
+MAKO_TEMPLATE = u"""Hello ${user.name},
+
+Here is a list of contracts that have to be renewed for two
+possible reasons:
+  - the end of contract date is passed
+  - the customer consumed more support hours than expected
+
+Can you contact the customer in order to sell a new or renew its contract.
+the contract has been set with a pending state, can you update the status
+of the analytic account following this rule:
+  - Set Done: if the customer does not want to renew
+  - Set Open: if the customer purchased an extra contract
+
+Here is the list of contracts to renew:
+% for partner, accounts in partners.iteritems():
+  * ${partner.name}
+  % for account in accounts:
+    - Name: ${account.name}
+      % if account.quantity_max != 0.0:
+      - Quantity: ${account.quantity}/${account.quantity_max} hours
+      % endif
+      - Dates: ${account.date_start} to ${account.date and account.date or '???'}
+      - Contacts:
+        % for address in account.partner_id.address:
+        . ${address.name}, ${address.phone}, ${address.email}
+        % endfor
+
+  % endfor
+% endfor
+
+You can use the report in the menu: Sales > Invoicing > Overdue Accounts
+
+Regards,
+
+--
+OpenERP
+"""
+
+class analytic_account(osv.osv):
+    _inherit = 'account.analytic.account'
+
+    def cron_account_analytic_account(self, cr, uid, context=None):
+        domain = [
+            ('name', 'not ilike', 'maintenance'),
+            ('partner_id', '!=', False),
+            ('user_id', '!=', False),
+            ('user_id.user_email', '!=', False),
+            ('state', 'in', ('draft', 'open')),
+            '|', ('date',  '<', time.strftime('%Y-%m-%d')), ('date', '=', False),
+        ]
+
+        account_ids = self.search(cr, uid, domain, context=context, order='name asc')
+        accounts = self.browse(cr, uid, account_ids, context=context)
+
+        users = dict()
+        for account in accounts:
+            users.setdefault(account.user_id, dict()).setdefault(account.partner_id, []).append(account)
+
+            account.write({'state' : 'pending'}, context=context)
+
+        for user, data in users.iteritems():
+            subject = '[OPENERP] Reporting: Analytic Accounts'
+            body = Template(MAKO_TEMPLATE).render_unicode(user=user, partners=data)
+            tools.email_send('noreply@xxxxxxxxxxx', [user.user_email, ], subject, body)
+
+        return True
+
+analytic_account()

=== modified file 'base_action_rule/base_action_rule.py'
--- base_action_rule/base_action_rule.py	2011-03-04 12:53:34 +0000
+++ base_action_rule/base_action_rule.py	2011-04-22 13:59:38 +0000
@@ -325,7 +325,7 @@
             @param context: A standard dictionary for contextual values """
         if context is None:
             context = {}
-        ok = True 
+        ok = True
         if action.filter_id:
             if action.model_id.model == action.filter_id.model_id:
                 context.update(eval(action.filter_id.context))
@@ -445,19 +445,13 @@
             context = {}
 
         context.update({'action': True})
-        if not scrit:
-            scrit = []
 
         for action in self.browse(cr, uid, ids, context=context):
-            model_obj = self.pool.get(action.model_id.model)
             for obj in objects:
-                ok = self.do_check(cr, uid, action, obj, context=context)
-                if not ok:
-                    continue
+                if self.do_check(cr, uid, action, obj, context=context):
+                    model_obj = self.pool.get(action.model_id.model)
+                    self.do_action(cr, uid, action, model_obj, obj, context=context)
 
-                if ok:
-                    self.do_action(cr, uid, action, model_obj, obj, context)
-                    break
         context.update({'action': False})
         return True
 
@@ -480,7 +474,7 @@
         return True
 
     _constraints = [
-        (_check_mail, 'Error: The mail is not well formated', ['act_mail_body']), 
+        (_check_mail, 'Error: The mail is not well formatted', ['act_mail_body']),
     ]
 
 base_action_rule()

=== modified file 'crm/crm.py'
--- crm/crm.py	2011-03-04 12:53:34 +0000
+++ crm/crm.py	2011-04-22 13:59:38 +0000
@@ -466,6 +466,11 @@
             src = case_email
             dest = case.user_id
             body = case.description or ""
+            for message in case.message_ids:
+                if message.name not in AVAILABLE_STATES.values():
+                    body = message.description
+                    break
+
             if case.message_ids:
                 body = case.message_ids[0].description or ""
             if not destination:
@@ -486,7 +491,7 @@
                 attach_to_send = map(lambda x: (x['datas_fname'], base64.decodestring(x['datas'])), attach_to_send)
 
                 # Send an email
-            subject = "Reminder: [%s] %s" % (str(case.id), case.name,)
+            subject = "[%s] %s" % (str(case.id), case.name,)
             tools.email_send(
                 src,
                 [dest],

=== modified file 'crm/crm_action_rule.py'
--- crm/crm_action_rule.py	2011-01-14 00:11:01 +0000
+++ crm/crm_action_rule.py	2011-04-22 13:59:38 +0000
@@ -107,9 +107,7 @@
         @param cr: the current row, from the database cursor,
         @param uid: the current user’s ID for security checks,
         @param context: A standard dictionary for contextual values """
-        res = super(base_action_rule, self).do_action(cr, uid, action, model_obj, obj, context=context)
         write = {}
-        
         if hasattr(action, 'act_section_id') and action.act_section_id:
             obj.section_id = action.act_section_id
             write['section_id'] = action.act_section_id.id
@@ -127,6 +125,7 @@
             model_obj._history(cr, uid, [obj], _(action.act_state))
 
         model_obj.write(cr, uid, [obj.id], write, context)
+        super(base_action_rule, self).do_action(cr, uid, action, model_obj, obj, context=context)
         emails = []
 
         if hasattr(obj, 'email_from') and action.act_mail_to_partner:

=== modified file 'crm/wizard/crm_send_email.py'
--- crm/wizard/crm_send_email.py	2011-04-07 09:27:30 +0000
+++ crm/wizard/crm_send_email.py	2011-04-22 13:59:38 +0000
@@ -212,9 +212,13 @@
                     res.update({'email_to': ''})
             if 'email_from' in fields:
                 res.update({'email_from': user_mail_from and tools.ustr(user_mail_from) or ''})
+
             if 'reply_to' in fields:
-                if hasattr(case, 'section_id'):
-                    res.update({'reply_to': case.section_id and case.section_id.reply_to or False})
+                if hasattr(case, 'set_reply_to'):
+                    case.set_reply_to(res)
+                elif hasattr(case, 'section_id'):
+                    res.update({'reply_to' : case.section_id and case.section_id.reply_to or False})
+
             if 'subject' in fields:
                 res.update({'subject': tools.ustr(context.get('subject', case.name) or '')})
                 if context.get('mass_mail'):
@@ -276,9 +280,10 @@
             if 'email_cc' in fields:
                  email_cc = (case.email_cc and tools.ustr(case.email_cc) + ', ' or '') + (hist.email_cc or '')
                  res.update({'email_cc': email_cc})
-            if 'reply_to' in fields:
-                if hasattr(case, 'section_id'):
-                    res.update({'reply_to': case.section_id.reply_to or ''})
+            if hasattr(case, 'set_reply_to'):
+                case.set_reply_to(res)
+            elif hasattr(case, 'section_id'):
+                res.update({'reply_to': case.section_id.reply_to or ''})
             if 'state' in fields:
                 res['state'] = u'pending'
         return res

=== modified file 'mail_gateway/scripts/openerp_mailgate/openerp_mailgate.py'
--- mail_gateway/scripts/openerp_mailgate/openerp_mailgate.py	2011-01-14 00:11:01 +0000
+++ mail_gateway/scripts/openerp_mailgate/openerp_mailgate.py	2011-04-22 13:59:38 +0000
@@ -86,7 +86,7 @@
     custom_values = {}
     try:
         custom_values = dict(eval(options.custom_values))
-    except:
+    except Exception:
         pass
 
     parser.parse(msg_txt, custom_values)

=== modified file 'project_issue/project_issue.py'
--- project_issue/project_issue.py	2011-04-07 11:41:45 +0000
+++ project_issue/project_issue.py	2011-04-22 13:59:38 +0000
@@ -56,7 +56,7 @@
         """
 
         res = super(project_issue, self).case_open(cr, uid, ids, *args)
-        self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S'), 'assigned_to' : uid})
+        self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S'), 'user_id' : uid})
         for (id, name) in self.name_get(cr, uid, ids):
             message = _("Issue '%s' has been opened.") % name
             self.log(cr, uid, id, message)
@@ -90,32 +90,32 @@
 
         res = {}
         for issue in self.browse(cr, uid, ids, context=context):
+            res[issue.id] = {}
             for field in fields:
-                res[issue.id] = {}
                 duration = 0
                 ans = False
                 hours = 0
 
+                date_create = datetime.strptime(issue.create_date, "%Y-%m-%d %H:%M:%S")
                 if field in ['working_hours_open','day_open']:
                     if issue.date_open:
-                        date_create = datetime.strptime(issue.create_date, "%Y-%m-%d %H:%M:%S")
                         date_open = datetime.strptime(issue.date_open, "%Y-%m-%d %H:%M:%S")
                         ans = date_open - date_create
                         date_until = issue.date_open
                         #Calculating no. of working hours to open the issue
                         hours = cal_obj.interval_hours_get(cr, uid, issue.project_id.resource_calendar_id.id,
-                                 datetime.strptime(issue.create_date, '%Y-%m-%d %H:%M:%S'),
-                                 datetime.strptime(issue.date_open, '%Y-%m-%d %H:%M:%S'))
+                                                           date_create,
+                                                           date_open)
                 elif field in ['working_hours_close','day_close']:
                     if issue.date_closed:
-                        date_create = datetime.strptime(issue.create_date, "%Y-%m-%d %H:%M:%S")
                         date_close = datetime.strptime(issue.date_closed, "%Y-%m-%d %H:%M:%S")
                         date_until = issue.date_closed
                         ans = date_close - date_create
                         #Calculating no. of working hours to close the issue
                         hours = cal_obj.interval_hours_get(cr, uid, issue.project_id.resource_calendar_id.id,
-                                datetime.strptime(issue.create_date, '%Y-%m-%d %H:%M:%S'),
-                                datetime.strptime(issue.date_closed, '%Y-%m-%d %H:%M:%S'))
+                                                           date_create,
+                                                           date_close)
+
                 if ans:
                     resource_id = False
                     if issue.user_id:
@@ -125,7 +125,11 @@
                     duration = float(ans.days)
                     if issue.project_id and issue.project_id.resource_calendar_id:
                         duration = float(ans.days) * 24
-                        new_dates = cal_obj.interval_min_get(cr, uid, issue.project_id.resource_calendar_id.id, datetime.strptime(issue.create_date, '%Y-%m-%d %H:%M:%S'), duration, resource=resource_id)
+
+                        new_dates = cal_obj.interval_min_get(cr, uid,
+                                                             issue.project_id.resource_calendar_id.id,
+                                                             date_create,
+                                                             duration, resource=resource_id)
                         no_days = []
                         date_until = datetime.strptime(date_until, '%Y-%m-%d %H:%M:%S')
                         for in_time, out_time in new_dates:
@@ -134,10 +138,12 @@
                             if out_time > date_until:
                                 break
                         duration = len(no_days)
+
                 if field in ['working_hours_open','working_hours_close']:
                     res[issue.id][field] = hours
                 else:
                     res[issue.id][field] = abs(float(duration))
+
         return res
 
     def _get_issue_task(self, cr, uid, ids, context=None):
@@ -175,7 +181,7 @@
         'section_id': fields.many2one('crm.case.section', 'Sales Team', \
                         select=True, help='Sales team to which Case belongs to.\
                              Define Responsible user and Email account for mail gateway.'),
-        'user_id': fields.related('project_id', 'user_id', type='many2one', relation='res.users', store=True, select=1, string='Responsible'),
+        'user_id' : fields.many2one('res.users', select=1, string='Responsible'),
         'partner_id': fields.many2one('res.partner', 'Partner'),
         'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \
                                  domain="[('partner_id','=',partner_id)]"),
@@ -282,7 +288,7 @@
                 'date': bug.date,
                 'project_id': bug.project_id.id,
                 'priority': bug.priority,
-                'user_id': bug.assigned_to.id,
+                'user_id': bug.user_id.id,
                 'planned_hours': 0.0,
             })
 
@@ -362,13 +368,10 @@
         """
         cases = self.browse(cr, uid, ids)
         for case in cases:
-            data = {}
+            data = {'state' : 'draft'}
             if case.project_id.project_escalation_id:
                 data['project_id'] = case.project_id.project_escalation_id.id
-                if case.project_id.project_escalation_id.user_id:
-                    data['user_id'] = case.project_id.project_escalation_id.user_id.id
-                if case.task_id:
-                    self.pool.get('project.task').write(cr, uid, [case.task_id.id], {'project_id': data['project_id'], 'user_id': False})
+                data['user_id'] = case.project_id.project_escalation_id.user_id and case.project_id.project_escalation_id.user_id.id or False
             else:
                 raise osv.except_osv(_('Warning !'), _('You cannot escalate this issue.\nThe relevant Project has not configured the Escalation Project!'))
             self.write(cr, uid, [case.id], data)
@@ -487,6 +490,14 @@
         return super(project_issue, self).copy(cr, uid, id, default=default,
                 context=context)
 
+    #def set_reply_to(self, cr, uid, oid, values, context=None):
+    #    default_value = False
+
+    #    if oid:
+    #        this = self.browse(cr, uid, oid, context=context)[0]
+    #        if this.section_id:
+    #            values['reply_to'] = this.section_id.email or default_value
+
 project_issue()
 
 class project(osv.osv):

=== modified file 'project_issue/project_issue_view.xml'
--- project_issue/project_issue_view.xml	2011-04-07 11:41:45 +0000
+++ project_issue/project_issue_view.xml	2011-04-22 13:59:38 +0000
@@ -55,8 +55,7 @@
                         <field name="name"/>
                         <field name="project_id" required="True" on_change="on_change_project(project_id)"/>
                         <field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
-                        <field name="user_id" invisible="1" />
-                        <field name="assigned_to"/>
+                        <field name="user_id" invisible="0" />
                         <field name="version_id" colspan="2" widget="selection"/>
                         <group colspan="2" col="4">
                             <field name="type_id" string="Resolution" />
@@ -75,7 +74,7 @@
                             <group col="3" colspan="2">
                             <separator colspan="3" string="Status"/>
                             <field name="priority" colspan="3"/>
-                            <field name="task_id" on_change="onchange_task_id(task_id)"/>
+                            <field name="task_id" />
                             <button string="Convert To Task" name="convert_issue_task" icon="gtk-index" type="object"
                                 attrs="{'invisible':[('task_id','!=',False)]}" />
                             <field name="progress" colspan="3" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
@@ -188,7 +187,7 @@
                     <button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
                     <button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
                     <field name="version_id" widget="selection"/>
-                    <field name="assigned_to"/>
+                    <field name="user_id"/>
                     <field name="progress" widget="progressbar" attrs="{'invisible':[('task_id','=',False)]}"/>
                     <field name="state"/>
                     <button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
@@ -217,8 +216,8 @@
                         <separator orientation="vertical"/>
                         <field name="name"/>
                         <field name="partner_id" groups="base.group_extended"/>
-                        <field name="assigned_to">
-                            <filter domain="[('assigned_to','=',False)]"  help="Unassigned Issues" icon="terp-personal-" separator="1"/>
+                        <field name="user_id">
+                            <filter domain="[('user_id','=',False)]"  help="Unassigned Issues" icon="terp-personal-" separator="1"/>
                         </field>
                         <field name="project_id"/>
                     </group>
@@ -232,7 +231,7 @@
                     <newline/>
                     <group expand="0" string="Group By..."  groups="base.group_extended">
                         <filter string="Responsible" icon="terp-personal"
-                            domain="[]" context="{'group_by':'assigned_to'}" />
+                            domain="[]" context="{'group_by':'user_id'}" />
                         <filter string="Partner" icon="terp-partner" domain="[]"
                             context="{'group_by':'partner_id'}" />
                         <separator orientation="vertical"/>
@@ -263,7 +262,7 @@
             <field name="type">calendar</field>
             <field name="priority" eval="2"/>
             <field name="arch" type="xml">
-                <calendar string="Issues" date_start="date" color="assigned_to" date_delay="duration">
+                <calendar string="Issues" date_start="date" color="user_id" date_delay="duration">
                     <field name="name"/>
                     <field name="partner_id"/>
                 </calendar>
@@ -288,7 +287,7 @@
                     <button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
                     <button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
                     <field name="version_id"/>
-                    <field name="assigned_to"/>
+                    <field name="user_id"/>
                     <field name="state"/>
                     <button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
                     <button name="case_close" string="Done" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
@@ -301,7 +300,7 @@
         </record>
 
         <record id="view_project_feature_filter" model="ir.ui.view">
-            <field name="name">Project Issue- Feature Tracker Search</field>
+            <field name="name">Project Issue - Feature Tracker Search</field>
             <field name="model">project.issue</field>
             <field name="type">search</field>
             <field name="arch" type="xml">
@@ -311,7 +310,7 @@
                     <separator orientation="vertical"/>
                     <group>
                         <field name="name" select='1' string="Feature description"/>
-                        <field name="assigned_to" select="1"/>
+                        <field name="user_id" select="1"/>
                         <field name="state" select="1">
                             <filter icon="terp-check" domain="[('state','in',('open','draft'))]" help="Current Features" name="current_feature"/>
                             <filter icon="terp-camera_test" domain="[('state','=','open')]" help="Open Features"/>

=== modified file 'project_issue/report/project_issue_report_view.xml'
--- project_issue/report/project_issue_report_view.xml	2011-04-07 11:41:45 +0000
+++ project_issue/report/project_issue_report_view.xml	2011-04-22 13:59:38 +0000
@@ -89,7 +89,7 @@
 
                            </field>
                               <field name="project_id"/>
-                          <field name="user_id"  select="1" widget="selection"/>
+                          <field name="user_id"  select="1"/>
                    </group>
                    <newline/>
                    <group expand="0" string="Extended Filters..." colspan="10" col="12" groups="base.group_extended">
@@ -154,8 +154,10 @@
             <field name="name">Issues Analysis</field>
             <field name="res_model">project.issue.report</field>
             <field name="view_type">form</field>
-              <field name="view_mode">graph,tree</field>
-              <field name="context">{'search_default_This Month':1,'search_default_project':1,'group_by_no_leaf':1,'group_by':[]}</field>
+            <field name="view_mode">graph,tree</field>
+              <!--<field name="context">{'search_default_This Month':1,'search_default_project':1,'group_by_no_leaf':1,'group_by':[]}</field>
+              -->
+            <field name="context">{'search_default_Current' : 1, 'search_default_month' : 1}</field>
             <field name="view_id" ref="view_project_issue_report_tree"/>
             <field name="search_view_id" ref="view_project_issue_report_filter"/>
             <field name="help">This report on the project issues allows you to analyse the quality of your support or after-sales services. You can track the issues per age. You can analyse the time required to open or close an issue, the number of email to exchange and the time spent on average by issues.</field>

=== modified file 'project_issue_sheet/project_issue_sheet_view.xml'
--- project_issue_sheet/project_issue_sheet_view.xml	2011-04-07 11:41:45 +0000
+++ project_issue_sheet/project_issue_sheet_view.xml	2011-04-22 13:59:38 +0000
@@ -18,11 +18,11 @@
                 </xpath>
                 <notebook colspan="4">
                     <page string="Worklogs">
-                        <field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : assigned_to, 'default_account_id' : analytic_account_id}">
-                            <tree editable="top" string="Timesheet">
+                        <field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : user_id, 'default_account_id' : analytic_account_id}">
+                            <tree editable="top" string="Timesheets">
                                 <field name="name"/>
                                 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
-                                <field name="account_id" invisible="0" domain="[('partner_id', '=', parent.partner_id)]" on_change="on_change_account_id(account_id)"/>
+                                <field name="account_id" invisible="0" domain="[('partner_id', '=', parent.partner_id)]" />
                                 <field name="date"/>
                                 <field name="user_id"/>
                                 <field invisible="1" name="journal_id"/>