[tryton-debian-vcs] tryton-modules-company branch upstream updated. upstream/3.4.1-1-ge8e7b60

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Thu Apr 23 16:03:36 UTC 2015


The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-company.git;a=commitdiff;h=upstream/3.4.1-1-ge8e7b60

commit e8e7b60006120d1ba057a531d995c75a46f875c5
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Apr 23 16:59:56 2015 +0200

    Adding upstream version 3.6.0.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/CHANGELOG b/CHANGELOG
index 53d0aca..ee5e7b0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,6 @@
-Version 3.4.1 - 2015-02-28
+Version 3.6.0 - 2015-04-20
 * Bug fixes (see mercurial logs for details)
-
+* Add support for PyPy
 Version 3.4.0 - 2014-10-20
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 12085d8..e64ec27 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_company
-Version: 3.4.1
+Version: 3.6.0
 Summary: Tryton module with companies and employees
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.4/
+Download-URL: http://downloads.tryton.org/3.6/
 Description: trytond_company
         ===============
         
@@ -65,4 +65,6 @@ Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Office/Business
diff --git a/__init__.py b/__init__.py
index 16ad20c..b4dfb40 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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.pool import Pool
 from .company import *
diff --git a/company.py b/company.py
index 70eb2ca..3034e2a 100644
--- a/company.py
+++ b/company.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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 copy
 from trytond.model import ModelView, ModelSQL, fields
 from trytond.wizard import Wizard, StateView, Button, StateTransition
@@ -145,25 +145,20 @@ class User:
 
     @fields.depends('main_company')
     def on_change_main_company(self):
-        return {
-            'company': self.main_company.id if self.main_company else None,
-            'employee': None,
-            }
+        self.company = self.main_company
+        self.employee = None
 
     @fields.depends('company', 'employees')
     def on_change_company(self):
         Employee = Pool().get('company.employee')
-        result = {
-            'employee': None,
-            }
+        self.employee = None
         if self.company and self.employees:
             employees = Employee.search([
                     ('id', 'in', [e.id for e in self.employees]),
                     ('company', '=', self.company.id),
                     ])
             if employees:
-                result['employee'] = employees[0].id
-        return result
+                self.employee = employees[0]
 
     @classmethod
     def _get_preferences(cls, user, context_only=False):
@@ -278,7 +273,7 @@ class Property:
     @classmethod
     def search(cls, domain, offset=0, limit=None, order=None, count=False,
             query=False):
-        if Transaction().user == 0 and not 'user' in Transaction().context:
+        if Transaction().user == 0 and 'user' not in Transaction().context:
             domain = ['AND', domain[:], ('company', '=', None)]
         return super(Property, cls).search(domain, offset=offset, limit=limit,
             order=order, count=count, query=query)
@@ -332,7 +327,7 @@ class CompanyConfig(Wizard):
     start = StateView('company.company.config.start',
         'company.company_config_start_view_form', [
             Button('Cancel', 'end', 'tryton-cancel'),
-            Button('Ok', 'company', 'tryton-ok', True),
+            Button('OK', 'company', 'tryton-ok', True),
             ])
     company = StateView('company.company',
         'company.company_view_form', [
@@ -358,11 +353,10 @@ class CompanyConfig(Wizard):
 class CompanyReport(Report):
 
     @classmethod
-    def parse(cls, report, records, data, localcontext):
-        user = Pool().get('res.user')(Transaction().user)
-        localcontext['company'] = user.company
-        return super(CompanyReport, cls).parse(report, records, data,
-            localcontext)
+    def get_context(cls, records, data):
+        report_context = super(CompanyReport, cls).get_context(records, data)
+        report_context['company'] = report_context['user'].company
+        return report_context
 
 
 class LetterReport(CompanyReport):
diff --git a/company.xml b/company.xml
index 6bea031..0c374c1 100644
--- a/company.xml
+++ b/company.xml
@@ -24,7 +24,7 @@ this repository contains the full copyright notices and license terms. -->
         <record model="ir.action.act_window" id="act_company_tree">
             <field name="name">Companies</field>
             <field name="res_model">company.company</field>
-            <field name="domain">[('parent', '=', None)]</field>
+            <field name="domain" eval="[('parent', '=', None)]" pyson="1"/>
         </record>
         <record model="ir.action.act_window.view"
             id="act_company_tree_view1">
@@ -102,11 +102,13 @@ this repository contains the full copyright notices and license terms. -->
             <field name="global_p" eval="True"/>
         </record>
         <record model="ir.rule" id="rule_property1">
-            <field name="domain">[('company', '=', user.company.id if user.company else None)]</field>
+            <field name="domain"
+                eval="[('company', '=', Eval('user', {}).get('company', None))]"
+                pyson="1"/>
             <field name="rule_group" ref="rule_group_property"/>
         </record>
         <record model="ir.rule" id="rule_property2">
-            <field name="domain">[('company', '=', None)]</field>
+            <field name="domain" eval="[('company', '=', None)]" pyson="1"/>
             <field name="rule_group" ref="rule_group_property"/>
         </record>
 
@@ -126,11 +128,13 @@ this repository contains the full copyright notices and license terms. -->
             <field name="global_p" eval="True"/>
         </record>
         <record model="ir.rule" id="rule_sequence1">
-            <field name="domain">[('company', '=', user.company.id if user.company else None)]</field>
+            <field name="domain"
+                eval="[('company', '=', Eval('user', {}).get('company', None))]"
+                pyson="1"/>
             <field name="rule_group" ref="rule_group_sequence"/>
         </record>
         <record model="ir.rule" id="rule_sequence2">
-            <field name="domain">[('company', '=', None)]</field>
+            <field name="domain" eval="[('company', '=', None)]" pyson="1"/>
             <field name="rule_group" ref="rule_group_sequence"/>
         </record>
 
@@ -139,11 +143,13 @@ this repository contains the full copyright notices and license terms. -->
             <field name="global_p" eval="True"/>
         </record>
         <record model="ir.rule" id="rule_sequence_strict1">
-            <field name="domain">[('company', '=', user.company.id if user.company else None)]</field>
+            <field name="domain"
+                eval="[('company', '=', Eval('user', {}).get('company', None))]"
+                pyson="1"/>
             <field name="rule_group" ref="rule_group_sequence_strict"/>
         </record>
         <record model="ir.rule" id="rule_sequence_strict2">
-            <field name="domain">[('company', '=', None)]</field>
+            <field name="domain" eval="[('company', '=', None)]" pyson="1"/>
             <field name="rule_group" ref="rule_group_sequence_strict"/>
         </record>
 
diff --git a/cron.py b/cron.py
index 35ceb00..f4756bf 100644
--- a/cron.py
+++ b/cron.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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 ModelSQL, fields
 from trytond.pool import Pool, PoolMeta
 from trytond.transaction import Transaction
diff --git a/letter.odt b/letter.odt
index 17ce07d..243368d 100644
Binary files a/letter.odt and b/letter.odt differ
diff --git a/locale/bg_BG.po b/locale/bg_BG.po
index 6ac1974..9973227 100644
--- a/locale/bg_BG.po
+++ b/locale/bg_BG.po
@@ -317,7 +317,7 @@ msgid "Cancel"
 msgstr "Отказ"
 
 msgctxt "wizard_button:company.company.config,start,company:"
-msgid "Ok"
+msgid "OK"
 msgstr "Добре"
 
 msgctxt "wizard_button:company.company.config,start,end:"
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 32bbc5e..52f50bb 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -351,7 +351,7 @@ msgid "Cancel"
 msgstr "Cancel·la"
 
 msgctxt "wizard_button:company.company.config,start,company:"
-msgid "Ok"
+msgid "OK"
 msgstr "Accepta"
 
 msgctxt "wizard_button:company.company.config,start,end:"
diff --git a/locale/cs_CZ.po b/locale/cs_CZ.po
index e607e36..fa24859 100644
--- a/locale/cs_CZ.po
+++ b/locale/cs_CZ.po
@@ -315,7 +315,7 @@ msgid "Cancel"
 msgstr ""
 
 msgctxt "wizard_button:company.company.config,start,company:"
-msgid "Ok"
+msgid "OK"
 msgstr ""
 
 msgctxt "wizard_button:company.company.config,start,end:"
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 8ff23ed..ea53864 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -315,7 +315,7 @@ msgid "Cancel"
 msgstr "Abbrechen"
 
 msgctxt "wizard_button:company.company.config,start,company:"
-msgid "Ok"
+msgid "OK"
 msgstr "OK"
 
 msgctxt "wizard_button:company.company.config,start,end:"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index f37fb39..13aab29 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -212,7 +212,7 @@ msgstr "Empleado"
 
 msgctxt "model:ir.action,name:act_company_config"
 msgid "Configure Company"
-msgstr "Configure su empresa"
+msgstr "Configurar Empresa"
 
 msgctxt "model:ir.action,name:act_company_list"
 msgid "Companies"
@@ -315,7 +315,7 @@ msgid "Cancel"
 msgstr "Cancelar"
 
 msgctxt "wizard_button:company.company.config,start,company:"
-msgid "Ok"
+msgid "OK"
 msgstr "Aceptar"
 
 msgctxt "wizard_button:company.company.config,start,end:"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index 7ed433c..8af263b 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -315,7 +315,7 @@ msgid "Cancel"
 msgstr "Cancelar"
 
 msgctxt "wizard_button:company.company.config,start,company:"
-msgid "Ok"
+msgid "OK"
 msgstr "Aceptar"
 
 msgctxt "wizard_button:company.company.config,start,end:"
diff --git a/locale/es_EC.po b/locale/es_EC.po
index fd84baa..ee2ab84 100644
--- a/locale/es_EC.po
+++ b/locale/es_EC.po
@@ -8,11 +8,11 @@ msgstr "Hijos"
 
 msgctxt "field:company.company,create_date:"
 msgid "Create Date"
-msgstr "Fecha de Creación"
+msgstr "Fecha de creación"
 
 msgctxt "field:company.company,create_uid:"
 msgid "Create User"
-msgstr "Creado por Usuario"
+msgstr "Creado por usuario"
 
 msgctxt "field:company.company,currency:"
 msgid "Currency"
@@ -48,15 +48,15 @@ msgstr "Nombre"
 
 msgctxt "field:company.company,timezone:"
 msgid "Timezone"
-msgstr "Zona Horaria"
+msgstr "Zona horaria"
 
 msgctxt "field:company.company,write_date:"
 msgid "Write Date"
-msgstr "Fecha de Modificación"
+msgstr "Fecha de modificación"
 
 msgctxt "field:company.company,write_uid:"
 msgid "Write User"
-msgstr "Modificado por Usuario"
+msgstr "Modificado por usuario"
 
 msgctxt "field:company.company.config.start,id:"
 msgid "ID"
@@ -68,11 +68,11 @@ msgstr "Empresa"
 
 msgctxt "field:company.employee,create_date:"
 msgid "Create Date"
-msgstr "Fecha de Creación"
+msgstr "Fecha de creación"
 
 msgctxt "field:company.employee,create_uid:"
 msgid "Create User"
-msgstr "Creado por Usuario"
+msgstr "Creado por usuario"
 
 msgctxt "field:company.employee,id:"
 msgid "ID"
@@ -88,11 +88,11 @@ msgstr "Nombre"
 
 msgctxt "field:company.employee,write_date:"
 msgid "Write Date"
-msgstr "Fecha de Modificación"
+msgstr "Fecha de modificación"
 
 msgctxt "field:company.employee,write_uid:"
 msgid "Write User"
-msgstr "Modificado por Usuario"
+msgstr "Modificado por usuario"
 
 msgctxt "field:ir.cron,companies:"
 msgid "Companies"
@@ -104,11 +104,11 @@ msgstr "Empresa"
 
 msgctxt "field:ir.cron-company.company,create_date:"
 msgid "Create Date"
-msgstr "Fecha de Creación"
+msgstr "Fecha de creación"
 
 msgctxt "field:ir.cron-company.company,create_uid:"
 msgid "Create User"
-msgstr "Creado por Usuario"
+msgstr "Creado por usuario"
 
 msgctxt "field:ir.cron-company.company,cron:"
 msgid "Cron"
@@ -124,11 +124,11 @@ msgstr "Nombre"
 
 msgctxt "field:ir.cron-company.company,write_date:"
 msgid "Write Date"
-msgstr "Fecha de Modificación"
+msgstr "Fecha de modificación"
 
 msgctxt "field:ir.cron-company.company,write_uid:"
 msgid "Write User"
-msgstr "Modificado por Usuario"
+msgstr "Modificado por usuario"
 
 msgctxt "field:ir.property,company:"
 msgid "Company"
@@ -144,15 +144,15 @@ msgstr "Empresa"
 
 msgctxt "field:res.user,companies:"
 msgid "Current Companies"
-msgstr "Empresas Actuales"
+msgstr "Empresas actuales"
 
 msgctxt "field:res.user,company:"
 msgid "Current Company"
-msgstr "Empresa Actual"
+msgstr "Empresa actual"
 
 msgctxt "field:res.user,employee:"
 msgid "Current Employee"
-msgstr "Empleado Actual"
+msgstr "Empleado actual"
 
 msgctxt "field:res.user,employees:"
 msgid "Employees"
@@ -160,15 +160,15 @@ msgstr "Empleados"
 
 msgctxt "field:res.user,main_company:"
 msgid "Main Company"
-msgstr "Empresa Principal"
+msgstr "Empresa principal"
 
 msgctxt "field:res.user-company.employee,create_date:"
 msgid "Create Date"
-msgstr "Fecha de Creación"
+msgstr "Fecha de creación"
 
 msgctxt "field:res.user-company.employee,create_uid:"
 msgid "Create User"
-msgstr "Creado por Usuario"
+msgstr "Creado por usuario"
 
 msgctxt "field:res.user-company.employee,employee:"
 msgid "Employee"
@@ -188,11 +188,11 @@ msgstr "Usuario"
 
 msgctxt "field:res.user-company.employee,write_date:"
 msgid "Write Date"
-msgstr "Fecha de Modificación"
+msgstr "Fecha de modificación"
 
 msgctxt "field:res.user-company.employee,write_uid:"
 msgid "Write User"
-msgstr "Modificado por Usuario"
+msgstr "Modificado por usuario"
 
 msgctxt "help:ir.cron,companies:"
 msgid "Companies registered for this cron"
@@ -204,7 +204,7 @@ msgstr "Empresa"
 
 msgctxt "model:company.company.config.start,name:"
 msgid "Company Config"
-msgstr "Configuración de Empresa"
+msgstr "Configuración de empresa"
 
 msgctxt "model:company.employee,name:"
 msgid "Employee"
@@ -212,7 +212,7 @@ msgstr "Empleado"
 
 msgctxt "model:ir.action,name:act_company_config"
 msgid "Configure Company"
-msgstr "Configurar Empresa"
+msgstr "Configurar empresa"
 
 msgctxt "model:ir.action,name:act_company_list"
 msgid "Companies"
@@ -252,7 +252,7 @@ msgstr "Usuario - Empleado"
 
 msgctxt "odt:party.letter:"
 msgid "Best Regards,"
-msgstr "Atentamente,"
+msgstr "Saludos cordiales,"
 
 msgctxt "odt:party.letter:"
 msgid "Date:"
@@ -260,7 +260,7 @@ msgstr "Fecha:"
 
 msgctxt "odt:party.letter:"
 msgid "Dear Madams and Sirs,"
-msgstr "Estimados Señores y Señoras,"
+msgstr "Estimados señores y señoras,"
 
 msgctxt "odt:party.letter:"
 msgid "E-Mail:"
@@ -280,7 +280,7 @@ msgstr "Número de RUC:"
 
 msgctxt "view:company.company.config.start:"
 msgid "Create Company"
-msgstr "Crear Empresa"
+msgstr "Crear empresa"
 
 msgctxt "view:company.company.config.start:"
 msgid "You can now add your company into the system."
@@ -315,8 +315,8 @@ msgid "Cancel"
 msgstr "Cancelar"
 
 msgctxt "wizard_button:company.company.config,start,company:"
-msgid "Ok"
-msgstr "Aceptar"
+msgid "OK"
+msgstr "OK"
 
 msgctxt "wizard_button:company.company.config,start,end:"
 msgid "Cancel"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index 0cd245d..9fc7097 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -351,7 +351,7 @@ msgid "Cancel"
 msgstr "Cancelar"
 
 msgctxt "wizard_button:company.company.config,start,company:"
-msgid "Ok"
+msgid "OK"
 msgstr "Aceptar"
 
 msgctxt "wizard_button:company.company.config,start,end:"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index bf9bdab..4cb3c3c 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -315,8 +315,8 @@ msgid "Cancel"
 msgstr "Annuler"
 
 msgctxt "wizard_button:company.company.config,start,company:"
-msgid "Ok"
-msgstr "Ok"
+msgid "OK"
+msgstr "OK"
 
 msgctxt "wizard_button:company.company.config,start,end:"
 msgid "Cancel"
diff --git a/locale/nl_NL.po b/locale/nl_NL.po
index 5364cdd..5efcdff 100644
--- a/locale/nl_NL.po
+++ b/locale/nl_NL.po
@@ -323,7 +323,7 @@ msgstr "Annuleren"
 
 #, fuzzy
 msgctxt "wizard_button:company.company.config,start,company:"
-msgid "Ok"
+msgid "OK"
 msgstr "Oké"
 
 #, fuzzy
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
index 1a936c0..f2d31e0 100644
--- a/locale/ru_RU.po
+++ b/locale/ru_RU.po
@@ -316,7 +316,7 @@ msgid "Cancel"
 msgstr "Отменить"
 
 msgctxt "wizard_button:company.company.config,start,company:"
-msgid "Ok"
+msgid "OK"
 msgstr "Ок"
 
 msgctxt "wizard_button:company.company.config,start,end:"
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index f1620e9..8a46e6d 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -315,7 +315,7 @@ msgid "Cancel"
 msgstr "Prekliči"
 
 msgctxt "wizard_button:company.company.config,start,company:"
-msgid "Ok"
+msgid "OK"
 msgstr "V redu"
 
 msgctxt "wizard_button:company.company.config,start,end:"
diff --git a/party.py b/party.py
index 5444005..f6b20df 100644
--- a/party.py
+++ b/party.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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.pyson import Eval
 from trytond.pool import PoolMeta
 
diff --git a/setup.py b/setup.py
index 3001f8f..99f4208 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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 setuptools import setup
 import re
@@ -87,6 +87,8 @@ setup(name=name,
         'Natural Language :: Spanish',
         'Operating System :: OS Independent',
         'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: Implementation :: CPython',
+        'Programming Language :: Python :: Implementation :: PyPy',
         'Topic :: Office/Business',
         ],
     license='GPL-3',
diff --git a/tests/__init__.py b/tests/__init__.py
index 962622c..899a23c 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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 .test_company import suite
 
diff --git a/tests/test_company.py b/tests/test_company.py
index 8e648f8..a46735b 100644
--- a/tests/test_company.py
+++ b/tests/test_company.py
@@ -1,33 +1,26 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# 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 unittest
 import doctest
 
 import trytond.tests.test_tryton
-from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT, test_view,\
-    test_depends
+from trytond.tests.test_tryton import ModuleTestCase
+from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT
 from trytond.transaction import Transaction
 
 
-class CompanyTestCase(unittest.TestCase):
+class CompanyTestCase(ModuleTestCase):
     'Test Company module'
+    module = 'company'
 
     def setUp(self):
-        trytond.tests.test_tryton.install_module('company')
+        super(CompanyTestCase, self).setUp()
         self.party = POOL.get('party.party')
         self.company = POOL.get('company.company')
         self.employee = POOL.get('company.employee')
         self.currency = POOL.get('currency.currency')
         self.user = POOL.get('res.user')
 
-    def test0005views(self):
-        'Test views'
-        test_view('company')
-
-    def test0006depends(self):
-        'Test depends'
-        test_depends()
-
     def test0010company(self):
         'Create company'
         with Transaction().start(DB_NAME, USER,
@@ -38,6 +31,7 @@ class CompanyTestCase(unittest.TestCase):
 
             party1, = self.party.create([{
                         'name': 'Dunder Mifflin',
+                        'addresses': [('create', [{}])],
                         }])
             company1, = self.company.create([{
                         'party': party1.id,
diff --git a/tests/tools.py b/tests/tools.py
new file mode 100644
index 0000000..99219c1
--- /dev/null
+++ b/tests/tools.py
@@ -0,0 +1,38 @@
+# 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 proteus import Model, Wizard
+from proteus.config import get_config
+
+from trytond.modules.currency.tests.tools import get_currency
+
+__all__ = ['create_company', 'get_company']
+
+
+def create_company(party=None, currency=None, config=None):
+    "Create the company using the proteus config"
+    Party = Model.get('party.party', config=config)
+    User = Model.get('res.user', config=config)
+
+    company_config = Wizard('company.company.config')
+    company_config.execute('company')
+    company = company_config.form
+    if not party:
+        party = Party(name='Dunder Mifflin')
+        party.save()
+    company.party = party
+    if not currency:
+        currency = get_currency()
+    company.currency = currency
+    company_config.execute('add')
+
+    if not config:
+        config = get_config()
+    config._context = User.get_preferences(True, config.context)
+    return company_config
+
+
+def get_company(config=None):
+    "Return the only company"
+    Company = Model.get('company.company', config=config)
+    company, = Company.find()
+    return company
diff --git a/tryton.cfg b/tryton.cfg
index c9e3bc8..0637139 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.4.1
+version=3.6.0
 depends:
     currency
     ir
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index ed1446f..7ead3a6 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-company
-Version: 3.4.1
+Version: 3.6.0
 Summary: Tryton module with companies and employees
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.4/
+Download-URL: http://downloads.tryton.org/3.6/
 Description: trytond_company
         ===============
         
@@ -65,4 +65,6 @@ Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Office/Business
diff --git a/trytond_company.egg-info/SOURCES.txt b/trytond_company.egg-info/SOURCES.txt
index 6e2b129..fb80498 100644
--- a/trytond_company.egg-info/SOURCES.txt
+++ b/trytond_company.egg-info/SOURCES.txt
@@ -33,6 +33,7 @@ tryton.cfg
 ./locale/sl_SI.po
 ./tests/__init__.py
 ./tests/test_company.py
+./tests/tools.py
 ./view/company_config_start_form.xml
 ./view/company_form.xml
 ./view/company_list.xml
diff --git a/trytond_company.egg-info/requires.txt b/trytond_company.egg-info/requires.txt
index 716f86c..2dc024c 100644
--- a/trytond_company.egg-info/requires.txt
+++ b/trytond_company.egg-info/requires.txt
@@ -1,6 +1,6 @@
-trytond_currency >= 3.4, < 3.5
-trytond_party >= 3.4, < 3.5
-trytond >= 3.4, < 3.5
+trytond_currency >= 3.6, < 3.7
+trytond_party >= 3.6, < 3.7
+trytond >= 3.6, < 3.7
 
 [timezone]
 pytz
\ No newline at end of file
-- 
tryton-modules-company



More information about the tryton-debian-vcs mailing list