Reviewers: ,


Please review this at http://codereview.tryton.org/168001/

Affected files:
  M company.py
  M cron.py
  M tests/test_company.py


Index: company.py
===================================================================

--- a/company.py
+++ b/company.py
@@ -161,10 +161,6 @@
         return res

     def get_preferences_fields_view(self):
-        company_obj = Pool().get('company.company')
-
-        user = self.browse(Transaction().user)
-
         res = super(User, self).get_preferences_fields_view()
         res = copy.deepcopy(res)
         return res

Index: cron.py
===================================================================

--- a/cron.py
+++ b/cron.py
@@ -1,7 +1,6 @@
 #This file is part of Tryton.  The COPYRIGHT file at the top level of
 #this repository contains the full copyright notices and license terms.
 from trytond.model import ModelView, ModelSQL, fields
-from trytond.transaction import Transaction
 from trytond.pool import Pool



Index: tests/test_company.py
===================================================================

--- a/tests/test_company.py
+++ b/tests/test_company.py
@@ -58,7 +58,7 @@
         '''
         Test company recursion.
         '''
-        with Transaction().start(DB_NAME, USER, CONTEXT) as transaction:
+        with Transaction().start(DB_NAME, USER, CONTEXT):
             currency1_id = self.currency.search([
                 ('code', '=', 'cu1'),
                 ], 0, 1, None)[0]
@@ -88,7 +88,7 @@
                 ('name', '=', 'B2CK'),
                 ], 0, 1, None)[0]

-            employee1_id = self.employee.create({
+            self.employee.create({
                 'name': 'Employee1',
                 'company': company1_id,
                 })



--
[email protected] mailing list

Reply via email to