diff options
| author | PAP(OpenERP) <> | 2010-08-12 13:01:45 +0530 |
|---|---|---|
| committer | Mustufa Rangwala <mra@mra-laptop> | 2010-08-12 13:01:45 +0530 |
| commit | c75affcd1c21ea5191dd57ade5ab045ff8e6de6f (patch) | |
| tree | 4f01b08339a61a4aec5ea58da9ce0cffa8153676 /addons/project_issue | |
| parent | 279d41f156ee676cae9373e27b6354b7f07c9a9a (diff) | |
[IMP] project & its related module with removing of mx.datetime dependancy
bzr revid: mra@mra-laptop-20100812073145-h57aft3vbcxsmvu7
Diffstat (limited to 'addons/project_issue')
| -rw-r--r-- | addons/project_issue/__init__.py | 1 | ||||
| -rw-r--r-- | addons/project_issue/__openerp__.py | 2 | ||||
| -rw-r--r-- | addons/project_issue/project_issue.py | 13 | ||||
| -rw-r--r-- | addons/project_issue/report/project_issue_report.py | 25 | ||||
| -rw-r--r-- | addons/project_issue/security/project_issue_security.xml | 8 |
5 files changed, 34 insertions, 15 deletions
diff --git a/addons/project_issue/__init__.py b/addons/project_issue/__init__.py index c51b756f4ca..5e8489ecafa 100644 --- a/addons/project_issue/__init__.py +++ b/addons/project_issue/__init__.py @@ -23,4 +23,5 @@ import project_issue import report import wizard + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_issue/__openerp__.py b/addons/project_issue/__openerp__.py index 5f04ad40640..4ed77cb1cbf 100644 --- a/addons/project_issue/__openerp__.py +++ b/addons/project_issue/__openerp__.py @@ -20,7 +20,6 @@ # ############################################################################## - { 'name': 'Issue Management in Project Management', 'version': '1.0', @@ -54,4 +53,5 @@ 'installable': True, 'active': False, } + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 62381dbfad0..dc065bc1055 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -23,7 +23,6 @@ import base64 import os import re import time -import mx.DateTime from datetime import datetime, timedelta import binascii import collections @@ -101,8 +100,8 @@ class project_issue(osv.osv, crm.crm_case): 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, - mx.DateTime.strptime(issue.create_date, '%Y-%m-%d %H:%M:%S'), - mx.DateTime.strptime(issue.date_open, '%Y-%m-%d %H:%M:%S')) + datetime.strptime(issue.create_date, '%Y-%m-%d %H:%M:%S'), + datetime.strptime(issue.date_open, '%Y-%m-%d %H:%M:%S')) 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") @@ -111,8 +110,8 @@ class project_issue(osv.osv, crm.crm_case): 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, - mx.DateTime.strptime(issue.create_date, '%Y-%m-%d %H:%M:%S'), - mx.DateTime.strptime(issue.date_closed, '%Y-%m-%d %H:%M:%S')) + datetime.strptime(issue.create_date, '%Y-%m-%d %H:%M:%S'), + datetime.strptime(issue.date_closed, '%Y-%m-%d %H:%M:%S')) if ans: resource_id = False if issue.user_id: @@ -122,9 +121,9 @@ class project_issue(osv.osv, crm.crm_case): 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, mx.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, datetime.strptime(issue.create_date, '%Y-%m-%d %H:%M:%S'), duration, resource=resource_id) no_days = [] - date_until = mx.DateTime.strptime(date_until, '%Y-%m-%d %H:%M:%S') + date_until = datetime.strptime(date_until, '%Y-%m-%d %H:%M:%S') for in_time, out_time in new_dates: if in_time.date not in no_days: no_days.append(in_time.date) diff --git a/addons/project_issue/report/project_issue_report.py b/addons/project_issue/report/project_issue_report.py index c79ac3eae64..d0bf5e29336 100644 --- a/addons/project_issue/report/project_issue_report.py +++ b/addons/project_issue/report/project_issue_report.py @@ -1,3 +1,25 @@ + +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +############################################################################## + from osv import fields,osv import tools from crm import crm @@ -126,8 +148,7 @@ class project_issue_report(osv.osv): project_issue c WHERE c.categ_id IN (select res_id from ir_model_data WHERE model = 'crm.case.categ' and name='bug_categ') )""") -project_issue_report() - +project_issue_report() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project_issue/security/project_issue_security.xml b/addons/project_issue/security/project_issue_security.xml index 1c0c23aad8d..d0aeabafc05 100644 --- a/addons/project_issue/security/project_issue_security.xml +++ b/addons/project_issue/security/project_issue_security.xml @@ -1,10 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <openerp> <data noupdate="1"> - - <record id="group_project_supporter" model="res.groups"> - <field name="name">Project / Support Manager</field> - </record> - + <record id="group_project_supporter" model="res.groups"> + <field name="name">Project / Support Manager</field> + </record> </data> </openerp> |
