diff --git a/line.py b/line.py index c4c8240835..8af964c620 100644 --- a/line.py +++ b/line.py @@ -14,7 +14,9 @@ class Line(ModelSQL, ModelView): _description = __doc__ employee = fields.Many2One('company.employee', 'Employee', required=True, - select=True, domain=[('company', '=', Get(Eval('context', {}), 'company'))]) + select=True, domain=[ + ('company', '=', Get(Eval('context', {}), 'company')), + ]) date = fields.Date('Date', required=True, select=True) hours = fields.Float('Hours', digits=(16, 2), required=True) work = fields.Many2One('timesheet.work', 'Work', diff --git a/tests/test_timesheet.py b/tests/test_timesheet.py index 7849096d76..8c53cad3c8 100644 --- a/tests/test_timesheet.py +++ b/tests/test_timesheet.py @@ -2,7 +2,8 @@ #This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. -import sys, os +import sys +import os DIR = os.path.abspath(os.path.normpath(os.path.join(__file__, '..', '..', '..', '..', '..', 'trytond'))) if os.path.isdir(DIR): @@ -33,6 +34,7 @@ class TimesheetTestCase(unittest.TestCase): ''' test_depends() + def suite(): suite = trytond.tests.test_tryton.suite() suite.addTests(unittest.TestLoader().loadTestsFromTestCase( diff --git a/work.py b/work.py index 31c8d24cd2..e3bfa344cf 100644 --- a/work.py +++ b/work.py @@ -121,6 +121,7 @@ class Work(ModelSQL, ModelView): if not ids: return {} res = {} + def _name(work): if work.parent: return _name(work.parent) + '\\' + work.name