~vauxoo/addons-vauxoo/6.0-trunk

« back to all changes in this revision

Viewing changes to project_task_work/model/project_task_work.py

  • Committer: Moises Lopez
  • Date: 2014-10-09 21:30:17 UTC
  • mfrom: (879.1.7 trunk-addons-vauxoo)
  • Revision ID: moylop260@vauxoo.com-20141009213017-u3jicyg8xery3r8c
[MERGE] upforward 7.0
-Fix unused import
-Fix relative import
-Fix full path import
-Fix trailing whitespace pylint error C0303
-Fix autopep8 ignoring E501 & E128
-Fix reimported
-Fix __openerp__.py files
-Translate update

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
24
24
##########################################################################
25
25
 
26
 
import time
27
26
from openerp.osv import osv, fields
28
 
from openerp.tools.translate import _
29
27
 
30
28
 
31
29
class project_task(osv.Model):
32
30
    _inherit = 'project.task'
33
31
 
34
 
 
35
32
    def _get_issue(self, cr, uid, ids, fieldname, arg, context=None):
36
33
        if context is None:
37
34
            context = {}
71
68
    def _get_project(self, cr, uid, ids, fieldname, arg, context=None):
72
69
        if context is None:
73
70
            context = {}
74
 
        res = {}.fromkeys(ids,None)
 
71
        res = {}.fromkeys(ids, None)
75
72
        ids = self.exists(cr, uid, ids, context=context)
76
73
        for ptw_brw in self.browse(cr, uid, ids, context=context):
77
74
            res[ptw_brw.id] = \
88
85
    def _get_issue(self, cr, uid, ids, fieldname, arg, context=None):
89
86
        if context is None:
90
87
            context = {}
91
 
        res = {}.fromkeys(ids,None)
 
88
        res = {}.fromkeys(ids, None)
92
89
        ids = self.exists(cr, uid, ids, context=context)
93
90
        pi_obj = self.pool.get('project.issue')
94
91
        ptw_brws = self.browse(cr, uid, ids, context=context)
104
101
    def _get_partner(self, cr, uid, ids, fieldname, arg, context=None):
105
102
        if context is None:
106
103
            context = {}
107
 
        res = {}.fromkeys(ids,None)
 
104
        res = {}.fromkeys(ids, None)
108
105
        ids = self.exists(cr, uid, ids, context=context)
109
106
        for ptw_brw in self.browse(cr, uid, ids, context=context):
110
107
 
135
132
    def _get_work_in_issue(self, cr, uid, ids, context=None):
136
133
        if context is None:
137
134
            context = {}
138
 
        res = []
139
135
        pi_obj = self.pool.get('project.issue')
140
136
        pt_ids = [pi_brw.task_id.id for pi_brw in pi_obj.browse(
141
137
            cr, uid, ids, context=context) if pi_brw.task_id]