[tryton-debian-vcs] tryton-modules-company branch upstream created. 858657792d6929d2ae8010f50b8ef1dad710032f
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Wed Nov 27 17:00:52 UTC 2013
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=858657792d6929d2ae8010f50b8ef1dad710032f
commit 858657792d6929d2ae8010f50b8ef1dad710032f
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Nov 24 17:26:54 2013 +0100
Adding upstream version 3.0.0.
diff --git a/CHANGELOG b/CHANGELOG
index e360a9f..b97ad05 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.0.0 - 2013-10-21
+* Bug fixes (see mercurial logs for details)
+
Version 2.8.0 - 2013-04-22
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index c2b7795..0ec3ec4 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_company
-Version: 2.8.0
+Version: 3.0.0
Summary: Tryton module with companies and employees
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: UNKNOWN
License: GPL-3
-Download-URL: http://downloads.tryton.org/2.8/
+Download-URL: http://downloads.tryton.org/3.0/
Description: trytond_company
===============
@@ -60,6 +60,7 @@ Classifier: Natural Language :: English
Classifier: Natural Language :: French
Classifier: Natural Language :: German
Classifier: Natural Language :: Russian
+Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.6
diff --git a/company.py b/company.py
index 0a786be..a39897a 100644
--- a/company.py
+++ b/company.py
@@ -229,7 +229,7 @@ class Property:
company = fields.Many2One('company.company', 'Company',
domain=[
('id', If(Eval('context', {}).contains('company'), '=', '!='),
- Eval('context', {}).get('company', 0)),
+ Eval('context', {}).get('company', -1)),
])
@classmethod
@@ -246,11 +246,11 @@ class Property:
@classmethod
def search(cls, domain, offset=0, limit=None, order=None, count=False,
- query_string=False):
+ query=False):
if Transaction().user == 0 and not 'user' in Transaction().context:
domain = ['AND', domain[:], ('company', '=', None)]
return super(Property, cls).search(domain, offset=offset, limit=limit,
- order=order, count=count, query_string=query_string)
+ order=order, count=count, query=query)
class Sequence:
@@ -258,7 +258,7 @@ class Sequence:
company = fields.Many2One('company.company', 'Company',
domain=[
('id', If(Eval('context', {}).contains('company'), '=', '!='),
- Eval('context', {}).get('company', 0)),
+ Eval('context', {}).get('company', -1)),
])
@classmethod
diff --git a/company.xml b/company.xml
index 3c10eef..6bea031 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', '=', False)]</field>
+ <field name="domain">[('parent', '=', None)]</field>
</record>
<record model="ir.action.act_window.view"
id="act_company_tree_view1">
diff --git a/letter.odt b/letter.odt
index 9b38d1c..17ce07d 100644
Binary files a/letter.odt and b/letter.odt differ
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index e99bc7c..c34f3c9 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -312,7 +312,7 @@ msgstr "Nombre CIF/NIF:"
msgctxt "view:company.company.config.start:"
msgid "Create Company"
-msgstr "Ara pot afegir la seva empresa en el sistema."
+msgstr "Ara podeu afegir la vostra empresa al sistema."
msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
diff --git a/locale/es_AR.po b/locale/es_AR.po
index d5f7914..70b00f2 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -16,7 +16,7 @@ msgstr "Usuario creación"
msgctxt "field:company.company,currency:"
msgid "Currency"
-msgstr "Divisa"
+msgstr "Moneda"
msgctxt "field:company.company,employees:"
msgid "Employees"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index e8f5ae6..8134100 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -264,7 +264,7 @@ msgstr "Carta"
msgctxt "model:ir.cron-company.company,name:"
msgid "Cron - Company"
-msgstr "Cron - Empresa"
+msgstr "Planificador - Empresa"
msgctxt "model:ir.ui.menu,name:menu_company_list"
msgid "Companies"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 2168565..0a3486b 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -251,14 +251,6 @@ msgid "Best Regards,"
msgstr "Bien cordialement,"
msgctxt "odt:party.letter:"
-msgid "Best Regards,"
-msgstr "Bien cordialement,"
-
-msgctxt "odt:party.letter:"
-msgid "Date:"
-msgstr "Date :"
-
-msgctxt "odt:party.letter:"
msgid "Date:"
msgstr "Date :"
@@ -267,22 +259,10 @@ msgid "Dear Madams and Sirs,"
msgstr "Chère madame, cher monsieur,"
msgctxt "odt:party.letter:"
-msgid "Dear Madams and Sirs,"
-msgstr "Chère madame, cher monsieur,"
-
-msgctxt "odt:party.letter:"
msgid "E-Mail:"
msgstr "E-Mail :"
msgctxt "odt:party.letter:"
-msgid "E-Mail:"
-msgstr "E-Mail :"
-
-msgctxt "odt:party.letter:"
-msgid "Phone:"
-msgstr "Téléphone"
-
-msgctxt "odt:party.letter:"
msgid "Phone:"
msgstr "Téléphone"
@@ -291,14 +271,6 @@ msgid "Subject:"
msgstr "Sujet :"
msgctxt "odt:party.letter:"
-msgid "Subject:"
-msgstr "Sujet :"
-
-msgctxt "odt:party.letter:"
-msgid "VAT Number:"
-msgstr "Numéro TVA :"
-
-msgctxt "odt:party.letter:"
msgid "VAT Number:"
msgstr "Numéro TVA :"
@@ -315,14 +287,6 @@ msgid "Companies"
msgstr "Sociétés"
msgctxt "view:company.company:"
-msgid "Companies"
-msgstr "Sociétés"
-
-msgctxt "view:company.company:"
-msgid "Company"
-msgstr "Société"
-
-msgctxt "view:company.company:"
msgid "Company"
msgstr "Société"
@@ -330,14 +294,6 @@ msgctxt "view:company.company:"
msgid "Reports"
msgstr "Rapports"
-msgctxt "view:company.company:"
-msgid "Reports"
-msgstr "Rapports"
-
-msgctxt "view:company.employee:"
-msgid "Employee"
-msgstr "Employé"
-
msgctxt "view:company.employee:"
msgid "Employee"
msgstr "Employé"
@@ -346,10 +302,6 @@ msgctxt "view:company.employee:"
msgid "Employees"
msgstr "Employés"
-msgctxt "view:company.employee:"
-msgid "Employees"
-msgstr "Employés"
-
msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr "Ajouter"
diff --git a/locale/es_AR.po b/locale/sl_SI.po
similarity index 74%
copy from locale/es_AR.po
copy to locale/sl_SI.po
index d5f7914..2a18c36 100644
--- a/locale/es_AR.po
+++ b/locale/sl_SI.po
@@ -4,31 +4,31 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,childs:"
msgid "Children"
-msgstr "Hijos"
+msgstr "Hčerinska podjetja"
msgctxt "field:company.company,create_date:"
msgid "Create Date"
-msgstr "Fecha creación"
+msgstr "Ustvarjeno"
msgctxt "field:company.company,create_uid:"
msgid "Create User"
-msgstr "Usuario creación"
+msgstr "Ustvaril"
msgctxt "field:company.company,currency:"
msgid "Currency"
-msgstr "Divisa"
+msgstr "Valuta"
msgctxt "field:company.company,employees:"
msgid "Employees"
-msgstr "Empleados"
+msgstr "Zaposlenci"
msgctxt "field:company.company,footer:"
msgid "Footer"
-msgstr "Pie de página"
+msgstr "Noga"
msgctxt "field:company.company,header:"
msgid "Header"
-msgstr "Encabezado"
+msgstr "Glava"
msgctxt "field:company.company,id:"
msgid "ID"
@@ -36,23 +36,23 @@ msgstr "ID"
msgctxt "field:company.company,parent:"
msgid "Parent"
-msgstr "Padre"
+msgstr "Matično podjetje"
msgctxt "field:company.company,party:"
msgid "Party"
-msgstr "Entidad"
+msgstr "Stranka"
msgctxt "field:company.company,rec_name:"
msgid "Name"
-msgstr "Nombre"
+msgstr "Ime"
msgctxt "field:company.company,write_date:"
msgid "Write Date"
-msgstr "Fecha modificación"
+msgstr "Zapisano"
msgctxt "field:company.company,write_uid:"
msgid "Write User"
-msgstr "Usuario modificación"
+msgstr "Zapisal"
msgctxt "field:company.company.config.start,id:"
msgid "ID"
@@ -60,15 +60,15 @@ msgstr "ID"
msgctxt "field:company.employee,company:"
msgid "Company"
-msgstr "Empresa"
+msgstr "Podjetje"
msgctxt "field:company.employee,create_date:"
msgid "Create Date"
-msgstr "Fecha creación"
+msgstr "Ustvarjeno"
msgctxt "field:company.employee,create_uid:"
msgid "Create User"
-msgstr "Usuario creación"
+msgstr "Ustvaril"
msgctxt "field:company.employee,id:"
msgid "ID"
@@ -76,39 +76,39 @@ msgstr "ID"
msgctxt "field:company.employee,party:"
msgid "Party"
-msgstr "Entidad"
+msgstr "Stranka"
msgctxt "field:company.employee,rec_name:"
msgid "Name"
-msgstr "Nombre"
+msgstr "Ime"
msgctxt "field:company.employee,write_date:"
msgid "Write Date"
-msgstr "Fecha modificación"
+msgstr "Zapisano"
msgctxt "field:company.employee,write_uid:"
msgid "Write User"
-msgstr "Usuario modificación"
+msgstr "Zapisal"
msgctxt "field:ir.cron,companies:"
msgid "Companies"
-msgstr "Empresas"
+msgstr "Podjetja"
msgctxt "field:ir.cron-company.company,company:"
msgid "Company"
-msgstr "Empresa"
+msgstr "Podjetje"
msgctxt "field:ir.cron-company.company,create_date:"
msgid "Create Date"
-msgstr "Fecha creación"
+msgstr "Ustvarjeno"
msgctxt "field:ir.cron-company.company,create_uid:"
msgid "Create User"
-msgstr "Usuario creación"
+msgstr "Ustvaril"
msgctxt "field:ir.cron-company.company,cron:"
msgid "Cron"
-msgstr "Programador de tareas"
+msgstr "Razporejevalnik"
msgctxt "field:ir.cron-company.company,id:"
msgid "ID"
@@ -116,59 +116,59 @@ msgstr "ID"
msgctxt "field:ir.cron-company.company,rec_name:"
msgid "Name"
-msgstr "Nombre"
+msgstr "Ime"
msgctxt "field:ir.cron-company.company,write_date:"
msgid "Write Date"
-msgstr "Fecha modificación"
+msgstr "Zapisano"
msgctxt "field:ir.cron-company.company,write_uid:"
msgid "Write User"
-msgstr "Usuario modificación"
+msgstr "Zapisal"
msgctxt "field:ir.property,company:"
msgid "Company"
-msgstr "Empresa"
+msgstr "Podjetje"
msgctxt "field:ir.sequence,company:"
msgid "Company"
-msgstr "Empresa"
+msgstr "Podjetje"
msgctxt "field:ir.sequence.strict,company:"
msgid "Company"
-msgstr "Empresa"
+msgstr "Podjetje"
msgctxt "field:res.user,companies:"
msgid "Current Companies"
-msgstr "Empresas actuales"
+msgstr "Trenutna podjetja"
msgctxt "field:res.user,company:"
msgid "Current Company"
-msgstr "Empresa actual"
+msgstr "Trenutno podjetje"
msgctxt "field:res.user,employee:"
msgid "Current Employee"
-msgstr "Empleado actual"
+msgstr "Zaposlenec"
msgctxt "field:res.user,employees:"
msgid "Employees"
-msgstr "Empleados"
+msgstr "Zaposlenci"
msgctxt "field:res.user,main_company:"
msgid "Main Company"
-msgstr "Empresa principal"
+msgstr "Glavno podjetje"
msgctxt "field:res.user-company.employee,create_date:"
msgid "Create Date"
-msgstr "Fecha creación"
+msgstr "Ustvarjeno"
msgctxt "field:res.user-company.employee,create_uid:"
msgid "Create User"
-msgstr "Usuario creación"
+msgstr "Ustvaril"
msgctxt "field:res.user-company.employee,employee:"
msgid "Employee"
-msgstr "Empleado"
+msgstr "Zaposlenec"
msgctxt "field:res.user-company.employee,id:"
msgid "ID"
@@ -176,144 +176,144 @@ msgstr "ID"
msgctxt "field:res.user-company.employee,rec_name:"
msgid "Name"
-msgstr "Nombre campo"
+msgstr "Ime"
msgctxt "field:res.user-company.employee,user:"
msgid "User"
-msgstr "Usuario"
+msgstr "Uporabnik"
msgctxt "field:res.user-company.employee,write_date:"
msgid "Write Date"
-msgstr "Fecha modificación"
+msgstr "Zapisano"
msgctxt "field:res.user-company.employee,write_uid:"
msgid "Write User"
-msgstr "Usuario modificación"
+msgstr "Zapisal"
msgctxt "help:ir.cron,companies:"
msgid "Companies registered for this cron"
-msgstr "Empresas registradas en este programador de tareas"
+msgstr "Podjetja, registrirana na ta razporejevalnik"
msgctxt "model:company.company,name:"
msgid "Company"
-msgstr "Empresa"
+msgstr "Podjetje"
msgctxt "model:company.company.config.start,name:"
msgid "Company Config"
-msgstr "Configuración de empresa"
+msgstr "Konfiguracija podjetja"
msgctxt "model:company.employee,name:"
msgid "Employee"
-msgstr "Empleado"
+msgstr "Zaposlenec"
msgctxt "model:ir.action,name:act_company_config"
msgid "Configure Company"
-msgstr "Configure su empresa"
+msgstr "Konfiguracija podjetja"
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
-msgstr "Empresas"
+msgstr "Podjetja"
msgctxt "model:ir.action,name:act_company_tree"
msgid "Companies"
-msgstr "Empresas"
+msgstr "Podjetja"
msgctxt "model:ir.action,name:act_employee_form"
msgid "Employees"
-msgstr "Empleados"
+msgstr "Zaposlenci"
msgctxt "model:ir.action,name:report_letter"
msgid "Letter"
-msgstr "Carta"
+msgstr "Pismo"
msgctxt "model:ir.cron-company.company,name:"
msgid "Cron - Company"
-msgstr "Programador de tareas - Empresa"
+msgstr "Razporejevalnik - Podjetje"
msgctxt "model:ir.ui.menu,name:menu_company_list"
msgid "Companies"
-msgstr "Empresas"
+msgstr "Podjetja"
msgctxt "model:ir.ui.menu,name:menu_company_tree"
msgid "Companies"
-msgstr "Empresas"
+msgstr "Podjetja"
msgctxt "model:ir.ui.menu,name:menu_employee_form"
msgid "Employees"
-msgstr "Empleados"
+msgstr "Zaposlenci"
msgctxt "model:res.user-company.employee,name:"
msgid "User - Employee"
-msgstr "Usuario - Empleado"
+msgstr "Uporabnik - Zaposlenec"
msgctxt "odt:party.letter:"
msgid "Best Regards,"
-msgstr "Atentamente,"
+msgstr "S spoštovanjem,"
msgctxt "odt:party.letter:"
msgid "Date:"
-msgstr "Fecha:"
+msgstr "Datum:"
msgctxt "odt:party.letter:"
msgid "Dear Madams and Sirs,"
-msgstr "Estimados señores y señoras,"
+msgstr "Spoštovani gospa in gospod,"
msgctxt "odt:party.letter:"
msgid "E-Mail:"
-msgstr "Correo electrónico:"
+msgstr "E-pošta:"
msgctxt "odt:party.letter:"
msgid "Phone:"
-msgstr "Teléfono:"
+msgstr "Telefon:"
msgctxt "odt:party.letter:"
msgid "Subject:"
-msgstr "Asunto:"
+msgstr "Zadeva:"
msgctxt "odt:party.letter:"
msgid "VAT Number:"
-msgstr "CUIT:"
+msgstr "DDV številka:"
msgctxt "view:company.company.config.start:"
msgid "Create Company"
-msgstr "Crear empresa"
+msgstr "Ustvari podjetje"
msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
-msgstr "Ahora puede añadir su empresa al sistema."
+msgstr "Zdaj je možno v sistem dodati podjetje."
msgctxt "view:company.company:"
msgid "Companies"
-msgstr "Empresas"
+msgstr "Podjetja"
msgctxt "view:company.company:"
msgid "Company"
-msgstr "Empresa"
+msgstr "Podjetje"
msgctxt "view:company.company:"
msgid "Reports"
-msgstr "Informes"
+msgstr "Poročila"
msgctxt "view:company.employee:"
msgid "Employee"
-msgstr "Empleado"
+msgstr "Zaposlenec"
msgctxt "view:company.employee:"
msgid "Employees"
-msgstr "Empleados"
+msgstr "Zaposlenci"
msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
-msgstr "Añadir"
+msgstr "Dodaj"
msgctxt "wizard_button:company.company.config,company,end:"
msgid "Cancel"
-msgstr "Cancelar"
+msgstr "Prekliči"
msgctxt "wizard_button:company.company.config,start,company:"
msgid "Ok"
-msgstr "Aceptar"
+msgstr "V redu"
msgctxt "wizard_button:company.company.config,start,end:"
msgid "Cancel"
-msgstr "Cancelar"
+msgstr "Prekliči"
diff --git a/setup.py b/setup.py
index 4a6f57d..750b6fd 100644
--- a/setup.py
+++ b/setup.py
@@ -65,6 +65,7 @@ setup(name='trytond_company',
'Natural Language :: French',
'Natural Language :: German',
'Natural Language :: Russian',
+ 'Natural Language :: Slovenian',
'Natural Language :: Spanish',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
diff --git a/tests/__init__.py b/tests/__init__.py
index 7d06523..962622c 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -2,3 +2,5 @@
#this repository contains the full copyright notices and license terms.
from .test_company import suite
+
+__all__ = ['suite']
diff --git a/tryton.cfg b/tryton.cfg
index 0c4e53d..12e126d 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=2.8.0
+version=3.0.0
depends:
currency
ir
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 097d169..deec5e1 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: 2.8.0
+Version: 3.0.0
Summary: Tryton module with companies and employees
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: UNKNOWN
License: GPL-3
-Download-URL: http://downloads.tryton.org/2.8/
+Download-URL: http://downloads.tryton.org/3.0/
Description: trytond_company
===============
@@ -60,6 +60,7 @@ Classifier: Natural Language :: English
Classifier: Natural Language :: French
Classifier: Natural Language :: German
Classifier: Natural Language :: Russian
+Classifier: Natural Language :: Slovenian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.6
diff --git a/trytond_company.egg-info/SOURCES.txt b/trytond_company.egg-info/SOURCES.txt
index 9bf9841..3da5b64 100644
--- a/trytond_company.egg-info/SOURCES.txt
+++ b/trytond_company.egg-info/SOURCES.txt
@@ -27,6 +27,7 @@ locale/es_ES.po
locale/fr_FR.po
locale/nl_NL.po
locale/ru_RU.po
+locale/sl_SI.po
trytond_company.egg-info/PKG-INFO
trytond_company.egg-info/SOURCES.txt
trytond_company.egg-info/dependency_links.txt
diff --git a/trytond_company.egg-info/requires.txt b/trytond_company.egg-info/requires.txt
index 161432c..a342ffb 100644
--- a/trytond_company.egg-info/requires.txt
+++ b/trytond_company.egg-info/requires.txt
@@ -1,3 +1,3 @@
-trytond_currency >= 2.8, < 2.9
-trytond_party >= 2.8, < 2.9
-trytond >= 2.8, < 2.9
\ No newline at end of file
+trytond_currency >= 3.0, < 3.1
+trytond_party >= 3.0, < 3.1
+trytond >= 3.0, < 3.1
\ No newline at end of file
commit 3c4dd204e97eaf1c6dd54a8bc403b77de36c62c2
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Thu May 2 00:35:52 2013 +0200
Adding upstream version 2.8.0.
diff --git a/CHANGELOG b/CHANGELOG
index b4f0a0e..e360a9f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-Version 2.6.1 - 2012-12-23
+Version 2.8.0 - 2013-04-22
* Bug fixes (see mercurial logs for details)
Version 2.6.0 - 2012-10-22
diff --git a/COPYRIGHT b/COPYRIGHT
index 2057c72..9192c97 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2012 Cédric Krier.
-Copyright (C) 2008-2012 Bertrand Chenal.
-Copyright (C) 2008-2012 B2CK SPRL.
+Copyright (C) 2008-2013 Cédric Krier.
+Copyright (C) 2008-2013 Bertrand Chenal.
+Copyright (C) 2008-2013 B2CK SPRL.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/MANIFEST.in b/MANIFEST.in
index 3e52948..99c60a7 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -6,6 +6,7 @@ include COPYRIGHT
include LICENSE
include tryton.cfg
include *.xml
+include view/*.xml
include *.odt
include locale/*.po
include doc/*
diff --git a/PKG-INFO b/PKG-INFO
index 98c444f..c2b7795 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_company
-Version: 2.6.1
+Version: 2.8.0
Summary: Tryton module with companies and employees
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: UNKNOWN
License: GPL-3
-Download-URL: http://downloads.tryton.org/2.6/
+Download-URL: http://downloads.tryton.org/2.8/
Description: trytond_company
===============
@@ -53,6 +53,7 @@ Classifier: Intended Audience :: Legal Industry
Classifier: Intended Audience :: Manufacturing
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: Bulgarian
+Classifier: Natural Language :: Catalan
Classifier: Natural Language :: Czech
Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
diff --git a/company.py b/company.py
index 583de29..0a786be 100644
--- a/company.py
+++ b/company.py
@@ -17,7 +17,7 @@ __metaclass__ = PoolMeta
class Company(ModelSQL, ModelView):
'Company'
__name__ = 'company.company'
- _inherits = {'party.party': 'party'}
+ _rec_name = 'party'
party = fields.Many2One('party.party', 'Party', required=True,
ondelete='CASCADE')
parent = fields.Many2One('company.company', 'Parent')
@@ -30,27 +30,14 @@ class Company(ModelSQL, ModelView):
@classmethod
def __setup__(cls):
super(Company, cls).__setup__()
- cls._constraints += [
- ('check_recursion', 'recursive_companies'),
- ]
- cls._error_messages.update({
- 'recursive_companies': \
- 'You can not create recursive companies!',
- })
@classmethod
- def copy(cls, companies, default=None):
- Party = Pool().get('party.party')
-
- if default is None:
- default = {}
- default = default.copy()
- new_companies = []
- for company in companies:
- default['party'], = Party.copy([company.party])
- new_company, = super(Company, cls).copy([company], default=default)
- new_companies.append(new_company)
- return new_companies
+ def validate(cls, companies):
+ super(Company, cls).validate(companies)
+ cls.check_recursion(companies)
+
+ def get_rec_name(self, name):
+ return self.party.rec_name
@classmethod
def write(cls, companies, vals):
@@ -62,10 +49,13 @@ class Company(ModelSQL, ModelView):
class Employee(ModelSQL, ModelView):
'Employee'
__name__ = 'company.employee'
- _inherits = {'party.party': 'party'}
+ _rec_name = 'party'
party = fields.Many2One('party.party', 'Party', required=True)
company = fields.Many2One('company.company', 'Company', required=True)
+ def get_rec_name(self, name):
+ return self.party.rec_name
+
class UserEmployee(ModelSQL):
'User - Employee'
@@ -135,7 +125,7 @@ class User:
def get_status_bar(self, name):
status = super(User, self).get_status_bar(name)
if self.company:
- status += ' - %s [%s]' % (self.company.name,
+ status += ' - %s [%s]' % (self.company.rec_name,
self.company.currency.name)
return status
diff --git a/company.xml b/company.xml
index e50a9a4..3c10eef 100644
--- a/company.xml
+++ b/company.xml
@@ -6,71 +6,20 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="company_view_form">
<field name="model">company.company</field>
<field name="type">form</field>
- <field name="inherit" ref="party.party_view_form"/>
- <field name="arch" type="xml">
- <![CDATA[
- <data>
- <xpath
- expr="/form"
- position="replace_attributes">
- <form string="Company"/>
- </xpath>
- <xpath
- expr="/form/group[@id="checkboxes"]"
- position="after">
- <label name="currency"/>
- <field name="currency"/>
- <label name="vat_country"/>
- <field name="vat_country"/>
- <label name="vat_number"/>
- <field name="vat_number"/>
- </xpath>
- <xpath
- expr="/form/notebook/page[@id="general"]"
- position="after">
- <page string="Company" col="2" id="company">
- <label name="parent"/>
- <field name="parent"/>
- <field name="employees" colspan="2"/>
- </page>
- <page string="Reports" col="1" id="reports">
- <separator name="header"/>
- <field name="header"/>
- <separator name="footer"/>
- <field name="footer"/>
- </page>
- </xpath>
- </data>
- ]]>
- </field>
+ <field name="inherit" eval="None"/>
+ <field name="name">company_form</field>
</record>
<record model="ir.ui.view" id="company_view_tree">
<field name="model">company.company</field>
<field name="type">tree</field>
<field name="field_childs">childs</field>
- <field name="arch" type="xml">
- <![CDATA[
- <tree string="Companies">
- <field name="name"/>
- <field name="currency"/>
- <field name="vat_code"/>
- <field name="parent" tree_invisible="1"/>
- <field name="childs" tree_invisible="1"/>
- </tree>
- ]]>
- </field>
+ <field name="name">company_tree</field>
</record>
<record model="ir.ui.view" id="company_view_list">
<field name="model">company.company</field>
<field name="type">tree</field>
<field name="priority" eval="10"/>
- <field name="arch" type="xml">
- <![CDATA[
- <tree string="Companies">
- <field name="name"/>
- </tree>
- ]]>
- </field>
+ <field name="name">company_list</field>
</record>
<record model="ir.action.act_window" id="act_company_tree">
<field name="name">Companies</field>
@@ -130,72 +79,22 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="user_view_form">
<field name="model">res.user</field>
<field name="inherit" ref="res.user_view_form"/>
- <field name="arch" type="xml">
- <![CDATA[
- <data>
- <xpath
- expr="/form/notebook/page/separator[@name="signature"]"
- position="before">
- <label name="main_company"/>
- <field name="main_company" widget="selection"/>
- <label name="company"/>
- <field name="company" widget="selection"/>
- <label name="employee"/>
- <field name="employee"/>
- <field name="employees" colspan="4"/>
- </xpath>
- </data>
- ]]>
- </field>
+ <field name="name">user_form</field>
</record>
<record model="ir.ui.view" id="user_view_form_preferences">
<field name="model">res.user</field>
<field name="inherit" ref="res.user_view_form_preferences"/>
- <field name="arch" type="xml">
- <![CDATA[
- <data>
- <xpath
- expr="/form/notebook/page/separator[@name="signature"]"
- position="before">
- <label name="company"/>
- <field name="company" widget="selection"/>
- <label name="employee"/>
- <field name="employee" widget="selection"/>
- </xpath>
- </data>
- ]]>
- </field>
+ <field name="name">user_form_preferences</field>
</record>
<record model="ir.ui.view" id="property_view_form">
<field name="model">ir.property</field>
<field name="inherit" ref="ir.property_view_form"/>
- <field name="arch" type="xml">
- <![CDATA[
- <data>
- <xpath
- expr="/form/field[@name='field']"
- position="after">
- <label name="company"/>
- <field name="company" colspan="3"/>
- </xpath>
- </data>
- ]]>
- </field>
+ <field name="name">property_form</field>
</record>
<record model="ir.ui.view" id="property_view_tree">
<field name="model">ir.property</field>
<field name="inherit" ref="ir.property_view_tree"/>
- <field name="arch" type="xml">
- <![CDATA[
- <data>
- <xpath
- expr="/tree/field[@name='field']"
- position="after">
- <field name="company"/>
- </xpath>
- </data>
- ]]>
- </field>
+ <field name="name">property_tree</field>
</record>
<record model="ir.rule.group" id="rule_group_property">
@@ -203,48 +102,23 @@ 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="field" search="[('name', '=', 'company'), ('model.model', '=', 'ir.property')]"/>
- <field name="operator">=</field>
- <field name="operand">User/Current Company</field>
+ <field name="domain">[('company', '=', user.company.id if user.company else None)]</field>
<field name="rule_group" ref="rule_group_property"/>
</record>
<record model="ir.rule" id="rule_property2">
- <field name="field" search="[('name', '=', 'company'), ('model.model', '=', 'ir.property')]"/>
- <field name="operator">=</field>
- <field name="operand">False</field>
+ <field name="domain">[('company', '=', None)]</field>
<field name="rule_group" ref="rule_group_property"/>
</record>
<record model="ir.ui.view" id="sequence_view_form">
<field name="model">ir.sequence</field>
<field name="inherit" ref="ir.sequence_view_form"/>
- <field name="arch" type="xml">
- <![CDATA[
- <data>
- <xpath
- expr="/form/field[@name="active"]"
- position="after">
- <label name="company"/>
- <field name="company" colspan="3"/>
- </xpath>
- </data>
- ]]>
- </field>
+ <field name="name">sequence_form</field>
</record>
<record model="ir.ui.view" id="sequence_view_tree">
<field name="model">ir.sequence</field>
<field name="inherit" ref="ir.sequence_view_tree"/>
- <field name="arch" type="xml">
- <![CDATA[
- <data>
- <xpath
- expr="/tree/field[@name="code"]"
- position="after">
- <field name="company"/>
- </xpath>
- </data>
- ]]>
- </field>
+ <field name="name">sequence_tree</field>
</record>
<record model="ir.rule.group" id="rule_group_sequence">
@@ -252,15 +126,11 @@ 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="field" search="[('name', '=', 'company'), ('model.model', '=', 'ir.sequence')]"/>
- <field name="operator">=</field>
- <field name="operand">User/Current Company</field>
+ <field name="domain">[('company', '=', user.company.id if user.company else None)]</field>
<field name="rule_group" ref="rule_group_sequence"/>
</record>
<record model="ir.rule" id="rule_sequence2">
- <field name="field" search="[('name', '=', 'company'), ('model.model', '=', 'ir.sequence')]"/>
- <field name="operator">=</field>
- <field name="operand">False</field>
+ <field name="domain">[('company', '=', None)]</field>
<field name="rule_group" ref="rule_group_sequence"/>
</record>
@@ -269,31 +139,18 @@ 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="field" search="[('name', '=', 'company'), ('model.model', '=', 'ir.sequence.strict')]"/>
- <field name="operator">=</field>
- <field name="operand">User/Current Company</field>
+ <field name="domain">[('company', '=', user.company.id if user.company else None)]</field>
<field name="rule_group" ref="rule_group_sequence_strict"/>
</record>
<record model="ir.rule" id="rule_sequence_strict2">
- <field name="field" search="[('name', '=', 'company'), ('model.model', '=', 'ir.sequence.strict')]"/>
- <field name="operator">=</field>
- <field name="operand">False</field>
+ <field name="domain">[('company', '=', None)]</field>
<field name="rule_group" ref="rule_group_sequence_strict"/>
</record>
<record model="ir.ui.view" id="company_config_start_view_form">
<field name="model">company.company.config.start</field>
<field name="type">form</field>
- <field name="arch" type="xml">
- <![CDATA[
- <form string="Create Company" col="2">
- <image name="tryton-dialog-information" xexpand="0"
- xfill="0"/>
- <label string="You can now add your company into the system." id="add"
- yalign="0.0" xalign="0.0" xexpand="1"/>
- </form>
- ]]>
- </field>
+ <field name="name">company_config_start_form</field>
</record>
<record model="ir.action.wizard" id="act_company_config">
@@ -309,53 +166,15 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="employee_view_form">
<field name="model">company.employee</field>
<field name="type">form</field>
- <field name="inherit" ref="party.party_view_form"/>
+ <field name="inherit" eval="None"/>
<field name="priority">10</field>
- <field name="arch" type="xml">
- <![CDATA[
- <data>
- <xpath
- expr="/form"
- position="replace_attributes">
- <form string="Employee"/>
- </xpath>
- <xpath expr="/form/group/label[@name='active']"
- position="before">
- <label name="company"/>
- <field name="company"/>
- </xpath>
- </data>
- ]]>
- </field>
- </record>
-
- <record model="ir.ui.view" id="employee_view_form2">
- <field name="model">company.employee</field>
- <field name="type">form</field>
- <field name="priority">20</field>
- <field name="arch" type="xml">
- <![CDATA[
- <form string="Employee">
- <label name="party"/>
- <field name="party"/>
- <label name="company"/>
- <field name="company"/>
- </form>
- ]]>
- </field>
+ <field name="name">employee_form</field>
</record>
<record model="ir.ui.view" id="employee_view_tree">
<field name="model">company.employee</field>
<field name="type">tree</field>
- <field name="arch" type="xml">
- <![CDATA[
- <tree string="Employees">
- <field name="name"/>
- <field name="company"/>
- </tree>
- ]]>
- </field>
+ <field name="name">employee_tree</field>
</record>
<record model="ir.action.act_window" id="act_employee_form">
@@ -369,7 +188,7 @@ this repository contains the full copyright notices and license terms. -->
</record>
<record model="ir.action.act_window.view" id="act_employee_form_view2">
<field name="sequence" eval="20"/>
- <field name="view" ref="employee_view_form2"/>
+ <field name="view" ref="employee_view_form"/>
<field name="act_window" ref="act_employee_form"/>
</record>
<menuitem parent="party.menu_configuration" action="act_employee_form"
diff --git a/cron.xml b/cron.xml
index 6aa9cc5..292c7e3 100644
--- a/cron.xml
+++ b/cron.xml
@@ -3,21 +3,10 @@
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
-
<record model="ir.ui.view" id="cron_view_form">
<field name="model">ir.cron</field>
<field name="inherit" ref="ir.cron_view_form"/>
- <field name="arch" type="xml">
- <![CDATA[
- <data>
- <xpath
- expr="/form/field[@name="args"]"
- position="after">
- <field name="companies" colspan="4"/>
- </xpath>
- </data>
- ]]>
- </field>
+ <field name="name">cron_form</field>
</record>
</data>
</tryton>
diff --git a/header_A4.odt b/header_A4.odt
index 57cd546..e377a27 100644
Binary files a/header_A4.odt and b/header_A4.odt differ
diff --git a/locale/bg_BG.po b/locale/bg_BG.po
index 462b5cb..8d5d990 100644
--- a/locale/bg_BG.po
+++ b/locale/bg_BG.po
@@ -2,10 +2,6 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:"
-msgid "You can not create recursive companies!"
-msgstr "Не може да създавате взаимно вложени фирми!"
-
msgctxt "field:company.company,childs:"
msgid "Children"
msgstr "Наследници"
@@ -296,10 +292,6 @@ msgid "Company"
msgstr "Фирма"
msgctxt "view:company.company:"
-msgid "Employees"
-msgstr "Служители"
-
-msgctxt "view:company.company:"
msgid "Reports"
msgstr "Справки"
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 94867d7..e99bc7c 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -2,9 +2,41 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:"
-msgid "You can not create recursive companies!"
-msgstr "No pot crear empreses recursives"
+msgctxt "error:ir.sequence.strict:"
+msgid "Invalid prefix \"%(prefix)s\" on sequence \"%(sequence)s\"."
+msgstr "Prefix \"%(prefix)s\" de la seqüència \"%(sequence)s\" no és correcte."
+
+msgctxt "error:ir.sequence.strict:"
+msgid "Invalid suffix \"%(suffix)s\" on sequence \"%(sequence)s\"."
+msgstr "Sufix \"%(sufix)s\" de la seqüència \"%(sequence)s\" no és correcte."
+
+msgctxt "error:ir.sequence.strict:"
+msgid "Last Timestamp cannot be in the future on sequence \"%s\"."
+msgstr "La darrera data-hora no pot ser del futur a la seqüència \"%s\"."
+
+msgctxt "error:ir.sequence.strict:"
+msgid "Missing sequence."
+msgstr "No es troba la seqüència."
+
+msgctxt "error:ir.sequence:"
+msgid "Invalid prefix \"%(prefix)s\" on sequence \"%(sequence)s\"."
+msgstr "Prefix \"%(prefix)s\" de la seqüència \"%(sequence)s\" no és correcte."
+
+msgctxt "error:ir.sequence:"
+msgid "Invalid suffix \"%(suffix)s\" on sequence \"%(sequence)s\"."
+msgstr "Sufix \"%(sufix)s\" de la seqüència \"%(sequence)s\" no és correcte."
+
+msgctxt "error:ir.sequence:"
+msgid "Last Timestamp cannot be in the future on sequence \"%s\"."
+msgstr "La darrera data-hora no pot ser del futur a la seqüència \"%s\"."
+
+msgctxt "error:ir.sequence:"
+msgid "Missing sequence."
+msgstr "No es troba la seqüència."
+
+msgctxt "error:res.user:"
+msgid "You can not set the password of ldap user \"%s\"."
+msgstr "No podeu establir la contrasenya de l'usuari \"%s\" d'ldap."
msgctxt "field:company.company,childs:"
msgid "Children"
@@ -284,11 +316,7 @@ msgstr "Ara pot afegir la seva empresa en el sistema."
msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
-msgstr "Ara pot afegir la seva empresa en el sistema."
-
-msgctxt "view:company.company:"
-msgid "Addresses"
-msgstr "Adreces"
+msgstr "Ara podeu afegir la seva empresa en el sistema."
msgctxt "view:company.company:"
msgid "Companies"
@@ -299,22 +327,10 @@ msgid "Company"
msgstr "Empresa"
msgctxt "view:company.company:"
-msgid "Employees"
-msgstr "Empleats"
-
-msgctxt "view:company.company:"
-msgid "General"
-msgstr "General"
-
-msgctxt "view:company.company:"
msgid "Reports"
msgstr "Informes"
msgctxt "view:company.employee:"
-msgid "Addresses"
-msgstr "Adreces"
-
-msgctxt "view:company.employee:"
msgid "Employee"
msgstr "Empleat"
@@ -322,10 +338,6 @@ msgctxt "view:company.employee:"
msgid "Employees"
msgstr "Empleats"
-msgctxt "view:company.employee:"
-msgid "General"
-msgstr "General"
-
msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr "Afegeix"
diff --git a/locale/cs_CZ.po b/locale/cs_CZ.po
index f05e8dc..6638d2e 100644
--- a/locale/cs_CZ.po
+++ b/locale/cs_CZ.po
@@ -2,10 +2,6 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:"
-msgid "You can not create recursive companies!"
-msgstr ""
-
msgctxt "field:company.company,childs:"
msgid "Children"
msgstr ""
@@ -295,10 +291,6 @@ msgid "Company"
msgstr ""
msgctxt "view:company.company:"
-msgid "Employees"
-msgstr ""
-
-msgctxt "view:company.company:"
msgid "Reports"
msgstr ""
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 150b750..765370d 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -2,10 +2,6 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:"
-msgid "You can not create recursive companies!"
-msgstr "Unternehmen können nicht rekursiv angelegt werden!"
-
msgctxt "field:company.company,childs:"
msgid "Children"
msgstr "Untergeordnet (Unternehmen)"
@@ -212,7 +208,7 @@ msgstr "Mitarbeiter"
msgctxt "model:ir.action,name:act_company_config"
msgid "Configure Company"
-msgstr "Konfiguration Unternehmen"
+msgstr "Unternehmen konfigurieren"
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
@@ -287,10 +283,6 @@ msgid "You can now add your company into the system."
msgstr "Sie können nun Ihr Unternehmen dem System hinzufügen."
msgctxt "view:company.company:"
-msgid "Addresses"
-msgstr "Adressen"
-
-msgctxt "view:company.company:"
msgid "Companies"
msgstr "Unternehmen"
@@ -299,33 +291,9 @@ msgid "Company"
msgstr "Unternehmen"
msgctxt "view:company.company:"
-msgid "Employees"
-msgstr "Mitarbeiter"
-
-msgctxt "view:company.company:"
-msgid "General"
-msgstr "Allgemein"
-
-msgctxt "view:company.company:"
msgid "Reports"
msgstr "Berichte"
-msgctxt "view:company.company:"
-msgid "_Employees"
-msgstr "_Mitarbeiter"
-
-msgctxt "view:company.company:"
-msgid "_General"
-msgstr "_Allgemein"
-
-msgctxt "view:company.company:"
-msgid "_Reports"
-msgstr "_Berichte"
-
-msgctxt "view:company.employee:"
-msgid "Addresses"
-msgstr "Adressen"
-
msgctxt "view:company.employee:"
msgid "Employee"
msgstr "Mitarbeiter"
@@ -334,14 +302,6 @@ msgctxt "view:company.employee:"
msgid "Employees"
msgstr "Mitarbeiter"
-msgctxt "view:company.employee:"
-msgid "General"
-msgstr "Allgemein"
-
-msgctxt "view:company.employee:"
-msgid "_General"
-msgstr "_Allgemein"
-
msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr "Hinzufügen"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index 9fbe5b6..d5f7914 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -2,10 +2,6 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:"
-msgid "You can not create recursive companies!"
-msgstr "¡No puede crear empresas recursivas!"
-
msgctxt "field:company.company,childs:"
msgid "Children"
msgstr "Hijos"
@@ -180,7 +176,7 @@ msgstr "ID"
msgctxt "field:res.user-company.employee,rec_name:"
msgid "Name"
-msgstr "Nombre del campo"
+msgstr "Nombre campo"
msgctxt "field:res.user-company.employee,user:"
msgid "User"
@@ -204,7 +200,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 +208,7 @@ msgstr "Empleado"
msgctxt "model:ir.action,name:act_company_config"
msgid "Configure Company"
-msgstr "Configurar Empresa"
+msgstr "Configure su empresa"
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
@@ -280,17 +276,13 @@ msgstr "CUIT:"
msgctxt "view:company.company.config.start:"
msgid "Create Company"
-msgstr "Crear una Empresa"
+msgstr "Crear empresa"
msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
msgstr "Ahora puede añadir su empresa al sistema."
msgctxt "view:company.company:"
-msgid "Addresses"
-msgstr "Direcciones"
-
-msgctxt "view:company.company:"
msgid "Companies"
msgstr "Empresas"
@@ -299,22 +291,10 @@ msgid "Company"
msgstr "Empresa"
msgctxt "view:company.company:"
-msgid "Employees"
-msgstr "Empleados"
-
-msgctxt "view:company.company:"
-msgid "General"
-msgstr "General"
-
-msgctxt "view:company.company:"
msgid "Reports"
msgstr "Informes"
msgctxt "view:company.employee:"
-msgid "Addresses"
-msgstr "Direcciones"
-
-msgctxt "view:company.employee:"
msgid "Employee"
msgstr "Empleado"
@@ -322,10 +302,6 @@ msgctxt "view:company.employee:"
msgid "Employees"
msgstr "Empleados"
-msgctxt "view:company.employee:"
-msgid "General"
-msgstr "General"
-
msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr "Añadir"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index c77dff9..011e792 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -2,10 +2,6 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:"
-msgid "You can not create recursive companies!"
-msgstr "¡No puede crear compañias recursivas!"
-
msgctxt "field:company.company,childs:"
msgid "Children"
msgstr "Hijos"
@@ -96,7 +92,7 @@ msgstr "Modificado por Usuario"
msgctxt "field:ir.cron,companies:"
msgid "Companies"
-msgstr "compañias"
+msgstr "Compañias"
msgctxt "field:ir.cron-company.company,company:"
msgid "Company"
@@ -144,16 +140,15 @@ msgstr "Compañia"
msgctxt "field:res.user,companies:"
msgid "Current Companies"
-msgstr "Compañias actuales"
+msgstr "Compañias Actuales"
msgctxt "field:res.user,company:"
msgid "Current Company"
-msgstr "Compañia actual"
+msgstr "Compañia Actual"
-#, fuzzy
msgctxt "field:res.user,employee:"
msgid "Current Employee"
-msgstr "Empleado"
+msgstr "Empleado Actual"
msgctxt "field:res.user,employees:"
msgid "Employees"
@@ -231,10 +226,9 @@ msgctxt "model:ir.action,name:report_letter"
msgid "Letter"
msgstr "Carta"
-#, fuzzy
msgctxt "model:ir.cron-company.company,name:"
msgid "Cron - Company"
-msgstr "ir.cron-company.company"
+msgstr "Cron - Compañia"
msgctxt "model:ir.ui.menu,name:menu_company_list"
msgid "Companies"
@@ -262,7 +256,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:"
@@ -282,17 +276,13 @@ msgstr "NIT:"
msgctxt "view:company.company.config.start:"
msgid "Create Company"
-msgstr "Crear una Compañia"
+msgstr "Crear Compañia"
msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
msgstr "Ahora puede añadir su compañia al sistema."
msgctxt "view:company.company:"
-msgid "Addresses"
-msgstr "Direcciones"
-
-msgctxt "view:company.company:"
msgid "Companies"
msgstr "Compañias"
@@ -301,22 +291,10 @@ msgid "Company"
msgstr "Compañia"
msgctxt "view:company.company:"
-msgid "Employees"
-msgstr "Empleados"
-
-msgctxt "view:company.company:"
-msgid "General"
-msgstr "General"
-
-msgctxt "view:company.company:"
msgid "Reports"
msgstr "Informes"
msgctxt "view:company.employee:"
-msgid "Addresses"
-msgstr "Direcciones"
-
-msgctxt "view:company.employee:"
msgid "Employee"
msgstr "Empleado"
@@ -324,10 +302,6 @@ msgctxt "view:company.employee:"
msgid "Employees"
msgstr "Empleados"
-msgctxt "view:company.employee:"
-msgid "General"
-msgstr "General"
-
msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr "Añadir"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index 9902af6..e8f5ae6 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -2,9 +2,41 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:"
-msgid "You can not create recursive companies!"
-msgstr "No puede crear empresas recursivas."
+msgctxt "error:ir.sequence.strict:"
+msgid "Invalid prefix \"%(prefix)s\" on sequence \"%(sequence)s\"."
+msgstr "Prefijo \"%(prefix)s\" de la secuencia \"%(sequence)s\" no es correcto."
+
+msgctxt "error:ir.sequence.strict:"
+msgid "Invalid suffix \"%(suffix)s\" on sequence \"%(sequence)s\"."
+msgstr "Sufijo \"%(sufix)s\" de la secuencia \"%(sequence)s\" no es correcto."
+
+msgctxt "error:ir.sequence.strict:"
+msgid "Last Timestamp cannot be in the future on sequence \"%s\"."
+msgstr "La última fecha-hora no puede ser del futuro en la secuencia \"%s\"."
+
+msgctxt "error:ir.sequence.strict:"
+msgid "Missing sequence."
+msgstr "Falta la secuencia."
+
+msgctxt "error:ir.sequence:"
+msgid "Invalid prefix \"%(prefix)s\" on sequence \"%(sequence)s\"."
+msgstr "Prefijo \"%(prefix)s\" de la secuencia \"%(sequence)s\" no es correcto."
+
+msgctxt "error:ir.sequence:"
+msgid "Invalid suffix \"%(suffix)s\" on sequence \"%(sequence)s\"."
+msgstr "Sufijo \"%(sufix)s\" de la secuencia \"%(sequence)s\" no es correcto."
+
+msgctxt "error:ir.sequence:"
+msgid "Last Timestamp cannot be in the future on sequence \"%s\"."
+msgstr "La última fecha-hora no puede ser del futuro en la secuencia \"%s\"."
+
+msgctxt "error:ir.sequence:"
+msgid "Missing sequence."
+msgstr "Falta la secuencia."
+
+msgctxt "error:res.user:"
+msgid "You can not set the password of ldap user \"%s\"."
+msgstr "No puede establecer la contraseña del usuario \"%s\" de ldap."
msgctxt "field:company.company,childs:"
msgid "Children"
@@ -287,10 +319,6 @@ msgid "You can now add your company into the system."
msgstr "Ahora puede añadir su empresa en el sistema."
msgctxt "view:company.company:"
-msgid "Addresses"
-msgstr "Direcciones"
-
-msgctxt "view:company.company:"
msgid "Companies"
msgstr "Empresas"
@@ -299,22 +327,10 @@ msgid "Company"
msgstr "Empresa"
msgctxt "view:company.company:"
-msgid "Employees"
-msgstr "Empleados"
-
-msgctxt "view:company.company:"
-msgid "General"
-msgstr "General"
-
-msgctxt "view:company.company:"
msgid "Reports"
msgstr "Informes"
msgctxt "view:company.employee:"
-msgid "Addresses"
-msgstr "Direcciones"
-
-msgctxt "view:company.employee:"
msgid "Employee"
msgstr "Empleado"
@@ -322,10 +338,6 @@ msgctxt "view:company.employee:"
msgid "Employees"
msgstr "Empleados"
-msgctxt "view:company.employee:"
-msgid "General"
-msgstr "General"
-
msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr "Añadir"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 1056ef3..2168565 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -2,14 +2,6 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:"
-msgid "You can not create recursive companies!"
-msgstr "Vous ne pouvez pas créer des sociétés récursives !"
-
-msgctxt "error:company.company:"
-msgid "You can not create recursive companies!"
-msgstr "Vous ne pouvez pas créer des sociétés récursives !"
-
msgctxt "field:company.company,childs:"
msgid "Children"
msgstr "Enfants"
@@ -236,7 +228,7 @@ msgstr "Lettre"
msgctxt "model:ir.cron-company.company,name:"
msgid "Cron - Company"
-msgstr ""
+msgstr "Cron - Société"
msgctxt "model:ir.ui.menu,name:menu_company_list"
msgid "Companies"
@@ -319,10 +311,6 @@ msgid "You can now add your company into the system."
msgstr "Vous pouvez maintenant ajouter votre société au système"
msgctxt "view:company.company:"
-msgid "Addresses"
-msgstr "Adresses"
-
-msgctxt "view:company.company:"
msgid "Companies"
msgstr "Sociétés"
@@ -339,14 +327,6 @@ msgid "Company"
msgstr "Société"
msgctxt "view:company.company:"
-msgid "Employees"
-msgstr "Employés"
-
-msgctxt "view:company.company:"
-msgid "General"
-msgstr "Général"
-
-msgctxt "view:company.company:"
msgid "Reports"
msgstr "Rapports"
@@ -355,10 +335,6 @@ msgid "Reports"
msgstr "Rapports"
msgctxt "view:company.employee:"
-msgid "Addresses"
-msgstr "Adresses"
-
-msgctxt "view:company.employee:"
msgid "Employee"
msgstr "Employé"
@@ -374,10 +350,6 @@ msgctxt "view:company.employee:"
msgid "Employees"
msgstr "Employés"
-msgctxt "view:company.employee:"
-msgid "General"
-msgstr "Général"
-
msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr "Ajouter"
diff --git a/locale/nl_NL.po b/locale/nl_NL.po
index b45de45..f6ddb2f 100644
--- a/locale/nl_NL.po
+++ b/locale/nl_NL.po
@@ -2,10 +2,6 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:"
-msgid "You can not create recursive companies!"
-msgstr "U kunt geen bedrijven aanmaken die naar zichzelf verwijzen!"
-
msgctxt "field:company.company,childs:"
msgid "Children"
msgstr "Onderliggende niveaus"
@@ -302,10 +298,6 @@ msgid "Company"
msgstr "Bedrijf"
msgctxt "view:company.company:"
-msgid "Employees"
-msgstr "Werknemers"
-
-msgctxt "view:company.company:"
msgid "Reports"
msgstr "Rapportage"
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
index 4c12f7a..fb165ea 100644
--- a/locale/ru_RU.po
+++ b/locale/ru_RU.po
@@ -2,21 +2,17 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:"
-msgid "You can not create recursive companies!"
-msgstr "Вы не можете создать взаимоподчинённые организации"
-
msgctxt "field:company.company,childs:"
msgid "Children"
msgstr "Подчиненый"
msgctxt "field:company.company,create_date:"
msgid "Create Date"
-msgstr ""
+msgstr "Дата создания"
msgctxt "field:company.company,create_uid:"
msgid "Create User"
-msgstr ""
+msgstr "Создано пользователем"
msgctxt "field:company.company,currency:"
msgid "Currency"
@@ -36,11 +32,11 @@ msgstr "Верхний колонтитул"
msgctxt "field:company.company,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
msgctxt "field:company.company,parent:"
msgid "Parent"
-msgstr "Основной"
+msgstr "Предок"
msgctxt "field:company.company,party:"
msgid "Party"
@@ -52,31 +48,31 @@ msgstr "Наименование"
msgctxt "field:company.company,write_date:"
msgid "Write Date"
-msgstr ""
+msgstr "Дата изменения"
msgctxt "field:company.company,write_uid:"
msgid "Write User"
-msgstr ""
+msgstr "Изменено пользователем"
msgctxt "field:company.company.config.start,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
msgctxt "field:company.employee,company:"
msgid "Company"
-msgstr "Учет.орг."
+msgstr "Организация"
msgctxt "field:company.employee,create_date:"
msgid "Create Date"
-msgstr ""
+msgstr "Дата создания"
msgctxt "field:company.employee,create_uid:"
msgid "Create User"
-msgstr ""
+msgstr "Создано пользователем"
msgctxt "field:company.employee,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
msgctxt "field:company.employee,party:"
msgid "Party"
@@ -88,11 +84,11 @@ msgstr "Наименование"
msgctxt "field:company.employee,write_date:"
msgid "Write Date"
-msgstr ""
+msgstr "Дата изменения"
msgctxt "field:company.employee,write_uid:"
msgid "Write User"
-msgstr ""
+msgstr "Изменено пользователем"
msgctxt "field:ir.cron,companies:"
msgid "Companies"
@@ -100,15 +96,15 @@ msgstr "Организация"
msgctxt "field:ir.cron-company.company,company:"
msgid "Company"
-msgstr "Учет.орг."
+msgstr "Организация"
msgctxt "field:ir.cron-company.company,create_date:"
msgid "Create Date"
-msgstr ""
+msgstr "Дата создания"
msgctxt "field:ir.cron-company.company,create_uid:"
msgid "Create User"
-msgstr ""
+msgstr "Создано пользователем"
msgctxt "field:ir.cron-company.company,cron:"
msgid "Cron"
@@ -116,7 +112,7 @@ msgstr "Планировщик"
msgctxt "field:ir.cron-company.company,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
msgctxt "field:ir.cron-company.company,rec_name:"
msgid "Name"
@@ -124,23 +120,23 @@ msgstr "Наименование"
msgctxt "field:ir.cron-company.company,write_date:"
msgid "Write Date"
-msgstr ""
+msgstr "Дата изменения"
msgctxt "field:ir.cron-company.company,write_uid:"
msgid "Write User"
-msgstr ""
+msgstr "Изменено пользователем"
msgctxt "field:ir.property,company:"
msgid "Company"
-msgstr "Учет.орг."
+msgstr "Организация"
msgctxt "field:ir.sequence,company:"
msgid "Company"
-msgstr "Учет.орг."
+msgstr "Организация"
msgctxt "field:ir.sequence.strict,company:"
msgid "Company"
-msgstr "Учет.орг."
+msgstr "Организация"
msgctxt "field:res.user,companies:"
msgid "Current Companies"
@@ -150,12 +146,10 @@ msgctxt "field:res.user,company:"
msgid "Current Company"
msgstr "Текущая организация"
-#, fuzzy
msgctxt "field:res.user,employee:"
msgid "Current Employee"
msgstr "Сотрудник"
-#, fuzzy
msgctxt "field:res.user,employees:"
msgid "Employees"
msgstr "Сотрудники"
@@ -166,38 +160,35 @@ msgstr "Основная организация"
msgctxt "field:res.user-company.employee,create_date:"
msgid "Create Date"
-msgstr ""
+msgstr "Дата создания"
msgctxt "field:res.user-company.employee,create_uid:"
msgid "Create User"
-msgstr ""
+msgstr "Создано пользователем"
-#, fuzzy
msgctxt "field:res.user-company.employee,employee:"
msgid "Employee"
msgstr "Сотрудник"
msgctxt "field:res.user-company.employee,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
-#, fuzzy
msgctxt "field:res.user-company.employee,rec_name:"
msgid "Name"
msgstr "Наименование"
-#, fuzzy
msgctxt "field:res.user-company.employee,user:"
msgid "User"
msgstr "Пользователь"
msgctxt "field:res.user-company.employee,write_date:"
msgid "Write Date"
-msgstr ""
+msgstr "Дата изменения"
msgctxt "field:res.user-company.employee,write_uid:"
msgid "Write User"
-msgstr ""
+msgstr "Изменено пользователем"
msgctxt "help:ir.cron,companies:"
msgid "Companies registered for this cron"
@@ -205,11 +196,11 @@ msgstr "Организации зарегистрированные для эт
msgctxt "model:company.company,name:"
msgid "Company"
-msgstr "Учет.орг."
+msgstr "Организация"
msgctxt "model:company.company.config.start,name:"
msgid "Company Config"
-msgstr ""
+msgstr "Настройка организации"
msgctxt "model:company.employee,name:"
msgid "Employee"
@@ -217,12 +208,11 @@ msgstr "Сотрудник"
msgctxt "model:ir.action,name:act_company_config"
msgid "Configure Company"
-msgstr ""
+msgstr "Настройка организации"
-#, fuzzy
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
-msgstr "Организация"
+msgstr "Организации"
msgctxt "model:ir.action,name:act_company_tree"
msgid "Companies"
@@ -236,19 +226,17 @@ msgctxt "model:ir.action,name:report_letter"
msgid "Letter"
msgstr "Письмо"
-#, fuzzy
msgctxt "model:ir.cron-company.company,name:"
msgid "Cron - Company"
-msgstr "Планировщик"
+msgstr "Планировщик - Организация"
-#, fuzzy
msgctxt "model:ir.ui.menu,name:menu_company_list"
msgid "Companies"
-msgstr "Организация"
+msgstr "Организации"
msgctxt "model:ir.ui.menu,name:menu_company_tree"
msgid "Companies"
-msgstr "Организация"
+msgstr "Организации в виде дерева"
msgctxt "model:ir.ui.menu,name:menu_employee_form"
msgid "Employees"
@@ -256,7 +244,7 @@ msgstr "Сотрудники"
msgctxt "model:res.user-company.employee,name:"
msgid "User - Employee"
-msgstr ""
+msgstr "Пользователь - Сотрудник"
msgctxt "odt:party.letter:"
msgid "Best Regards,"
@@ -272,7 +260,7 @@ msgstr "Уважаемые дамы и годпода,"
msgctxt "odt:party.letter:"
msgid "E-Mail:"
-msgstr "E-Mail:"
+msgstr "Эл.почта:"
msgctxt "odt:party.letter:"
msgid "Phone:"
@@ -284,15 +272,15 @@ msgstr "Тема:"
msgctxt "odt:party.letter:"
msgid "VAT Number:"
-msgstr ""
+msgstr "ИНН:"
msgctxt "view:company.company.config.start:"
msgid "Create Company"
-msgstr ""
+msgstr "Создание организации"
msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
-msgstr ""
+msgstr "Теперь вы можете добавить организации."
msgctxt "view:company.company:"
msgid "Companies"
@@ -300,11 +288,7 @@ msgstr "Организация"
msgctxt "view:company.company:"
msgid "Company"
-msgstr "Учет.орг."
-
-msgctxt "view:company.company:"
-msgid "Employees"
-msgstr "Сотрудники"
+msgstr "Организация"
msgctxt "view:company.company:"
msgid "Reports"
@@ -314,15 +298,10 @@ msgctxt "view:company.employee:"
msgid "Employee"
msgstr "Сотрудник"
-#, fuzzy
msgctxt "view:company.employee:"
msgid "Employees"
msgstr "Сотрудники"
-msgctxt "view:company.employee:"
-msgid "Employess"
-msgstr "Сотрудники"
-
msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr "Добавить"
@@ -331,12 +310,10 @@ msgctxt "wizard_button:company.company.config,company,end:"
msgid "Cancel"
msgstr "Отменить"
-#, fuzzy
msgctxt "wizard_button:company.company.config,start,company:"
msgid "Ok"
-msgstr "Да"
+msgstr "Ок"
-#, fuzzy
msgctxt "wizard_button:company.company.config,start,end:"
msgid "Cancel"
msgstr "Отменить"
diff --git a/setup.py b/setup.py
index d81e4ee..4a6f57d 100644
--- a/setup.py
+++ b/setup.py
@@ -25,10 +25,10 @@ requires = []
for dep in info.get('depends', []):
if not re.match(r'(ir|res|webdav)(\W|$)', dep):
requires.append('trytond_%s >= %s.%s, < %s.%s' %
- (dep, major_version, minor_version, major_version,
- minor_version + 1))
+ (dep, major_version, minor_version, major_version,
+ minor_version + 1))
requires.append('trytond >= %s.%s, < %s.%s' %
- (major_version, minor_version, major_version, minor_version + 1))
+ (major_version, minor_version, major_version, minor_version + 1))
setup(name='trytond_company',
version=info.get('version', '0.0.1'),
@@ -36,16 +36,17 @@ setup(name='trytond_company',
long_description=read('README'),
author='Tryton',
url='http://www.tryton.org/',
- download_url="http://downloads.tryton.org/" + \
- info.get('version', '0.0.1').rsplit('.', 1)[0] + '/',
+ download_url=("http://downloads.tryton.org/" +
+ info.get('version', '0.0.1').rsplit('.', 1)[0] + '/'),
package_dir={'trytond.modules.company': '.'},
packages=[
'trytond.modules.company',
'trytond.modules.company.tests',
],
package_data={
- 'trytond.modules.company': info.get('xml', []) \
- + ['tryton.cfg', 'locale/*.po', 'header_A4.odt', 'letter.odt'],
+ 'trytond.modules.company': (info.get('xml', [])
+ + ['tryton.cfg', 'view/*.xml', 'locale/*.po', 'header_A4.odt',
+ 'letter.odt']),
},
classifiers=[
'Development Status :: 5 - Production/Stable',
@@ -57,6 +58,7 @@ setup(name='trytond_company',
'Intended Audience :: Manufacturing',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: Bulgarian',
+ 'Natural Language :: Catalan',
'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
diff --git a/tests/test_company.py b/tests/test_company.py
index 304b473..face119 100644
--- a/tests/test_company.py
+++ b/tests/test_company.py
@@ -22,6 +22,7 @@ class CompanyTestCase(unittest.TestCase):
def setUp(self):
trytond.tests.test_tryton.install_module('company')
+ self.party = POOL.get('party.party')
self.company = POOL.get('company.company')
self.employee = POOL.get('company.employee')
self.currency = POOL.get('currency.currency')
@@ -49,10 +50,13 @@ class CompanyTestCase(unittest.TestCase):
('code', '=', 'cu1'),
], 0, 1, None)
- company1 = self.company.create({
- 'name': 'B2CK',
- 'currency': currency1.id,
- })
+ party1, = self.party.create([{
+ 'name': 'B2CK',
+ }])
+ company1, = self.company.create([{
+ 'party': party1.id,
+ 'currency': currency1.id,
+ }])
self.assert_(company1)
transaction.cursor.commit()
@@ -66,14 +70,17 @@ class CompanyTestCase(unittest.TestCase):
], 0, 1, None)
company1, = self.company.search([
- ('name', '=', 'B2CK'),
+ ('rec_name', '=', 'B2CK'),
], 0, 1, None)
- company2 = self.company.create({
- 'name': 'B2CK Branch',
- 'parent': company1.id,
- 'currency': currency1.id,
- })
+ party2, = self.party.create([{
+ 'name': 'B2CK Branch',
+ }])
+ company2, = self.company.create([{
+ 'party': party2.id,
+ 'parent': company1.id,
+ 'currency': currency1.id,
+ }])
self.assert_(company2)
self.assertRaises(Exception, self.company.write,
@@ -88,13 +95,16 @@ class CompanyTestCase(unittest.TestCase):
with Transaction().start(DB_NAME, USER,
context=CONTEXT) as transaction:
company1, = self.company.search([
- ('name', '=', 'B2CK'),
+ ('rec_name', '=', 'B2CK'),
], 0, 1, None)
- self.employee.create({
- 'name': 'Employee1',
- 'company': company1.id,
- })
+ party, = self.party.create([{
+ 'name': 'Employee1',
+ }])
+ self.employee.create([{
+ 'party': party.id,
+ 'company': company1.id,
+ }])
transaction.cursor.commit()
def test0040user(self):
@@ -108,26 +118,28 @@ class CompanyTestCase(unittest.TestCase):
], 0, 1, None)
company1, = self.company.search([
- ('name', '=', 'B2CK'),
+ ('rec_name', '=', 'B2CK'),
], 0, 1, None)
- company2 = self.company.create({
- 'name': 'B2CK Branch',
- 'parent': company1.id,
- 'currency': currency1.id,
- })
- user1 = self.user.create({
- 'name': 'Test 1',
- 'login': 'test1',
- 'main_company': company1.id,
- 'company': company1.id,
- })
- user2 = self.user.create({
- 'name': 'Test 2',
- 'login': 'test2',
- 'main_company': company2.id,
- 'company': company2.id,
- })
+ party2, = self.party.create([{
+ 'name': 'B2CK Branch',
+ }])
+ company2, = self.company.create([{
+ 'party': party2.id,
+ 'parent': company1.id,
+ 'currency': currency1.id,
+ }])
+ user1, user2 = self.user.create([{
+ 'name': 'Test 1',
+ 'login': 'test1',
+ 'main_company': company1.id,
+ 'company': company1.id,
+ }, {
+ 'name': 'Test 2',
+ 'login': 'test2',
+ 'main_company': company2.id,
+ 'company': company2.id,
+ }])
self.assert_(user1)
with transaction.set_user(user1.id):
diff --git a/tryton.cfg b/tryton.cfg
index 3231230..0c4e53d 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=2.6.1
+version=2.8.0
depends:
currency
ir
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 6613d6a..097d169 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: 2.6.1
+Version: 2.8.0
Summary: Tryton module with companies and employees
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: UNKNOWN
License: GPL-3
-Download-URL: http://downloads.tryton.org/2.6/
+Download-URL: http://downloads.tryton.org/2.8/
Description: trytond_company
===============
@@ -53,6 +53,7 @@ Classifier: Intended Audience :: Legal Industry
Classifier: Intended Audience :: Manufacturing
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: Bulgarian
+Classifier: Natural Language :: Catalan
Classifier: Natural Language :: Czech
Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
diff --git a/trytond_company.egg-info/SOURCES.txt b/trytond_company.egg-info/SOURCES.txt
index 016c09b..9bf9841 100644
--- a/trytond_company.egg-info/SOURCES.txt
+++ b/trytond_company.egg-info/SOURCES.txt
@@ -33,4 +33,17 @@ trytond_company.egg-info/dependency_links.txt
trytond_company.egg-info/entry_points.txt
trytond_company.egg-info/not-zip-safe
trytond_company.egg-info/requires.txt
-trytond_company.egg-info/top_level.txt
\ No newline at end of file
+trytond_company.egg-info/top_level.txt
+view/company_config_start_form.xml
+view/company_form.xml
+view/company_list.xml
+view/company_tree.xml
+view/cron_form.xml
+view/employee_form.xml
+view/employee_tree.xml
+view/property_form.xml
+view/property_tree.xml
+view/sequence_form.xml
+view/sequence_tree.xml
+view/user_form.xml
+view/user_form_preferences.xml
\ No newline at end of file
diff --git a/trytond_company.egg-info/requires.txt b/trytond_company.egg-info/requires.txt
index 1ad737a..161432c 100644
--- a/trytond_company.egg-info/requires.txt
+++ b/trytond_company.egg-info/requires.txt
@@ -1,3 +1,3 @@
-trytond_currency >= 2.6, < 2.7
-trytond_party >= 2.6, < 2.7
-trytond >= 2.6, < 2.7
\ No newline at end of file
+trytond_currency >= 2.8, < 2.9
+trytond_party >= 2.8, < 2.9
+trytond >= 2.8, < 2.9
\ No newline at end of file
diff --git a/view/company_config_start_form.xml b/view/company_config_start_form.xml
new file mode 100644
index 0000000..b50594b
--- /dev/null
+++ b/view/company_config_start_form.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<form string="Create Company" col="2">
+ <image name="tryton-dialog-information" xexpand="0" xfill="0"/>
+ <label string="You can now add your company into the system." id="add"
+ yalign="0.0" xalign="0.0" xexpand="1"/>
+</form>
diff --git a/view/company_form.xml b/view/company_form.xml
new file mode 100644
index 0000000..8d93a26
--- /dev/null
+++ b/view/company_form.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<form string="Company">
+ <label name="party"/>
+ <field name="party"/>
+ <label name="currency"/>
+ <field name="currency"/>
+ <notebook colspan="4">
+ <page string="Company" col="2" id="company">
+ <label name="parent"/>
+ <field name="parent"/>
+ <field name="employees" colspan="2"/>
+ </page>
+ <page string="Reports" col="1" id="reports">
+ <separator name="header"/>
+ <field name="header"/>
+ <separator name="footer"/>
+ <field name="footer"/>
+ </page>
+ </notebook>
+</form>
diff --git a/view/company_list.xml b/view/company_list.xml
new file mode 100644
index 0000000..0bb5c59
--- /dev/null
+++ b/view/company_list.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<tree string="Companies">
+ <field name="party"/>
+</tree>
diff --git a/view/company_tree.xml b/view/company_tree.xml
new file mode 100644
index 0000000..a1246a4
--- /dev/null
+++ b/view/company_tree.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<tree string="Companies">
+ <field name="party"/>
+ <field name="currency"/>
+ <field name="parent" tree_invisible="1"/>
+ <field name="childs" tree_invisible="1"/>
+</tree>
diff --git a/view/cron_form.xml b/view/cron_form.xml
new file mode 100644
index 0000000..cc5ad3f
--- /dev/null
+++ b/view/cron_form.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<data>
+ <xpath expr="/form/field[@name='args']" position="after">
+ <field name="companies" colspan="4"/>
+ </xpath>
+</data>
diff --git a/view/employee_form.xml b/view/employee_form.xml
new file mode 100644
index 0000000..485422c
--- /dev/null
+++ b/view/employee_form.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<form string="Employee">
+ <label name="party"/>
+ <field name="party"/>
+ <label name="company"/>
+ <field name="company"/>
+</form>
diff --git a/view/employee_tree.xml b/view/employee_tree.xml
new file mode 100644
index 0000000..9fdac87
--- /dev/null
+++ b/view/employee_tree.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<tree string="Employees">
+ <field name="party"/>
+ <field name="company"/>
+</tree>
diff --git a/view/property_form.xml b/view/property_form.xml
new file mode 100644
index 0000000..474ad2f
--- /dev/null
+++ b/view/property_form.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<data>
+ <xpath expr="/form/field[@name='field']" position="after">
+ <label name="company"/>
+ <field name="company" colspan="3"/>
+ </xpath>
+</data>
diff --git a/view/property_tree.xml b/view/property_tree.xml
new file mode 100644
index 0000000..fb3f503
--- /dev/null
+++ b/view/property_tree.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<data>
+ <xpath expr="/tree/field[@name='field']" position="after">
+ <field name="company"/>
+ </xpath>
+</data>
diff --git a/view/sequence_form.xml b/view/sequence_form.xml
new file mode 100644
index 0000000..d116a10
--- /dev/null
+++ b/view/sequence_form.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<data>
+ <xpath expr="/form/field[@name='active']" position="after">
+ <label name="company"/>
+ <field name="company" colspan="3"/>
+ </xpath>
+</data>
diff --git a/view/sequence_tree.xml b/view/sequence_tree.xml
new file mode 100644
index 0000000..299953c
--- /dev/null
+++ b/view/sequence_tree.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<data>
+ <xpath expr="/tree/field[@name='code']" position="after">
+ <field name="company"/>
+ </xpath>
+</data>
diff --git a/view/user_form.xml b/view/user_form.xml
new file mode 100644
index 0000000..ffe15a2
--- /dev/null
+++ b/view/user_form.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<data>
+ <xpath expr="/form/notebook/page/separator[@name='signature']"
+ position="before">
+ <label name="main_company"/>
+ <field name="main_company" widget="selection"/>
+ <label name="company"/>
+ <field name="company" widget="selection"/>
+ <label name="employee"/>
+ <field name="employee"/>
+ <field name="employees" colspan="4"/>
+ </xpath>
+</data>
diff --git a/view/user_form_preferences.xml b/view/user_form_preferences.xml
new file mode 100644
index 0000000..f53ebd7
--- /dev/null
+++ b/view/user_form_preferences.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<data>
+ <xpath expr="/form/notebook/page/separator[@name='signature']"
+ position="before">
+ <label name="company"/>
+ <field name="company" widget="selection"/>
+ <label name="employee"/>
+ <field name="employee" widget="selection"/>
+ </xpath>
+</data>
commit 9bb3b765bbad8537c401ff5789eba1664eda5101
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Fri Feb 15 20:50:39 2013 +0100
Adding upstream version 2.6.1.
diff --git a/CHANGELOG b/CHANGELOG
index 5186d48..b4f0a0e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.1 - 2012-12-23
+* Bug fixes (see mercurial logs for details)
+
Version 2.6.0 - 2012-10-22
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index dda30da..98c444f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
Name: trytond_company
-Version: 2.6.0
+Version: 2.6.1
Summary: Tryton module with companies and employees
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/company.py b/company.py
index 8fa9648..583de29 100644
--- a/company.py
+++ b/company.py
@@ -255,11 +255,12 @@ class Property:
return res
@classmethod
- def search(cls, domain, offset=0, limit=None, order=None, count=False):
+ def search(cls, domain, offset=0, limit=None, order=None, count=False,
+ query_string=False):
if Transaction().user == 0 and not 'user' in Transaction().context:
domain = ['AND', domain[:], ('company', '=', None)]
- return super(Property, cls).search(domain, offset=offset,
- limit=limit, order=order, count=count)
+ return super(Property, cls).search(domain, offset=offset, limit=limit,
+ order=order, count=count, query_string=query_string)
class Sequence:
diff --git a/tryton.cfg b/tryton.cfg
index be00df4..3231230 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=2.6.0
+version=2.6.1
depends:
currency
ir
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 37fca2f..6613d6a 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
Name: trytond-company
-Version: 2.6.0
+Version: 2.6.1
Summary: Tryton module with companies and employees
Home-page: http://www.tryton.org/
Author: Tryton
commit 7ee6454985777945f75a6d7df4daa24b61f07efd
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Oct 23 19:53:30 2012 +0200
Adding upstream version 2.6.0.
diff --git a/CHANGELOG b/CHANGELOG
index 656e2a1..5186d48 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.6.0 - 2012-10-22
+* Bug fixes (see mercurial logs for details)
+
Version 2.4.0 - 2012-04-23
* Bug fixes (see mercurial logs for details)
* Allow to have more than one possible employee per user
diff --git a/MANIFEST.in b/MANIFEST.in
index 4aec982..3e52948 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -4,6 +4,7 @@ include TODO
include CHANGELOG
include COPYRIGHT
include LICENSE
+include tryton.cfg
include *.xml
include *.odt
include locale/*.po
diff --git a/PKG-INFO b/PKG-INFO
index 2af8d06..dda30da 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,19 +1,48 @@
Metadata-Version: 1.0
Name: trytond_company
-Version: 2.4.0
-Summary: Define company and employee.
-Add main and current company on users preferences.
-Add company on properties.
-Define new report parser for report with company header.
-Add letter template on party.
-Make the scheduler run on each companies.
-
+Version: 2.6.0
+Summary: Tryton module with companies and employees
Home-page: http://www.tryton.org/
-Author: B2CK
-Author-email: info at b2ck.com
+Author: Tryton
+Author-email: UNKNOWN
License: GPL-3
-Download-URL: http://downloads.tryton.org/2.4/
-Description: UNKNOWN
+Download-URL: http://downloads.tryton.org/2.6/
+Description: trytond_company
+ ===============
+
+ The company module of the Tryton application platform.
+
+ Installing
+ ----------
+
+ See INSTALL
+
+ Support
+ -------
+
+ If you encounter any problems with Tryton, please don't hesitate to ask
+ questions on the Tryton bug tracker, mailing list, wiki or IRC channel:
+
+ http://bugs.tryton.org/
+ http://groups.tryton.org/
+ http://wiki.tryton.org/
+ irc://irc.freenode.net/tryton
+
+ License
+ -------
+
+ See LICENSE
+
+ Copyright
+ ---------
+
+ See COPYRIGHT
+
+
+ For more information please visit the Tryton web site:
+
+ http://www.tryton.org/
+
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
diff --git a/README b/README
index d5d8f6a..9db8567 100644
--- a/README
+++ b/README
@@ -2,7 +2,6 @@ trytond_company
===============
The company module of the Tryton application platform.
-See __tryton__.py
Installing
----------
diff --git a/__init__.py b/__init__.py
index acd8e36..294bc15 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,6 +1,29 @@
#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 *
from .cron import *
-from . import party
+from .party import *
+
+
+def register():
+ Pool.register(
+ Company,
+ Employee,
+ UserEmployee,
+ User,
+ Property,
+ Sequence,
+ SequenceStrict,
+ CompanyConfigStart,
+ Cron,
+ CronCompany,
+ PartyConfiguration,
+ module='company', type_='model')
+ Pool.register(
+ CompanyConfig,
+ module='company', type_='wizard')
+ Pool.register(
+ LetterReport,
+ module='company', type_='report')
diff --git a/__tryton__.py b/__tryton__.py
deleted file mode 100644
index 4b7bb86..0000000
--- a/__tryton__.py
+++ /dev/null
@@ -1,110 +0,0 @@
-# -*- coding: utf-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.
-{
- 'name': 'Company',
- 'name_bg_BG': 'Фирма',
- 'name_ca_ES': 'Empresa',
- 'name_de_DE': 'Unternehmen',
- 'name_es_AR': 'Empresa',
- 'name_es_CO': 'Compañía',
- 'name_es_ES': 'Empresa',
- 'name_fr_FR': 'Société',
- 'name_nl_NL': 'Bedrijf',
- 'version': '2.4.0',
- 'author': 'B2CK',
- 'email': 'info at b2ck.com',
- 'website': 'http://www.tryton.org/',
- 'description': '''Define company and employee.
-Add main and current company on users preferences.
-Add company on properties.
-Define new report parser for report with company header.
-Add letter template on party.
-Make the scheduler run on each companies.
-''',
- 'description_bg_BG': ''' - Задаване на фирма и служители
- - Добавяне на основна и текуща фирма според предпочитания на потребителите
- - Добавяне на фирма при предпочитания
- - Задаване на нов анализатор на справки с фирмен горен колонтитул
- - Добавяне на шаблон на писмо за партньор
- - Възможност планировщика да работи на всяка фирма
-''',
- 'description_ca_ES': '''- Defineix empresa i empleats.
-- Afegeix l'empresa principal i predeterminada a les preferències dels usuaris.
-- Afegeix l'empresa a les propietats.
-- Defineix un nou analitzador pels informes amb l'encapçalament de l'empresa.
-- Afegeix una plantilla de carta a tercers.
-- Fa que el planificador de tasques s'executi per empresa.
-''',
- 'description_de_DE': ''' - Ermöglicht die Eingabe von Umternehmen und Mitarbeitern.
- - Fügt Haupt- und aktuelles Unternehmen zu den Benutzereinstellungen hinzu.
- - Fügt das Unternehmen den Eigenschaften hinzu.
- - Ermöglicht die Definition eines neuen Berichtsanalysierers mit Unternehmen im Berichtskopf.
- - Fügt den Kontakten die Berichtsvorlage für Briefe hinzu.
- - Initialisiert die Aufgaben des Zeitplaners für jedes Unternehmen.
-''',
- 'description_es_AR': '''Define empresa y empleados.
- - Añade la empresa principal y predeterminada en las preferencias de los usuarios.
- - Añade empresa a las propiedades.
- - Define un nuevo analizador de informe para los informes con el encabezado de la empresa.
- - Añade una plantilla de carta en entidades.
- - Hace que el programador de tareas se ejecute por empresa.
-''',
- 'description_es_CO': ''' - Define compañía y empleados.
- - Añade compañía principal y predeterminada de acuerdo a preferencia de usuarios.
- - Añade compañía a las propiedades.
- - Define un nuevo reporteador para los encabezados de los reportes por compañía.
- - Añade plantilla de carta a un tercero.
- - Se ejecuta el agendador por compañía.
-''',
- 'description_es_ES': '''Define empresa y empleados.
- - Añade la empresa principal y predeterminada en las preferencias de los usuarios.
- - Añade la empresa a las propiedades.
- - Define un nuevo analizador para los informes con el encabezado de la empresa.
- - Añade una plantilla de carta a terceros.
- - Hace que el planificador de tareas se ejecute por empresa.
-''',
- 'description_fr_FR': '''Défini société et employé.
-Ajoute les sociétés principale et courante dans les préférences de l'utilisateur.
-Ajoute la société sur les propriétés.
-Défini un nouveau moteur de rapport gérant une entête par société.
-Ajoute un canva de lettre par tiers.
-Lance les planificateurs sur chaque société.
-''',
- 'description_nl_NL': ''' - Definieert bedrijf en werknemers.
- - Voegt moederbedrijf en huidig bedrijf toe aan gebruikers voorkeuren.
- - Voegt bedrijf toe aan eigenschappen.
- - Definieert nieuwe rapport routine voor een rapport met 'bedrijfskop'.
- - Voegt briefsjabloon toe aan relatie.
- - Initieert automatisch herhalende taken voor elk bedrijf.
-''',
- 'description_ru_RU': '''Учет организаций и сотрудников.
- - Добавление основной и дочерних организаций
- - Добавление учетных организаций и свойств
- - Настройка отчетов для печати на фирменных бланках.
- - Добавление шаблона письма.
- - Устанавливает планировщика на работу с каждой учетной организацией.
-''',
- 'depends': [
- 'ir',
- 'res',
- 'party',
- 'currency',
- ],
- 'xml': [
- 'company.xml',
- 'cron.xml',
- ],
- 'translation': [
- 'locale/bg_BG.po',
- 'locale/ca_ES.po',
- 'locale/cs_CZ.po',
- 'locale/de_DE.po',
- 'locale/es_AR.po',
- 'locale/es_CO.po',
- 'locale/es_ES.po',
- 'locale/fr_FR.po',
- 'locale/nl_NL.po',
- 'locale/ru_RU.po',
- ]
-}
diff --git a/company.py b/company.py
index 490fc7f..8fa9648 100644
--- a/company.py
+++ b/company.py
@@ -6,15 +6,18 @@ from trytond.wizard import Wizard, StateView, Button, StateTransition
from trytond.report import Report
from trytond.pyson import Eval, If
from trytond.transaction import Transaction
-from trytond.pool import Pool
+from trytond.pool import Pool, PoolMeta
+
+__all__ = ['Company', 'Employee', 'UserEmployee', 'User', 'Property',
+ 'Sequence', 'SequenceStrict', 'CompanyConfigStart', 'CompanyConfig',
+ 'CompanyReport', 'LetterReport']
+__metaclass__ = PoolMeta
class Company(ModelSQL, ModelView):
'Company'
- _name = 'company.company'
- _description = __doc__
+ __name__ = 'company.company'
_inherits = {'party.party': 'party'}
-
party = fields.Many2One('party.party', 'Party', required=True,
ondelete='CASCADE')
parent = fields.Many2One('company.company', 'Parent')
@@ -24,70 +27,57 @@ class Company(ModelSQL, ModelView):
currency = fields.Many2One('currency.currency', 'Currency', required=True)
employees = fields.One2Many('company.employee', 'company', 'Employees')
- def __init__(self):
- super(Company, self).__init__()
- self._constraints += [
+ @classmethod
+ def __setup__(cls):
+ super(Company, cls).__setup__()
+ cls._constraints += [
('check_recursion', 'recursive_companies'),
- ]
- self._error_messages.update({
- 'recursive_companies': 'You can not create recursive companies!',
- })
-
- def copy(self, ids, default=None):
- party_obj = Pool().get('party.party')
-
- int_id = False
- if isinstance(ids, (int, long)):
- int_id = True
- ids = [ids]
+ ]
+ cls._error_messages.update({
+ 'recursive_companies': \
+ 'You can not create recursive companies!',
+ })
+
+ @classmethod
+ def copy(cls, companies, default=None):
+ Party = Pool().get('party.party')
+
if default is None:
default = {}
default = default.copy()
- new_ids = []
- for company in self.browse(ids):
- default['party'] = party_obj.copy(company.party.id)
- new_id = super(Company, self).copy(company.id, default=default)
- new_ids.append(new_id)
-
- if int_id:
- return new_ids[0]
- return new_ids
-
- def write(self, ids, vals):
- res = super(Company, self).write(ids, vals)
+ new_companies = []
+ for company in companies:
+ default['party'], = Party.copy([company.party])
+ new_company, = super(Company, cls).copy([company], default=default)
+ new_companies.append(new_company)
+ return new_companies
+
+ @classmethod
+ def write(cls, companies, vals):
+ super(Company, cls).write(companies, vals)
# Restart the cache on the domain_get method
- Pool().get('ir.rule').domain_get.reset()
- return res
-
-Company()
+ Pool().get('ir.rule')._domain_get_cache.clear()
class Employee(ModelSQL, ModelView):
'Employee'
- _name = 'company.employee'
- _description = __doc__
+ __name__ = 'company.employee'
_inherits = {'party.party': 'party'}
-
party = fields.Many2One('party.party', 'Party', required=True)
company = fields.Many2One('company.company', 'Company', required=True)
-Employee()
-
class UserEmployee(ModelSQL):
'User - Employee'
- _name = 'res.user-company.employee'
- _description = __doc__
+ __name__ = 'res.user-company.employee'
user = fields.Many2One('res.user', 'User', ondelete='CASCADE', select=True,
required=True)
employee = fields.Many2One('company.employee', 'Employee',
ondelete='CASCADE', select=True, required=True)
-UserEmployee()
-
-class User(ModelSQL, ModelView):
- _name = 'res.user'
+class User:
+ __name__ = 'res.user'
main_company = fields.Many2One('company.company', 'Main Company',
on_change=['main_company'])
company = fields.Many2One('company.company', 'Current Company',
@@ -97,94 +87,101 @@ class User(ModelSQL, ModelView):
'Current Companies'), 'get_companies')
employees = fields.Many2Many('res.user-company.employee', 'user',
'employee', 'Employees')
- employee = fields.Many2One('company.employee', 'Employee',
+ employee = fields.Many2One('company.employee', 'Current Employee',
domain=[
('company', '=', Eval('company')),
('id', 'in', Eval('employees', [])),
],
depends=['company', 'employees'])
- def __init__(self):
- super(User, self).__init__()
- self._context_fields.insert(0, 'company')
- self._context_fields.insert(0, 'employee')
+ @classmethod
+ def __setup__(cls):
+ super(User, cls).__setup__()
+ cls._context_fields.insert(0, 'company')
+ cls._context_fields.insert(0, 'employee')
- def default_main_company(self):
+ @staticmethod
+ def default_main_company():
return Transaction().context.get('company')
- def default_company(self):
- return self.default_main_company()
+ @classmethod
+ def default_company(cls):
+ return cls.default_main_company()
- def get_companies(self, ids, name):
- company_obj = Pool().get('company.company')
- res = {}
+ @classmethod
+ def get_companies(cls, users, name):
+ Company = Pool().get('company.company')
+ companies = {}
company_childs = {}
- for user in self.browse(ids):
- res[user.id] = []
- company_id = None
+ for user in users:
+ companies[user.id] = []
+ company = None
if user.company:
- company_id = user.company.id
+ company = user.company
elif user.main_company:
- company_id = user.main_company.id
- if company_id:
- if company_id in company_childs:
- company_ids = company_childs[company_id]
+ company = user.main_company
+ if company:
+ if company in company_childs:
+ company_ids = company_childs[company]
else:
- company_ids = company_obj.search([
- ('parent', 'child_of', [company_id]),
- ])
- company_childs[company_id] = company_ids
+ company_ids = map(int, Company.search([
+ ('parent', 'child_of', [company.id]),
+ ]))
+ company_childs[company] = company_ids
if company_ids:
- res[user.id].extend(company_ids)
- return res
+ companies[user.id].extend(company_ids)
+ return companies
- def get_status_bar(self, ids, name):
- res = super(User, self).get_status_bar(ids, name)
- for user in self.browse(ids):
- if user.company:
- res[user.id] += ' - %s [%s]' % (user.company.name,
- user.company.currency.name)
- return res
+ def get_status_bar(self, name):
+ status = super(User, self).get_status_bar(name)
+ if self.company:
+ status += ' - %s [%s]' % (self.company.name,
+ self.company.currency.name)
+ return status
- def on_change_main_company(self, vals):
+ def on_change_main_company(self):
return {
- 'company': vals.get('main_company'),
+ 'company': self.main_company.id if self.main_company else None,
'employee': None,
}
- def on_change_company(self, values):
- employee_obj = Pool().get('company.employee')
+ def on_change_company(self):
+ Employee = Pool().get('company.employee')
result = {
'employee': None,
}
- if values.get('company') and values.get('employees'):
- employee_ids = employee_obj.search([
- ('id', 'in', [e['id'] for e in values['employees']]),
- ('company', '=', values['company']),
+ if self.company and self.employees:
+ employees = Employee.search([
+ ('id', 'in', [e.id for e in self.employees]),
+ ('company', '=', self.company.id),
])
- if employee_ids:
- result['employee'] = employee_ids[0]
+ if employees:
+ result['employee'] = employees[0].id
return result
- def _get_preferences(self, user, context_only=False):
- res = super(User, self)._get_preferences(user,
- context_only=context_only)
+ @classmethod
+ def _get_preferences(cls, user, context_only=False):
+ res = super(User, cls)._get_preferences(user,
+ context_only=context_only)
if not context_only:
- res['main_company'] = user.main_company.id
- if user.main_company.id:
+ res['main_company'] = None
+ if user.main_company:
+ res['main_company'] = user.main_company.id
res['main_company.rec_name'] = user.main_company.rec_name
res['employees'] = [e.id for e in user.employees]
if user.employee:
- res['employee'] = user.employee.id
- if user.employee.id:
+ res['employee'] = None
+ if user.employee:
+ res['employee'] = user.employee.id
res['employee.rec_name'] = user.employee.rec_name
return res
- def get_preferences_fields_view(self):
+ @classmethod
+ def get_preferences_fields_view(cls):
pool = Pool()
- company_obj = pool.get('company.company')
+ Company = pool.get('company.company')
- res = super(User, self).get_preferences_fields_view()
+ res = super(User, cls).get_preferences_fields_view()
res = copy.deepcopy(res)
def convert2selection(definition, name):
@@ -196,114 +193,105 @@ class User(ModelSQL, ModelView):
if 'company' in res['fields']:
selection = convert2selection(res['fields'], 'company')
- user = self.browse(Transaction().user)
- company_ids = company_obj.search([
- ('parent', 'child_of', [user.main_company.id], 'parent'),
- ])
- for company in company_obj.browse(company_ids):
- selection.append((company.id, company.rec_name))
+ user = cls(Transaction().user)
+ if user.main_company:
+ companies = Company.search([
+ ('parent', 'child_of', [user.main_company.id],
+ 'parent'),
+ ])
+ for company in companies:
+ selection.append((company.id, company.rec_name))
return res
- def read(self, ids, fields_names=None):
- company_obj = Pool().get('company.company')
+ @classmethod
+ def read(cls, ids, fields_names=None):
+ Company = Pool().get('company.company')
user_id = Transaction().user
if user_id == 0 and 'user' in Transaction().context:
user_id = Transaction().context['user']
- result = super(User, self).read(ids, fields_names=fields_names)
+ result = super(User, cls).read(ids, fields_names=fields_names)
if (fields_names
and 'company' in fields_names
and 'company' in Transaction().context):
values = None
- if isinstance(ids, (int, long)):
- if int(user_id) == ids:
- values = result
- else:
- if int(user_id) in ids:
- for vals in result:
- if vals['id'] == int(user_id):
- values = vals
- break
+ if int(user_id) in ids:
+ for vals in result:
+ if vals['id'] == int(user_id):
+ values = vals
+ break
if values:
main_company_id = values.get('main_company')
if not main_company_id:
- main_company_id = self.read(user_id,
- ['main_company'])['main_company']
- companies = company_obj.search([
- ('parent', 'child_of', [main_company_id]),
- ])
+ main_company_id = cls.read([user_id],
+ ['main_company'])[0]['main_company']
+ companies = Company.search([
+ ('parent', 'child_of', [main_company_id]),
+ ])
company_id = Transaction().context['company']
- if ((company_id and company_id in companies)
+ if ((company_id and company_id in map(int, companies))
or not company_id):
values['company'] = company_id
return result
-User()
-
-class Property(ModelSQL, ModelView):
- _name = 'ir.property'
+class Property:
+ __name__ = 'ir.property'
company = fields.Many2One('company.company', 'Company',
domain=[
('id', If(Eval('context', {}).contains('company'), '=', '!='),
Eval('context', {}).get('company', 0)),
])
- def _set_values(self, model, res_id, val, field_id):
- user_obj = Pool().get('res.user')
+ @classmethod
+ def _set_values(cls, model, res_id, val, field_id):
+ User = Pool().get('res.user')
user_id = Transaction().user
if user_id == 0:
user_id = Transaction().context.get('user', user_id)
- user = user_obj.browse(user_id)
- res = super(Property, self)._set_values(model, res_id, val, field_id)
- if user:
+ user = User(user_id)
+ res = super(Property, cls)._set_values(model, res_id, val, field_id)
+ if user and user.company:
res['company'] = user.company.id
return res
- def search(self, domain, offset=0, limit=None, order=None, count=False):
+ @classmethod
+ def search(cls, domain, offset=0, limit=None, order=None, count=False):
if Transaction().user == 0 and not 'user' in Transaction().context:
domain = ['AND', domain[:], ('company', '=', None)]
- return super(Property, self).search(domain, offset=offset,
+ return super(Property, cls).search(domain, offset=offset,
limit=limit, order=order, count=count)
-Property()
-
-class Sequence(ModelSQL, ModelView):
- _name = 'ir.sequence'
+class Sequence:
+ __name__ = 'ir.sequence'
company = fields.Many2One('company.company', 'Company',
domain=[
('id', If(Eval('context', {}).contains('company'), '=', '!='),
Eval('context', {}).get('company', 0)),
])
- def __init__(self):
- super(Sequence, self).__init__()
- self._order.insert(0, ('company', 'ASC'))
+ @classmethod
+ def __setup__(cls):
+ super(Sequence, cls).__setup__()
+ cls._order.insert(0, ('company', 'ASC'))
- def default_company(self):
+ @staticmethod
+ def default_company():
return Transaction().context.get('company')
-Sequence()
-
class SequenceStrict(Sequence):
- _name = 'ir.sequence.strict'
-
-SequenceStrict()
+ __name__ = 'ir.sequence.strict'
class CompanyConfigStart(ModelView):
'Company Config'
- _name = 'company.company.config.start'
- _description = __doc__
-
-CompanyConfigStart()
+ __name__ = 'company.company.config.start'
class CompanyConfig(Wizard):
'Configure Company'
- _name = 'company.company.config'
-
+ __name__ = 'company.company.config'
start = StateView('company.company.config.start',
'company.company_config_start_view_form', [
Button('Cancel', 'end', 'tryton-cancel'),
@@ -316,48 +304,29 @@ class CompanyConfig(Wizard):
])
add = StateTransition()
- def transition_add(self, session):
- company_obj = Pool().get('company.company')
- user_obj = Pool().get('res.user')
-
- values = session.data['company'].copy()
- for fname in values.keys():
- if fname in ('id', 'party'):
- del values[fname]
- continue
- if fname in company_obj._columns:
- field = company_obj._columns[fname]
- else:
- field = company_obj._inherit_fields[fname][2]
- if field._type == 'one2many':
- values[fname] = [('create', v) for v in values[fname]]
- elif field._type == 'many2many':
- values[fname] = [('set', [v['id'] for v in values[fname]])]
- company_id = company_obj.create(values)
- user_ids = user_obj.search([
- ('main_company', '=', None),
- ])
- user_obj.write(user_ids, {
- 'main_company': company_id,
- 'company': company_id,
- })
- return 'end'
+ def transition_add(self):
+ User = Pool().get('res.user')
-CompanyConfig()
+ self.company.save()
+ users = User.search([
+ ('main_company', '=', None),
+ ])
+ User.write(users, {
+ 'main_company': self.company.id,
+ 'company': self.company.id,
+ })
+ return 'end'
class CompanyReport(Report):
- def parse(self, report, objects, datas, localcontext=None):
- user = Pool().get('res.user').browse(Transaction().user)
- if localcontext is None:
- localcontext = {}
+ @classmethod
+ def parse(cls, report, records, data, localcontext):
+ user = Pool().get('res.user')(Transaction().user)
localcontext['company'] = user.company
- return super(CompanyReport, self).parse(report, objects, datas,
- localcontext=localcontext)
+ return super(CompanyReport, cls).parse(report, records, data,
+ localcontext)
class LetterReport(CompanyReport):
- _name = 'party.letter'
-
-LetterReport()
+ __name__ = 'party.letter'
diff --git a/cron.py b/cron.py
index 4d91ace..35ceb00 100644
--- a/cron.py
+++ b/cron.py
@@ -1,45 +1,48 @@
#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.pool import Pool
+from trytond.model import ModelSQL, fields
+from trytond.pool import Pool, PoolMeta
+from trytond.transaction import Transaction
-class Cron(ModelSQL, ModelView):
- "Cron"
- _name = "ir.cron"
+__all__ = ['Cron', 'CronCompany']
+__metaclass__ = PoolMeta
+
+
+class Cron:
+ __name__ = "ir.cron"
companies = fields.Many2Many('ir.cron-company.company', 'cron', 'company',
'Companies', help='Companies registered for this cron')
- def _callback(self, cron):
- user_obj = Pool().get('res.user')
+ @classmethod
+ def _callback(cls, cron):
+ User = Pool().get('res.user')
if not cron.companies:
- return super(Cron, self)._callback(cron)
+ return super(Cron, cls)._callback(cron)
# TODO replace with context
for company in cron.companies:
- user_obj.write(cron.user.id, {
- 'company': company.id,
- 'main_company': company.id,
- })
- super(Cron, self)._callback(cron)
- user_obj.write(cron.user.id, {
- 'company': None,
- 'main_company': None,
- })
-
- def default_companies(self):
- company_obj = Pool().get('company.company')
- return company_obj.search([])
-
-Cron()
+ User.write([cron.user], {
+ 'company': company.id,
+ 'main_company': company.id,
+ })
+ with Transaction().set_context(company=company.id):
+ super(Cron, cls)._callback(cron)
+ User.write([cron.user], {
+ 'company': None,
+ 'main_company': None,
+ })
+
+ @staticmethod
+ def default_companies():
+ Company = Pool().get('company.company')
+ return map(int, Company.search([]))
class CronCompany(ModelSQL):
'Cron - Company'
- _name = 'ir.cron-company.company'
+ __name__ = 'ir.cron-company.company'
_table = 'cron_company_rel'
cron = fields.Many2One('ir.cron', 'Cron', ondelete='CASCADE',
required=True, select=True)
company = fields.Many2One('company.company', 'Company', ondelete='CASCADE',
required=True, select=True)
-
-CronCompany()
diff --git a/header_A4.odt b/header_A4.odt
index d3f3fc4..57cd546 100644
Binary files a/header_A4.odt and b/header_A4.odt differ
diff --git a/locale/bg_BG.po b/locale/bg_BG.po
index bee7e8a..462b5cb 100644
--- a/locale/bg_BG.po
+++ b/locale/bg_BG.po
@@ -8,7 +8,7 @@ msgstr "Не може да създавате взаимно вложени фи
msgctxt "field:company.company,childs:"
msgid "Children"
-msgstr "Деца"
+msgstr "Наследници"
msgctxt "field:company.company,create_date:"
msgid "Create Date"
@@ -150,8 +150,9 @@ msgctxt "field:res.user,company:"
msgid "Current Company"
msgstr "Текуща фирма"
+#, fuzzy
msgctxt "field:res.user,employee:"
-msgid "Employee"
+msgid "Current Employee"
msgstr "Служител"
msgctxt "field:res.user,employees:"
@@ -204,7 +205,7 @@ msgstr "Фирма"
msgctxt "model:company.company.config.start,name:"
msgid "Company Config"
-msgstr ""
+msgstr "Конфигуриране на фирма"
msgctxt "model:company.employee,name:"
msgid "Employee"
@@ -212,7 +213,7 @@ msgstr "Служител"
msgctxt "model:ir.action,name:act_company_config"
msgid "Configure Company"
-msgstr ""
+msgstr "Конфигуриране на фирма"
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
@@ -231,7 +232,7 @@ msgid "Letter"
msgstr "Писмо"
msgctxt "model:ir.cron-company.company,name:"
-msgid "ir.cron-company.company"
+msgid "Cron - Company"
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_company_list"
@@ -248,7 +249,7 @@ msgstr "Служители"
msgctxt "model:res.user-company.employee,name:"
msgid "User - Employee"
-msgstr ""
+msgstr "Потребител - Служител"
msgctxt "odt:party.letter:"
msgid "Best Regards,"
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 495fc61..94867d7 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -12,16 +12,15 @@ msgstr "Fills"
msgctxt "field:company.company,create_date:"
msgid "Create Date"
-msgstr ""
+msgstr "Data creació"
-#, fuzzy
msgctxt "field:company.company,create_uid:"
msgid "Create User"
-msgstr "Crear usuari"
+msgstr "Usuari creació"
msgctxt "field:company.company,currency:"
msgid "Currency"
-msgstr "Divisa"
+msgstr "Moneda"
msgctxt "field:company.company,employees:"
msgid "Employees"
@@ -37,7 +36,7 @@ msgstr "Encapçalat"
msgctxt "field:company.company,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
msgctxt "field:company.company,parent:"
msgid "Parent"
@@ -53,15 +52,15 @@ msgstr "Nom"
msgctxt "field:company.company,write_date:"
msgid "Write Date"
-msgstr ""
+msgstr "Data modificació"
msgctxt "field:company.company,write_uid:"
msgid "Write User"
-msgstr ""
+msgstr "Usuari modificació"
msgctxt "field:company.company.config.start,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
msgctxt "field:company.employee,company:"
msgid "Company"
@@ -69,16 +68,15 @@ msgstr "Empresa"
msgctxt "field:company.employee,create_date:"
msgid "Create Date"
-msgstr ""
+msgstr "Data creació"
-#, fuzzy
msgctxt "field:company.employee,create_uid:"
msgid "Create User"
-msgstr "Crear usuari"
+msgstr "Usuari creació"
msgctxt "field:company.employee,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
msgctxt "field:company.employee,party:"
msgid "Party"
@@ -90,11 +88,11 @@ msgstr "Nom"
msgctxt "field:company.employee,write_date:"
msgid "Write Date"
-msgstr ""
+msgstr "Data modificació"
msgctxt "field:company.employee,write_uid:"
msgid "Write User"
-msgstr ""
+msgstr "Usuari modificació"
msgctxt "field:ir.cron,companies:"
msgid "Companies"
@@ -106,20 +104,19 @@ msgstr "Empresa"
msgctxt "field:ir.cron-company.company,create_date:"
msgid "Create Date"
-msgstr ""
+msgstr "Data creació"
-#, fuzzy
msgctxt "field:ir.cron-company.company,create_uid:"
msgid "Create User"
-msgstr "Crear usuari"
+msgstr "Usuari creació"
msgctxt "field:ir.cron-company.company,cron:"
msgid "Cron"
-msgstr "Programador de tasques"
+msgstr "Planificador de tasques"
msgctxt "field:ir.cron-company.company,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
msgctxt "field:ir.cron-company.company,rec_name:"
msgid "Name"
@@ -127,11 +124,11 @@ msgstr "Nom"
msgctxt "field:ir.cron-company.company,write_date:"
msgid "Write Date"
-msgstr ""
+msgstr "Data modificació"
msgctxt "field:ir.cron-company.company,write_uid:"
msgid "Write User"
-msgstr ""
+msgstr "Usuari modificació"
msgctxt "field:ir.property,company:"
msgid "Company"
@@ -154,10 +151,9 @@ msgid "Current Company"
msgstr "Empresa actual"
msgctxt "field:res.user,employee:"
-msgid "Employee"
+msgid "Current Employee"
msgstr "Empleat"
-#, fuzzy
msgctxt "field:res.user,employees:"
msgid "Employees"
msgstr "Empleats"
@@ -168,43 +164,39 @@ msgstr "Empresa principal"
msgctxt "field:res.user-company.employee,create_date:"
msgid "Create Date"
-msgstr ""
+msgstr "Data creació"
-#, fuzzy
msgctxt "field:res.user-company.employee,create_uid:"
msgid "Create User"
-msgstr "Crear usuari"
+msgstr "Usuari creació"
-#, fuzzy
msgctxt "field:res.user-company.employee,employee:"
msgid "Employee"
msgstr "Empleat"
msgctxt "field:res.user-company.employee,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
-#, fuzzy
msgctxt "field:res.user-company.employee,rec_name:"
msgid "Name"
-msgstr "Nom del camp"
+msgstr "Nom"
-#, fuzzy
msgctxt "field:res.user-company.employee,user:"
msgid "User"
msgstr "Usuari"
msgctxt "field:res.user-company.employee,write_date:"
msgid "Write Date"
-msgstr ""
+msgstr "Data modificació"
msgctxt "field:res.user-company.employee,write_uid:"
msgid "Write User"
-msgstr ""
+msgstr "Usuari modificació"
msgctxt "help:ir.cron,companies:"
msgid "Companies registered for this cron"
-msgstr "Empreses registrades en aquest programador de tasques"
+msgstr "Empreses registrades en aquest planificador"
msgctxt "model:company.company,name:"
msgid "Company"
@@ -212,7 +204,7 @@ msgstr "Empresa"
msgctxt "model:company.company.config.start,name:"
msgid "Company Config"
-msgstr ""
+msgstr "Configuració empresa"
msgctxt "model:company.employee,name:"
msgid "Employee"
@@ -220,9 +212,8 @@ msgstr "Empleat"
msgctxt "model:ir.action,name:act_company_config"
msgid "Configure Company"
-msgstr ""
+msgstr "Configura la seva empresa"
-#, fuzzy
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
msgstr "Empreses"
@@ -240,10 +231,9 @@ msgid "Letter"
msgstr "Carta"
msgctxt "model:ir.cron-company.company,name:"
-msgid "ir.cron-company.company"
-msgstr "ir.cron-company.company"
+msgid "Cron - Company"
+msgstr "Cron - Empresa"
-#, fuzzy
msgctxt "model:ir.ui.menu,name:menu_company_list"
msgid "Companies"
msgstr "Empreses"
@@ -258,7 +248,7 @@ msgstr "Empleats"
msgctxt "model:res.user-company.employee,name:"
msgid "User - Employee"
-msgstr ""
+msgstr "Usuari - Emprat"
msgctxt "odt:party.letter:"
msgid "Best Regards,"
@@ -286,15 +276,15 @@ msgstr "Assumpte:"
msgctxt "odt:party.letter:"
msgid "VAT Number:"
-msgstr ""
+msgstr "Nombre CIF/NIF:"
msgctxt "view:company.company.config.start:"
msgid "Create Company"
-msgstr ""
+msgstr "Ara pot afegir la seva empresa en el sistema."
msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
-msgstr ""
+msgstr "Ara pot afegir la seva empresa en el sistema."
msgctxt "view:company.company:"
msgid "Addresses"
@@ -338,18 +328,16 @@ msgstr "General"
msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
-msgstr "Afegir"
+msgstr "Afegeix"
msgctxt "wizard_button:company.company.config,company,end:"
msgid "Cancel"
-msgstr "Cancel·lar"
+msgstr "Cancel·la"
-#, fuzzy
msgctxt "wizard_button:company.company.config,start,company:"
msgid "Ok"
-msgstr "Acceptar"
+msgstr "Accepta"
-#, fuzzy
msgctxt "wizard_button:company.company.config,start,end:"
msgid "Cancel"
-msgstr "Cancel·lar"
+msgstr "Cancel·la"
diff --git a/locale/cs_CZ.po b/locale/cs_CZ.po
index c31d3f3..f05e8dc 100644
--- a/locale/cs_CZ.po
+++ b/locale/cs_CZ.po
@@ -151,7 +151,7 @@ msgid "Current Company"
msgstr ""
msgctxt "field:res.user,employee:"
-msgid "Employee"
+msgid "Current Employee"
msgstr ""
msgctxt "field:res.user,employees:"
@@ -231,7 +231,7 @@ msgid "Letter"
msgstr ""
msgctxt "model:ir.cron-company.company,name:"
-msgid "ir.cron-company.company"
+msgid "Cron - Company"
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_company_list"
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 6211880..150b750 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -151,8 +151,8 @@ msgid "Current Company"
msgstr "Aktuelles Unternehmen"
msgctxt "field:res.user,employee:"
-msgid "Employee"
-msgstr "Mitarbeiter"
+msgid "Current Employee"
+msgstr "Aktueller Mitarbeiter"
msgctxt "field:res.user,employees:"
msgid "Employees"
@@ -231,8 +231,8 @@ msgid "Letter"
msgstr "Brief"
msgctxt "model:ir.cron-company.company,name:"
-msgid "ir.cron-company.company"
-msgstr "ir.cron-company.company"
+msgid "Cron - Company"
+msgstr "Zeitplaner - Unternehmen"
msgctxt "model:ir.ui.menu,name:menu_company_list"
msgid "Companies"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index bfe49fd..9fbe5b6 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -151,8 +151,8 @@ msgid "Current Company"
msgstr "Empresa actual"
msgctxt "field:res.user,employee:"
-msgid "Employee"
-msgstr "Empleado"
+msgid "Current Employee"
+msgstr "Empleado actual"
msgctxt "field:res.user,employees:"
msgid "Employees"
@@ -231,8 +231,8 @@ msgid "Letter"
msgstr "Carta"
msgctxt "model:ir.cron-company.company,name:"
-msgid "ir.cron-company.company"
-msgstr "ir.cron-company.company"
+msgid "Cron - Company"
+msgstr "Programador de tareas - Empresa"
msgctxt "model:ir.ui.menu,name:menu_company_list"
msgid "Companies"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index e688aa8..c77dff9 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -4,20 +4,19 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:company.company:"
msgid "You can not create recursive companies!"
-msgstr "No puede crear compañías recursivas!"
+msgstr "¡No puede crear compañias recursivas!"
msgctxt "field:company.company,childs:"
msgid "Children"
-msgstr "Hij at s"
+msgstr "Hijos"
msgctxt "field:company.company,create_date:"
msgid "Create Date"
-msgstr ""
+msgstr "Fecha de Creación"
-#, fuzzy
msgctxt "field:company.company,create_uid:"
msgid "Create User"
-msgstr "Crear usuario"
+msgstr "Creado por Usuario"
msgctxt "field:company.company,currency:"
msgid "Currency"
@@ -37,7 +36,7 @@ msgstr "Encabezado"
msgctxt "field:company.company,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
msgctxt "field:company.company,parent:"
msgid "Parent"
@@ -53,32 +52,31 @@ msgstr "Nombre"
msgctxt "field:company.company,write_date:"
msgid "Write Date"
-msgstr ""
+msgstr "Fecha de Modificación"
msgctxt "field:company.company,write_uid:"
msgid "Write User"
-msgstr ""
+msgstr "Modificado por Usuario"
msgctxt "field:company.company.config.start,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
msgctxt "field:company.employee,company:"
msgid "Company"
-msgstr "Compañía"
+msgstr "Compañia"
msgctxt "field:company.employee,create_date:"
msgid "Create Date"
-msgstr ""
+msgstr "Fecha de Creación"
-#, fuzzy
msgctxt "field:company.employee,create_uid:"
msgid "Create User"
-msgstr "Crear usuario"
+msgstr "Creado por Usuario"
msgctxt "field:company.employee,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
msgctxt "field:company.employee,party:"
msgid "Party"
@@ -90,36 +88,35 @@ msgstr "Nombre"
msgctxt "field:company.employee,write_date:"
msgid "Write Date"
-msgstr ""
+msgstr "Fecha de Modificación"
msgctxt "field:company.employee,write_uid:"
msgid "Write User"
-msgstr ""
+msgstr "Modificado por Usuario"
msgctxt "field:ir.cron,companies:"
msgid "Companies"
-msgstr "Compañías"
+msgstr "compañias"
msgctxt "field:ir.cron-company.company,company:"
msgid "Company"
-msgstr "Compañía"
+msgstr "Compañia"
msgctxt "field:ir.cron-company.company,create_date:"
msgid "Create Date"
-msgstr ""
+msgstr "Fecha de Creación"
-#, fuzzy
msgctxt "field:ir.cron-company.company,create_uid:"
msgid "Create User"
-msgstr "Crear usuario"
+msgstr "Creado por Usuario"
msgctxt "field:ir.cron-company.company,cron:"
msgid "Cron"
-msgstr "Agendador"
+msgstr "Programador de tareas"
msgctxt "field:ir.cron-company.company,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
msgctxt "field:ir.cron-company.company,rec_name:"
msgid "Name"
@@ -127,92 +124,88 @@ msgstr "Nombre"
msgctxt "field:ir.cron-company.company,write_date:"
msgid "Write Date"
-msgstr ""
+msgstr "Fecha de Modificación"
msgctxt "field:ir.cron-company.company,write_uid:"
msgid "Write User"
-msgstr ""
+msgstr "Modificado por Usuario"
msgctxt "field:ir.property,company:"
msgid "Company"
-msgstr "Compañía"
+msgstr "Compañia"
msgctxt "field:ir.sequence,company:"
msgid "Company"
-msgstr "Compañía"
+msgstr "Compañia"
msgctxt "field:ir.sequence.strict,company:"
msgid "Company"
-msgstr "Compañía"
+msgstr "Compañia"
msgctxt "field:res.user,companies:"
msgid "Current Companies"
-msgstr "Compañías en Curso"
+msgstr "Compañias actuales"
msgctxt "field:res.user,company:"
msgid "Current Company"
-msgstr "Compañía Actual"
+msgstr "Compañia actual"
+#, fuzzy
msgctxt "field:res.user,employee:"
-msgid "Employee"
+msgid "Current Employee"
msgstr "Empleado"
-#, fuzzy
msgctxt "field:res.user,employees:"
msgid "Employees"
msgstr "Empleados"
msgctxt "field:res.user,main_company:"
msgid "Main Company"
-msgstr "Compañía Principal"
+msgstr "Compañia principal"
msgctxt "field:res.user-company.employee,create_date:"
msgid "Create Date"
-msgstr ""
+msgstr "Fecha de Creación"
-#, fuzzy
msgctxt "field:res.user-company.employee,create_uid:"
msgid "Create User"
-msgstr "Crear usuario"
+msgstr "Creado por Usuario"
-#, fuzzy
msgctxt "field:res.user-company.employee,employee:"
msgid "Employee"
msgstr "Empleado"
msgctxt "field:res.user-company.employee,id:"
msgid "ID"
-msgstr ""
+msgstr "ID"
-#, fuzzy
msgctxt "field:res.user-company.employee,rec_name:"
msgid "Name"
-msgstr "Nombre de Contacto"
+msgstr "Nombre"
-#, fuzzy
msgctxt "field:res.user-company.employee,user:"
msgid "User"
msgstr "Usuario"
msgctxt "field:res.user-company.employee,write_date:"
msgid "Write Date"
-msgstr ""
+msgstr "Fecha de Modificación"
msgctxt "field:res.user-company.employee,write_uid:"
msgid "Write User"
-msgstr ""
+msgstr "Modificado por Usuario"
msgctxt "help:ir.cron,companies:"
msgid "Companies registered for this cron"
-msgstr "Compañías registradas para este lanzador"
+msgstr "compañias registradas en este programador de tareas"
msgctxt "model:company.company,name:"
msgid "Company"
-msgstr "Compañía"
+msgstr "Compañia"
msgctxt "model:company.company.config.start,name:"
msgid "Company Config"
-msgstr ""
+msgstr "Configuración de Compañia"
msgctxt "model:company.employee,name:"
msgid "Employee"
@@ -220,16 +213,15 @@ msgstr "Empleado"
msgctxt "model:ir.action,name:act_company_config"
msgid "Configure Company"
-msgstr ""
+msgstr "Configurar Compañia"
-#, fuzzy
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
-msgstr "Compañías"
+msgstr "Compañias"
msgctxt "model:ir.action,name:act_company_tree"
msgid "Companies"
-msgstr "Compañías"
+msgstr "Compañias"
msgctxt "model:ir.action,name:act_employee_form"
msgid "Employees"
@@ -239,18 +231,18 @@ msgctxt "model:ir.action,name:report_letter"
msgid "Letter"
msgstr "Carta"
+#, fuzzy
msgctxt "model:ir.cron-company.company,name:"
-msgid "ir.cron-company.company"
+msgid "Cron - Company"
msgstr "ir.cron-company.company"
-#, fuzzy
msgctxt "model:ir.ui.menu,name:menu_company_list"
msgid "Companies"
-msgstr "Compañías"
+msgstr "Compañias"
msgctxt "model:ir.ui.menu,name:menu_company_tree"
msgid "Companies"
-msgstr "Compañías"
+msgstr "Compañias"
msgctxt "model:ir.ui.menu,name:menu_employee_form"
msgid "Employees"
@@ -258,7 +250,7 @@ msgstr "Empleados"
msgctxt "model:res.user-company.employee,name:"
msgid "User - Employee"
-msgstr ""
+msgstr "Usuario - Empleado"
msgctxt "odt:party.letter:"
msgid "Best Regards,"
@@ -270,7 +262,7 @@ msgstr "Fecha:"
msgctxt "odt:party.letter:"
msgid "Dear Madams and Sirs,"
-msgstr "Estimados Señoras y Señores,"
+msgstr "Estimados señores y señoras,"
msgctxt "odt:party.letter:"
msgid "E-Mail:"
@@ -282,19 +274,19 @@ msgstr "Teléfono:"
msgctxt "odt:party.letter:"
msgid "Subject:"
-msgstr "Título:"
+msgstr "Asunto:"
msgctxt "odt:party.letter:"
msgid "VAT Number:"
-msgstr ""
+msgstr "NIT:"
msgctxt "view:company.company.config.start:"
msgid "Create Company"
-msgstr ""
+msgstr "Crear una Compañia"
msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
-msgstr ""
+msgstr "Ahora puede añadir su compañia al sistema."
msgctxt "view:company.company:"
msgid "Addresses"
@@ -302,11 +294,11 @@ msgstr "Direcciones"
msgctxt "view:company.company:"
msgid "Companies"
-msgstr "Compañías"
+msgstr "Compañias"
msgctxt "view:company.company:"
msgid "Company"
-msgstr "Compañía"
+msgstr "Compañia"
msgctxt "view:company.company:"
msgid "Employees"
@@ -318,7 +310,7 @@ msgstr "General"
msgctxt "view:company.company:"
msgid "Reports"
-msgstr "Reportes"
+msgstr "Informes"
msgctxt "view:company.employee:"
msgid "Addresses"
@@ -338,18 +330,16 @@ msgstr "General"
msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
-msgstr "Adicionar"
+msgstr "Añadir"
msgctxt "wizard_button:company.company.config,company,end:"
msgid "Cancel"
msgstr "Cancelar"
-#, fuzzy
msgctxt "wizard_button:company.company.config,start,company:"
msgid "Ok"
msgstr "Aceptar"
-#, fuzzy
msgctxt "wizard_button:company.company.config,start,end:"
msgid "Cancel"
msgstr "Cancelar"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index c3843cd..9902af6 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -20,7 +20,7 @@ msgstr "Usuario creación"
msgctxt "field:company.company,currency:"
msgid "Currency"
-msgstr "Divisa"
+msgstr "Moneda"
msgctxt "field:company.company,employees:"
msgid "Employees"
@@ -112,7 +112,7 @@ msgstr "Usuario creación"
msgctxt "field:ir.cron-company.company,cron:"
msgid "Cron"
-msgstr "Planificador"
+msgstr "Planificador de tareas"
msgctxt "field:ir.cron-company.company,id:"
msgid "ID"
@@ -151,8 +151,8 @@ msgid "Current Company"
msgstr "Empresa actual"
msgctxt "field:res.user,employee:"
-msgid "Employee"
-msgstr "Empleado"
+msgid "Current Employee"
+msgstr "Empleado actual"
msgctxt "field:res.user,employees:"
msgid "Employees"
@@ -212,7 +212,7 @@ msgstr "Empleado"
msgctxt "model:ir.action,name:act_company_config"
msgid "Configure Company"
-msgstr "Configuración empresa"
+msgstr "Configura su empresa"
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
@@ -231,8 +231,8 @@ msgid "Letter"
msgstr "Carta"
msgctxt "model:ir.cron-company.company,name:"
-msgid "ir.cron-company.company"
-msgstr "ir.cron-company.company"
+msgid "Cron - Company"
+msgstr "Cron - Empresa"
msgctxt "model:ir.ui.menu,name:menu_company_list"
msgid "Companies"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 7fc0410..1056ef3 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -148,15 +148,15 @@ msgstr "Société"
msgctxt "field:res.user,companies:"
msgid "Current Companies"
-msgstr "Sociétés courantes"
+msgstr "Sociétés actuelles"
msgctxt "field:res.user,company:"
msgid "Current Company"
-msgstr "Société courante"
+msgstr "Société actuelle"
msgctxt "field:res.user,employee:"
-msgid "Employee"
-msgstr "Employé"
+msgid "Current Employee"
+msgstr "Employé actuel"
msgctxt "field:res.user,employees:"
msgid "Employees"
@@ -235,7 +235,7 @@ msgid "Letter"
msgstr "Lettre"
msgctxt "model:ir.cron-company.company,name:"
-msgid "ir.cron-company.company"
+msgid "Cron - Company"
msgstr ""
msgctxt "model:ir.ui.menu,name:menu_company_list"
diff --git a/locale/nl_NL.po b/locale/nl_NL.po
index 2d548e8..b45de45 100644
--- a/locale/nl_NL.po
+++ b/locale/nl_NL.po
@@ -150,8 +150,9 @@ msgctxt "field:res.user,company:"
msgid "Current Company"
msgstr "Huidig bedrijf"
+#, fuzzy
msgctxt "field:res.user,employee:"
-msgid "Employee"
+msgid "Current Employee"
msgstr "Werknemer"
#, fuzzy
@@ -236,7 +237,7 @@ msgid "Letter"
msgstr "Brief"
msgctxt "model:ir.cron-company.company,name:"
-msgid "ir.cron-company.company"
+msgid "Cron - Company"
msgstr ""
#, fuzzy
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
index 7838413..4c12f7a 100644
--- a/locale/ru_RU.po
+++ b/locale/ru_RU.po
@@ -150,8 +150,9 @@ msgctxt "field:res.user,company:"
msgid "Current Company"
msgstr "Текущая организация"
+#, fuzzy
msgctxt "field:res.user,employee:"
-msgid "Employee"
+msgid "Current Employee"
msgstr "Сотрудник"
#, fuzzy
@@ -235,8 +236,9 @@ msgctxt "model:ir.action,name:report_letter"
msgid "Letter"
msgstr "Письмо"
+#, fuzzy
msgctxt "model:ir.cron-company.company,name:"
-msgid "ir.cron-company.company"
+msgid "Cron - Company"
msgstr "Планировщик"
#, fuzzy
diff --git a/party.py b/party.py
index b6d5ff0..5444005 100644
--- a/party.py
+++ b/party.py
@@ -1,21 +1,20 @@
#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 Model
from trytond.pyson import Eval
+from trytond.pool import PoolMeta
+__all__ = ['PartyConfiguration']
+__metaclass__ = PoolMeta
-class Configuration(Model):
- _name = 'party.configuration'
- def __init__(self):
- super(Configuration, self).__init__()
+class PartyConfiguration:
+ __name__ = 'party.configuration'
- self.party_sequence = copy.copy(self.party_sequence)
- self.party_sequence.domain = copy.copy(self.party_sequence.domain)
- self.party_sequence.domain = [
- self.party_sequence.domain,
- ('company', 'in', [Eval('context', {}).get('company'), None])]
+ @classmethod
+ def __setup__(cls):
+ super(PartyConfiguration, cls).__setup__()
-Configuration()
+ cls.party_sequence.domain = [
+ cls.party_sequence.domain,
+ ('company', 'in', [Eval('context', {}).get('company'), None]),
+ ]
diff --git a/setup.py b/setup.py
index f08af25..d81e4ee 100644
--- a/setup.py
+++ b/setup.py
@@ -4,8 +4,19 @@
from setuptools import setup
import re
+import os
+import ConfigParser
-info = eval(open('__tryton__.py').read())
+
+def read(fname):
+ return open(os.path.join(os.path.dirname(__file__), fname)).read()
+
+config = ConfigParser.ConfigParser()
+config.readfp(open('tryton.cfg'))
+info = dict(config.items('tryton'))
+for key in ('depends', 'extras_depend', 'xml'):
+ if key in info:
+ info[key] = info[key].strip().splitlines()
major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
@@ -21,22 +32,21 @@ requires.append('trytond >= %s.%s, < %s.%s' %
setup(name='trytond_company',
version=info.get('version', '0.0.1'),
- description=info.get('description', ''),
- author=info.get('author', ''),
- author_email=info.get('email', ''),
- url=info.get('website', ''),
+ description='Tryton module with companies and employees',
+ long_description=read('README'),
+ author='Tryton',
+ url='http://www.tryton.org/',
download_url="http://downloads.tryton.org/" + \
- info.get('version', '0.0.1').rsplit('.', 1)[0] + '/',
+ info.get('version', '0.0.1').rsplit('.', 1)[0] + '/',
package_dir={'trytond.modules.company': '.'},
packages=[
'trytond.modules.company',
'trytond.modules.company.tests',
- ],
+ ],
package_data={
'trytond.modules.company': info.get('xml', []) \
- + info.get('translation', []) \
- + ['header_A4.odt', 'letter.odt'],
- },
+ + ['tryton.cfg', 'locale/*.po', 'header_A4.odt', 'letter.odt'],
+ },
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
@@ -58,7 +68,7 @@ setup(name='trytond_company',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Office/Business',
- ],
+ ],
license='GPL-3',
install_requires=requires,
zip_safe=False,
@@ -68,4 +78,4 @@ setup(name='trytond_company',
""",
test_suite='tests',
test_loader='trytond.test_loader:Loader',
-)
+ )
diff --git a/tests/test_company.py b/tests/test_company.py
index 89eba51..304b473 100644
--- a/tests/test_company.py
+++ b/tests/test_company.py
@@ -45,15 +45,15 @@ class CompanyTestCase(unittest.TestCase):
'''
with Transaction().start(DB_NAME, USER,
context=CONTEXT) as transaction:
- currency1_id = self.currency.search([
- ('code', '=', 'cu1'),
- ], 0, 1, None)[0]
+ currency1, = self.currency.search([
+ ('code', '=', 'cu1'),
+ ], 0, 1, None)
- company1_id = self.company.create({
- 'name': 'B2CK',
- 'currency': currency1_id,
- })
- self.assert_(company1_id)
+ company1 = self.company.create({
+ 'name': 'B2CK',
+ 'currency': currency1.id,
+ })
+ self.assert_(company1)
transaction.cursor.commit()
def test0020company_recursion(self):
@@ -61,24 +61,24 @@ class CompanyTestCase(unittest.TestCase):
Test company recursion.
'''
with Transaction().start(DB_NAME, USER, context=CONTEXT):
- currency1_id = self.currency.search([
+ currency1, = self.currency.search([
('code', '=', 'cu1'),
- ], 0, 1, None)[0]
-
- company1_id = self.company.search([
- ('name', '=', 'B2CK'),
- ], 0, 1, None)[0]
-
- company2_id = self.company.create({
- 'name': 'B2CK Branch',
- 'parent': company1_id,
- 'currency': currency1_id,
- })
- self.assert_(company2_id)
-
- self.failUnlessRaises(Exception, self.company.write,
- company1_id, {
- 'parent': company2_id,
+ ], 0, 1, None)
+
+ company1, = self.company.search([
+ ('name', '=', 'B2CK'),
+ ], 0, 1, None)
+
+ company2 = self.company.create({
+ 'name': 'B2CK Branch',
+ 'parent': company1.id,
+ 'currency': currency1.id,
+ })
+ self.assert_(company2)
+
+ self.assertRaises(Exception, self.company.write,
+ [company1], {
+ 'parent': company2.id,
})
def test0030employe(self):
@@ -87,14 +87,14 @@ class CompanyTestCase(unittest.TestCase):
'''
with Transaction().start(DB_NAME, USER,
context=CONTEXT) as transaction:
- company1_id = self.company.search([
- ('name', '=', 'B2CK'),
- ], 0, 1, None)[0]
+ company1, = self.company.search([
+ ('name', '=', 'B2CK'),
+ ], 0, 1, None)
self.employee.create({
- 'name': 'Employee1',
- 'company': company1_id,
- })
+ 'name': 'Employee1',
+ 'company': company1.id,
+ })
transaction.cursor.commit()
def test0040user(self):
@@ -103,58 +103,47 @@ class CompanyTestCase(unittest.TestCase):
'''
with Transaction().start(DB_NAME, USER,
context=CONTEXT) as transaction:
- currency1_id = self.currency.search([
- ('code', '=', 'cu1'),
- ], 0, 1, None)[0]
-
- company1_id = self.company.search([
- ('name', '=', 'B2CK'),
- ], 0, 1, None)[0]
-
- company2_id = self.company.create({
- 'name': 'B2CK Branch',
- 'parent': company1_id,
- 'currency': currency1_id,
- })
- user1_id = self.user.create({
- 'name': 'Test 1',
- 'login': 'test1',
- 'main_company': company1_id,
- 'company': company1_id,
- })
- user2_id = self.user.create({
- 'name': 'Test 2',
- 'login': 'test2',
- 'main_company': company2_id,
- 'company': company2_id,
- })
- self.assert_(user1_id)
-
- with transaction.set_user(user1_id):
- company_id = self.user.read(user1_id, ['company'])['company']
- self.assertEqual(company_id, company1_id)
-
- user1, user2 = self.user.browse([user1_id, user2_id])
- self.assertEqual(user1.company.id, company1_id)
- self.assertEqual(user2.company.id, company2_id)
-
- with transaction.set_context({'company': company2_id}):
- company_id = self.user.read(user1_id,
- ['company'])['company']
- self.assertEqual(company_id, company2_id)
-
- user1, user2 = self.user.browse([user1_id, user2_id])
- self.assertEqual(user1.company.id, company2_id)
- self.assertEqual(user2.company.id, company2_id)
-
- with transaction.set_context({'company': False}):
- company_id = self.user.read(user1_id,
- ['company'])['company']
- self.assertEqual(company_id, False)
-
- user1, user2 = self.user.browse([user1_id, user2_id])
- self.assertEqual(user1.company.id, None)
- self.assertEqual(user2.company.id, company2_id)
+ currency1, = self.currency.search([
+ ('code', '=', 'cu1'),
+ ], 0, 1, None)
+
+ company1, = self.company.search([
+ ('name', '=', 'B2CK'),
+ ], 0, 1, None)
+
+ company2 = self.company.create({
+ 'name': 'B2CK Branch',
+ 'parent': company1.id,
+ 'currency': currency1.id,
+ })
+ user1 = self.user.create({
+ 'name': 'Test 1',
+ 'login': 'test1',
+ 'main_company': company1.id,
+ 'company': company1.id,
+ })
+ user2 = self.user.create({
+ 'name': 'Test 2',
+ 'login': 'test2',
+ 'main_company': company2.id,
+ 'company': company2.id,
+ })
+ self.assert_(user1)
+
+ with transaction.set_user(user1.id):
+ user1, user2 = self.user.browse([user1.id, user2.id])
+ self.assertEqual(user1.company, company1)
+ self.assertEqual(user2.company, company2)
+
+ with transaction.set_context({'company': company2.id}):
+ user1, user2 = self.user.browse([user1.id, user2.id])
+ self.assertEqual(user1.company, company2)
+ self.assertEqual(user2.company, company2)
+
+ with transaction.set_context({'company': None}):
+ user1, user2 = self.user.browse([user1.id, user2.id])
+ self.assertEqual(user1.company, None)
+ self.assertEqual(user2.company, company2)
def suite():
diff --git a/tryton.cfg b/tryton.cfg
new file mode 100644
index 0000000..be00df4
--- /dev/null
+++ b/tryton.cfg
@@ -0,0 +1,10 @@
+[tryton]
+version=2.6.0
+depends:
+ currency
+ ir
+ party
+ res
+xml:
+ company.xml
+ cron.xml
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 3ef2f43..37fca2f 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,19 +1,48 @@
Metadata-Version: 1.0
Name: trytond-company
-Version: 2.4.0
-Summary: Define company and employee.
-Add main and current company on users preferences.
-Add company on properties.
-Define new report parser for report with company header.
-Add letter template on party.
-Make the scheduler run on each companies.
-
+Version: 2.6.0
+Summary: Tryton module with companies and employees
Home-page: http://www.tryton.org/
-Author: B2CK
-Author-email: info at b2ck.com
+Author: Tryton
+Author-email: UNKNOWN
License: GPL-3
-Download-URL: http://downloads.tryton.org/2.4/
-Description: UNKNOWN
+Download-URL: http://downloads.tryton.org/2.6/
+Description: trytond_company
+ ===============
+
+ The company module of the Tryton application platform.
+
+ Installing
+ ----------
+
+ See INSTALL
+
+ Support
+ -------
+
+ If you encounter any problems with Tryton, please don't hesitate to ask
+ questions on the Tryton bug tracker, mailing list, wiki or IRC channel:
+
+ http://bugs.tryton.org/
+ http://groups.tryton.org/
+ http://wiki.tryton.org/
+ irc://irc.freenode.net/tryton
+
+ License
+ -------
+
+ See LICENSE
+
+ Copyright
+ ---------
+
+ See COPYRIGHT
+
+
+ For more information please visit the Tryton web site:
+
+ http://www.tryton.org/
+
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
diff --git a/trytond_company.egg-info/SOURCES.txt b/trytond_company.egg-info/SOURCES.txt
index dea7938..016c09b 100644
--- a/trytond_company.egg-info/SOURCES.txt
+++ b/trytond_company.egg-info/SOURCES.txt
@@ -9,8 +9,8 @@ cron.xml
header_A4.odt
letter.odt
setup.py
+tryton.cfg
./__init__.py
-./__tryton__.py
./company.py
./cron.py
./party.py
diff --git a/trytond_company.egg-info/requires.txt b/trytond_company.egg-info/requires.txt
index b1689d6..1ad737a 100644
--- a/trytond_company.egg-info/requires.txt
+++ b/trytond_company.egg-info/requires.txt
@@ -1,3 +1,3 @@
-trytond_party >= 2.4, < 2.5
-trytond_currency >= 2.4, < 2.5
-trytond >= 2.4, < 2.5
\ No newline at end of file
+trytond_currency >= 2.6, < 2.7
+trytond_party >= 2.6, < 2.7
+trytond >= 2.6, < 2.7
\ No newline at end of file
commit 5f39dc2375bec1cc2312b3dfe48e94ff14140eea
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue Apr 24 19:30:40 2012 +0200
Adding upstream version 2.4.0.
diff --git a/CHANGELOG b/CHANGELOG
index f9fcbce..656e2a1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,6 @@
-Version 2.2.1 - 2011-12-26
+Version 2.4.0 - 2012-04-23
* Bug fixes (see mercurial logs for details)
+* Allow to have more than one possible employee per user
Version 2.2.0 - 2011-10-24
* Bug fixes (see mercurial logs for details)
diff --git a/COPYRIGHT b/COPYRIGHT
index 3d2324b..2057c72 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2011 Cédric Krier.
-Copyright (C) 2008-2011 Bertrand Chenal.
-Copyright (C) 2008-2011 B2CK SPRL.
+Copyright (C) 2008-2012 Cédric Krier.
+Copyright (C) 2008-2012 Bertrand Chenal.
+Copyright (C) 2008-2012 B2CK SPRL.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/INSTALL b/INSTALL
index 2234c4f..8266cc9 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@ Installing trytond_company
Prerequisites
-------------
- * Python 2.5 or later (http://www.python.org/)
+ * Python 2.6 or later (http://www.python.org/)
* trytond (http://www.tryton.org/)
* trytond_party (http://www.tryton.org/)
* trytond_currency (http://www.tryton.org/)
diff --git a/PKG-INFO b/PKG-INFO
index e7fab0f..2af8d06 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.0
Name: trytond_company
-Version: 2.2.1
+Version: 2.4.0
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,7 +12,7 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
-Download-URL: http://downloads.tryton.org/2.2/
+Download-URL: http://downloads.tryton.org/2.4/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff --git a/__init__.py b/__init__.py
index 62dd77d..acd8e36 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,6 +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 company import *
-from cron import *
-import party
+from .company import *
+from .cron import *
+from . import party
diff --git a/__tryton__.py b/__tryton__.py
index 10fabc3..4b7bb86 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -4,12 +4,14 @@
{
'name': 'Company',
'name_bg_BG': 'Фирма',
+ 'name_ca_ES': 'Empresa',
'name_de_DE': 'Unternehmen',
+ 'name_es_AR': 'Empresa',
'name_es_CO': 'Compañía',
'name_es_ES': 'Empresa',
'name_fr_FR': 'Société',
'name_nl_NL': 'Bedrijf',
- 'version': '2.2.1',
+ 'version': '2.4.0',
'author': 'B2CK',
'email': 'info at b2ck.com',
'website': 'http://www.tryton.org/',
@@ -27,6 +29,13 @@ Make the scheduler run on each companies.
- Добавяне на шаблон на писмо за партньор
- Възможност планировщика да работи на всяка фирма
''',
+ 'description_ca_ES': '''- Defineix empresa i empleats.
+- Afegeix l'empresa principal i predeterminada a les preferències dels usuaris.
+- Afegeix l'empresa a les propietats.
+- Defineix un nou analitzador pels informes amb l'encapçalament de l'empresa.
+- Afegeix una plantilla de carta a tercers.
+- Fa que el planificador de tasques s'executi per empresa.
+''',
'description_de_DE': ''' - Ermöglicht die Eingabe von Umternehmen und Mitarbeitern.
- Fügt Haupt- und aktuelles Unternehmen zu den Benutzereinstellungen hinzu.
- Fügt das Unternehmen den Eigenschaften hinzu.
@@ -34,6 +43,13 @@ Make the scheduler run on each companies.
- Fügt den Kontakten die Berichtsvorlage für Briefe hinzu.
- Initialisiert die Aufgaben des Zeitplaners für jedes Unternehmen.
''',
+ 'description_es_AR': '''Define empresa y empleados.
+ - Añade la empresa principal y predeterminada en las preferencias de los usuarios.
+ - Añade empresa a las propiedades.
+ - Define un nuevo analizador de informe para los informes con el encabezado de la empresa.
+ - Añade una plantilla de carta en entidades.
+ - Hace que el programador de tareas se ejecute por empresa.
+''',
'description_es_CO': ''' - Define compañía y empleados.
- Añade compañía principal y predeterminada de acuerdo a preferencia de usuarios.
- Añade compañía a las propiedades.
@@ -43,10 +59,10 @@ Make the scheduler run on each companies.
''',
'description_es_ES': '''Define empresa y empleados.
- Añade la empresa principal y predeterminada en las preferencias de los usuarios.
- - Añade empresa a las propiedades.
- - Define un nuevo analizador de informe para los informes con el encabezado de la empresa.
- - Añade una plantilla de carta en terceros.
- - Hace que el programador de tareas se ejecute por empresa.
+ - Añade la empresa a las propiedades.
+ - Define un nuevo analizador para los informes con el encabezado de la empresa.
+ - Añade una plantilla de carta a terceros.
+ - Hace que el planificador de tareas se ejecute por empresa.
''',
'description_fr_FR': '''Défini société et employé.
Ajoute les sociétés principale et courante dans les préférences de l'utilisateur.
@@ -81,8 +97,10 @@ Lance les planificateurs sur chaque société.
],
'translation': [
'locale/bg_BG.po',
+ 'locale/ca_ES.po',
'locale/cs_CZ.po',
'locale/de_DE.po',
+ 'locale/es_AR.po',
'locale/es_CO.po',
'locale/es_ES.po',
'locale/fr_FR.po',
diff --git a/company.py b/company.py
index 6e15d19..490fc7f 100644
--- a/company.py
+++ b/company.py
@@ -2,7 +2,7 @@
#this repository contains the full copyright notices and license terms.
import copy
from trytond.model import ModelView, ModelSQL, fields
-from trytond.wizard import Wizard
+from trytond.wizard import Wizard, StateView, Button, StateTransition
from trytond.report import Report
from trytond.pyson import Eval, If
from trytond.transaction import Transaction
@@ -74,32 +74,43 @@ class Employee(ModelSQL, ModelView):
Employee()
+class UserEmployee(ModelSQL):
+ 'User - Employee'
+ _name = 'res.user-company.employee'
+ _description = __doc__
+ user = fields.Many2One('res.user', 'User', ondelete='CASCADE', select=True,
+ required=True)
+ employee = fields.Many2One('company.employee', 'Employee',
+ ondelete='CASCADE', select=True, required=True)
+
+UserEmployee()
+
+
class User(ModelSQL, ModelView):
_name = 'res.user'
main_company = fields.Many2One('company.company', 'Main Company',
- on_change=['main_company'])
+ on_change=['main_company'])
company = fields.Many2One('company.company', 'Current Company',
- domain=[('parent', 'child_of', [Eval('main_company')], 'parent')],
- depends=['main_company'])
+ domain=[('parent', 'child_of', [Eval('main_company')], 'parent')],
+ depends=['main_company'], on_change=['company', 'employees'])
companies = fields.Function(fields.One2Many('company.company', None,
'Current Companies'), 'get_companies')
+ employees = fields.Many2Many('res.user-company.employee', 'user',
+ 'employee', 'Employees')
employee = fields.Many2One('company.employee', 'Employee',
- domain=[('company', 'child_of', [Eval('main_company')], 'parent')],
- depends=['main_company'])
+ domain=[
+ ('company', '=', Eval('company')),
+ ('id', 'in', Eval('employees', [])),
+ ],
+ depends=['company', 'employees'])
def __init__(self):
super(User, self).__init__()
self._context_fields.insert(0, 'company')
- self._constraints += [
- ('check_company', 'child_company'),
- ]
- self._error_messages.update({
- 'child_company': 'You can not set a company that is not ' \
- 'a child of your main company!',
- })
+ self._context_fields.insert(0, 'employee')
def default_main_company(self):
- return Transaction().context.get('company') or False
+ return Transaction().context.get('company')
def default_company(self):
return self.default_main_company()
@@ -110,7 +121,7 @@ class User(ModelSQL, ModelView):
company_childs = {}
for user in self.browse(ids):
res[user.id] = []
- company_id = False
+ company_id = None
if user.company:
company_id = user.company.id
elif user.main_company:
@@ -136,37 +147,61 @@ class User(ModelSQL, ModelView):
return res
def on_change_main_company(self, vals):
- return {'company': vals.get('main_company', False)}
-
- def check_company(self, ids):
- company_obj = Pool().get('company.company')
- for user in self.browse(ids):
- if user.main_company:
- companies = company_obj.search([
- ('parent', 'child_of', [user.main_company.id]),
+ return {
+ 'company': vals.get('main_company'),
+ 'employee': None,
+ }
+
+ def on_change_company(self, values):
+ employee_obj = Pool().get('company.employee')
+ result = {
+ 'employee': None,
+ }
+ if values.get('company') and values.get('employees'):
+ employee_ids = employee_obj.search([
+ ('id', 'in', [e['id'] for e in values['employees']]),
+ ('company', '=', values['company']),
])
- if user.company.id and (user.company.id not in companies):
- return False
- elif user.company:
- return False
- return True
+ if employee_ids:
+ result['employee'] = employee_ids[0]
+ return result
def _get_preferences(self, user, context_only=False):
- res = super(User, self)._get_preferences(user,
+ res = super(User, self)._get_preferences(user,
context_only=context_only)
if not context_only:
res['main_company'] = user.main_company.id
+ if user.main_company.id:
+ res['main_company.rec_name'] = user.main_company.rec_name
+ res['employees'] = [e.id for e in user.employees]
if user.employee:
res['employee'] = user.employee.id
+ if user.employee.id:
+ res['employee.rec_name'] = user.employee.rec_name
return res
def get_preferences_fields_view(self):
- company_obj = Pool().get('company.company')
-
- user = self.browse(Transaction().user)
+ pool = Pool()
+ company_obj = pool.get('company.company')
res = super(User, self).get_preferences_fields_view()
res = copy.deepcopy(res)
+
+ def convert2selection(definition, name):
+ del definition[name]['relation']
+ definition[name]['type'] = 'selection'
+ selection = []
+ definition[name]['selection'] = selection
+ return selection
+
+ if 'company' in res['fields']:
+ selection = convert2selection(res['fields'], 'company')
+ user = self.browse(Transaction().user)
+ company_ids = company_obj.search([
+ ('parent', 'child_of', [user.main_company.id], 'parent'),
+ ])
+ for company in company_obj.browse(company_ids):
+ selection.append((company.id, company.rec_name))
return res
def read(self, ids, fields_names=None):
@@ -213,21 +248,20 @@ class Property(ModelSQL, ModelView):
Eval('context', {}).get('company', 0)),
])
- def _set_values(self, name, model, res_id, val, field_id):
+ def _set_values(self, model, res_id, val, field_id):
user_obj = Pool().get('res.user')
user_id = Transaction().user
if user_id == 0:
user_id = Transaction().context.get('user', user_id)
user = user_obj.browse(user_id)
- res = super(Property, self)._set_values(name, model, res_id, val,
- field_id)
+ res = super(Property, self)._set_values(model, res_id, val, field_id)
if user:
res['company'] = user.company.id
return res
def search(self, domain, offset=0, limit=None, order=None, count=False):
if Transaction().user == 0 and not 'user' in Transaction().context:
- domain = ['AND', domain[:], ('company', '=', False)]
+ domain = ['AND', domain[:], ('company', '=', None)]
return super(Property, self).search(domain, offset=offset,
limit=limit, order=order, count=count)
@@ -247,7 +281,7 @@ class Sequence(ModelSQL, ModelView):
self._order.insert(0, ('company', 'ASC'))
def default_company(self):
- return Transaction().context.get('company') or False
+ return Transaction().context.get('company')
Sequence()
@@ -258,60 +292,56 @@ class SequenceStrict(Sequence):
SequenceStrict()
-class CompanyConfigInit(ModelView):
- 'Company Config Init'
- _name = 'company.company.config.init'
+class CompanyConfigStart(ModelView):
+ 'Company Config'
+ _name = 'company.company.config.start'
_description = __doc__
-CompanyConfigInit()
+CompanyConfigStart()
class CompanyConfig(Wizard):
- 'Configure companies'
+ 'Configure Company'
_name = 'company.company.config'
- states = {
- 'init': {
- 'result': {
- 'type': 'form',
- 'object': 'company.company.config.init',
- 'state': [
- ('end', 'Cancel', 'tryton-cancel'),
- ('company', 'Ok', 'tryton-ok', True),
- ],
- },
- },
- 'company': {
- 'result': {
- 'type': 'form',
- 'object': 'company.company',
- 'state': [
- ('end', 'Cancel', 'tryton-cancel'),
- ('add', 'Add', 'tryton-ok', True),
- ],
- },
- },
- 'add': {
- 'result': {
- 'type': 'action',
- 'action': '_add',
- 'state': 'end',
- },
- },
- }
-
- def _add(self, data):
+
+ start = StateView('company.company.config.start',
+ 'company.company_config_start_view_form', [
+ Button('Cancel', 'end', 'tryton-cancel'),
+ Button('Ok', 'company', 'tryton-ok', True),
+ ])
+ company = StateView('company.company',
+ 'company.company_view_form', [
+ Button('Cancel', 'end', 'tryton-cancel'),
+ Button('Add', 'add', 'tryton-ok', True),
+ ])
+ add = StateTransition()
+
+ def transition_add(self, session):
company_obj = Pool().get('company.company')
user_obj = Pool().get('res.user')
- company_id = company_obj.create(data['form'])
+ values = session.data['company'].copy()
+ for fname in values.keys():
+ if fname in ('id', 'party'):
+ del values[fname]
+ continue
+ if fname in company_obj._columns:
+ field = company_obj._columns[fname]
+ else:
+ field = company_obj._inherit_fields[fname][2]
+ if field._type == 'one2many':
+ values[fname] = [('create', v) for v in values[fname]]
+ elif field._type == 'many2many':
+ values[fname] = [('set', [v['id'] for v in values[fname]])]
+ company_id = company_obj.create(values)
user_ids = user_obj.search([
- ('main_company', '=', False),
+ ('main_company', '=', None),
])
user_obj.write(user_ids, {
'main_company': company_id,
'company': company_id,
})
- return {}
+ return 'end'
CompanyConfig()
diff --git a/company.xml b/company.xml
index ca74dff..e50a9a4 100644
--- a/company.xml
+++ b/company.xml
@@ -16,16 +16,6 @@ this repository contains the full copyright notices and license terms. -->
<form string="Company"/>
</xpath>
<xpath
- expr="/form/label[@name="code"]"
- position="replace">
- <label name="parent"/>
- </xpath>
- <xpath
- expr="/form/field[@name="code"]"
- position="replace">
- <field name="parent"/>
- </xpath>
- <xpath
expr="/form/group[@id="checkboxes"]"
position="after">
<label name="currency"/>
@@ -38,8 +28,10 @@ this repository contains the full copyright notices and license terms. -->
<xpath
expr="/form/notebook/page[@id="general"]"
position="after">
- <page string="Employees" col="1" id="employees">
- <field name="employees"/>
+ <page string="Company" col="2" id="company">
+ <label name="parent"/>
+ <field name="parent"/>
+ <field name="employees" colspan="2"/>
</page>
<page string="Reports" col="1" id="reports">
<separator name="header"/>
@@ -150,6 +142,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="company" widget="selection"/>
<label name="employee"/>
<field name="employee"/>
+ <field name="employees" colspan="4"/>
</xpath>
</data>
]]>
@@ -166,6 +159,8 @@ this repository contains the full copyright notices and license terms. -->
position="before">
<label name="company"/>
<field name="company" widget="selection"/>
+ <label name="employee"/>
+ <field name="employee" widget="selection"/>
</xpath>
</data>
]]>
@@ -178,7 +173,7 @@ this repository contains the full copyright notices and license terms. -->
<![CDATA[
<data>
<xpath
- expr="/form/field[@name="name"]"
+ expr="/form/field[@name='field']"
position="after">
<label name="company"/>
<field name="company" colspan="3"/>
@@ -194,7 +189,7 @@ this repository contains the full copyright notices and license terms. -->
<![CDATA[
<data>
<xpath
- expr="/tree/field[@name="name"]"
+ expr="/tree/field[@name='field']"
position="after">
<field name="company"/>
</xpath>
@@ -286,8 +281,8 @@ this repository contains the full copyright notices and license terms. -->
<field name="rule_group" ref="rule_group_sequence_strict"/>
</record>
- <record model="ir.ui.view" id="company_config_init_view_form">
- <field name="model">company.company.config.init</field>
+ <record model="ir.ui.view" id="company_config_start_view_form">
+ <field name="model">company.company.config.start</field>
<field name="type">form</field>
<field name="arch" type="xml">
<![CDATA[
@@ -300,15 +295,22 @@ this repository contains the full copyright notices and license terms. -->
]]>
</field>
</record>
+
+ <record model="ir.action.wizard" id="act_company_config">
+ <field name="name">Configure Company</field>
+ <field name="wiz_name">company.company.config</field>
+ </record>
+
<record model="ir.module.module.config_wizard.item"
id="config_wizard_item_company">
- <field name="name">company.company.config</field>
+ <field name="action" ref="act_company_config"/>
</record>
<record model="ir.ui.view" id="employee_view_form">
<field name="model">company.employee</field>
<field name="type">form</field>
<field name="inherit" ref="party.party_view_form"/>
+ <field name="priority">10</field>
<field name="arch" type="xml">
<![CDATA[
<data>
@@ -317,20 +319,32 @@ this repository contains the full copyright notices and license terms. -->
position="replace_attributes">
<form string="Employee"/>
</xpath>
- <xpath
- expr="/form/label[@name="code"]"
- position="replace">
+ <xpath expr="/form/group/label[@name='active']"
+ position="before">
<label name="company"/>
- </xpath>
- <xpath
- expr="/form/field[@name="code"]"
- position="replace">
<field name="company"/>
</xpath>
</data>
]]>
</field>
</record>
+
+ <record model="ir.ui.view" id="employee_view_form2">
+ <field name="model">company.employee</field>
+ <field name="type">form</field>
+ <field name="priority">20</field>
+ <field name="arch" type="xml">
+ <![CDATA[
+ <form string="Employee">
+ <label name="party"/>
+ <field name="party"/>
+ <label name="company"/>
+ <field name="company"/>
+ </form>
+ ]]>
+ </field>
+ </record>
+
<record model="ir.ui.view" id="employee_view_tree">
<field name="model">company.employee</field>
<field name="type">tree</field>
@@ -355,7 +369,7 @@ this repository contains the full copyright notices and license terms. -->
</record>
<record model="ir.action.act_window.view" id="act_employee_form_view2">
<field name="sequence" eval="20"/>
- <field name="view" ref="employee_view_form"/>
+ <field name="view" ref="employee_view_form2"/>
<field name="act_window" ref="act_employee_form"/>
</record>
<menuitem parent="party.menu_configuration" action="act_employee_form"
diff --git a/cron.py b/cron.py
index 53fd4ac..4d91ace 100644
--- 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
@@ -23,8 +22,8 @@ class Cron(ModelSQL, ModelView):
})
super(Cron, self)._callback(cron)
user_obj.write(cron.user.id, {
- 'company': False,
- 'main_company': False,
+ 'company': None,
+ 'main_company': None,
})
def default_companies(self):
@@ -39,8 +38,8 @@ class CronCompany(ModelSQL):
_name = 'ir.cron-company.company'
_table = 'cron_company_rel'
cron = fields.Many2One('ir.cron', 'Cron', ondelete='CASCADE',
- required=True, select=1)
+ required=True, select=True)
company = fields.Many2One('company.company', 'Company', ondelete='CASCADE',
- required=True, select=1)
+ required=True, select=True)
CronCompany()
diff --git a/locale/bg_BG.po b/locale/bg_BG.po
index 615669f..bee7e8a 100644
--- a/locale/bg_BG.po
+++ b/locale/bg_BG.po
@@ -2,119 +2,218 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:0"
+msgctxt "error:company.company:"
msgid "You can not create recursive companies!"
msgstr "Не може да създавате взаимно вложени фирми!"
-msgctxt "error:res.user:0"
-msgid "You can not set a company that is not a child of your main company!"
-msgstr "Не може да изберете фирма която не е подчинена на основната фирма!"
-
-msgctxt "field:company.company,childs:0"
+msgctxt "field:company.company,childs:"
msgid "Children"
msgstr "Деца"
-msgctxt "field:company.company,currency:0"
+msgctxt "field:company.company,create_date:"
+msgid "Create Date"
+msgstr "Създадено на"
+
+msgctxt "field:company.company,create_uid:"
+msgid "Create User"
+msgstr "Създадено от"
+
+msgctxt "field:company.company,currency:"
msgid "Currency"
msgstr "Валута"
-msgctxt "field:company.company,employees:0"
+msgctxt "field:company.company,employees:"
msgid "Employees"
msgstr "Служители"
-msgctxt "field:company.company,footer:0"
+msgctxt "field:company.company,footer:"
msgid "Footer"
msgstr "Долен колонтитул"
-msgctxt "field:company.company,header:0"
+msgctxt "field:company.company,header:"
msgid "Header"
msgstr "Горен колонтитул"
-msgctxt "field:company.company,parent:0"
+msgctxt "field:company.company,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:company.company,parent:"
msgid "Parent"
msgstr "Родител"
-msgctxt "field:company.company,party:0"
+msgctxt "field:company.company,party:"
msgid "Party"
msgstr "Партньор"
-msgctxt "field:company.company,rec_name:0"
+msgctxt "field:company.company,rec_name:"
msgid "Name"
msgstr "Име"
-msgctxt "field:company.employee,company:0"
+msgctxt "field:company.company,write_date:"
+msgid "Write Date"
+msgstr "Променено на"
+
+msgctxt "field:company.company,write_uid:"
+msgid "Write User"
+msgstr "Променено от"
+
+msgctxt "field:company.company.config.start,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:company.employee,company:"
msgid "Company"
msgstr "Фирма"
-msgctxt "field:company.employee,party:0"
+msgctxt "field:company.employee,create_date:"
+msgid "Create Date"
+msgstr "Създадено на"
+
+msgctxt "field:company.employee,create_uid:"
+msgid "Create User"
+msgstr "Създадено от"
+
+msgctxt "field:company.employee,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:company.employee,party:"
msgid "Party"
msgstr "Партньор"
-msgctxt "field:company.employee,rec_name:0"
+msgctxt "field:company.employee,rec_name:"
msgid "Name"
msgstr "Име"
-msgctxt "field:ir.cron,companies:0"
+msgctxt "field:company.employee,write_date:"
+msgid "Write Date"
+msgstr "Променено на"
+
+msgctxt "field:company.employee,write_uid:"
+msgid "Write User"
+msgstr "Променено от"
+
+msgctxt "field:ir.cron,companies:"
msgid "Companies"
msgstr "Фирми"
-msgctxt "field:ir.cron-company.company,company:0"
+msgctxt "field:ir.cron-company.company,company:"
msgid "Company"
msgstr "Фирма"
-msgctxt "field:ir.cron-company.company,cron:0"
+msgctxt "field:ir.cron-company.company,create_date:"
+msgid "Create Date"
+msgstr "Създадено на"
+
+msgctxt "field:ir.cron-company.company,create_uid:"
+msgid "Create User"
+msgstr "Създадено от"
+
+msgctxt "field:ir.cron-company.company,cron:"
msgid "Cron"
msgstr "Планировщик"
-msgctxt "field:ir.cron-company.company,rec_name:0"
+msgctxt "field:ir.cron-company.company,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:ir.cron-company.company,rec_name:"
msgid "Name"
msgstr "Име"
-msgctxt "field:ir.property,company:0"
+msgctxt "field:ir.cron-company.company,write_date:"
+msgid "Write Date"
+msgstr "Променено на"
+
+msgctxt "field:ir.cron-company.company,write_uid:"
+msgid "Write User"
+msgstr "Променено от"
+
+msgctxt "field:ir.property,company:"
msgid "Company"
msgstr "Фирма"
-msgctxt "field:ir.sequence,company:0"
+msgctxt "field:ir.sequence,company:"
msgid "Company"
msgstr "Фирма"
-msgctxt "field:ir.sequence.strict,company:0"
+msgctxt "field:ir.sequence.strict,company:"
msgid "Company"
msgstr "Фирма"
-msgctxt "field:res.user,companies:0"
+msgctxt "field:res.user,companies:"
msgid "Current Companies"
msgstr "Текущи фирми"
-msgctxt "field:res.user,company:0"
+msgctxt "field:res.user,company:"
msgid "Current Company"
msgstr "Текуща фирма"
-msgctxt "field:res.user,employee:0"
+msgctxt "field:res.user,employee:"
msgid "Employee"
msgstr "Служител"
-msgctxt "field:res.user,main_company:0"
+msgctxt "field:res.user,employees:"
+msgid "Employees"
+msgstr "Служители"
+
+msgctxt "field:res.user,main_company:"
msgid "Main Company"
msgstr "Основна фирма"
-msgctxt "help:ir.cron,companies:0"
+msgctxt "field:res.user-company.employee,create_date:"
+msgid "Create Date"
+msgstr "Създадено на"
+
+msgctxt "field:res.user-company.employee,create_uid:"
+msgid "Create User"
+msgstr "Създадено от"
+
+msgctxt "field:res.user-company.employee,employee:"
+msgid "Employee"
+msgstr "Служител"
+
+msgctxt "field:res.user-company.employee,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:res.user-company.employee,rec_name:"
+msgid "Name"
+msgstr "Име на прикачен файл"
+
+msgctxt "field:res.user-company.employee,user:"
+msgid "User"
+msgstr "Потребител"
+
+msgctxt "field:res.user-company.employee,write_date:"
+msgid "Write Date"
+msgstr "Променено на"
+
+msgctxt "field:res.user-company.employee,write_uid:"
+msgid "Write User"
+msgstr "Променено от"
+
+msgctxt "help:ir.cron,companies:"
msgid "Companies registered for this cron"
msgstr "Фирми регистрирани за този планировщик"
-msgctxt "model:company.company,name:0"
+msgctxt "model:company.company,name:"
msgid "Company"
msgstr "Фирма"
-msgctxt "model:company.company.config.init,name:0"
-msgid "Company Config Init"
-msgstr "Начално инициализиране на фирма"
+msgctxt "model:company.company.config.start,name:"
+msgid "Company Config"
+msgstr ""
-msgctxt "model:company.employee,name:0"
+msgctxt "model:company.employee,name:"
msgid "Employee"
msgstr "Служител"
-#, fuzzy
+msgctxt "model:ir.action,name:act_company_config"
+msgid "Configure Company"
+msgstr ""
+
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
msgstr "Фирми"
@@ -131,11 +230,10 @@ msgctxt "model:ir.action,name:report_letter"
msgid "Letter"
msgstr "Писмо"
-msgctxt "model:ir.cron-company.company,name:0"
+msgctxt "model:ir.cron-company.company,name:"
msgid "ir.cron-company.company"
msgstr ""
-#, fuzzy
msgctxt "model:ir.ui.menu,name:menu_company_list"
msgid "Companies"
msgstr "Фирми"
@@ -148,78 +246,82 @@ msgctxt "model:ir.ui.menu,name:menu_employee_form"
msgid "Employees"
msgstr "Служители"
-msgctxt "odt:party.letter:0"
+msgctxt "model:res.user-company.employee,name:"
+msgid "User - Employee"
+msgstr ""
+
+msgctxt "odt:party.letter:"
msgid "Best Regards,"
msgstr "С уважение,"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Date:"
msgstr "Дата:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Dear Madams and Sirs,"
msgstr "Уважаеми дами и годпода,"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "E-Mail:"
msgstr "E-Mail:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Phone:"
msgstr "Телефон:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Subject:"
msgstr "Относно:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "VAT Number:"
-msgstr ""
+msgstr "ДДС номер:"
-msgctxt "view:company.company.config.init:0"
+msgctxt "view:company.company.config.start:"
msgid "Create Company"
msgstr "Създаване на фирма"
-msgctxt "view:company.company.config.init:0"
+msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
msgstr "Сега може да добавите фирмата си към системата"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Companies"
msgstr "Фирми"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Company"
msgstr "Фирма"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Employees"
msgstr "Служители"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Reports"
msgstr "Справки"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employee"
msgstr "Служител"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employees"
msgstr "Служители"
-msgctxt "wizard_button:company.company.config,company,add:0"
+msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr "Добавяне"
-msgctxt "wizard_button:company.company.config,company,end:0"
+msgctxt "wizard_button:company.company.config,company,end:"
msgid "Cancel"
msgstr "Отказ"
-msgctxt "wizard_button:company.company.config,init,company:0"
+msgctxt "wizard_button:company.company.config,start,company:"
msgid "Ok"
msgstr "Добре"
-msgctxt "wizard_button:company.company.config,init,end:0"
+msgctxt "wizard_button:company.company.config,start,end:"
msgid "Cancel"
msgstr "Отказ"
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
new file mode 100644
index 0000000..495fc61
--- /dev/null
+++ b/locale/ca_ES.po
@@ -0,0 +1,355 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:company.company:"
+msgid "You can not create recursive companies!"
+msgstr "No pot crear empreses recursives"
+
+msgctxt "field:company.company,childs:"
+msgid "Children"
+msgstr "Fills"
+
+msgctxt "field:company.company,create_date:"
+msgid "Create Date"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:company.company,create_uid:"
+msgid "Create User"
+msgstr "Crear usuari"
+
+msgctxt "field:company.company,currency:"
+msgid "Currency"
+msgstr "Divisa"
+
+msgctxt "field:company.company,employees:"
+msgid "Employees"
+msgstr "Empleats"
+
+msgctxt "field:company.company,footer:"
+msgid "Footer"
+msgstr "Peu de pàgina"
+
+msgctxt "field:company.company,header:"
+msgid "Header"
+msgstr "Encapçalat"
+
+msgctxt "field:company.company,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:company.company,parent:"
+msgid "Parent"
+msgstr "Pare"
+
+msgctxt "field:company.company,party:"
+msgid "Party"
+msgstr "Tercer"
+
+msgctxt "field:company.company,rec_name:"
+msgid "Name"
+msgstr "Nom"
+
+msgctxt "field:company.company,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:company.company,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:company.company.config.start,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:company.employee,company:"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "field:company.employee,create_date:"
+msgid "Create Date"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:company.employee,create_uid:"
+msgid "Create User"
+msgstr "Crear usuari"
+
+msgctxt "field:company.employee,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:company.employee,party:"
+msgid "Party"
+msgstr "Tercer"
+
+msgctxt "field:company.employee,rec_name:"
+msgid "Name"
+msgstr "Nom"
+
+msgctxt "field:company.employee,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:company.employee,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:ir.cron,companies:"
+msgid "Companies"
+msgstr "Empreses"
+
+msgctxt "field:ir.cron-company.company,company:"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "field:ir.cron-company.company,create_date:"
+msgid "Create Date"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:ir.cron-company.company,create_uid:"
+msgid "Create User"
+msgstr "Crear usuari"
+
+msgctxt "field:ir.cron-company.company,cron:"
+msgid "Cron"
+msgstr "Programador de tasques"
+
+msgctxt "field:ir.cron-company.company,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,rec_name:"
+msgid "Name"
+msgstr "Nom"
+
+msgctxt "field:ir.cron-company.company,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:ir.property,company:"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "field:ir.sequence,company:"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "field:ir.sequence.strict,company:"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "field:res.user,companies:"
+msgid "Current Companies"
+msgstr "Empreses actuals"
+
+msgctxt "field:res.user,company:"
+msgid "Current Company"
+msgstr "Empresa actual"
+
+msgctxt "field:res.user,employee:"
+msgid "Employee"
+msgstr "Empleat"
+
+#, fuzzy
+msgctxt "field:res.user,employees:"
+msgid "Employees"
+msgstr "Empleats"
+
+msgctxt "field:res.user,main_company:"
+msgid "Main Company"
+msgstr "Empresa principal"
+
+msgctxt "field:res.user-company.employee,create_date:"
+msgid "Create Date"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:res.user-company.employee,create_uid:"
+msgid "Create User"
+msgstr "Crear usuari"
+
+#, fuzzy
+msgctxt "field:res.user-company.employee,employee:"
+msgid "Employee"
+msgstr "Empleat"
+
+msgctxt "field:res.user-company.employee,id:"
+msgid "ID"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:res.user-company.employee,rec_name:"
+msgid "Name"
+msgstr "Nom del camp"
+
+#, fuzzy
+msgctxt "field:res.user-company.employee,user:"
+msgid "User"
+msgstr "Usuari"
+
+msgctxt "field:res.user-company.employee,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:res.user-company.employee,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "help:ir.cron,companies:"
+msgid "Companies registered for this cron"
+msgstr "Empreses registrades en aquest programador de tasques"
+
+msgctxt "model:company.company,name:"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "model:company.company.config.start,name:"
+msgid "Company Config"
+msgstr ""
+
+msgctxt "model:company.employee,name:"
+msgid "Employee"
+msgstr "Empleat"
+
+msgctxt "model:ir.action,name:act_company_config"
+msgid "Configure Company"
+msgstr ""
+
+#, fuzzy
+msgctxt "model:ir.action,name:act_company_list"
+msgid "Companies"
+msgstr "Empreses"
+
+msgctxt "model:ir.action,name:act_company_tree"
+msgid "Companies"
+msgstr "Empreses"
+
+msgctxt "model:ir.action,name:act_employee_form"
+msgid "Employees"
+msgstr "Empleats"
+
+msgctxt "model:ir.action,name:report_letter"
+msgid "Letter"
+msgstr "Carta"
+
+msgctxt "model:ir.cron-company.company,name:"
+msgid "ir.cron-company.company"
+msgstr "ir.cron-company.company"
+
+#, fuzzy
+msgctxt "model:ir.ui.menu,name:menu_company_list"
+msgid "Companies"
+msgstr "Empreses"
+
+msgctxt "model:ir.ui.menu,name:menu_company_tree"
+msgid "Companies"
+msgstr "Empreses"
+
+msgctxt "model:ir.ui.menu,name:menu_employee_form"
+msgid "Employees"
+msgstr "Empleats"
+
+msgctxt "model:res.user-company.employee,name:"
+msgid "User - Employee"
+msgstr ""
+
+msgctxt "odt:party.letter:"
+msgid "Best Regards,"
+msgstr "Atentament,"
+
+msgctxt "odt:party.letter:"
+msgid "Date:"
+msgstr "Data:"
+
+msgctxt "odt:party.letter:"
+msgid "Dear Madams and Sirs,"
+msgstr "Estimats senyors i senyores,"
+
+msgctxt "odt:party.letter:"
+msgid "E-Mail:"
+msgstr "Correu electrònic:"
+
+msgctxt "odt:party.letter:"
+msgid "Phone:"
+msgstr "Telèfon:"
+
+msgctxt "odt:party.letter:"
+msgid "Subject:"
+msgstr "Assumpte:"
+
+msgctxt "odt:party.letter:"
+msgid "VAT Number:"
+msgstr ""
+
+msgctxt "view:company.company.config.start:"
+msgid "Create Company"
+msgstr ""
+
+msgctxt "view:company.company.config.start:"
+msgid "You can now add your company into the system."
+msgstr ""
+
+msgctxt "view:company.company:"
+msgid "Addresses"
+msgstr "Adreces"
+
+msgctxt "view:company.company:"
+msgid "Companies"
+msgstr "Empreses"
+
+msgctxt "view:company.company:"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "view:company.company:"
+msgid "Employees"
+msgstr "Empleats"
+
+msgctxt "view:company.company:"
+msgid "General"
+msgstr "General"
+
+msgctxt "view:company.company:"
+msgid "Reports"
+msgstr "Informes"
+
+msgctxt "view:company.employee:"
+msgid "Addresses"
+msgstr "Adreces"
+
+msgctxt "view:company.employee:"
+msgid "Employee"
+msgstr "Empleat"
+
+msgctxt "view:company.employee:"
+msgid "Employees"
+msgstr "Empleats"
+
+msgctxt "view:company.employee:"
+msgid "General"
+msgstr "General"
+
+msgctxt "wizard_button:company.company.config,company,add:"
+msgid "Add"
+msgstr "Afegir"
+
+msgctxt "wizard_button:company.company.config,company,end:"
+msgid "Cancel"
+msgstr "Cancel·lar"
+
+#, fuzzy
+msgctxt "wizard_button:company.company.config,start,company:"
+msgid "Ok"
+msgstr "Acceptar"
+
+#, fuzzy
+msgctxt "wizard_button:company.company.config,start,end:"
+msgid "Cancel"
+msgstr "Cancel·lar"
diff --git a/locale/cs_CZ.po b/locale/cs_CZ.po
index 08a4102..c31d3f3 100644
--- a/locale/cs_CZ.po
+++ b/locale/cs_CZ.po
@@ -2,118 +2,218 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:0"
+msgctxt "error:company.company:"
msgid "You can not create recursive companies!"
msgstr ""
-msgctxt "error:res.user:0"
-msgid "You can not set a company that is not a child of your main company!"
+msgctxt "field:company.company,childs:"
+msgid "Children"
msgstr ""
-msgctxt "field:company.company,childs:0"
-msgid "Children"
+msgctxt "field:company.company,create_date:"
+msgid "Create Date"
+msgstr ""
+
+msgctxt "field:company.company,create_uid:"
+msgid "Create User"
msgstr ""
-msgctxt "field:company.company,currency:0"
+msgctxt "field:company.company,currency:"
msgid "Currency"
msgstr ""
-msgctxt "field:company.company,employees:0"
+msgctxt "field:company.company,employees:"
msgid "Employees"
msgstr ""
-msgctxt "field:company.company,footer:0"
+msgctxt "field:company.company,footer:"
msgid "Footer"
msgstr ""
-msgctxt "field:company.company,header:0"
+msgctxt "field:company.company,header:"
msgid "Header"
msgstr ""
-msgctxt "field:company.company,parent:0"
+msgctxt "field:company.company,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:company.company,parent:"
msgid "Parent"
msgstr ""
-msgctxt "field:company.company,party:0"
+msgctxt "field:company.company,party:"
msgid "Party"
msgstr ""
-msgctxt "field:company.company,rec_name:0"
+msgctxt "field:company.company,rec_name:"
msgid "Name"
msgstr ""
-msgctxt "field:company.employee,company:0"
+msgctxt "field:company.company,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:company.company,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:company.company.config.start,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:company.employee,company:"
msgid "Company"
msgstr ""
-msgctxt "field:company.employee,party:0"
+msgctxt "field:company.employee,create_date:"
+msgid "Create Date"
+msgstr ""
+
+msgctxt "field:company.employee,create_uid:"
+msgid "Create User"
+msgstr ""
+
+msgctxt "field:company.employee,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:company.employee,party:"
msgid "Party"
msgstr ""
-msgctxt "field:company.employee,rec_name:0"
+msgctxt "field:company.employee,rec_name:"
msgid "Name"
msgstr ""
-msgctxt "field:ir.cron,companies:0"
+msgctxt "field:company.employee,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:company.employee,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:ir.cron,companies:"
msgid "Companies"
msgstr ""
-msgctxt "field:ir.cron-company.company,company:0"
+msgctxt "field:ir.cron-company.company,company:"
msgid "Company"
msgstr ""
-msgctxt "field:ir.cron-company.company,cron:0"
+msgctxt "field:ir.cron-company.company,create_date:"
+msgid "Create Date"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,create_uid:"
+msgid "Create User"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,cron:"
msgid "Cron"
msgstr ""
-msgctxt "field:ir.cron-company.company,rec_name:0"
+msgctxt "field:ir.cron-company.company,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,rec_name:"
msgid "Name"
msgstr ""
-msgctxt "field:ir.property,company:0"
+msgctxt "field:ir.cron-company.company,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:ir.property,company:"
msgid "Company"
msgstr ""
-msgctxt "field:ir.sequence,company:0"
+msgctxt "field:ir.sequence,company:"
msgid "Company"
msgstr ""
-msgctxt "field:ir.sequence.strict,company:0"
+msgctxt "field:ir.sequence.strict,company:"
msgid "Company"
msgstr ""
-msgctxt "field:res.user,companies:0"
+msgctxt "field:res.user,companies:"
msgid "Current Companies"
msgstr ""
-msgctxt "field:res.user,company:0"
+msgctxt "field:res.user,company:"
msgid "Current Company"
msgstr ""
-msgctxt "field:res.user,employee:0"
+msgctxt "field:res.user,employee:"
msgid "Employee"
msgstr ""
-msgctxt "field:res.user,main_company:0"
+msgctxt "field:res.user,employees:"
+msgid "Employees"
+msgstr ""
+
+msgctxt "field:res.user,main_company:"
msgid "Main Company"
msgstr ""
-msgctxt "help:ir.cron,companies:0"
+msgctxt "field:res.user-company.employee,create_date:"
+msgid "Create Date"
+msgstr ""
+
+msgctxt "field:res.user-company.employee,create_uid:"
+msgid "Create User"
+msgstr ""
+
+msgctxt "field:res.user-company.employee,employee:"
+msgid "Employee"
+msgstr ""
+
+msgctxt "field:res.user-company.employee,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:res.user-company.employee,rec_name:"
+msgid "Name"
+msgstr ""
+
+msgctxt "field:res.user-company.employee,user:"
+msgid "User"
+msgstr ""
+
+msgctxt "field:res.user-company.employee,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:res.user-company.employee,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "help:ir.cron,companies:"
msgid "Companies registered for this cron"
msgstr ""
-msgctxt "model:company.company,name:0"
+msgctxt "model:company.company,name:"
msgid "Company"
msgstr ""
-msgctxt "model:company.company.config.init,name:0"
-msgid "Company Config Init"
+msgctxt "model:company.company.config.start,name:"
+msgid "Company Config"
msgstr ""
-msgctxt "model:company.employee,name:0"
+msgctxt "model:company.employee,name:"
msgid "Employee"
msgstr ""
+msgctxt "model:ir.action,name:act_company_config"
+msgid "Configure Company"
+msgstr ""
+
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
msgstr ""
@@ -130,7 +230,7 @@ msgctxt "model:ir.action,name:report_letter"
msgid "Letter"
msgstr ""
-msgctxt "model:ir.cron-company.company,name:0"
+msgctxt "model:ir.cron-company.company,name:"
msgid "ir.cron-company.company"
msgstr ""
@@ -146,78 +246,82 @@ msgctxt "model:ir.ui.menu,name:menu_employee_form"
msgid "Employees"
msgstr ""
-msgctxt "odt:party.letter:0"
+msgctxt "model:res.user-company.employee,name:"
+msgid "User - Employee"
+msgstr ""
+
+msgctxt "odt:party.letter:"
msgid "Best Regards,"
msgstr ""
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Date:"
msgstr ""
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Dear Madams and Sirs,"
msgstr ""
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "E-Mail:"
msgstr ""
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Phone:"
msgstr ""
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Subject:"
msgstr ""
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "VAT Number:"
msgstr ""
-msgctxt "view:company.company.config.init:0"
+msgctxt "view:company.company.config.start:"
msgid "Create Company"
msgstr ""
-msgctxt "view:company.company.config.init:0"
+msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
msgstr ""
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Companies"
msgstr ""
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Company"
msgstr ""
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Employees"
msgstr ""
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Reports"
msgstr ""
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employee"
msgstr ""
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employees"
msgstr ""
-msgctxt "wizard_button:company.company.config,company,add:0"
+msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr ""
-msgctxt "wizard_button:company.company.config,company,end:0"
+msgctxt "wizard_button:company.company.config,company,end:"
msgid "Cancel"
msgstr ""
-msgctxt "wizard_button:company.company.config,init,company:0"
+msgctxt "wizard_button:company.company.config,start,company:"
msgid "Ok"
msgstr ""
-msgctxt "wizard_button:company.company.config,init,end:0"
+msgctxt "wizard_button:company.company.config,start,end:"
msgid "Cancel"
msgstr ""
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 1c10a82..6211880 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -2,160 +2,218 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:0"
+msgctxt "error:company.company:"
msgid "You can not create recursive companies!"
msgstr "Unternehmen können nicht rekursiv angelegt werden!"
-msgctxt "error:res.user:0"
-msgid "You can not set a company that is not a child of your main company!"
-msgstr ""
-"Das Unternehmen muss ein Tochterunternehmen (untergeordnet) des "
-"Hauptunternehmens sein"
-
-msgctxt "field:company.company,childs:0"
+msgctxt "field:company.company,childs:"
msgid "Children"
msgstr "Untergeordnet (Unternehmen)"
-msgctxt "field:company.company,create_date:0"
-msgid "Creation date"
+msgctxt "field:company.company,create_date:"
+msgid "Create Date"
msgstr "Erstellungsdatum"
-msgctxt "field:company.company,create_uid:0"
-msgid "Creation user"
-msgstr "Ersteller"
+msgctxt "field:company.company,create_uid:"
+msgid "Create User"
+msgstr "Erstellt durch"
-msgctxt "field:company.company,currency:0"
+msgctxt "field:company.company,currency:"
msgid "Currency"
msgstr "Währung"
-msgctxt "field:company.company,employees:0"
+msgctxt "field:company.company,employees:"
msgid "Employees"
msgstr "Mitarbeiter"
-msgctxt "field:company.company,footer:0"
+msgctxt "field:company.company,footer:"
msgid "Footer"
msgstr "Dokumentenfuß"
-msgctxt "field:company.company,header:0"
+msgctxt "field:company.company,header:"
msgid "Header"
msgstr "Dokumentenkopf"
-msgctxt "field:company.company,id:0"
+msgctxt "field:company.company,id:"
msgid "ID"
msgstr "ID"
-msgctxt "field:company.company,parent:0"
+msgctxt "field:company.company,parent:"
msgid "Parent"
msgstr "Übergeordnet (Unternehmen)"
-msgctxt "field:company.company,party:0"
+msgctxt "field:company.company,party:"
msgid "Party"
msgstr "Partei"
-msgctxt "field:company.company,rec_name:0"
+msgctxt "field:company.company,rec_name:"
msgid "Name"
msgstr "Name"
-msgctxt "field:company.company,write_date:0"
-msgid "Last modification date"
-msgstr "Zuletzt geändert am"
+msgctxt "field:company.company,write_date:"
+msgid "Write Date"
+msgstr "Zuletzt geändert"
+
+msgctxt "field:company.company,write_uid:"
+msgid "Write User"
+msgstr "Letzte Änderung durch"
-msgctxt "field:company.company,write_uid:0"
-msgid "Last modification by"
-msgstr "Zuletzt geändert von"
+msgctxt "field:company.company.config.start,id:"
+msgid "ID"
+msgstr "ID"
-msgctxt "field:company.employee,company:0"
+msgctxt "field:company.employee,company:"
msgid "Company"
msgstr "Unternehmen"
-msgctxt "field:company.employee,create_date:0"
-msgid "Creation date"
+msgctxt "field:company.employee,create_date:"
+msgid "Create Date"
msgstr "Erstellungsdatum"
-msgctxt "field:company.employee,create_uid:0"
-msgid "Creation user"
-msgstr "Ersteller"
+msgctxt "field:company.employee,create_uid:"
+msgid "Create User"
+msgstr "Erstellt durch"
-msgctxt "field:company.employee,id:0"
+msgctxt "field:company.employee,id:"
msgid "ID"
msgstr "ID"
-msgctxt "field:company.employee,party:0"
+msgctxt "field:company.employee,party:"
msgid "Party"
msgstr "Partei"
-msgctxt "field:company.employee,rec_name:0"
+msgctxt "field:company.employee,rec_name:"
msgid "Name"
msgstr "Name"
-msgctxt "field:company.employee,write_date:0"
-msgid "Last modification date"
-msgstr "Zuletzt geändert am"
+msgctxt "field:company.employee,write_date:"
+msgid "Write Date"
+msgstr "Zuletzt geändert"
-msgctxt "field:company.employee,write_uid:0"
-msgid "Last modification by"
-msgstr "Zuletzt geändert von"
+msgctxt "field:company.employee,write_uid:"
+msgid "Write User"
+msgstr "Letzte Änderung durch"
-msgctxt "field:ir.cron,companies:0"
+msgctxt "field:ir.cron,companies:"
msgid "Companies"
msgstr "Unternehmen"
-msgctxt "field:ir.cron-company.company,company:0"
+msgctxt "field:ir.cron-company.company,company:"
msgid "Company"
msgstr "Unternehmen"
-msgctxt "field:ir.cron-company.company,cron:0"
+msgctxt "field:ir.cron-company.company,create_date:"
+msgid "Create Date"
+msgstr "Erstellungsdatum"
+
+msgctxt "field:ir.cron-company.company,create_uid:"
+msgid "Create User"
+msgstr "Erstellt durch"
+
+msgctxt "field:ir.cron-company.company,cron:"
msgid "Cron"
msgstr "Cron"
-msgctxt "field:ir.cron-company.company,rec_name:0"
+msgctxt "field:ir.cron-company.company,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:ir.cron-company.company,rec_name:"
msgid "Name"
msgstr "Name"
-msgctxt "field:ir.property,company:0"
+msgctxt "field:ir.cron-company.company,write_date:"
+msgid "Write Date"
+msgstr "Zuletzt geändert"
+
+msgctxt "field:ir.cron-company.company,write_uid:"
+msgid "Write User"
+msgstr "Letzte Änderung durch"
+
+msgctxt "field:ir.property,company:"
msgid "Company"
msgstr "Unternehmen"
-msgctxt "field:ir.sequence,company:0"
+msgctxt "field:ir.sequence,company:"
msgid "Company"
msgstr "Unternehmen"
-msgctxt "field:ir.sequence.strict,company:0"
+msgctxt "field:ir.sequence.strict,company:"
msgid "Company"
msgstr "Unternehmen"
-msgctxt "field:res.user,companies:0"
+msgctxt "field:res.user,companies:"
msgid "Current Companies"
msgstr "Aktuelle Unternehmen"
-msgctxt "field:res.user,company:0"
+msgctxt "field:res.user,company:"
msgid "Current Company"
msgstr "Aktuelles Unternehmen"
-msgctxt "field:res.user,employee:0"
+msgctxt "field:res.user,employee:"
msgid "Employee"
msgstr "Mitarbeiter"
-msgctxt "field:res.user,main_company:0"
+msgctxt "field:res.user,employees:"
+msgid "Employees"
+msgstr "Mitarbeiter"
+
+msgctxt "field:res.user,main_company:"
msgid "Main Company"
msgstr "Mutterbetrieb"
-msgctxt "help:ir.cron,companies:0"
+msgctxt "field:res.user-company.employee,create_date:"
+msgid "Create Date"
+msgstr "Erstellungsdatum"
+
+msgctxt "field:res.user-company.employee,create_uid:"
+msgid "Create User"
+msgstr "Erstellt durch"
+
+msgctxt "field:res.user-company.employee,employee:"
+msgid "Employee"
+msgstr "Mitarbeiter"
+
+msgctxt "field:res.user-company.employee,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:res.user-company.employee,rec_name:"
+msgid "Name"
+msgstr "Name"
+
+msgctxt "field:res.user-company.employee,user:"
+msgid "User"
+msgstr "Benutzer"
+
+msgctxt "field:res.user-company.employee,write_date:"
+msgid "Write Date"
+msgstr "Zuletzt geändert"
+
+msgctxt "field:res.user-company.employee,write_uid:"
+msgid "Write User"
+msgstr "Letzte Änderung durch"
+
+msgctxt "help:ir.cron,companies:"
msgid "Companies registered for this cron"
msgstr "Unternehmen, für welche dieser Job durchgeführt werden soll"
-msgctxt "model:company.company,name:0"
+msgctxt "model:company.company,name:"
msgid "Company"
msgstr "Unternehmen"
-msgctxt "model:company.company.config.init,name:0"
-msgid "Company Config Init"
-msgstr "Unternehmen Konfiguration Init"
+msgctxt "model:company.company.config.start,name:"
+msgid "Company Config"
+msgstr "Unternehmen Konfiguration"
-msgctxt "model:company.employee,name:0"
+msgctxt "model:company.employee,name:"
msgid "Employee"
msgstr "Mitarbeiter"
+msgctxt "model:ir.action,name:act_company_config"
+msgid "Configure Company"
+msgstr "Konfiguration Unternehmen"
+
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
msgstr "Unternehmen"
@@ -172,7 +230,7 @@ msgctxt "model:ir.action,name:report_letter"
msgid "Letter"
msgstr "Brief"
-msgctxt "model:ir.cron-company.company,name:0"
+msgctxt "model:ir.cron-company.company,name:"
msgid "ir.cron-company.company"
msgstr "ir.cron-company.company"
@@ -188,110 +246,114 @@ msgctxt "model:ir.ui.menu,name:menu_employee_form"
msgid "Employees"
msgstr "Mitarbeiter"
-msgctxt "odt:party.letter:0"
+msgctxt "model:res.user-company.employee,name:"
+msgid "User - Employee"
+msgstr "Benutzer - Mitarbeiter"
+
+msgctxt "odt:party.letter:"
msgid "Best Regards,"
msgstr "Mit freundlichen Grüßen,"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Date:"
msgstr "Datum:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Dear Madams and Sirs,"
msgstr "Sehr geehrte Damen und Herren,"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "E-Mail:"
msgstr "E-Mail:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Phone:"
msgstr "Telefon:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Subject:"
msgstr "Betreff:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "VAT Number:"
msgstr "USt-ID-Nr.:"
-msgctxt "view:company.company.config.init:0"
+msgctxt "view:company.company.config.start:"
msgid "Create Company"
msgstr "Unternehmen anlegen"
-msgctxt "view:company.company.config.init:0"
+msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
msgstr "Sie können nun Ihr Unternehmen dem System hinzufügen."
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Addresses"
msgstr "Adressen"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Companies"
msgstr "Unternehmen"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Company"
msgstr "Unternehmen"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Employees"
msgstr "Mitarbeiter"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "General"
msgstr "Allgemein"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Reports"
msgstr "Berichte"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "_Employees"
msgstr "_Mitarbeiter"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "_General"
msgstr "_Allgemein"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "_Reports"
msgstr "_Berichte"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Addresses"
msgstr "Adressen"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employee"
msgstr "Mitarbeiter"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employees"
msgstr "Mitarbeiter"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "General"
msgstr "Allgemein"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "_General"
msgstr "_Allgemein"
-msgctxt "wizard_button:company.company.config,company,add:0"
+msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr "Hinzufügen"
-msgctxt "wizard_button:company.company.config,company,end:0"
+msgctxt "wizard_button:company.company.config,company,end:"
msgid "Cancel"
msgstr "Abbrechen"
-msgctxt "wizard_button:company.company.config,init,company:0"
+msgctxt "wizard_button:company.company.config,start,company:"
msgid "Ok"
msgstr "OK"
-msgctxt "wizard_button:company.company.config,init,end:0"
+msgctxt "wizard_button:company.company.config,start,end:"
msgid "Cancel"
msgstr "Abbrechen"
diff --git a/locale/es_AR.po b/locale/es_AR.po
new file mode 100644
index 0000000..bfe49fd
--- /dev/null
+++ b/locale/es_AR.po
@@ -0,0 +1,343 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:company.company:"
+msgid "You can not create recursive companies!"
+msgstr "¡No puede crear empresas recursivas!"
+
+msgctxt "field:company.company,childs:"
+msgid "Children"
+msgstr "Hijos"
+
+msgctxt "field:company.company,create_date:"
+msgid "Create Date"
+msgstr "Fecha creación"
+
+msgctxt "field:company.company,create_uid:"
+msgid "Create User"
+msgstr "Usuario creación"
+
+msgctxt "field:company.company,currency:"
+msgid "Currency"
+msgstr "Divisa"
+
+msgctxt "field:company.company,employees:"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "field:company.company,footer:"
+msgid "Footer"
+msgstr "Pie de página"
+
+msgctxt "field:company.company,header:"
+msgid "Header"
+msgstr "Encabezado"
+
+msgctxt "field:company.company,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:company.company,parent:"
+msgid "Parent"
+msgstr "Padre"
+
+msgctxt "field:company.company,party:"
+msgid "Party"
+msgstr "Entidad"
+
+msgctxt "field:company.company,rec_name:"
+msgid "Name"
+msgstr "Nombre"
+
+msgctxt "field:company.company,write_date:"
+msgid "Write Date"
+msgstr "Fecha modificación"
+
+msgctxt "field:company.company,write_uid:"
+msgid "Write User"
+msgstr "Usuario modificación"
+
+msgctxt "field:company.company.config.start,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:company.employee,company:"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "field:company.employee,create_date:"
+msgid "Create Date"
+msgstr "Fecha creación"
+
+msgctxt "field:company.employee,create_uid:"
+msgid "Create User"
+msgstr "Usuario creación"
+
+msgctxt "field:company.employee,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:company.employee,party:"
+msgid "Party"
+msgstr "Entidad"
+
+msgctxt "field:company.employee,rec_name:"
+msgid "Name"
+msgstr "Nombre"
+
+msgctxt "field:company.employee,write_date:"
+msgid "Write Date"
+msgstr "Fecha modificación"
+
+msgctxt "field:company.employee,write_uid:"
+msgid "Write User"
+msgstr "Usuario modificación"
+
+msgctxt "field:ir.cron,companies:"
+msgid "Companies"
+msgstr "Empresas"
+
+msgctxt "field:ir.cron-company.company,company:"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "field:ir.cron-company.company,create_date:"
+msgid "Create Date"
+msgstr "Fecha creación"
+
+msgctxt "field:ir.cron-company.company,create_uid:"
+msgid "Create User"
+msgstr "Usuario creación"
+
+msgctxt "field:ir.cron-company.company,cron:"
+msgid "Cron"
+msgstr "Programador de tareas"
+
+msgctxt "field:ir.cron-company.company,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:ir.cron-company.company,rec_name:"
+msgid "Name"
+msgstr "Nombre"
+
+msgctxt "field:ir.cron-company.company,write_date:"
+msgid "Write Date"
+msgstr "Fecha modificación"
+
+msgctxt "field:ir.cron-company.company,write_uid:"
+msgid "Write User"
+msgstr "Usuario modificación"
+
+msgctxt "field:ir.property,company:"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "field:ir.sequence,company:"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "field:ir.sequence.strict,company:"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "field:res.user,companies:"
+msgid "Current Companies"
+msgstr "Empresas actuales"
+
+msgctxt "field:res.user,company:"
+msgid "Current Company"
+msgstr "Empresa actual"
+
+msgctxt "field:res.user,employee:"
+msgid "Employee"
+msgstr "Empleado"
+
+msgctxt "field:res.user,employees:"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "field:res.user,main_company:"
+msgid "Main Company"
+msgstr "Empresa principal"
+
+msgctxt "field:res.user-company.employee,create_date:"
+msgid "Create Date"
+msgstr "Fecha creación"
+
+msgctxt "field:res.user-company.employee,create_uid:"
+msgid "Create User"
+msgstr "Usuario creación"
+
+msgctxt "field:res.user-company.employee,employee:"
+msgid "Employee"
+msgstr "Empleado"
+
+msgctxt "field:res.user-company.employee,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:res.user-company.employee,rec_name:"
+msgid "Name"
+msgstr "Nombre del campo"
+
+msgctxt "field:res.user-company.employee,user:"
+msgid "User"
+msgstr "Usuario"
+
+msgctxt "field:res.user-company.employee,write_date:"
+msgid "Write Date"
+msgstr "Fecha modificación"
+
+msgctxt "field:res.user-company.employee,write_uid:"
+msgid "Write User"
+msgstr "Usuario modificación"
+
+msgctxt "help:ir.cron,companies:"
+msgid "Companies registered for this cron"
+msgstr "Empresas registradas en este programador de tareas"
+
+msgctxt "model:company.company,name:"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "model:company.company.config.start,name:"
+msgid "Company Config"
+msgstr "Configuración de Empresa"
+
+msgctxt "model:company.employee,name:"
+msgid "Employee"
+msgstr "Empleado"
+
+msgctxt "model:ir.action,name:act_company_config"
+msgid "Configure Company"
+msgstr "Configurar Empresa"
+
+msgctxt "model:ir.action,name:act_company_list"
+msgid "Companies"
+msgstr "Empresas"
+
+msgctxt "model:ir.action,name:act_company_tree"
+msgid "Companies"
+msgstr "Empresas"
+
+msgctxt "model:ir.action,name:act_employee_form"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "model:ir.action,name:report_letter"
+msgid "Letter"
+msgstr "Carta"
+
+msgctxt "model:ir.cron-company.company,name:"
+msgid "ir.cron-company.company"
+msgstr "ir.cron-company.company"
+
+msgctxt "model:ir.ui.menu,name:menu_company_list"
+msgid "Companies"
+msgstr "Empresas"
+
+msgctxt "model:ir.ui.menu,name:menu_company_tree"
+msgid "Companies"
+msgstr "Empresas"
+
+msgctxt "model:ir.ui.menu,name:menu_employee_form"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "model:res.user-company.employee,name:"
+msgid "User - Employee"
+msgstr "Usuario - Empleado"
+
+msgctxt "odt:party.letter:"
+msgid "Best Regards,"
+msgstr "Atentamente,"
+
+msgctxt "odt:party.letter:"
+msgid "Date:"
+msgstr "Fecha:"
+
+msgctxt "odt:party.letter:"
+msgid "Dear Madams and Sirs,"
+msgstr "Estimados señores y señoras,"
+
+msgctxt "odt:party.letter:"
+msgid "E-Mail:"
+msgstr "Correo electrónico:"
+
+msgctxt "odt:party.letter:"
+msgid "Phone:"
+msgstr "Teléfono:"
+
+msgctxt "odt:party.letter:"
+msgid "Subject:"
+msgstr "Asunto:"
+
+msgctxt "odt:party.letter:"
+msgid "VAT Number:"
+msgstr "CUIT:"
+
+msgctxt "view:company.company.config.start:"
+msgid "Create Company"
+msgstr "Crear una Empresa"
+
+msgctxt "view:company.company.config.start:"
+msgid "You can now add your company into the system."
+msgstr "Ahora puede añadir su empresa al sistema."
+
+msgctxt "view:company.company:"
+msgid "Addresses"
+msgstr "Direcciones"
+
+msgctxt "view:company.company:"
+msgid "Companies"
+msgstr "Empresas"
+
+msgctxt "view:company.company:"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "view:company.company:"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "view:company.company:"
+msgid "General"
+msgstr "General"
+
+msgctxt "view:company.company:"
+msgid "Reports"
+msgstr "Informes"
+
+msgctxt "view:company.employee:"
+msgid "Addresses"
+msgstr "Direcciones"
+
+msgctxt "view:company.employee:"
+msgid "Employee"
+msgstr "Empleado"
+
+msgctxt "view:company.employee:"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "view:company.employee:"
+msgid "General"
+msgstr "General"
+
+msgctxt "wizard_button:company.company.config,company,add:"
+msgid "Add"
+msgstr "Añadir"
+
+msgctxt "wizard_button:company.company.config,company,end:"
+msgid "Cancel"
+msgstr "Cancelar"
+
+msgctxt "wizard_button:company.company.config,start,company:"
+msgid "Ok"
+msgstr "Aceptar"
+
+msgctxt "wizard_button:company.company.config,start,end:"
+msgid "Cancel"
+msgstr "Cancelar"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index 32e56e1..e688aa8 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -2,119 +2,226 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:0"
+msgctxt "error:company.company:"
msgid "You can not create recursive companies!"
msgstr "No puede crear compañías recursivas!"
-msgctxt "error:res.user:0"
-msgid "You can not set a company that is not a child of your main company!"
-msgstr ""
-"No puede establecer una compañía que no es hija de su compañía principal!"
-
-msgctxt "field:company.company,childs:0"
+msgctxt "field:company.company,childs:"
msgid "Children"
msgstr "Hij at s"
-msgctxt "field:company.company,currency:0"
+msgctxt "field:company.company,create_date:"
+msgid "Create Date"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:company.company,create_uid:"
+msgid "Create User"
+msgstr "Crear usuario"
+
+msgctxt "field:company.company,currency:"
msgid "Currency"
msgstr "Moneda"
-msgctxt "field:company.company,employees:0"
+msgctxt "field:company.company,employees:"
msgid "Employees"
msgstr "Empleados"
-msgctxt "field:company.company,footer:0"
+msgctxt "field:company.company,footer:"
msgid "Footer"
msgstr "Pie de página"
-msgctxt "field:company.company,header:0"
+msgctxt "field:company.company,header:"
msgid "Header"
msgstr "Encabezado"
-msgctxt "field:company.company,parent:0"
+msgctxt "field:company.company,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:company.company,parent:"
msgid "Parent"
msgstr "Padre"
-msgctxt "field:company.company,party:0"
+msgctxt "field:company.company,party:"
msgid "Party"
msgstr "Tercero"
-msgctxt "field:company.company,rec_name:0"
+msgctxt "field:company.company,rec_name:"
msgid "Name"
msgstr "Nombre"
-msgctxt "field:company.employee,company:0"
+msgctxt "field:company.company,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:company.company,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:company.company.config.start,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:company.employee,company:"
msgid "Company"
msgstr "Compañía"
-msgctxt "field:company.employee,party:0"
+msgctxt "field:company.employee,create_date:"
+msgid "Create Date"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:company.employee,create_uid:"
+msgid "Create User"
+msgstr "Crear usuario"
+
+msgctxt "field:company.employee,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:company.employee,party:"
msgid "Party"
msgstr "Tercero"
-msgctxt "field:company.employee,rec_name:0"
+msgctxt "field:company.employee,rec_name:"
msgid "Name"
msgstr "Nombre"
-msgctxt "field:ir.cron,companies:0"
+msgctxt "field:company.employee,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:company.employee,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:ir.cron,companies:"
msgid "Companies"
msgstr "Compañías"
-msgctxt "field:ir.cron-company.company,company:0"
+msgctxt "field:ir.cron-company.company,company:"
msgid "Company"
msgstr "Compañía"
-msgctxt "field:ir.cron-company.company,cron:0"
+msgctxt "field:ir.cron-company.company,create_date:"
+msgid "Create Date"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:ir.cron-company.company,create_uid:"
+msgid "Create User"
+msgstr "Crear usuario"
+
+msgctxt "field:ir.cron-company.company,cron:"
msgid "Cron"
msgstr "Agendador"
-msgctxt "field:ir.cron-company.company,rec_name:0"
+msgctxt "field:ir.cron-company.company,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,rec_name:"
msgid "Name"
msgstr "Nombre"
-msgctxt "field:ir.property,company:0"
+msgctxt "field:ir.cron-company.company,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:ir.property,company:"
msgid "Company"
msgstr "Compañía"
-msgctxt "field:ir.sequence,company:0"
+msgctxt "field:ir.sequence,company:"
msgid "Company"
msgstr "Compañía"
-msgctxt "field:ir.sequence.strict,company:0"
+msgctxt "field:ir.sequence.strict,company:"
msgid "Company"
msgstr "Compañía"
-msgctxt "field:res.user,companies:0"
+msgctxt "field:res.user,companies:"
msgid "Current Companies"
msgstr "Compañías en Curso"
-msgctxt "field:res.user,company:0"
+msgctxt "field:res.user,company:"
msgid "Current Company"
msgstr "Compañía Actual"
-msgctxt "field:res.user,employee:0"
+msgctxt "field:res.user,employee:"
msgid "Employee"
msgstr "Empleado"
-msgctxt "field:res.user,main_company:0"
+#, fuzzy
+msgctxt "field:res.user,employees:"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "field:res.user,main_company:"
msgid "Main Company"
msgstr "Compañía Principal"
-msgctxt "help:ir.cron,companies:0"
+msgctxt "field:res.user-company.employee,create_date:"
+msgid "Create Date"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:res.user-company.employee,create_uid:"
+msgid "Create User"
+msgstr "Crear usuario"
+
+#, fuzzy
+msgctxt "field:res.user-company.employee,employee:"
+msgid "Employee"
+msgstr "Empleado"
+
+msgctxt "field:res.user-company.employee,id:"
+msgid "ID"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:res.user-company.employee,rec_name:"
+msgid "Name"
+msgstr "Nombre de Contacto"
+
+#, fuzzy
+msgctxt "field:res.user-company.employee,user:"
+msgid "User"
+msgstr "Usuario"
+
+msgctxt "field:res.user-company.employee,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:res.user-company.employee,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "help:ir.cron,companies:"
msgid "Companies registered for this cron"
msgstr "Compañías registradas para este lanzador"
-msgctxt "model:company.company,name:0"
+msgctxt "model:company.company,name:"
msgid "Company"
msgstr "Compañía"
-msgctxt "model:company.company.config.init,name:0"
-msgid "Company Config Init"
-msgstr "Configuración inicial de Compañía"
+msgctxt "model:company.company.config.start,name:"
+msgid "Company Config"
+msgstr ""
-msgctxt "model:company.employee,name:0"
+msgctxt "model:company.employee,name:"
msgid "Employee"
msgstr "Empleado"
+msgctxt "model:ir.action,name:act_company_config"
+msgid "Configure Company"
+msgstr ""
+
#, fuzzy
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
@@ -132,7 +239,7 @@ msgctxt "model:ir.action,name:report_letter"
msgid "Letter"
msgstr "Carta"
-msgctxt "model:ir.cron-company.company,name:0"
+msgctxt "model:ir.cron-company.company,name:"
msgid "ir.cron-company.company"
msgstr "ir.cron-company.company"
@@ -149,94 +256,100 @@ msgctxt "model:ir.ui.menu,name:menu_employee_form"
msgid "Employees"
msgstr "Empleados"
-msgctxt "odt:party.letter:0"
+msgctxt "model:res.user-company.employee,name:"
+msgid "User - Employee"
+msgstr ""
+
+msgctxt "odt:party.letter:"
msgid "Best Regards,"
msgstr "Atentamente,"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Date:"
msgstr "Fecha:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Dear Madams and Sirs,"
msgstr "Estimados Señoras y Señores,"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "E-Mail:"
msgstr "Correo electrónico:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Phone:"
msgstr "Teléfono:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Subject:"
msgstr "Título:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "VAT Number:"
msgstr ""
-msgctxt "view:company.company.config.init:0"
+msgctxt "view:company.company.config.start:"
msgid "Create Company"
-msgstr "Crear Compañía"
+msgstr ""
-msgctxt "view:company.company.config.init:0"
+msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
-msgstr "Ahora puede añadir su compañía al sistema."
+msgstr ""
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Addresses"
msgstr "Direcciones"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Companies"
msgstr "Compañías"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Company"
msgstr "Compañía"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Employees"
msgstr "Empleados"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "General"
msgstr "General"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Reports"
msgstr "Reportes"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Addresses"
msgstr "Direcciones"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employee"
msgstr "Empleado"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employees"
msgstr "Empleados"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "General"
msgstr "General"
-msgctxt "wizard_button:company.company.config,company,add:0"
+msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr "Adicionar"
-msgctxt "wizard_button:company.company.config,company,end:0"
+msgctxt "wizard_button:company.company.config,company,end:"
msgid "Cancel"
msgstr "Cancelar"
-msgctxt "wizard_button:company.company.config,init,company:0"
+#, fuzzy
+msgctxt "wizard_button:company.company.config,start,company:"
msgid "Ok"
msgstr "Aceptar"
-msgctxt "wizard_button:company.company.config,init,end:0"
+#, fuzzy
+msgctxt "wizard_button:company.company.config,start,end:"
msgid "Cancel"
msgstr "Cancelar"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index e70a442..c3843cd 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -2,120 +2,218 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:0"
+msgctxt "error:company.company:"
msgid "You can not create recursive companies!"
-msgstr "No puede crear empresas recursivas"
+msgstr "No puede crear empresas recursivas."
-msgctxt "error:res.user:0"
-msgid "You can not set a company that is not a child of your main company!"
-msgstr ""
-"No puede establecer una empresa que no es hija de su empresa principal"
-
-msgctxt "field:company.company,childs:0"
+msgctxt "field:company.company,childs:"
msgid "Children"
msgstr "Hijos"
-msgctxt "field:company.company,currency:0"
+msgctxt "field:company.company,create_date:"
+msgid "Create Date"
+msgstr "Fecha creación"
+
+msgctxt "field:company.company,create_uid:"
+msgid "Create User"
+msgstr "Usuario creación"
+
+msgctxt "field:company.company,currency:"
msgid "Currency"
msgstr "Divisa"
-msgctxt "field:company.company,employees:0"
+msgctxt "field:company.company,employees:"
msgid "Employees"
msgstr "Empleados"
-msgctxt "field:company.company,footer:0"
+msgctxt "field:company.company,footer:"
msgid "Footer"
msgstr "Pie de página"
-msgctxt "field:company.company,header:0"
+msgctxt "field:company.company,header:"
msgid "Header"
msgstr "Encabezado"
-msgctxt "field:company.company,parent:0"
+msgctxt "field:company.company,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:company.company,parent:"
msgid "Parent"
msgstr "Padre"
-msgctxt "field:company.company,party:0"
+msgctxt "field:company.company,party:"
msgid "Party"
msgstr "Tercero"
-msgctxt "field:company.company,rec_name:0"
+msgctxt "field:company.company,rec_name:"
msgid "Name"
msgstr "Nombre"
-msgctxt "field:company.employee,company:0"
+msgctxt "field:company.company,write_date:"
+msgid "Write Date"
+msgstr "Fecha modificación"
+
+msgctxt "field:company.company,write_uid:"
+msgid "Write User"
+msgstr "Usuario modificación"
+
+msgctxt "field:company.company.config.start,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:company.employee,company:"
msgid "Company"
msgstr "Empresa"
-msgctxt "field:company.employee,party:0"
+msgctxt "field:company.employee,create_date:"
+msgid "Create Date"
+msgstr "Fecha creación"
+
+msgctxt "field:company.employee,create_uid:"
+msgid "Create User"
+msgstr "Usuario creación"
+
+msgctxt "field:company.employee,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:company.employee,party:"
msgid "Party"
msgstr "Tercero"
-msgctxt "field:company.employee,rec_name:0"
+msgctxt "field:company.employee,rec_name:"
msgid "Name"
msgstr "Nombre"
-msgctxt "field:ir.cron,companies:0"
+msgctxt "field:company.employee,write_date:"
+msgid "Write Date"
+msgstr "Fecha modificación"
+
+msgctxt "field:company.employee,write_uid:"
+msgid "Write User"
+msgstr "Usuario modificación"
+
+msgctxt "field:ir.cron,companies:"
msgid "Companies"
msgstr "Empresas"
-msgctxt "field:ir.cron-company.company,company:0"
+msgctxt "field:ir.cron-company.company,company:"
msgid "Company"
msgstr "Empresa"
-msgctxt "field:ir.cron-company.company,cron:0"
+msgctxt "field:ir.cron-company.company,create_date:"
+msgid "Create Date"
+msgstr "Fecha creación"
+
+msgctxt "field:ir.cron-company.company,create_uid:"
+msgid "Create User"
+msgstr "Usuario creación"
+
+msgctxt "field:ir.cron-company.company,cron:"
msgid "Cron"
-msgstr "Programador de tareas"
+msgstr "Planificador"
+
+msgctxt "field:ir.cron-company.company,id:"
+msgid "ID"
+msgstr "ID"
-msgctxt "field:ir.cron-company.company,rec_name:0"
+msgctxt "field:ir.cron-company.company,rec_name:"
msgid "Name"
msgstr "Nombre"
-msgctxt "field:ir.property,company:0"
+msgctxt "field:ir.cron-company.company,write_date:"
+msgid "Write Date"
+msgstr "Fecha modificación"
+
+msgctxt "field:ir.cron-company.company,write_uid:"
+msgid "Write User"
+msgstr "Usuario modificación"
+
+msgctxt "field:ir.property,company:"
msgid "Company"
msgstr "Empresa"
-msgctxt "field:ir.sequence,company:0"
+msgctxt "field:ir.sequence,company:"
msgid "Company"
msgstr "Empresa"
-msgctxt "field:ir.sequence.strict,company:0"
+msgctxt "field:ir.sequence.strict,company:"
msgid "Company"
msgstr "Empresa"
-msgctxt "field:res.user,companies:0"
+msgctxt "field:res.user,companies:"
msgid "Current Companies"
msgstr "Empresas actuales"
-msgctxt "field:res.user,company:0"
+msgctxt "field:res.user,company:"
msgid "Current Company"
msgstr "Empresa actual"
-msgctxt "field:res.user,employee:0"
+msgctxt "field:res.user,employee:"
msgid "Employee"
msgstr "Empleado"
-msgctxt "field:res.user,main_company:0"
+msgctxt "field:res.user,employees:"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "field:res.user,main_company:"
msgid "Main Company"
msgstr "Empresa principal"
-msgctxt "help:ir.cron,companies:0"
+msgctxt "field:res.user-company.employee,create_date:"
+msgid "Create Date"
+msgstr "Fecha creación"
+
+msgctxt "field:res.user-company.employee,create_uid:"
+msgid "Create User"
+msgstr "Usuario creación"
+
+msgctxt "field:res.user-company.employee,employee:"
+msgid "Employee"
+msgstr "Empleado"
+
+msgctxt "field:res.user-company.employee,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:res.user-company.employee,rec_name:"
+msgid "Name"
+msgstr "Nombre"
+
+msgctxt "field:res.user-company.employee,user:"
+msgid "User"
+msgstr "Usuario"
+
+msgctxt "field:res.user-company.employee,write_date:"
+msgid "Write Date"
+msgstr "Fecha modificación"
+
+msgctxt "field:res.user-company.employee,write_uid:"
+msgid "Write User"
+msgstr "Usuario modificación"
+
+msgctxt "help:ir.cron,companies:"
msgid "Companies registered for this cron"
-msgstr "Empresas registradas en este programador de tareas"
+msgstr "Empresas registradas en este planificador."
-msgctxt "model:company.company,name:0"
+msgctxt "model:company.company,name:"
msgid "Company"
msgstr "Empresa"
-msgctxt "model:company.company.config.init,name:0"
-msgid "Company Config Init"
-msgstr "Inicialización de la configuración de la empresa"
+msgctxt "model:company.company.config.start,name:"
+msgid "Company Config"
+msgstr "Configuración empresa"
-msgctxt "model:company.employee,name:0"
+msgctxt "model:company.employee,name:"
msgid "Employee"
msgstr "Empleado"
-#, fuzzy
+msgctxt "model:ir.action,name:act_company_config"
+msgid "Configure Company"
+msgstr "Configuración empresa"
+
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
msgstr "Empresas"
@@ -132,11 +230,10 @@ msgctxt "model:ir.action,name:report_letter"
msgid "Letter"
msgstr "Carta"
-msgctxt "model:ir.cron-company.company,name:0"
+msgctxt "model:ir.cron-company.company,name:"
msgid "ir.cron-company.company"
msgstr "ir.cron-company.company"
-#, fuzzy
msgctxt "model:ir.ui.menu,name:menu_company_list"
msgid "Companies"
msgstr "Empresas"
@@ -149,94 +246,98 @@ msgctxt "model:ir.ui.menu,name:menu_employee_form"
msgid "Employees"
msgstr "Empleados"
-msgctxt "odt:party.letter:0"
+msgctxt "model:res.user-company.employee,name:"
+msgid "User - Employee"
+msgstr "Usuario - Empleado"
+
+msgctxt "odt:party.letter:"
msgid "Best Regards,"
msgstr "Atentamente,"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Date:"
msgstr "Fecha:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Dear Madams and Sirs,"
msgstr "Estimados señores y señoras,"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "E-Mail:"
msgstr "Correo electrónico:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Phone:"
msgstr "Teléfono:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Subject:"
msgstr "Asunto:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "VAT Number:"
-msgstr ""
+msgstr "Número CIF/NIF:"
-msgctxt "view:company.company.config.init:0"
+msgctxt "view:company.company.config.start:"
msgid "Create Company"
msgstr "Crear empresa"
-msgctxt "view:company.company.config.init:0"
+msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
-msgstr "Ahora puede añadir su empresa al sistema."
+msgstr "Ahora puede añadir su empresa en el sistema."
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Addresses"
msgstr "Direcciones"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Companies"
msgstr "Empresas"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Company"
msgstr "Empresa"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Employees"
msgstr "Empleados"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "General"
msgstr "General"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Reports"
msgstr "Informes"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Addresses"
msgstr "Direcciones"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employee"
msgstr "Empleado"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employees"
msgstr "Empleados"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "General"
msgstr "General"
-msgctxt "wizard_button:company.company.config,company,add:0"
+msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr "Añadir"
-msgctxt "wizard_button:company.company.config,company,end:0"
+msgctxt "wizard_button:company.company.config,company,end:"
msgid "Cancel"
msgstr "Cancelar"
-msgctxt "wizard_button:company.company.config,init,company:0"
+msgctxt "wizard_button:company.company.config,start,company:"
msgid "Ok"
msgstr "Aceptar"
-msgctxt "wizard_button:company.company.config,init,end:0"
+msgctxt "wizard_button:company.company.config,start,end:"
msgid "Cancel"
msgstr "Cancelar"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index e02959b..7fc0410 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -2,120 +2,222 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:0"
+msgctxt "error:company.company:"
msgid "You can not create recursive companies!"
msgstr "Vous ne pouvez pas créer des sociétés récursives !"
-msgctxt "error:res.user:0"
-msgid "You can not set a company that is not a child of your main company!"
-msgstr ""
-"Vous ne pouvez pas choisir une société qui n'est pas enfant de votre société"
-" principale !"
+msgctxt "error:company.company:"
+msgid "You can not create recursive companies!"
+msgstr "Vous ne pouvez pas créer des sociétés récursives !"
-msgctxt "field:company.company,childs:0"
+msgctxt "field:company.company,childs:"
msgid "Children"
msgstr "Enfants"
-msgctxt "field:company.company,currency:0"
+msgctxt "field:company.company,create_date:"
+msgid "Create Date"
+msgstr "Date de création"
+
+msgctxt "field:company.company,create_uid:"
+msgid "Create User"
+msgstr "Créé par"
+
+msgctxt "field:company.company,currency:"
msgid "Currency"
msgstr "Devise"
-msgctxt "field:company.company,employees:0"
+msgctxt "field:company.company,employees:"
msgid "Employees"
msgstr "Employés"
-msgctxt "field:company.company,footer:0"
+msgctxt "field:company.company,footer:"
msgid "Footer"
msgstr "Pied de Page"
-msgctxt "field:company.company,header:0"
+msgctxt "field:company.company,header:"
msgid "Header"
msgstr "Entête de Page"
-msgctxt "field:company.company,parent:0"
+msgctxt "field:company.company,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:company.company,parent:"
msgid "Parent"
msgstr "Parent"
-msgctxt "field:company.company,party:0"
+msgctxt "field:company.company,party:"
msgid "Party"
msgstr "Tiers"
-msgctxt "field:company.company,rec_name:0"
+msgctxt "field:company.company,rec_name:"
msgid "Name"
msgstr "Nom"
-msgctxt "field:company.employee,company:0"
+msgctxt "field:company.company,write_date:"
+msgid "Write Date"
+msgstr "Date de mise à jour"
+
+msgctxt "field:company.company,write_uid:"
+msgid "Write User"
+msgstr "Mis à jour par"
+
+msgctxt "field:company.company.config.start,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:company.employee,company:"
msgid "Company"
msgstr "Société"
-msgctxt "field:company.employee,party:0"
+msgctxt "field:company.employee,create_date:"
+msgid "Create Date"
+msgstr "Date de création"
+
+msgctxt "field:company.employee,create_uid:"
+msgid "Create User"
+msgstr "Créé par"
+
+msgctxt "field:company.employee,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:company.employee,party:"
msgid "Party"
msgstr "Tiers"
-msgctxt "field:company.employee,rec_name:0"
+msgctxt "field:company.employee,rec_name:"
msgid "Name"
msgstr "Nom"
-msgctxt "field:ir.cron,companies:0"
+msgctxt "field:company.employee,write_date:"
+msgid "Write Date"
+msgstr "Date de mise à jour"
+
+msgctxt "field:company.employee,write_uid:"
+msgid "Write User"
+msgstr "Mis à jour par"
+
+msgctxt "field:ir.cron,companies:"
msgid "Companies"
msgstr "Sociétés"
-msgctxt "field:ir.cron-company.company,company:0"
+msgctxt "field:ir.cron-company.company,company:"
msgid "Company"
msgstr "Société"
-msgctxt "field:ir.cron-company.company,cron:0"
+msgctxt "field:ir.cron-company.company,create_date:"
+msgid "Create Date"
+msgstr "Date de création"
+
+msgctxt "field:ir.cron-company.company,create_uid:"
+msgid "Create User"
+msgstr "Créé par"
+
+msgctxt "field:ir.cron-company.company,cron:"
msgid "Cron"
msgstr "Cron"
-msgctxt "field:ir.cron-company.company,rec_name:0"
+msgctxt "field:ir.cron-company.company,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:ir.cron-company.company,rec_name:"
msgid "Name"
msgstr "Nom"
-msgctxt "field:ir.property,company:0"
+msgctxt "field:ir.cron-company.company,write_date:"
+msgid "Write Date"
+msgstr "Date de mise à jour"
+
+msgctxt "field:ir.cron-company.company,write_uid:"
+msgid "Write User"
+msgstr "Mis à jour par"
+
+msgctxt "field:ir.property,company:"
msgid "Company"
msgstr "Société"
-msgctxt "field:ir.sequence,company:0"
+msgctxt "field:ir.sequence,company:"
msgid "Company"
msgstr "Société"
-msgctxt "field:ir.sequence.strict,company:0"
+msgctxt "field:ir.sequence.strict,company:"
msgid "Company"
msgstr "Société"
-msgctxt "field:res.user,companies:0"
+msgctxt "field:res.user,companies:"
msgid "Current Companies"
msgstr "Sociétés courantes"
-msgctxt "field:res.user,company:0"
+msgctxt "field:res.user,company:"
msgid "Current Company"
msgstr "Société courante"
-msgctxt "field:res.user,employee:0"
+msgctxt "field:res.user,employee:"
msgid "Employee"
msgstr "Employé"
-msgctxt "field:res.user,main_company:0"
+msgctxt "field:res.user,employees:"
+msgid "Employees"
+msgstr "Employés"
+
+msgctxt "field:res.user,main_company:"
msgid "Main Company"
msgstr "Société principale"
-msgctxt "help:ir.cron,companies:0"
+msgctxt "field:res.user-company.employee,create_date:"
+msgid "Create Date"
+msgstr "Date de création"
+
+msgctxt "field:res.user-company.employee,create_uid:"
+msgid "Create User"
+msgstr "Créé par"
+
+msgctxt "field:res.user-company.employee,employee:"
+msgid "Employee"
+msgstr "Employé"
+
+msgctxt "field:res.user-company.employee,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:res.user-company.employee,rec_name:"
+msgid "Name"
+msgstr "Nom"
+
+msgctxt "field:res.user-company.employee,user:"
+msgid "User"
+msgstr "Utilisateur"
+
+msgctxt "field:res.user-company.employee,write_date:"
+msgid "Write Date"
+msgstr "Date de mise à jour"
+
+msgctxt "field:res.user-company.employee,write_uid:"
+msgid "Write User"
+msgstr "Mis à jour par"
+
+msgctxt "help:ir.cron,companies:"
msgid "Companies registered for this cron"
msgstr "Sociétés enregistrées pour ce planificateur"
-msgctxt "model:company.company,name:0"
+msgctxt "model:company.company,name:"
msgid "Company"
msgstr "Société"
-msgctxt "model:company.company.config.init,name:0"
-msgid "Company Config Init"
-msgstr "Société config - Init"
+msgctxt "model:company.company.config.start,name:"
+msgid "Company Config"
+msgstr "Configuration société"
-msgctxt "model:company.employee,name:0"
+msgctxt "model:company.employee,name:"
msgid "Employee"
msgstr "Employé"
+msgctxt "model:ir.action,name:act_company_config"
+msgid "Configure Company"
+msgstr "Configuration société"
+
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
msgstr "Sociétés"
@@ -132,7 +234,7 @@ msgctxt "model:ir.action,name:report_letter"
msgid "Letter"
msgstr "Lettre"
-msgctxt "model:ir.cron-company.company,name:0"
+msgctxt "model:ir.cron-company.company,name:"
msgid "ir.cron-company.company"
msgstr ""
@@ -148,94 +250,146 @@ msgctxt "model:ir.ui.menu,name:menu_employee_form"
msgid "Employees"
msgstr "Employés"
-msgctxt "odt:party.letter:0"
+msgctxt "model:res.user-company.employee,name:"
+msgid "User - Employee"
+msgstr "Utilisateur - Employé"
+
+msgctxt "odt:party.letter:"
msgid "Best Regards,"
msgstr "Bien cordialement,"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
+msgid "Best Regards,"
+msgstr "Bien cordialement,"
+
+msgctxt "odt:party.letter:"
msgid "Date:"
msgstr "Date :"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
+msgid "Date:"
+msgstr "Date :"
+
+msgctxt "odt:party.letter:"
+msgid "Dear Madams and Sirs,"
+msgstr "Chère madame, cher monsieur,"
+
+msgctxt "odt:party.letter:"
msgid "Dear Madams and Sirs,"
msgstr "Chère madame, cher monsieur,"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "E-Mail:"
msgstr "E-Mail :"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
+msgid "E-Mail:"
+msgstr "E-Mail :"
+
+msgctxt "odt:party.letter:"
msgid "Phone:"
msgstr "Téléphone"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
+msgid "Phone:"
+msgstr "Téléphone"
+
+msgctxt "odt:party.letter:"
+msgid "Subject:"
+msgstr "Sujet :"
+
+msgctxt "odt:party.letter:"
msgid "Subject:"
msgstr "Sujet :"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "VAT Number:"
msgstr "Numéro TVA :"
-msgctxt "view:company.company.config.init:0"
+msgctxt "odt:party.letter:"
+msgid "VAT Number:"
+msgstr "Numéro TVA :"
+
+msgctxt "view:company.company.config.start:"
msgid "Create Company"
-msgstr "Créer une société"
+msgstr "Créer la sociéte"
-msgctxt "view:company.company.config.init:0"
+msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
-msgstr "Vous pouvez maintenant ajouter votre société dans le système."
+msgstr "Vous pouvez maintenant ajouter votre société au système"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Addresses"
msgstr "Adresses"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Companies"
msgstr "Sociétés"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
+msgid "Companies"
+msgstr "Sociétés"
+
+msgctxt "view:company.company:"
+msgid "Company"
+msgstr "Société"
+
+msgctxt "view:company.company:"
msgid "Company"
msgstr "Société"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Employees"
msgstr "Employés"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "General"
msgstr "Général"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Reports"
msgstr "Rapports"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.company:"
+msgid "Reports"
+msgstr "Rapports"
+
+msgctxt "view:company.employee:"
msgid "Addresses"
msgstr "Adresses"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employee"
msgstr "Employé"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
+msgid "Employee"
+msgstr "Employé"
+
+msgctxt "view:company.employee:"
+msgid "Employees"
+msgstr "Employés"
+
+msgctxt "view:company.employee:"
msgid "Employees"
msgstr "Employés"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "General"
msgstr "Général"
-msgctxt "wizard_button:company.company.config,company,add:0"
+msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr "Ajouter"
-msgctxt "wizard_button:company.company.config,company,end:0"
+msgctxt "wizard_button:company.company.config,company,end:"
msgid "Cancel"
msgstr "Annuler"
-msgctxt "wizard_button:company.company.config,init,company:0"
+msgctxt "wizard_button:company.company.config,start,company:"
msgid "Ok"
msgstr "Ok"
-msgctxt "wizard_button:company.company.config,init,end:0"
+msgctxt "wizard_button:company.company.config,start,end:"
msgid "Cancel"
msgstr "Annuler"
diff --git a/locale/nl_NL.po b/locale/nl_NL.po
index 76d37a2..2d548e8 100644
--- a/locale/nl_NL.po
+++ b/locale/nl_NL.po
@@ -2,120 +2,222 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:0"
+msgctxt "error:company.company:"
msgid "You can not create recursive companies!"
msgstr "U kunt geen bedrijven aanmaken die naar zichzelf verwijzen!"
-msgctxt "error:res.user:0"
-msgid "You can not set a company that is not a child of your main company!"
-msgstr ""
-"U kunt geen bedrijf kiezen dat geen onderdeel uitmaakt van het "
-"moederbedrijf!"
-
-msgctxt "field:company.company,childs:0"
+msgctxt "field:company.company,childs:"
msgid "Children"
msgstr "Onderliggende niveaus"
-msgctxt "field:company.company,currency:0"
+msgctxt "field:company.company,create_date:"
+msgid "Create Date"
+msgstr ""
+
+msgctxt "field:company.company,create_uid:"
+msgid "Create User"
+msgstr ""
+
+msgctxt "field:company.company,currency:"
msgid "Currency"
msgstr "Valuta"
-msgctxt "field:company.company,employees:0"
+msgctxt "field:company.company,employees:"
msgid "Employees"
msgstr "Werknemers"
-msgctxt "field:company.company,footer:0"
+msgctxt "field:company.company,footer:"
msgid "Footer"
msgstr "Werknemers"
-msgctxt "field:company.company,header:0"
+msgctxt "field:company.company,header:"
msgid "Header"
msgstr "Werknemers"
-msgctxt "field:company.company,parent:0"
+msgctxt "field:company.company,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:company.company,parent:"
msgid "Parent"
msgstr "Bovenliggend niveau"
-msgctxt "field:company.company,party:0"
+msgctxt "field:company.company,party:"
msgid "Party"
msgstr "Relatie"
-msgctxt "field:company.company,rec_name:0"
+msgctxt "field:company.company,rec_name:"
msgid "Name"
msgstr "Naam"
-msgctxt "field:company.employee,company:0"
+msgctxt "field:company.company,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:company.company,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:company.company.config.start,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:company.employee,company:"
msgid "Company"
msgstr "Bedrijf"
-msgctxt "field:company.employee,party:0"
+msgctxt "field:company.employee,create_date:"
+msgid "Create Date"
+msgstr ""
+
+msgctxt "field:company.employee,create_uid:"
+msgid "Create User"
+msgstr ""
+
+msgctxt "field:company.employee,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:company.employee,party:"
msgid "Party"
msgstr "Relatie"
-msgctxt "field:company.employee,rec_name:0"
+msgctxt "field:company.employee,rec_name:"
msgid "Name"
msgstr "Naam"
-msgctxt "field:ir.cron,companies:0"
+msgctxt "field:company.employee,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:company.employee,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:ir.cron,companies:"
msgid "Companies"
msgstr "Bedrijven"
-msgctxt "field:ir.cron-company.company,company:0"
+msgctxt "field:ir.cron-company.company,company:"
msgid "Company"
msgstr "Bedrijf"
-msgctxt "field:ir.cron-company.company,cron:0"
+msgctxt "field:ir.cron-company.company,create_date:"
+msgid "Create Date"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,create_uid:"
+msgid "Create User"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,cron:"
msgid "Cron"
msgstr "Cyclische opdracht"
-msgctxt "field:ir.cron-company.company,rec_name:0"
+msgctxt "field:ir.cron-company.company,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,rec_name:"
msgid "Name"
msgstr "Naam"
-msgctxt "field:ir.property,company:0"
+msgctxt "field:ir.cron-company.company,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:ir.property,company:"
msgid "Company"
msgstr "Bedrijf"
-msgctxt "field:ir.sequence,company:0"
+msgctxt "field:ir.sequence,company:"
msgid "Company"
msgstr "Bedrijf"
-msgctxt "field:ir.sequence.strict,company:0"
+msgctxt "field:ir.sequence.strict,company:"
msgid "Company"
msgstr "Bedrijf"
-msgctxt "field:res.user,companies:0"
+msgctxt "field:res.user,companies:"
msgid "Current Companies"
msgstr "Huidige bedrijven"
-msgctxt "field:res.user,company:0"
+msgctxt "field:res.user,company:"
msgid "Current Company"
msgstr "Huidig bedrijf"
-msgctxt "field:res.user,employee:0"
+msgctxt "field:res.user,employee:"
msgid "Employee"
msgstr "Werknemer"
-msgctxt "field:res.user,main_company:0"
+#, fuzzy
+msgctxt "field:res.user,employees:"
+msgid "Employees"
+msgstr "Werknemers"
+
+msgctxt "field:res.user,main_company:"
msgid "Main Company"
msgstr "Moederbedrijf"
-msgctxt "help:ir.cron,companies:0"
+msgctxt "field:res.user-company.employee,create_date:"
+msgid "Create Date"
+msgstr ""
+
+msgctxt "field:res.user-company.employee,create_uid:"
+msgid "Create User"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:res.user-company.employee,employee:"
+msgid "Employee"
+msgstr "Werknemer"
+
+msgctxt "field:res.user-company.employee,id:"
+msgid "ID"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:res.user-company.employee,rec_name:"
+msgid "Name"
+msgstr "Naam bijlage"
+
+#, fuzzy
+msgctxt "field:res.user-company.employee,user:"
+msgid "User"
+msgstr "Gebruiker"
+
+msgctxt "field:res.user-company.employee,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:res.user-company.employee,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "help:ir.cron,companies:"
msgid "Companies registered for this cron"
msgstr "Bedrijven aangesloten op deze cyclische opdracht"
-msgctxt "model:company.company,name:0"
+msgctxt "model:company.company,name:"
msgid "Company"
msgstr "Bedrijf"
-msgctxt "model:company.company.config.init,name:0"
-msgid "Company Config Init"
-msgstr "Bedrijfsinstellingen gaan maken"
+msgctxt "model:company.company.config.start,name:"
+msgid "Company Config"
+msgstr ""
-msgctxt "model:company.employee,name:0"
+msgctxt "model:company.employee,name:"
msgid "Employee"
msgstr "Werknemer"
+msgctxt "model:ir.action,name:act_company_config"
+msgid "Configure Company"
+msgstr ""
+
#, fuzzy
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
@@ -133,7 +235,7 @@ msgctxt "model:ir.action,name:report_letter"
msgid "Letter"
msgstr "Brief"
-msgctxt "model:ir.cron-company.company,name:0"
+msgctxt "model:ir.cron-company.company,name:"
msgid "ir.cron-company.company"
msgstr ""
@@ -150,78 +252,84 @@ msgctxt "model:ir.ui.menu,name:menu_employee_form"
msgid "Employees"
msgstr "Werknemers"
-msgctxt "odt:party.letter:0"
+msgctxt "model:res.user-company.employee,name:"
+msgid "User - Employee"
+msgstr ""
+
+msgctxt "odt:party.letter:"
msgid "Best Regards,"
msgstr "Met vriendelijke groet,"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Date:"
msgstr "Datum:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Dear Madams and Sirs,"
msgstr "Geachte heer/mevrouw,"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "E-Mail:"
msgstr "E-mail:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Phone:"
msgstr "Telefoon:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Subject:"
msgstr "Betreft:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "VAT Number:"
msgstr "BTW-nummer:"
-msgctxt "view:company.company.config.init:0"
+msgctxt "view:company.company.config.start:"
msgid "Create Company"
-msgstr "Bedrijf aanmaken"
+msgstr ""
-msgctxt "view:company.company.config.init:0"
+msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
-msgstr "U kunt nu uw eigen bedrijf toevoegen aan het systeem."
+msgstr ""
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Companies"
msgstr "Bedrijven"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Company"
msgstr "Bedrijf"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Employees"
msgstr "Werknemers"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Reports"
msgstr "Rapportage"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employee"
msgstr "Werknemer"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employees"
msgstr "Werknemers"
-msgctxt "wizard_button:company.company.config,company,add:0"
+msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr "Toevoegen"
-msgctxt "wizard_button:company.company.config,company,end:0"
+msgctxt "wizard_button:company.company.config,company,end:"
msgid "Cancel"
msgstr "Annuleren"
-msgctxt "wizard_button:company.company.config,init,company:0"
+#, fuzzy
+msgctxt "wizard_button:company.company.config,start,company:"
msgid "Ok"
msgstr "Oké"
-msgctxt "wizard_button:company.company.config,init,end:0"
+#, fuzzy
+msgctxt "wizard_button:company.company.config,start,end:"
msgid "Cancel"
msgstr "Annuleren"
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
index 9c21bd1..7838413 100644
--- a/locale/ru_RU.po
+++ b/locale/ru_RU.po
@@ -2,120 +2,222 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
-msgctxt "error:company.company:0"
+msgctxt "error:company.company:"
msgid "You can not create recursive companies!"
msgstr "Вы не можете создать взаимоподчинённые организации"
-msgctxt "error:res.user:0"
-msgid "You can not set a company that is not a child of your main company!"
-msgstr ""
-"вы не можете установить учетную организацию, отсутвуют подразделения вашей "
-"компании"
-
-msgctxt "field:company.company,childs:0"
+msgctxt "field:company.company,childs:"
msgid "Children"
msgstr "Подчиненый"
-msgctxt "field:company.company,currency:0"
+msgctxt "field:company.company,create_date:"
+msgid "Create Date"
+msgstr ""
+
+msgctxt "field:company.company,create_uid:"
+msgid "Create User"
+msgstr ""
+
+msgctxt "field:company.company,currency:"
msgid "Currency"
msgstr "Валюта"
-msgctxt "field:company.company,employees:0"
+msgctxt "field:company.company,employees:"
msgid "Employees"
msgstr "Сотрудники"
-msgctxt "field:company.company,footer:0"
+msgctxt "field:company.company,footer:"
msgid "Footer"
msgstr "Нижний колонтитул"
-msgctxt "field:company.company,header:0"
+msgctxt "field:company.company,header:"
msgid "Header"
msgstr "Верхний колонтитул"
-msgctxt "field:company.company,parent:0"
+msgctxt "field:company.company,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:company.company,parent:"
msgid "Parent"
msgstr "Основной"
-msgctxt "field:company.company,party:0"
+msgctxt "field:company.company,party:"
msgid "Party"
msgstr "Контрагент"
-msgctxt "field:company.company,rec_name:0"
+msgctxt "field:company.company,rec_name:"
msgid "Name"
msgstr "Наименование"
-msgctxt "field:company.employee,company:0"
+msgctxt "field:company.company,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:company.company,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:company.company.config.start,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:company.employee,company:"
msgid "Company"
msgstr "Учет.орг."
-msgctxt "field:company.employee,party:0"
+msgctxt "field:company.employee,create_date:"
+msgid "Create Date"
+msgstr ""
+
+msgctxt "field:company.employee,create_uid:"
+msgid "Create User"
+msgstr ""
+
+msgctxt "field:company.employee,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:company.employee,party:"
msgid "Party"
msgstr "Контрагент"
-msgctxt "field:company.employee,rec_name:0"
+msgctxt "field:company.employee,rec_name:"
msgid "Name"
msgstr "Наименование"
-msgctxt "field:ir.cron,companies:0"
+msgctxt "field:company.employee,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:company.employee,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:ir.cron,companies:"
msgid "Companies"
msgstr "Организация"
-msgctxt "field:ir.cron-company.company,company:0"
+msgctxt "field:ir.cron-company.company,company:"
msgid "Company"
msgstr "Учет.орг."
-msgctxt "field:ir.cron-company.company,cron:0"
+msgctxt "field:ir.cron-company.company,create_date:"
+msgid "Create Date"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,create_uid:"
+msgid "Create User"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,cron:"
msgid "Cron"
msgstr "Планировщик"
-msgctxt "field:ir.cron-company.company,rec_name:0"
+msgctxt "field:ir.cron-company.company,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,rec_name:"
msgid "Name"
msgstr "Наименование"
-msgctxt "field:ir.property,company:0"
+msgctxt "field:ir.cron-company.company,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:ir.property,company:"
msgid "Company"
msgstr "Учет.орг."
-msgctxt "field:ir.sequence,company:0"
+msgctxt "field:ir.sequence,company:"
msgid "Company"
msgstr "Учет.орг."
-msgctxt "field:ir.sequence.strict,company:0"
+msgctxt "field:ir.sequence.strict,company:"
msgid "Company"
msgstr "Учет.орг."
-msgctxt "field:res.user,companies:0"
+msgctxt "field:res.user,companies:"
msgid "Current Companies"
msgstr "Текущие организации"
-msgctxt "field:res.user,company:0"
+msgctxt "field:res.user,company:"
msgid "Current Company"
msgstr "Текущая организация"
-msgctxt "field:res.user,employee:0"
+msgctxt "field:res.user,employee:"
msgid "Employee"
msgstr "Сотрудник"
-msgctxt "field:res.user,main_company:0"
+#, fuzzy
+msgctxt "field:res.user,employees:"
+msgid "Employees"
+msgstr "Сотрудники"
+
+msgctxt "field:res.user,main_company:"
msgid "Main Company"
msgstr "Основная организация"
-msgctxt "help:ir.cron,companies:0"
+msgctxt "field:res.user-company.employee,create_date:"
+msgid "Create Date"
+msgstr ""
+
+msgctxt "field:res.user-company.employee,create_uid:"
+msgid "Create User"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:res.user-company.employee,employee:"
+msgid "Employee"
+msgstr "Сотрудник"
+
+msgctxt "field:res.user-company.employee,id:"
+msgid "ID"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:res.user-company.employee,rec_name:"
+msgid "Name"
+msgstr "Наименование"
+
+#, fuzzy
+msgctxt "field:res.user-company.employee,user:"
+msgid "User"
+msgstr "Пользователь"
+
+msgctxt "field:res.user-company.employee,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:res.user-company.employee,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "help:ir.cron,companies:"
msgid "Companies registered for this cron"
msgstr "Организации зарегистрированные для этого планировщика"
-msgctxt "model:company.company,name:0"
+msgctxt "model:company.company,name:"
msgid "Company"
msgstr "Учет.орг."
-msgctxt "model:company.company.config.init,name:0"
-msgid "Company Config Init"
-msgstr "Конфигурация модуля предприятия"
+msgctxt "model:company.company.config.start,name:"
+msgid "Company Config"
+msgstr ""
-msgctxt "model:company.employee,name:0"
+msgctxt "model:company.employee,name:"
msgid "Employee"
msgstr "Сотрудник"
+msgctxt "model:ir.action,name:act_company_config"
+msgid "Configure Company"
+msgstr ""
+
#, fuzzy
msgctxt "model:ir.action,name:act_company_list"
msgid "Companies"
@@ -133,7 +235,7 @@ msgctxt "model:ir.action,name:report_letter"
msgid "Letter"
msgstr "Письмо"
-msgctxt "model:ir.cron-company.company,name:0"
+msgctxt "model:ir.cron-company.company,name:"
msgid "ir.cron-company.company"
msgstr "Планировщик"
@@ -150,83 +252,89 @@ msgctxt "model:ir.ui.menu,name:menu_employee_form"
msgid "Employees"
msgstr "Сотрудники"
-msgctxt "odt:party.letter:0"
+msgctxt "model:res.user-company.employee,name:"
+msgid "User - Employee"
+msgstr ""
+
+msgctxt "odt:party.letter:"
msgid "Best Regards,"
msgstr "С уважением,"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Date:"
msgstr "Дата:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Dear Madams and Sirs,"
msgstr "Уважаемые дамы и годпода,"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "E-Mail:"
msgstr "E-Mail:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Phone:"
msgstr "Телефон:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "Subject:"
msgstr "Тема:"
-msgctxt "odt:party.letter:0"
+msgctxt "odt:party.letter:"
msgid "VAT Number:"
msgstr ""
-msgctxt "view:company.company.config.init:0"
+msgctxt "view:company.company.config.start:"
msgid "Create Company"
-msgstr "Создать организацию"
+msgstr ""
-msgctxt "view:company.company.config.init:0"
+msgctxt "view:company.company.config.start:"
msgid "You can now add your company into the system."
-msgstr "Теперь вы можете добавить организацию в систему"
+msgstr ""
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Companies"
msgstr "Организация"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Company"
msgstr "Учет.орг."
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Employees"
msgstr "Сотрудники"
-msgctxt "view:company.company:0"
+msgctxt "view:company.company:"
msgid "Reports"
msgstr "Отчеты"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employee"
msgstr "Сотрудник"
#, fuzzy
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employees"
msgstr "Сотрудники"
-msgctxt "view:company.employee:0"
+msgctxt "view:company.employee:"
msgid "Employess"
msgstr "Сотрудники"
-msgctxt "wizard_button:company.company.config,company,add:0"
+msgctxt "wizard_button:company.company.config,company,add:"
msgid "Add"
msgstr "Добавить"
-msgctxt "wizard_button:company.company.config,company,end:0"
+msgctxt "wizard_button:company.company.config,company,end:"
msgid "Cancel"
msgstr "Отменить"
-msgctxt "wizard_button:company.company.config,init,company:0"
+#, fuzzy
+msgctxt "wizard_button:company.company.config,start,company:"
msgid "Ok"
msgstr "Да"
-msgctxt "wizard_button:company.company.config,init,end:0"
+#, fuzzy
+msgctxt "wizard_button:company.company.config,start,end:"
msgid "Cancel"
msgstr "Отменить"
diff --git a/party.py b/party.py
index ef4b845..b6d5ff0 100644
--- a/party.py
+++ b/party.py
@@ -16,6 +16,6 @@ class Configuration(Model):
self.party_sequence.domain = copy.copy(self.party_sequence.domain)
self.party_sequence.domain = [
self.party_sequence.domain,
- ('company', 'in', [Eval('context', {}).get('company'), False])]
+ ('company', 'in', [Eval('context', {}).get('company'), None])]
Configuration()
diff --git a/setup.py b/setup.py
index d4da235..f08af25 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ minor_version = int(minor_version)
requires = []
for dep in info.get('depends', []):
- if not re.match(r'(ir|res|workflow|webdav)(\W|$)', dep):
+ if not re.match(r'(ir|res|webdav)(\W|$)', dep):
requires.append('trytond_%s >= %s.%s, < %s.%s' %
(dep, major_version, minor_version, major_version,
minor_version + 1))
diff --git a/tests/__init__.py b/tests/__init__.py
index 31b9c4a..7d06523 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,4 +1,4 @@
#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
+from .test_company import suite
diff --git a/tests/test_company.py b/tests/test_company.py
index d7041a3..89eba51 100644
--- a/tests/test_company.py
+++ b/tests/test_company.py
@@ -1,7 +1,8 @@
#!/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.
-import sys, os
+import sys
+import os
DIR = os.path.abspath(os.path.normpath(os.path.join(__file__,
'..', '..', '..', '..', '..', 'trytond')))
if os.path.isdir(DIR):
@@ -90,7 +91,7 @@ class CompanyTestCase(unittest.TestCase):
('name', '=', 'B2CK'),
], 0, 1, None)[0]
- employee1_id = self.employee.create({
+ self.employee.create({
'name': 'Employee1',
'company': company1_id,
})
@@ -138,7 +139,8 @@ class CompanyTestCase(unittest.TestCase):
self.assertEqual(user2.company.id, company2_id)
with transaction.set_context({'company': company2_id}):
- company_id = self.user.read(user1_id, ['company'])['company']
+ company_id = self.user.read(user1_id,
+ ['company'])['company']
self.assertEqual(company_id, company2_id)
user1, user2 = self.user.browse([user1_id, user2_id])
@@ -146,11 +148,12 @@ class CompanyTestCase(unittest.TestCase):
self.assertEqual(user2.company.id, company2_id)
with transaction.set_context({'company': False}):
- company_id = self.user.read(user1_id, ['company'])['company']
+ company_id = self.user.read(user1_id,
+ ['company'])['company']
self.assertEqual(company_id, False)
user1, user2 = self.user.browse([user1_id, user2_id])
- self.assertEqual(user1.company.id, False)
+ self.assertEqual(user1.company.id, None)
self.assertEqual(user2.company.id, company2_id)
@@ -160,7 +163,8 @@ def suite():
for test in test_currency.suite():
if test not in suite:
suite.addTest(test)
- suite.addTests(unittest.TestLoader().loadTestsFromTestCase(CompanyTestCase))
+ suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
+ CompanyTestCase))
return suite
if __name__ == '__main__':
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 57ff09b..3ef2f43 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.0
Name: trytond-company
-Version: 2.2.1
+Version: 2.4.0
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,7 +12,7 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
-Download-URL: http://downloads.tryton.org/2.2/
+Download-URL: http://downloads.tryton.org/2.4/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff --git a/trytond_company.egg-info/SOURCES.txt b/trytond_company.egg-info/SOURCES.txt
index e7c75f7..dea7938 100644
--- a/trytond_company.egg-info/SOURCES.txt
+++ b/trytond_company.egg-info/SOURCES.txt
@@ -18,8 +18,10 @@ setup.py
./tests/test_company.py
doc/index.rst
locale/bg_BG.po
+locale/ca_ES.po
locale/cs_CZ.po
locale/de_DE.po
+locale/es_AR.po
locale/es_CO.po
locale/es_ES.po
locale/fr_FR.po
diff --git a/trytond_company.egg-info/requires.txt b/trytond_company.egg-info/requires.txt
index 357954b..b1689d6 100644
--- a/trytond_company.egg-info/requires.txt
+++ b/trytond_company.egg-info/requires.txt
@@ -1,3 +1,3 @@
-trytond_party >= 2.2, < 2.3
-trytond_currency >= 2.2, < 2.3
-trytond >= 2.2, < 2.3
\ No newline at end of file
+trytond_party >= 2.4, < 2.5
+trytond_currency >= 2.4, < 2.5
+trytond >= 2.4, < 2.5
\ No newline at end of file
commit c991b136038cc634c8918d3fbe01f4de535e575a
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Dec 26 13:35:50 2011 +0100
Adding upstream version 2.2.1.
diff --git a/CHANGELOG b/CHANGELOG
index 45c5081..f9fcbce 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.1 - 2011-12-26
+* Bug fixes (see mercurial logs for details)
+
Version 2.2.0 - 2011-10-24
* Bug fixes (see mercurial logs for details)
* Add currency name in status bar
diff --git a/PKG-INFO b/PKG-INFO
index b0777e4..e7fab0f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
Name: trytond_company
-Version: 2.2.0
+Version: 2.2.1
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
diff --git a/__tryton__.py b/__tryton__.py
index 17511d5..10fabc3 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -9,7 +9,7 @@
'name_es_ES': 'Empresa',
'name_fr_FR': 'Société',
'name_nl_NL': 'Bedrijf',
- 'version': '2.2.0',
+ 'version': '2.2.1',
'author': 'B2CK',
'email': 'info at b2ck.com',
'website': 'http://www.tryton.org/',
diff --git a/tests/test_company.py b/tests/test_company.py
index 946a176..d7041a3 100644
--- a/tests/test_company.py
+++ b/tests/test_company.py
@@ -42,7 +42,8 @@ class CompanyTestCase(unittest.TestCase):
'''
Create company.
'''
- with Transaction().start(DB_NAME, USER, CONTEXT) as transaction:
+ with Transaction().start(DB_NAME, USER,
+ context=CONTEXT) as transaction:
currency1_id = self.currency.search([
('code', '=', 'cu1'),
], 0, 1, None)[0]
@@ -58,7 +59,7 @@ class CompanyTestCase(unittest.TestCase):
'''
Test company recursion.
'''
- with Transaction().start(DB_NAME, USER, CONTEXT) as transaction:
+ with Transaction().start(DB_NAME, USER, context=CONTEXT):
currency1_id = self.currency.search([
('code', '=', 'cu1'),
], 0, 1, None)[0]
@@ -83,7 +84,8 @@ class CompanyTestCase(unittest.TestCase):
'''
Create employee.
'''
- with Transaction().start(DB_NAME, USER, CONTEXT) as transaction:
+ with Transaction().start(DB_NAME, USER,
+ context=CONTEXT) as transaction:
company1_id = self.company.search([
('name', '=', 'B2CK'),
], 0, 1, None)[0]
@@ -98,7 +100,8 @@ class CompanyTestCase(unittest.TestCase):
'''
Test user company
'''
- with Transaction().start(DB_NAME, USER, CONTEXT) as transaction:
+ with Transaction().start(DB_NAME, USER,
+ context=CONTEXT) as transaction:
currency1_id = self.currency.search([
('code', '=', 'cu1'),
], 0, 1, None)[0]
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 84b6640..57ff09b 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
Name: trytond-company
-Version: 2.2.0
+Version: 2.2.1
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
commit 44265d54b28a92e4ff6eca01702bd94090be47f9
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Oct 31 16:20:44 2011 +0100
Adding upstream version 2.2.0.
diff --git a/CHANGELOG b/CHANGELOG
index d373589..45c5081 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,7 @@
-Version 2.0.1 - 2011-10-01
+Version 2.2.0 - 2011-10-24
* Bug fixes (see mercurial logs for details)
+* Add currency name in status bar
+* Allow to change user company with context
Version 2.0.0 - 2011-04-27
* Bug fixes (see mercurial logs for details)
diff --git a/MANIFEST.in b/MANIFEST.in
index 7b252be..4aec982 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -6,5 +6,5 @@ include COPYRIGHT
include LICENSE
include *.xml
include *.odt
-include *.csv
+include locale/*.po
include doc/*
diff --git a/PKG-INFO b/PKG-INFO
index 187769d..b0777e4 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond_company
-Version: 2.0.1
+Version: 2.2.0
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,17 +12,19 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
-Download-URL: http://downloads.tryton.org/2.0/
+Download-URL: http://downloads.tryton.org/2.2/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
+Classifier: Framework :: Tryton
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Legal Industry
Classifier: Intended Audience :: Manufacturing
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: Bulgarian
+Classifier: Natural Language :: Czech
Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
Classifier: Natural Language :: French
@@ -30,7 +32,6 @@ Classifier: Natural Language :: German
Classifier: Natural Language :: Russian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2.5
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Office/Business
diff --git a/__init__.py b/__init__.py
index 9125c89..62dd77d 100644
--- a/__init__.py
+++ b/__init__.py
@@ -3,3 +3,4 @@
from company import *
from cron import *
+import party
diff --git a/__tryton__.py b/__tryton__.py
index 327eec9..17511d5 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -9,7 +9,7 @@
'name_es_ES': 'Empresa',
'name_fr_FR': 'Société',
'name_nl_NL': 'Bedrijf',
- 'version': '2.0.1',
+ 'version': '2.2.0',
'author': 'B2CK',
'email': 'info at b2ck.com',
'website': 'http://www.tryton.org/',
@@ -80,12 +80,13 @@ Lance les planificateurs sur chaque société.
'cron.xml',
],
'translation': [
- 'bg_BG.csv',
- 'de_DE.csv',
- 'es_CO.csv',
- 'es_ES.csv',
- 'fr_FR.csv',
- 'nl_NL.csv',
- 'ru_RU.csv',
+ 'locale/bg_BG.po',
+ 'locale/cs_CZ.po',
+ 'locale/de_DE.po',
+ 'locale/es_CO.po',
+ 'locale/es_ES.po',
+ 'locale/fr_FR.po',
+ 'locale/nl_NL.po',
+ 'locale/ru_RU.po',
]
}
diff --git a/bg_BG.csv b/bg_BG.csv
deleted file mode 100644
index d748c63..0000000
--- a/bg_BG.csv
+++ /dev/null
@@ -1,57 +0,0 @@
-type,name,res_id,src,value,fuzzy
-error,company.company,0,You can not create recursive companies!,Не може да създавате взаимно вложени фирми!,0
-error,res.user,0,You can not set a company that is not a child of your main company!,Не може да изберете фирма която не е подчинена на основната фирма!,0
-field,"company.company,childs",0,Children,Деца,0
-field,"company.company,currency",0,Currency,Валута,0
-field,"company.company,employees",0,Employees,Служители,0
-field,"company.company,footer",0,Footer,Долен колонтитул,0
-field,"company.company,header",0,Header,Горен колонтитул,0
-field,"company.company,parent",0,Parent,Родител,0
-field,"company.company,party",0,Party,Партньор,0
-field,"company.company,rec_name",0,Name,Име,0
-field,"company.employee,company",0,Company,Фирма,0
-field,"company.employee,party",0,Party,Партньор,0
-field,"company.employee,rec_name",0,Name,Име,0
-field,"ir.cron,companies",0,Companies,Фирми,0
-field,"ir.cron-company.company,company",0,Company,Фирма,0
-field,"ir.cron-company.company,cron",0,Cron,Планировщик,0
-field,"ir.cron-company.company,rec_name",0,Name,Име,0
-field,"ir.property,company",0,Company,Фирма,0
-field,"ir.sequence,company",0,Company,Фирма,0
-field,"ir.sequence.strict,company",0,Company,Фирма,0
-field,"res.user,companies",0,Current Companies,Текущи фирми,0
-field,"res.user,company",0,Current Company,Текуща фирма,0
-field,"res.user,employee",0,Employee,Служител,0
-field,"res.user,main_company",0,Main Company,Основна фирма,0
-help,"ir.cron,companies",0,Companies registered for this cron,Фирми регистрирани за този планировщик,0
-model,"company.company,name",0,Company,Фирма,0
-model,"company.company.config.init,name",0,Company Config Init,Начално инициализиране на фирма,0
-model,"company.employee,name",0,Employee,Служител,0
-model,"ir.action,name",,Companies,Фирми,0
-model,"ir.action,name",act_company_form,Companies,Фирми,0
-model,"ir.action,name",act_company_tree,Companies,Фирми,0
-model,"ir.action,name",act_employee_form,Employees,Служители,0
-model,"ir.action,name",report_letter,Letter,Писмо,0
-model,"ir.cron-company.company,name",0,ir.cron-company.company,,0
-model,"ir.ui.menu,name",,New Company,Нова фирма,0
-model,"ir.ui.menu,name",menu_company_form,New Company,Нова фирма,0
-model,"ir.ui.menu,name",menu_company_tree,Companies,Фирми,0
-model,"ir.ui.menu,name",menu_employee_form,Employees,Служители,0
-odt,party.letter,0,"Best Regards,","С уважение,",0
-odt,party.letter,0,Date:,Дата:,0
-odt,party.letter,0,"Dear Madams and Sirs,","Уважаеми дами и годпода,",0
-odt,party.letter,0,E-Mail:,E-Mail:,0
-odt,party.letter,0,Phone:,Телефон:,0
-odt,party.letter,0,Subject:,Относно:,0
-view,company.company,0,Companies,Фирми,0
-view,company.company,0,Company,Фирма,0
-view,company.company,0,Employees,Служители,0
-view,company.company,0,Reports,Справки,0
-view,company.company.config.init,0,Create Company,Създаване на фирма,0
-view,company.company.config.init,0,You can now add your company into the system.,Сега може да добавите фирмата си към системата,0
-view,company.employee,0,Employee,Служител,0
-view,company.employee,0,Employees,Служители,0
-wizard_button,"company.company.config,company,add",0,Add,Добавяне,0
-wizard_button,"company.company.config,company,end",0,Cancel,Отказ,0
-wizard_button,"company.company.config,init,company",0,Ok,Добре,0
-wizard_button,"company.company.config,init,end",0,Cancel,Отказ,0
diff --git a/company.py b/company.py
index 283e1ef..6e15d19 100644
--- a/company.py
+++ b/company.py
@@ -1,12 +1,12 @@
#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 __future__ import with_statement
import copy
from trytond.model import ModelView, ModelSQL, fields
from trytond.wizard import Wizard
from trytond.report import Report
-from trytond.pyson import Eval, If, In, Get
+from trytond.pyson import Eval, If
from trytond.transaction import Transaction
+from trytond.pool import Pool
class Company(ModelSQL, ModelView):
@@ -34,7 +34,7 @@ class Company(ModelSQL, ModelView):
})
def copy(self, ids, default=None):
- party_obj = self.pool.get('party.party')
+ party_obj = Pool().get('party.party')
int_id = False
if isinstance(ids, (int, long)):
@@ -56,7 +56,7 @@ class Company(ModelSQL, ModelView):
def write(self, ids, vals):
res = super(Company, self).write(ids, vals)
# Restart the cache on the domain_get method
- self.pool.get('ir.rule').domain_get.reset()
+ Pool().get('ir.rule').domain_get.reset()
return res
Company()
@@ -84,7 +84,8 @@ class User(ModelSQL, ModelView):
companies = fields.Function(fields.One2Many('company.company', None,
'Current Companies'), 'get_companies')
employee = fields.Many2One('company.employee', 'Employee',
- domain=[('company', 'child_of', [Eval('main_company')], 'parent')])
+ domain=[('company', 'child_of', [Eval('main_company')], 'parent')],
+ depends=['main_company'])
def __init__(self):
super(User, self).__init__()
@@ -104,7 +105,7 @@ class User(ModelSQL, ModelView):
return self.default_main_company()
def get_companies(self, ids, name):
- company_obj = self.pool.get('company.company')
+ company_obj = Pool().get('company.company')
res = {}
company_childs = {}
for user in self.browse(ids):
@@ -130,14 +131,15 @@ class User(ModelSQL, ModelView):
res = super(User, self).get_status_bar(ids, name)
for user in self.browse(ids):
if user.company:
- res[user.id] += ' ' + user.company.name
+ res[user.id] += ' - %s [%s]' % (user.company.name,
+ user.company.currency.name)
return res
def on_change_main_company(self, vals):
return {'company': vals.get('main_company', False)}
def check_company(self, ids):
- company_obj = self.pool.get('company.company')
+ company_obj = Pool().get('company.company')
for user in self.browse(ids):
if user.main_company:
companies = company_obj.search([
@@ -159,7 +161,7 @@ class User(ModelSQL, ModelView):
return res
def get_preferences_fields_view(self):
- company_obj = self.pool.get('company.company')
+ company_obj = Pool().get('company.company')
user = self.browse(Transaction().user)
@@ -167,19 +169,52 @@ class User(ModelSQL, ModelView):
res = copy.deepcopy(res)
return res
+ def read(self, ids, fields_names=None):
+ company_obj = Pool().get('company.company')
+ user_id = Transaction().user
+ if user_id == 0 and 'user' in Transaction().context:
+ user_id = Transaction().context['user']
+ result = super(User, self).read(ids, fields_names=fields_names)
+ if (fields_names
+ and 'company' in fields_names
+ and 'company' in Transaction().context):
+ values = None
+ if isinstance(ids, (int, long)):
+ if int(user_id) == ids:
+ values = result
+ else:
+ if int(user_id) in ids:
+ for vals in result:
+ if vals['id'] == int(user_id):
+ values = vals
+ break
+ if values:
+ main_company_id = values.get('main_company')
+ if not main_company_id:
+ main_company_id = self.read(user_id,
+ ['main_company'])['main_company']
+ companies = company_obj.search([
+ ('parent', 'child_of', [main_company_id]),
+ ])
+ company_id = Transaction().context['company']
+ if ((company_id and company_id in companies)
+ or not company_id):
+ values['company'] = company_id
+ return result
+
User()
class Property(ModelSQL, ModelView):
_name = 'ir.property'
company = fields.Many2One('company.company', 'Company',
- domain=[
- ('id', If(In('company', Eval('context', {})), '=', '!='),
- Get(Eval('context', {}), 'company', 0)),
+ domain=[
+ ('id', If(Eval('context', {}).contains('company'), '=', '!='),
+ Eval('context', {}).get('company', 0)),
])
def _set_values(self, name, model, res_id, val, field_id):
- user_obj = self.pool.get('res.user')
+ user_obj = Pool().get('res.user')
user_id = Transaction().user
if user_id == 0:
user_id = Transaction().context.get('user', user_id)
@@ -202,9 +237,9 @@ Property()
class Sequence(ModelSQL, ModelView):
_name = 'ir.sequence'
company = fields.Many2One('company.company', 'Company',
- domain=[
- ('id', If(In('company', Eval('context', {})), '=', '!='),
- Get(Eval('context', {}), 'company', 0)),
+ domain=[
+ ('id', If(Eval('context', {}).contains('company'), '=', '!='),
+ Eval('context', {}).get('company', 0)),
])
def __init__(self):
@@ -265,8 +300,8 @@ class CompanyConfig(Wizard):
}
def _add(self, data):
- company_obj = self.pool.get('company.company')
- user_obj = self.pool.get('res.user')
+ company_obj = Pool().get('company.company')
+ user_obj = Pool().get('res.user')
company_id = company_obj.create(data['form'])
user_ids = user_obj.search([
@@ -284,7 +319,7 @@ CompanyConfig()
class CompanyReport(Report):
def parse(self, report, objects, datas, localcontext=None):
- user = self.pool.get('res.user').browse(Transaction().user)
+ user = Pool().get('res.user').browse(Transaction().user)
if localcontext is None:
localcontext = {}
localcontext['company'] = user.company
diff --git a/company.xml b/company.xml
index 4257220..ca74dff 100644
--- a/company.xml
+++ b/company.xml
@@ -39,7 +39,6 @@ this repository contains the full copyright notices and license terms. -->
expr="/form/notebook/page[@id="general"]"
position="after">
<page string="Employees" col="1" id="employees">
- <separator name="employees"/>
<field name="employees"/>
</page>
<page string="Reports" col="1" id="reports">
@@ -60,9 +59,9 @@ this repository contains the full copyright notices and license terms. -->
<field name="arch" type="xml">
<![CDATA[
<tree string="Companies">
- <field name="name" select="1"/>
- <field name="currency" select="1"/>
- <field name="vat_code" select="1"/>
+ <field name="name"/>
+ <field name="currency"/>
+ <field name="vat_code"/>
<field name="parent" tree_invisible="1"/>
<field name="childs" tree_invisible="1"/>
</tree>
@@ -76,7 +75,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="arch" type="xml">
<![CDATA[
<tree string="Companies">
- <field name="name" select="1"/>
+ <field name="name"/>
</tree>
]]>
</field>
@@ -120,25 +119,6 @@ this repository contains the full copyright notices and license terms. -->
<menuitem parent="menu_company_tree" action="act_company_list"
id="menu_company_list"/>
- <record model="ir.action.act_window" id="act_company_form">
- <field name="name">Companies</field>
- <field name="res_model">company.company</field>
- </record>
- <record model="ir.action.act_window.view"
- id="act_company_form_view1">
- <field name="sequence" eval="10"/>
- <field name="view" ref="company_view_form"/>
- <field name="act_window" ref="act_company_form"/>
- </record>
- <record model="ir.action.act_window.view"
- id="act_company_form_view2">
- <field name="sequence" eval="20"/>
- <field name="view" ref="company_view_list"/>
- <field name="act_window" ref="act_company_form"/>
- </record>
- <menuitem parent="menu_company_tree" action="act_company_form"
- id="menu_company_form" name="New Company"/>
-
<record model="ir.model.access" id="access_company">
<field name="model" search="[('model', '=', 'company.company')]"/>
<field name="perm_read" eval="True"/>
@@ -165,9 +145,9 @@ this repository contains the full copyright notices and license terms. -->
expr="/form/notebook/page/separator[@name="signature"]"
position="before">
<label name="main_company"/>
- <field name="main_company"/>
+ <field name="main_company" widget="selection"/>
<label name="company"/>
- <field name="company"/>
+ <field name="company" widget="selection"/>
<label name="employee"/>
<field name="employee"/>
</xpath>
@@ -185,7 +165,7 @@ this repository contains the full copyright notices and license terms. -->
expr="/form/notebook/page/separator[@name="signature"]"
position="before">
<label name="company"/>
- <field name="company"/>
+ <field name="company" widget="selection"/>
</xpath>
</data>
]]>
@@ -216,7 +196,7 @@ this repository contains the full copyright notices and license terms. -->
<xpath
expr="/tree/field[@name="name"]"
position="after">
- <field name="company" select="1"/>
+ <field name="company"/>
</xpath>
</data>
]]>
@@ -265,7 +245,7 @@ this repository contains the full copyright notices and license terms. -->
<xpath
expr="/tree/field[@name="code"]"
position="after">
- <field name="company" select="2"/>
+ <field name="company"/>
</xpath>
</data>
]]>
@@ -312,11 +292,10 @@ this repository contains the full copyright notices and license terms. -->
<field name="arch" type="xml">
<![CDATA[
<form string="Create Company" col="2">
- <image name="tryton-dialog-information"/>
- <group col="1" id="labels">
- <label string="You can now add your company into the system."
- align="0.0" id="add"/>
- </group>
+ <image name="tryton-dialog-information" xexpand="0"
+ xfill="0"/>
+ <label string="You can now add your company into the system." id="add"
+ yalign="0.0" xalign="0.0" xexpand="1"/>
</form>
]]>
</field>
@@ -358,8 +337,8 @@ this repository contains the full copyright notices and license terms. -->
<field name="arch" type="xml">
<![CDATA[
<tree string="Employees">
- <field name="name" select="1"/>
- <field name="company" select="1"/>
+ <field name="name"/>
+ <field name="company"/>
</tree>
]]>
</field>
@@ -407,7 +386,7 @@ this repository contains the full copyright notices and license terms. -->
</record>
<record model="ir.action.keyword" id="report_letter_party">
<field name="keyword">form_print</field>
- <field name="model">party.party,0</field>
+ <field name="model">party.party,-1</field>
<field name="action" ref="report_letter"/>
</record>
</data>
diff --git a/cron.py b/cron.py
index 7cfcca2..53fd4ac 100644
--- a/cron.py
+++ b/cron.py
@@ -2,6 +2,8 @@
#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
+
class Cron(ModelSQL, ModelView):
"Cron"
@@ -10,20 +12,23 @@ class Cron(ModelSQL, ModelView):
'Companies', help='Companies registered for this cron')
def _callback(self, cron):
- cursor = Transaction().cursor
- cursor.execute("SELECT company from cron_company_rel "
- "WHERE cron = %s", (cron['id'],))
- for company, in cursor.fetchall():
- cursor.execute(
- "UPDATE res_user SET company = %s, main_company = %s "
- "WHERE id = %s", (company, company, cron['user']))
+ user_obj = Pool().get('res.user')
+ if not cron.companies:
+ return super(Cron, self)._callback(cron)
+ # TODO replace with context
+ for company in cron.companies:
+ user_obj.write(cron.user.id, {
+ 'company': company.id,
+ 'main_company': company.id,
+ })
super(Cron, self)._callback(cron)
- cursor.execute(
- "UPDATE res_user SET company = NULL, main_company = NULL "
- "WHERE id = %s", (cron['user'],))
+ user_obj.write(cron.user.id, {
+ 'company': False,
+ 'main_company': False,
+ })
def default_companies(self):
- company_obj = self.pool.get('company.company')
+ company_obj = Pool().get('company.company')
return company_obj.search([])
Cron()
diff --git a/cron.xml b/cron.xml
index fc92901..6aa9cc5 100644
--- a/cron.xml
+++ b/cron.xml
@@ -13,8 +13,7 @@ this repository contains the full copyright notices and license terms. -->
<xpath
expr="/form/field[@name="args"]"
position="after">
- <separator name="companies" colspan="6"/>
- <field name="companies" colspan="6"/>
+ <field name="companies" colspan="4"/>
</xpath>
</data>
]]>
diff --git a/de_DE.csv b/de_DE.csv
deleted file mode 100644
index 3213c0c..0000000
--- a/de_DE.csv
+++ /dev/null
@@ -1,76 +0,0 @@
-type,name,res_id,src,value,fuzzy
-error,company.company,0,You can not create recursive companies!,Unternehmen können nicht rekursiv angelegt werden!,0
-error,res.user,0,You can not set a company that is not a child of your main company!,Das Unternehmen muss ein Tochterunternehmen (untergeordnet) des Hauptunternehmens sein,0
-field,"company.company,childs",0,Children,Untergeordnet (Unternehmen),0
-field,"company.company,create_date",0,Creation date,Erstellungsdatum,0
-field,"company.company,create_uid",0,Creation user,Ersteller,0
-field,"company.company,currency",0,Currency,Währung,0
-field,"company.company,employees",0,Employees,Mitarbeiter,0
-field,"company.company,footer",0,Footer,Dokumentenfuß,0
-field,"company.company,header",0,Header,Dokumentenkopf,0
-field,"company.company,id",0,ID,ID,0
-field,"company.company,parent",0,Parent,Übergeordnet (Unternehmen),0
-field,"company.company,party",0,Party,Partei,0
-field,"company.company,rec_name",0,Name,Name,0
-field,"company.company,write_date",0,Last modification date,Zuletzt geändert am,0
-field,"company.company,write_uid",0,Last modification by,Zuletzt geändert von,0
-field,"company.employee,company",0,Company,Unternehmen,0
-field,"company.employee,create_date",0,Creation date,Erstellungsdatum,0
-field,"company.employee,create_uid",0,Creation user,Ersteller,0
-field,"company.employee,id",0,ID,ID,0
-field,"company.employee,party",0,Party,Partei,0
-field,"company.employee,rec_name",0,Name,Name,0
-field,"company.employee,write_date",0,Last modification date,Zuletzt geändert am,0
-field,"company.employee,write_uid",0,Last modification by,Zuletzt geändert von,0
-field,"ir.cron,companies",0,Companies,Unternehmen,0
-field,"ir.cron-company.company,company",0,Company,Unternehmen,0
-field,"ir.cron-company.company,cron",0,Cron,Cron,0
-field,"ir.cron-company.company,rec_name",0,Name,Name,0
-field,"ir.property,company",0,Company,Unternehmen,0
-field,"ir.sequence,company",0,Company,Unternehmen,0
-field,"ir.sequence.strict,company",0,Company,Unternehmen,0
-field,"res.user,companies",0,Current Companies,Aktuelle Unternehmen,0
-field,"res.user,company",0,Current Company,Aktuelles Unternehmen,0
-field,"res.user,employee",0,Employee,Mitarbeiter,0
-field,"res.user,main_company",0,Main Company,Mutterbetrieb,0
-help,"ir.cron,companies",0,Companies registered for this cron,"Unternehmen, für welche dieser Job durchgeführt werden soll",0
-model,"company.company,name",0,Company,Unternehmen,0
-model,"company.company.config.init,name",0,Company Config Init,Unternehmen Konfiguration Init,0
-model,"company.employee,name",0,Employee,Mitarbeiter,0
-model,"ir.action,name",act_company_form,Companies,Unternehmen,0
-model,"ir.action,name",act_company_list,Companies,Unternehmen,0
-model,"ir.action,name",act_company_tree,Companies,Unternehmen,0
-model,"ir.action,name",act_employee_form,Employees,Mitarbeiter,0
-model,"ir.action,name",report_letter,Letter,Brief,0
-model,"ir.cron-company.company,name",0,ir.cron-company.company,ir.cron-company.company,0
-model,"ir.ui.menu,name",menu_company_form,New Company,Neues Unternehmen,0
-model,"ir.ui.menu,name",menu_company_list,Companies,Unternehmen,0
-model,"ir.ui.menu,name",menu_company_tree,Companies,Unternehmen,0
-model,"ir.ui.menu,name",menu_employee_form,Employees,Mitarbeiter,0
-odt,party.letter,0,"Best Regards,","Mit freundlichen Grüßen,",0
-odt,party.letter,0,Date:,Datum:,0
-odt,party.letter,0,"Dear Madams and Sirs,","Sehr geehrte Damen und Herren,",0
-odt,party.letter,0,E-Mail:,E-Mail:,0
-odt,party.letter,0,Phone:,Telefon:,0
-odt,party.letter,0,Subject:,Betreff:,0
-odt,party.letter,0,VAT Number:,USt-ID-Nr.:,0
-view,company.company,0,Addresses,Adressen,0
-view,company.company,0,Companies,Unternehmen,0
-view,company.company,0,Company,Unternehmen,0
-view,company.company,0,Employees,Mitarbeiter,0
-view,company.company,0,General,Allgemein,0
-view,company.company,0,Reports,Berichte,0
-view,company.company,0,_Employees,_Mitarbeiter,0
-view,company.company,0,_General,_Allgemein,0
-view,company.company,0,_Reports,_Berichte,0
-view,company.company.config.init,0,Create Company,Unternehmen anlegen,0
-view,company.company.config.init,0,You can now add your company into the system.,Sie können nun Ihr Unternehmen dem System hinzufügen!,0
-view,company.employee,0,Addresses,Adressen,0
-view,company.employee,0,Employee,Mitarbeiter,0
-view,company.employee,0,Employees,Mitarbeiter,0
-view,company.employee,0,General,Allgemein,0
-view,company.employee,0,_General,_Allgemein,0
-wizard_button,"company.company.config,company,add",0,Add,Hinzufügen,0
-wizard_button,"company.company.config,company,end",0,Cancel,Abbrechen,0
-wizard_button,"company.company.config,init,company",0,Ok,OK,0
-wizard_button,"company.company.config,init,end",0,Cancel,Abbrechen,0
diff --git a/es_CO.csv b/es_CO.csv
deleted file mode 100644
index 5b41261..0000000
--- a/es_CO.csv
+++ /dev/null
@@ -1,61 +0,0 @@
-type,name,res_id,src,value,fuzzy
-error,company.company,0,You can not create recursive companies!,No puede crear compañías recursivas!,0
-error,res.user,0,You can not set a company that is not a child of your main company!,No puede establecer una compañía que no es hija de su compañía principal!,0
-field,"company.company,childs",0,Children,Hij at s,0
-field,"company.company,currency",0,Currency,Moneda,0
-field,"company.company,employees",0,Employees,Empleados,0
-field,"company.company,footer",0,Footer,Pie de página,0
-field,"company.company,header",0,Header,Encabezado,0
-field,"company.company,parent",0,Parent,Padre,0
-field,"company.company,party",0,Party,Tercero,0
-field,"company.company,rec_name",0,Name,Nombre,0
-field,"company.employee,company",0,Company,Compañía,0
-field,"company.employee,party",0,Party,Tercero,0
-field,"company.employee,rec_name",0,Name,Nombre,0
-field,"ir.cron,companies",0,Companies,Compañías,0
-field,"ir.cron-company.company,company",0,Company,Compañía,0
-field,"ir.cron-company.company,cron",0,Cron,Agendador,0
-field,"ir.cron-company.company,rec_name",0,Name,Nombre,0
-field,"ir.property,company",0,Company,Compañía,0
-field,"ir.sequence,company",0,Company,Compañía,0
-field,"ir.sequence.strict,company",0,Company,Compañía,0
-field,"res.user,companies",0,Current Companies,Compañías en Curso,0
-field,"res.user,company",0,Current Company,Compañía Actual,0
-field,"res.user,employee",0,Employee,Empleado,0
-field,"res.user,main_company",0,Main Company,Compañía Principal,0
-help,"ir.cron,companies",0,Companies registered for this cron,Compañías registradas para este lanzador,0
-model,"company.company.config.init,name",0,Company Config Init,Configuración inicial de Compañía,0
-model,"company.company,name",0,Company,Compañía,0
-model,"company.employee,name",0,Employee,Empleado,0
-model,"ir.action,name",act_company_tree,Companies,Compañías,0
-model,"ir.action,name",act_company_form,Companies,Compañías,0
-model,"ir.action,name",act_company_form2,Companies,Compañías,0
-model,"ir.action,name",act_employee_form,Employees,Empleados,0
-model,"ir.action,name",report_letter,Letter,Carta,0
-model,"ir.cron-company.company,name",0,ir.cron-company.company,ir.cron-company.company,0
-model,"ir.ui.menu,name",menu_company_tree,Companies,Compañías,0
-model,"ir.ui.menu,name",menu_company_form,Edit Companies,Editar Compañías,0
-model,"ir.ui.menu,name",menu_employee_form,Employees,Empleados,0
-model,"ir.ui.menu,name",menu_company_form2,New Company,Nueva Compañía,0
-odt,party.letter,0,"Best Regards,","Atentamente,",0
-odt,party.letter,0,Date:,Fecha:,0
-odt,party.letter,0,"Dear Madams and Sirs,","Estimados Señoras y Señores,",0
-odt,party.letter,0,E-Mail:,Correo electrónico:,0
-odt,party.letter,0,Phone:,Teléfono:,0
-odt,party.letter,0,Subject:,Título:,0
-view,company.company,0,Addresses,Direcciones,0
-view,company.company,0,Companies,Compañías,0
-view,company.company,0,Company,Compañía,0
-view,company.company,0,Employees,Empleados,0
-view,company.company,0,General,General,0
-view,company.company,0,Reports,Reportes,0
-view,company.company.config.init,0,Create Company,Crear Compañía,0
-view,company.company.config.init,0,You can now add your company into the system.,Ahora puede añadir su compañía al sistema.,0
-view,company.employee,0,Addresses,Direcciones,0
-view,company.employee,0,Employee,Empleado,0
-view,company.employee,0,Employees,Empleados,0
-view,company.employee,0,General,General,0
-wizard_button,"company.company.config,company,add",0,Add,Adicionar,0
-wizard_button,"company.company.config,company,end",0,Cancel,Cancelar,0
-wizard_button,"company.company.config,init,company",0,Ok,Aceptar,0
-wizard_button,"company.company.config,init,end",0,Cancel,Cancelar,0
diff --git a/es_ES.csv b/es_ES.csv
deleted file mode 100644
index ebdcdc5..0000000
--- a/es_ES.csv
+++ /dev/null
@@ -1,61 +0,0 @@
-type,name,res_id,src,value,fuzzy
-error,company.company,0,You can not create recursive companies!,No puede crear empresas recursivas,0
-error,res.user,0,You can not set a company that is not a child of your main company!,No puede establecer una empresa que no es hija de su empresa principal,0
-field,"company.company,childs",0,Children,Hijos,0
-field,"company.company,currency",0,Currency,Divisa,0
-field,"company.company,employees",0,Employees,Empleados,0
-field,"company.company,footer",0,Footer,Pie de página,0
-field,"company.company,header",0,Header,Encabezado,0
-field,"company.company,parent",0,Parent,Padre,0
-field,"company.company,party",0,Party,Tercero,0
-field,"company.company,rec_name",0,Name,Nombre,0
-field,"company.employee,company",0,Company,Empresa,0
-field,"company.employee,party",0,Party,Tercero,0
-field,"company.employee,rec_name",0,Name,Nombre,0
-field,"ir.cron,companies",0,Companies,Empresas,0
-field,"ir.cron-company.company,company",0,Company,Empresa,0
-field,"ir.cron-company.company,cron",0,Cron,Programador de tareas,0
-field,"ir.cron-company.company,rec_name",0,Name,Nombre,0
-field,"ir.property,company",0,Company,Empresa,0
-field,"ir.sequence,company",0,Company,Empresa,0
-field,"ir.sequence.strict,company",0,Company,Empresa,0
-field,"res.user,companies",0,Current Companies,Empresas actuales,0
-field,"res.user,company",0,Current Company,Empresa actual,0
-field,"res.user,employee",0,Employee,Empleado,0
-field,"res.user,main_company",0,Main Company,Empresa principal,0
-help,"ir.cron,companies",0,Companies registered for this cron,Empresas registradas en este programador de tareas,0
-model,"company.company.config.init,name",0,Company Config Init,Inicialización de la configuración de la empresa,0
-model,"company.company,name",0,Company,Empresa,0
-model,"company.employee,name",0,Employee,Empleado,0
-model,"ir.action,name",act_company_tree,Companies,Empresas,0
-model,"ir.action,name",act_company_form,Companies,Empresas,0
-model,"ir.action,name",act_company_form2,Companies,Empresas,0
-model,"ir.action,name",act_employee_form,Employees,Empleados,0
-model,"ir.action,name",report_letter,Letter,Carta,0
-model,"ir.cron-company.company,name",0,ir.cron-company.company,ir.cron-company.company,0
-model,"ir.ui.menu,name",menu_company_tree,Companies,Empresas,0
-model,"ir.ui.menu,name",menu_company_form,Edit Companies,Editar empresas,0
-model,"ir.ui.menu,name",menu_employee_form,Employees,Empleados,0
-model,"ir.ui.menu,name",menu_company_form2,New Company,Nueva empresa,0
-odt,party.letter,0,"Best Regards,","Atentamente,",0
-odt,party.letter,0,Date:,Fecha:,0
-odt,party.letter,0,"Dear Madams and Sirs,","Estimados señores y señoras,",0
-odt,party.letter,0,E-Mail:,Correo electrónico:,0
-odt,party.letter,0,Phone:,Teléfono:,0
-odt,party.letter,0,Subject:,Asunto:,0
-view,company.company,0,Addresses,Direcciones,0
-view,company.company,0,Companies,Empresas,0
-view,company.company,0,Company,Empresa,0
-view,company.company,0,Employees,Empleados,0
-view,company.company,0,General,General,0
-view,company.company,0,Reports,Informes,0
-view,company.company.config.init,0,Create Company,Crear empresa,0
-view,company.company.config.init,0,You can now add your company into the system.,Ahora puede añadir su empresa al sistema.,0
-view,company.employee,0,Addresses,Direcciones,0
-view,company.employee,0,Employee,Empleado,0
-view,company.employee,0,Employees,Empleados,0
-view,company.employee,0,General,General,0
-wizard_button,"company.company.config,company,add",0,Add,Añadir,0
-wizard_button,"company.company.config,company,end",0,Cancel,Cancelar,0
-wizard_button,"company.company.config,init,company",0,Ok,Aceptar,0
-wizard_button,"company.company.config,init,end",0,Cancel,Cancelar,0
diff --git a/fr_FR.csv b/fr_FR.csv
deleted file mode 100644
index 15c3f15..0000000
--- a/fr_FR.csv
+++ /dev/null
@@ -1,62 +0,0 @@
-type,name,res_id,src,value,fuzzy
-error,company.company,0,You can not create recursive companies!,Vous ne pouvez pas créer des sociétés récursives !,0
-error,res.user,0,You can not set a company that is not a child of your main company!,Vous ne pouvez pas choisir une société qui n'est pas enfant de votre société principale !,0
-field,"company.company,childs",0,Children,Enfants,0
-field,"company.company,currency",0,Currency,Devise,0
-field,"company.company,employees",0,Employees,Employés,0
-field,"company.company,footer",0,Footer,Pied de Page,0
-field,"company.company,header",0,Header,Entête de Page,0
-field,"company.company,parent",0,Parent,Parent,0
-field,"company.company,party",0,Party,Tiers,0
-field,"company.company,rec_name",0,Name,Nom,0
-field,"company.employee,company",0,Company,Société,0
-field,"company.employee,party",0,Party,Tiers,0
-field,"company.employee,rec_name",0,Name,Nom,0
-field,"ir.cron,companies",0,Companies,Sociétés,0
-field,"ir.cron-company.company,company",0,Company,Société,0
-field,"ir.cron-company.company,cron",0,Cron,Cron,0
-field,"ir.cron-company.company,rec_name",0,Name,Nom,0
-field,"ir.property,company",0,Company,Société,0
-field,"ir.sequence,company",0,Company,Société,0
-field,"ir.sequence.strict,company",0,Company,Société,0
-field,"res.user,companies",0,Current Companies,Sociétés courantes,0
-field,"res.user,company",0,Current Company,Société courante,0
-field,"res.user,employee",0,Employee,Employé,0
-field,"res.user,main_company",0,Main Company,Société principale,0
-help,"ir.cron,companies",0,Companies registered for this cron,Sociétés enregistrées pour ce planificateur,0
-model,"company.company,name",0,Company,Société,0
-model,"company.company.config.init,name",0,Company Config Init,Société config - Init,0
-model,"company.employee,name",0,Employee,Employé,0
-model,"ir.action,name",act_company_form,Companies,Sociétés,0
-model,"ir.action,name",act_company_list,Companies,Sociétés,1
-model,"ir.action,name",act_company_tree,Companies,Sociétés,0
-model,"ir.action,name",act_employee_form,Employees,Employés,0
-model,"ir.action,name",report_letter,Letter,Lettre,0
-model,"ir.cron-company.company,name",0,ir.cron-company.company,,0
-model,"ir.ui.menu,name",menu_company_form,New Company,Nouvelle société,0
-model,"ir.ui.menu,name",menu_company_list,Companies,Sociétés,1
-model,"ir.ui.menu,name",menu_company_tree,Companies,Sociétés,0
-model,"ir.ui.menu,name",menu_employee_form,Employees,Employés,0
-odt,party.letter,0,"Best Regards,","Bien cordialement,",0
-odt,party.letter,0,Date:,Date :,0
-odt,party.letter,0,"Dear Madams and Sirs,","Chère madame, cher monsieur,",0
-odt,party.letter,0,E-Mail:,E-Mail :,0
-odt,party.letter,0,Phone:,Téléphone,0
-odt,party.letter,0,Subject:,Sujet :,0
-odt,party.letter,0,VAT Number:,Numéro TVA :,0
-view,company.company,0,Addresses,Adresses,0
-view,company.company,0,Companies,Sociétés,0
-view,company.company,0,Company,Société,0
-view,company.company,0,Employees,Employés,0
-view,company.company,0,General,Général,0
-view,company.company,0,Reports,Rapports,0
-view,company.company.config.init,0,Create Company,Créer une société,0
-view,company.company.config.init,0,You can now add your company into the system.,Vous pouvez maintenant ajouter votre société dans le système.,0
-view,company.employee,0,Addresses,Adresses,0
-view,company.employee,0,Employee,Employé,0
-view,company.employee,0,Employees,Employés,0
-view,company.employee,0,General,Général,0
-wizard_button,"company.company.config,company,add",0,Add,Ajouter,0
-wizard_button,"company.company.config,company,end",0,Cancel,Annuler,0
-wizard_button,"company.company.config,init,company",0,Ok,Ok,0
-wizard_button,"company.company.config,init,end",0,Cancel,Annuler,0
diff --git a/locale/bg_BG.po b/locale/bg_BG.po
new file mode 100644
index 0000000..615669f
--- /dev/null
+++ b/locale/bg_BG.po
@@ -0,0 +1,225 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:company.company:0"
+msgid "You can not create recursive companies!"
+msgstr "Не може да създавате взаимно вложени фирми!"
+
+msgctxt "error:res.user:0"
+msgid "You can not set a company that is not a child of your main company!"
+msgstr "Не може да изберете фирма която не е подчинена на основната фирма!"
+
+msgctxt "field:company.company,childs:0"
+msgid "Children"
+msgstr "Деца"
+
+msgctxt "field:company.company,currency:0"
+msgid "Currency"
+msgstr "Валута"
+
+msgctxt "field:company.company,employees:0"
+msgid "Employees"
+msgstr "Служители"
+
+msgctxt "field:company.company,footer:0"
+msgid "Footer"
+msgstr "Долен колонтитул"
+
+msgctxt "field:company.company,header:0"
+msgid "Header"
+msgstr "Горен колонтитул"
+
+msgctxt "field:company.company,parent:0"
+msgid "Parent"
+msgstr "Родител"
+
+msgctxt "field:company.company,party:0"
+msgid "Party"
+msgstr "Партньор"
+
+msgctxt "field:company.company,rec_name:0"
+msgid "Name"
+msgstr "Име"
+
+msgctxt "field:company.employee,company:0"
+msgid "Company"
+msgstr "Фирма"
+
+msgctxt "field:company.employee,party:0"
+msgid "Party"
+msgstr "Партньор"
+
+msgctxt "field:company.employee,rec_name:0"
+msgid "Name"
+msgstr "Име"
+
+msgctxt "field:ir.cron,companies:0"
+msgid "Companies"
+msgstr "Фирми"
+
+msgctxt "field:ir.cron-company.company,company:0"
+msgid "Company"
+msgstr "Фирма"
+
+msgctxt "field:ir.cron-company.company,cron:0"
+msgid "Cron"
+msgstr "Планировщик"
+
+msgctxt "field:ir.cron-company.company,rec_name:0"
+msgid "Name"
+msgstr "Име"
+
+msgctxt "field:ir.property,company:0"
+msgid "Company"
+msgstr "Фирма"
+
+msgctxt "field:ir.sequence,company:0"
+msgid "Company"
+msgstr "Фирма"
+
+msgctxt "field:ir.sequence.strict,company:0"
+msgid "Company"
+msgstr "Фирма"
+
+msgctxt "field:res.user,companies:0"
+msgid "Current Companies"
+msgstr "Текущи фирми"
+
+msgctxt "field:res.user,company:0"
+msgid "Current Company"
+msgstr "Текуща фирма"
+
+msgctxt "field:res.user,employee:0"
+msgid "Employee"
+msgstr "Служител"
+
+msgctxt "field:res.user,main_company:0"
+msgid "Main Company"
+msgstr "Основна фирма"
+
+msgctxt "help:ir.cron,companies:0"
+msgid "Companies registered for this cron"
+msgstr "Фирми регистрирани за този планировщик"
+
+msgctxt "model:company.company,name:0"
+msgid "Company"
+msgstr "Фирма"
+
+msgctxt "model:company.company.config.init,name:0"
+msgid "Company Config Init"
+msgstr "Начално инициализиране на фирма"
+
+msgctxt "model:company.employee,name:0"
+msgid "Employee"
+msgstr "Служител"
+
+#, fuzzy
+msgctxt "model:ir.action,name:act_company_list"
+msgid "Companies"
+msgstr "Фирми"
+
+msgctxt "model:ir.action,name:act_company_tree"
+msgid "Companies"
+msgstr "Фирми"
+
+msgctxt "model:ir.action,name:act_employee_form"
+msgid "Employees"
+msgstr "Служители"
+
+msgctxt "model:ir.action,name:report_letter"
+msgid "Letter"
+msgstr "Писмо"
+
+msgctxt "model:ir.cron-company.company,name:0"
+msgid "ir.cron-company.company"
+msgstr ""
+
+#, fuzzy
+msgctxt "model:ir.ui.menu,name:menu_company_list"
+msgid "Companies"
+msgstr "Фирми"
+
+msgctxt "model:ir.ui.menu,name:menu_company_tree"
+msgid "Companies"
+msgstr "Фирми"
+
+msgctxt "model:ir.ui.menu,name:menu_employee_form"
+msgid "Employees"
+msgstr "Служители"
+
+msgctxt "odt:party.letter:0"
+msgid "Best Regards,"
+msgstr "С уважение,"
+
+msgctxt "odt:party.letter:0"
+msgid "Date:"
+msgstr "Дата:"
+
+msgctxt "odt:party.letter:0"
+msgid "Dear Madams and Sirs,"
+msgstr "Уважаеми дами и годпода,"
+
+msgctxt "odt:party.letter:0"
+msgid "E-Mail:"
+msgstr "E-Mail:"
+
+msgctxt "odt:party.letter:0"
+msgid "Phone:"
+msgstr "Телефон:"
+
+msgctxt "odt:party.letter:0"
+msgid "Subject:"
+msgstr "Относно:"
+
+msgctxt "odt:party.letter:0"
+msgid "VAT Number:"
+msgstr ""
+
+msgctxt "view:company.company.config.init:0"
+msgid "Create Company"
+msgstr "Създаване на фирма"
+
+msgctxt "view:company.company.config.init:0"
+msgid "You can now add your company into the system."
+msgstr "Сега може да добавите фирмата си към системата"
+
+msgctxt "view:company.company:0"
+msgid "Companies"
+msgstr "Фирми"
+
+msgctxt "view:company.company:0"
+msgid "Company"
+msgstr "Фирма"
+
+msgctxt "view:company.company:0"
+msgid "Employees"
+msgstr "Служители"
+
+msgctxt "view:company.company:0"
+msgid "Reports"
+msgstr "Справки"
+
+msgctxt "view:company.employee:0"
+msgid "Employee"
+msgstr "Служител"
+
+msgctxt "view:company.employee:0"
+msgid "Employees"
+msgstr "Служители"
+
+msgctxt "wizard_button:company.company.config,company,add:0"
+msgid "Add"
+msgstr "Добавяне"
+
+msgctxt "wizard_button:company.company.config,company,end:0"
+msgid "Cancel"
+msgstr "Отказ"
+
+msgctxt "wizard_button:company.company.config,init,company:0"
+msgid "Ok"
+msgstr "Добре"
+
+msgctxt "wizard_button:company.company.config,init,end:0"
+msgid "Cancel"
+msgstr "Отказ"
diff --git a/locale/cs_CZ.po b/locale/cs_CZ.po
new file mode 100644
index 0000000..08a4102
--- /dev/null
+++ b/locale/cs_CZ.po
@@ -0,0 +1,223 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:company.company:0"
+msgid "You can not create recursive companies!"
+msgstr ""
+
+msgctxt "error:res.user:0"
+msgid "You can not set a company that is not a child of your main company!"
+msgstr ""
+
+msgctxt "field:company.company,childs:0"
+msgid "Children"
+msgstr ""
+
+msgctxt "field:company.company,currency:0"
+msgid "Currency"
+msgstr ""
+
+msgctxt "field:company.company,employees:0"
+msgid "Employees"
+msgstr ""
+
+msgctxt "field:company.company,footer:0"
+msgid "Footer"
+msgstr ""
+
+msgctxt "field:company.company,header:0"
+msgid "Header"
+msgstr ""
+
+msgctxt "field:company.company,parent:0"
+msgid "Parent"
+msgstr ""
+
+msgctxt "field:company.company,party:0"
+msgid "Party"
+msgstr ""
+
+msgctxt "field:company.company,rec_name:0"
+msgid "Name"
+msgstr ""
+
+msgctxt "field:company.employee,company:0"
+msgid "Company"
+msgstr ""
+
+msgctxt "field:company.employee,party:0"
+msgid "Party"
+msgstr ""
+
+msgctxt "field:company.employee,rec_name:0"
+msgid "Name"
+msgstr ""
+
+msgctxt "field:ir.cron,companies:0"
+msgid "Companies"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,company:0"
+msgid "Company"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,cron:0"
+msgid "Cron"
+msgstr ""
+
+msgctxt "field:ir.cron-company.company,rec_name:0"
+msgid "Name"
+msgstr ""
+
+msgctxt "field:ir.property,company:0"
+msgid "Company"
+msgstr ""
+
+msgctxt "field:ir.sequence,company:0"
+msgid "Company"
+msgstr ""
+
+msgctxt "field:ir.sequence.strict,company:0"
+msgid "Company"
+msgstr ""
+
+msgctxt "field:res.user,companies:0"
+msgid "Current Companies"
+msgstr ""
+
+msgctxt "field:res.user,company:0"
+msgid "Current Company"
+msgstr ""
+
+msgctxt "field:res.user,employee:0"
+msgid "Employee"
+msgstr ""
+
+msgctxt "field:res.user,main_company:0"
+msgid "Main Company"
+msgstr ""
+
+msgctxt "help:ir.cron,companies:0"
+msgid "Companies registered for this cron"
+msgstr ""
+
+msgctxt "model:company.company,name:0"
+msgid "Company"
+msgstr ""
+
+msgctxt "model:company.company.config.init,name:0"
+msgid "Company Config Init"
+msgstr ""
+
+msgctxt "model:company.employee,name:0"
+msgid "Employee"
+msgstr ""
+
+msgctxt "model:ir.action,name:act_company_list"
+msgid "Companies"
+msgstr ""
+
+msgctxt "model:ir.action,name:act_company_tree"
+msgid "Companies"
+msgstr ""
+
+msgctxt "model:ir.action,name:act_employee_form"
+msgid "Employees"
+msgstr ""
+
+msgctxt "model:ir.action,name:report_letter"
+msgid "Letter"
+msgstr ""
+
+msgctxt "model:ir.cron-company.company,name:0"
+msgid "ir.cron-company.company"
+msgstr ""
+
+msgctxt "model:ir.ui.menu,name:menu_company_list"
+msgid "Companies"
+msgstr ""
+
+msgctxt "model:ir.ui.menu,name:menu_company_tree"
+msgid "Companies"
+msgstr ""
+
+msgctxt "model:ir.ui.menu,name:menu_employee_form"
+msgid "Employees"
+msgstr ""
+
+msgctxt "odt:party.letter:0"
+msgid "Best Regards,"
+msgstr ""
+
+msgctxt "odt:party.letter:0"
+msgid "Date:"
+msgstr ""
+
+msgctxt "odt:party.letter:0"
+msgid "Dear Madams and Sirs,"
+msgstr ""
+
+msgctxt "odt:party.letter:0"
+msgid "E-Mail:"
+msgstr ""
+
+msgctxt "odt:party.letter:0"
+msgid "Phone:"
+msgstr ""
+
+msgctxt "odt:party.letter:0"
+msgid "Subject:"
+msgstr ""
+
+msgctxt "odt:party.letter:0"
+msgid "VAT Number:"
+msgstr ""
+
+msgctxt "view:company.company.config.init:0"
+msgid "Create Company"
+msgstr ""
+
+msgctxt "view:company.company.config.init:0"
+msgid "You can now add your company into the system."
+msgstr ""
+
+msgctxt "view:company.company:0"
+msgid "Companies"
+msgstr ""
+
+msgctxt "view:company.company:0"
+msgid "Company"
+msgstr ""
+
+msgctxt "view:company.company:0"
+msgid "Employees"
+msgstr ""
+
+msgctxt "view:company.company:0"
+msgid "Reports"
+msgstr ""
+
+msgctxt "view:company.employee:0"
+msgid "Employee"
+msgstr ""
+
+msgctxt "view:company.employee:0"
+msgid "Employees"
+msgstr ""
+
+msgctxt "wizard_button:company.company.config,company,add:0"
+msgid "Add"
+msgstr ""
+
+msgctxt "wizard_button:company.company.config,company,end:0"
+msgid "Cancel"
+msgstr ""
+
+msgctxt "wizard_button:company.company.config,init,company:0"
+msgid "Ok"
+msgstr ""
+
+msgctxt "wizard_button:company.company.config,init,end:0"
+msgid "Cancel"
+msgstr ""
diff --git a/locale/de_DE.po b/locale/de_DE.po
new file mode 100644
index 0000000..1c10a82
--- /dev/null
+++ b/locale/de_DE.po
@@ -0,0 +1,297 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:company.company:0"
+msgid "You can not create recursive companies!"
+msgstr "Unternehmen können nicht rekursiv angelegt werden!"
+
+msgctxt "error:res.user:0"
+msgid "You can not set a company that is not a child of your main company!"
+msgstr ""
+"Das Unternehmen muss ein Tochterunternehmen (untergeordnet) des "
+"Hauptunternehmens sein"
+
+msgctxt "field:company.company,childs:0"
+msgid "Children"
+msgstr "Untergeordnet (Unternehmen)"
+
+msgctxt "field:company.company,create_date:0"
+msgid "Creation date"
+msgstr "Erstellungsdatum"
+
+msgctxt "field:company.company,create_uid:0"
+msgid "Creation user"
+msgstr "Ersteller"
+
+msgctxt "field:company.company,currency:0"
+msgid "Currency"
+msgstr "Währung"
+
+msgctxt "field:company.company,employees:0"
+msgid "Employees"
+msgstr "Mitarbeiter"
+
+msgctxt "field:company.company,footer:0"
+msgid "Footer"
+msgstr "Dokumentenfuß"
+
+msgctxt "field:company.company,header:0"
+msgid "Header"
+msgstr "Dokumentenkopf"
+
+msgctxt "field:company.company,id:0"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:company.company,parent:0"
+msgid "Parent"
+msgstr "Übergeordnet (Unternehmen)"
+
+msgctxt "field:company.company,party:0"
+msgid "Party"
+msgstr "Partei"
+
+msgctxt "field:company.company,rec_name:0"
+msgid "Name"
+msgstr "Name"
+
+msgctxt "field:company.company,write_date:0"
+msgid "Last modification date"
+msgstr "Zuletzt geändert am"
+
+msgctxt "field:company.company,write_uid:0"
+msgid "Last modification by"
+msgstr "Zuletzt geändert von"
+
+msgctxt "field:company.employee,company:0"
+msgid "Company"
+msgstr "Unternehmen"
+
+msgctxt "field:company.employee,create_date:0"
+msgid "Creation date"
+msgstr "Erstellungsdatum"
+
+msgctxt "field:company.employee,create_uid:0"
+msgid "Creation user"
+msgstr "Ersteller"
+
+msgctxt "field:company.employee,id:0"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:company.employee,party:0"
+msgid "Party"
+msgstr "Partei"
+
+msgctxt "field:company.employee,rec_name:0"
+msgid "Name"
+msgstr "Name"
+
+msgctxt "field:company.employee,write_date:0"
+msgid "Last modification date"
+msgstr "Zuletzt geändert am"
+
+msgctxt "field:company.employee,write_uid:0"
+msgid "Last modification by"
+msgstr "Zuletzt geändert von"
+
+msgctxt "field:ir.cron,companies:0"
+msgid "Companies"
+msgstr "Unternehmen"
+
+msgctxt "field:ir.cron-company.company,company:0"
+msgid "Company"
+msgstr "Unternehmen"
+
+msgctxt "field:ir.cron-company.company,cron:0"
+msgid "Cron"
+msgstr "Cron"
+
+msgctxt "field:ir.cron-company.company,rec_name:0"
+msgid "Name"
+msgstr "Name"
+
+msgctxt "field:ir.property,company:0"
+msgid "Company"
+msgstr "Unternehmen"
+
+msgctxt "field:ir.sequence,company:0"
+msgid "Company"
+msgstr "Unternehmen"
+
+msgctxt "field:ir.sequence.strict,company:0"
+msgid "Company"
+msgstr "Unternehmen"
+
+msgctxt "field:res.user,companies:0"
+msgid "Current Companies"
+msgstr "Aktuelle Unternehmen"
+
+msgctxt "field:res.user,company:0"
+msgid "Current Company"
+msgstr "Aktuelles Unternehmen"
+
+msgctxt "field:res.user,employee:0"
+msgid "Employee"
+msgstr "Mitarbeiter"
+
+msgctxt "field:res.user,main_company:0"
+msgid "Main Company"
+msgstr "Mutterbetrieb"
+
+msgctxt "help:ir.cron,companies:0"
+msgid "Companies registered for this cron"
+msgstr "Unternehmen, für welche dieser Job durchgeführt werden soll"
+
+msgctxt "model:company.company,name:0"
+msgid "Company"
+msgstr "Unternehmen"
+
+msgctxt "model:company.company.config.init,name:0"
+msgid "Company Config Init"
+msgstr "Unternehmen Konfiguration Init"
+
+msgctxt "model:company.employee,name:0"
+msgid "Employee"
+msgstr "Mitarbeiter"
+
+msgctxt "model:ir.action,name:act_company_list"
+msgid "Companies"
+msgstr "Unternehmen"
+
+msgctxt "model:ir.action,name:act_company_tree"
+msgid "Companies"
+msgstr "Unternehmen"
+
+msgctxt "model:ir.action,name:act_employee_form"
+msgid "Employees"
+msgstr "Mitarbeiter"
+
+msgctxt "model:ir.action,name:report_letter"
+msgid "Letter"
+msgstr "Brief"
+
+msgctxt "model:ir.cron-company.company,name:0"
+msgid "ir.cron-company.company"
+msgstr "ir.cron-company.company"
+
+msgctxt "model:ir.ui.menu,name:menu_company_list"
+msgid "Companies"
+msgstr "Unternehmen"
+
+msgctxt "model:ir.ui.menu,name:menu_company_tree"
+msgid "Companies"
+msgstr "Unternehmen"
+
+msgctxt "model:ir.ui.menu,name:menu_employee_form"
+msgid "Employees"
+msgstr "Mitarbeiter"
+
+msgctxt "odt:party.letter:0"
+msgid "Best Regards,"
+msgstr "Mit freundlichen Grüßen,"
+
+msgctxt "odt:party.letter:0"
+msgid "Date:"
+msgstr "Datum:"
+
+msgctxt "odt:party.letter:0"
+msgid "Dear Madams and Sirs,"
+msgstr "Sehr geehrte Damen und Herren,"
+
+msgctxt "odt:party.letter:0"
+msgid "E-Mail:"
+msgstr "E-Mail:"
+
+msgctxt "odt:party.letter:0"
+msgid "Phone:"
+msgstr "Telefon:"
+
+msgctxt "odt:party.letter:0"
+msgid "Subject:"
+msgstr "Betreff:"
+
+msgctxt "odt:party.letter:0"
+msgid "VAT Number:"
+msgstr "USt-ID-Nr.:"
+
+msgctxt "view:company.company.config.init:0"
+msgid "Create Company"
+msgstr "Unternehmen anlegen"
+
+msgctxt "view:company.company.config.init:0"
+msgid "You can now add your company into the system."
+msgstr "Sie können nun Ihr Unternehmen dem System hinzufügen."
+
+msgctxt "view:company.company:0"
+msgid "Addresses"
+msgstr "Adressen"
+
+msgctxt "view:company.company:0"
+msgid "Companies"
+msgstr "Unternehmen"
+
+msgctxt "view:company.company:0"
+msgid "Company"
+msgstr "Unternehmen"
+
+msgctxt "view:company.company:0"
+msgid "Employees"
+msgstr "Mitarbeiter"
+
+msgctxt "view:company.company:0"
+msgid "General"
+msgstr "Allgemein"
+
+msgctxt "view:company.company:0"
+msgid "Reports"
+msgstr "Berichte"
+
+msgctxt "view:company.company:0"
+msgid "_Employees"
+msgstr "_Mitarbeiter"
+
+msgctxt "view:company.company:0"
+msgid "_General"
+msgstr "_Allgemein"
+
+msgctxt "view:company.company:0"
+msgid "_Reports"
+msgstr "_Berichte"
+
+msgctxt "view:company.employee:0"
+msgid "Addresses"
+msgstr "Adressen"
+
+msgctxt "view:company.employee:0"
+msgid "Employee"
+msgstr "Mitarbeiter"
+
+msgctxt "view:company.employee:0"
+msgid "Employees"
+msgstr "Mitarbeiter"
+
+msgctxt "view:company.employee:0"
+msgid "General"
+msgstr "Allgemein"
+
+msgctxt "view:company.employee:0"
+msgid "_General"
+msgstr "_Allgemein"
+
+msgctxt "wizard_button:company.company.config,company,add:0"
+msgid "Add"
+msgstr "Hinzufügen"
+
+msgctxt "wizard_button:company.company.config,company,end:0"
+msgid "Cancel"
+msgstr "Abbrechen"
+
+msgctxt "wizard_button:company.company.config,init,company:0"
+msgid "Ok"
+msgstr "OK"
+
+msgctxt "wizard_button:company.company.config,init,end:0"
+msgid "Cancel"
+msgstr "Abbrechen"
diff --git a/locale/es_CO.po b/locale/es_CO.po
new file mode 100644
index 0000000..32e56e1
--- /dev/null
+++ b/locale/es_CO.po
@@ -0,0 +1,242 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:company.company:0"
+msgid "You can not create recursive companies!"
+msgstr "No puede crear compañías recursivas!"
+
+msgctxt "error:res.user:0"
+msgid "You can not set a company that is not a child of your main company!"
+msgstr ""
+"No puede establecer una compañía que no es hija de su compañía principal!"
+
+msgctxt "field:company.company,childs:0"
+msgid "Children"
+msgstr "Hij at s"
+
+msgctxt "field:company.company,currency:0"
+msgid "Currency"
+msgstr "Moneda"
+
+msgctxt "field:company.company,employees:0"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "field:company.company,footer:0"
+msgid "Footer"
+msgstr "Pie de página"
+
+msgctxt "field:company.company,header:0"
+msgid "Header"
+msgstr "Encabezado"
+
+msgctxt "field:company.company,parent:0"
+msgid "Parent"
+msgstr "Padre"
+
+msgctxt "field:company.company,party:0"
+msgid "Party"
+msgstr "Tercero"
+
+msgctxt "field:company.company,rec_name:0"
+msgid "Name"
+msgstr "Nombre"
+
+msgctxt "field:company.employee,company:0"
+msgid "Company"
+msgstr "Compañía"
+
+msgctxt "field:company.employee,party:0"
+msgid "Party"
+msgstr "Tercero"
+
+msgctxt "field:company.employee,rec_name:0"
+msgid "Name"
+msgstr "Nombre"
+
+msgctxt "field:ir.cron,companies:0"
+msgid "Companies"
+msgstr "Compañías"
+
+msgctxt "field:ir.cron-company.company,company:0"
+msgid "Company"
+msgstr "Compañía"
+
+msgctxt "field:ir.cron-company.company,cron:0"
+msgid "Cron"
+msgstr "Agendador"
+
+msgctxt "field:ir.cron-company.company,rec_name:0"
+msgid "Name"
+msgstr "Nombre"
+
+msgctxt "field:ir.property,company:0"
+msgid "Company"
+msgstr "Compañía"
+
+msgctxt "field:ir.sequence,company:0"
+msgid "Company"
+msgstr "Compañía"
+
+msgctxt "field:ir.sequence.strict,company:0"
+msgid "Company"
+msgstr "Compañía"
+
+msgctxt "field:res.user,companies:0"
+msgid "Current Companies"
+msgstr "Compañías en Curso"
+
+msgctxt "field:res.user,company:0"
+msgid "Current Company"
+msgstr "Compañía Actual"
+
+msgctxt "field:res.user,employee:0"
+msgid "Employee"
+msgstr "Empleado"
+
+msgctxt "field:res.user,main_company:0"
+msgid "Main Company"
+msgstr "Compañía Principal"
+
+msgctxt "help:ir.cron,companies:0"
+msgid "Companies registered for this cron"
+msgstr "Compañías registradas para este lanzador"
+
+msgctxt "model:company.company,name:0"
+msgid "Company"
+msgstr "Compañía"
+
+msgctxt "model:company.company.config.init,name:0"
+msgid "Company Config Init"
+msgstr "Configuración inicial de Compañía"
+
+msgctxt "model:company.employee,name:0"
+msgid "Employee"
+msgstr "Empleado"
+
+#, fuzzy
+msgctxt "model:ir.action,name:act_company_list"
+msgid "Companies"
+msgstr "Compañías"
+
+msgctxt "model:ir.action,name:act_company_tree"
+msgid "Companies"
+msgstr "Compañías"
+
+msgctxt "model:ir.action,name:act_employee_form"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "model:ir.action,name:report_letter"
+msgid "Letter"
+msgstr "Carta"
+
+msgctxt "model:ir.cron-company.company,name:0"
+msgid "ir.cron-company.company"
+msgstr "ir.cron-company.company"
+
+#, fuzzy
+msgctxt "model:ir.ui.menu,name:menu_company_list"
+msgid "Companies"
+msgstr "Compañías"
+
+msgctxt "model:ir.ui.menu,name:menu_company_tree"
+msgid "Companies"
+msgstr "Compañías"
+
+msgctxt "model:ir.ui.menu,name:menu_employee_form"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "odt:party.letter:0"
+msgid "Best Regards,"
+msgstr "Atentamente,"
+
+msgctxt "odt:party.letter:0"
+msgid "Date:"
+msgstr "Fecha:"
+
+msgctxt "odt:party.letter:0"
+msgid "Dear Madams and Sirs,"
+msgstr "Estimados Señoras y Señores,"
+
+msgctxt "odt:party.letter:0"
+msgid "E-Mail:"
+msgstr "Correo electrónico:"
+
+msgctxt "odt:party.letter:0"
+msgid "Phone:"
+msgstr "Teléfono:"
+
+msgctxt "odt:party.letter:0"
+msgid "Subject:"
+msgstr "Título:"
+
+msgctxt "odt:party.letter:0"
+msgid "VAT Number:"
+msgstr ""
+
+msgctxt "view:company.company.config.init:0"
+msgid "Create Company"
+msgstr "Crear Compañía"
+
+msgctxt "view:company.company.config.init:0"
+msgid "You can now add your company into the system."
+msgstr "Ahora puede añadir su compañía al sistema."
+
+msgctxt "view:company.company:0"
+msgid "Addresses"
+msgstr "Direcciones"
+
+msgctxt "view:company.company:0"
+msgid "Companies"
+msgstr "Compañías"
+
+msgctxt "view:company.company:0"
+msgid "Company"
+msgstr "Compañía"
+
+msgctxt "view:company.company:0"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "view:company.company:0"
+msgid "General"
+msgstr "General"
+
+msgctxt "view:company.company:0"
+msgid "Reports"
+msgstr "Reportes"
+
+msgctxt "view:company.employee:0"
+msgid "Addresses"
+msgstr "Direcciones"
+
+msgctxt "view:company.employee:0"
+msgid "Employee"
+msgstr "Empleado"
+
+msgctxt "view:company.employee:0"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "view:company.employee:0"
+msgid "General"
+msgstr "General"
+
+msgctxt "wizard_button:company.company.config,company,add:0"
+msgid "Add"
+msgstr "Adicionar"
+
+msgctxt "wizard_button:company.company.config,company,end:0"
+msgid "Cancel"
+msgstr "Cancelar"
+
+msgctxt "wizard_button:company.company.config,init,company:0"
+msgid "Ok"
+msgstr "Aceptar"
+
+msgctxt "wizard_button:company.company.config,init,end:0"
+msgid "Cancel"
+msgstr "Cancelar"
diff --git a/locale/es_ES.po b/locale/es_ES.po
new file mode 100644
index 0000000..e70a442
--- /dev/null
+++ b/locale/es_ES.po
@@ -0,0 +1,242 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:company.company:0"
+msgid "You can not create recursive companies!"
+msgstr "No puede crear empresas recursivas"
+
+msgctxt "error:res.user:0"
+msgid "You can not set a company that is not a child of your main company!"
+msgstr ""
+"No puede establecer una empresa que no es hija de su empresa principal"
+
+msgctxt "field:company.company,childs:0"
+msgid "Children"
+msgstr "Hijos"
+
+msgctxt "field:company.company,currency:0"
+msgid "Currency"
+msgstr "Divisa"
+
+msgctxt "field:company.company,employees:0"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "field:company.company,footer:0"
+msgid "Footer"
+msgstr "Pie de página"
+
+msgctxt "field:company.company,header:0"
+msgid "Header"
+msgstr "Encabezado"
+
+msgctxt "field:company.company,parent:0"
+msgid "Parent"
+msgstr "Padre"
+
+msgctxt "field:company.company,party:0"
+msgid "Party"
+msgstr "Tercero"
+
+msgctxt "field:company.company,rec_name:0"
+msgid "Name"
+msgstr "Nombre"
+
+msgctxt "field:company.employee,company:0"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "field:company.employee,party:0"
+msgid "Party"
+msgstr "Tercero"
+
+msgctxt "field:company.employee,rec_name:0"
+msgid "Name"
+msgstr "Nombre"
+
+msgctxt "field:ir.cron,companies:0"
+msgid "Companies"
+msgstr "Empresas"
+
+msgctxt "field:ir.cron-company.company,company:0"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "field:ir.cron-company.company,cron:0"
+msgid "Cron"
+msgstr "Programador de tareas"
+
+msgctxt "field:ir.cron-company.company,rec_name:0"
+msgid "Name"
+msgstr "Nombre"
+
+msgctxt "field:ir.property,company:0"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "field:ir.sequence,company:0"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "field:ir.sequence.strict,company:0"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "field:res.user,companies:0"
+msgid "Current Companies"
+msgstr "Empresas actuales"
+
+msgctxt "field:res.user,company:0"
+msgid "Current Company"
+msgstr "Empresa actual"
+
+msgctxt "field:res.user,employee:0"
+msgid "Employee"
+msgstr "Empleado"
+
+msgctxt "field:res.user,main_company:0"
+msgid "Main Company"
+msgstr "Empresa principal"
+
+msgctxt "help:ir.cron,companies:0"
+msgid "Companies registered for this cron"
+msgstr "Empresas registradas en este programador de tareas"
+
+msgctxt "model:company.company,name:0"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "model:company.company.config.init,name:0"
+msgid "Company Config Init"
+msgstr "Inicialización de la configuración de la empresa"
+
+msgctxt "model:company.employee,name:0"
+msgid "Employee"
+msgstr "Empleado"
+
+#, fuzzy
+msgctxt "model:ir.action,name:act_company_list"
+msgid "Companies"
+msgstr "Empresas"
+
+msgctxt "model:ir.action,name:act_company_tree"
+msgid "Companies"
+msgstr "Empresas"
+
+msgctxt "model:ir.action,name:act_employee_form"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "model:ir.action,name:report_letter"
+msgid "Letter"
+msgstr "Carta"
+
+msgctxt "model:ir.cron-company.company,name:0"
+msgid "ir.cron-company.company"
+msgstr "ir.cron-company.company"
+
+#, fuzzy
+msgctxt "model:ir.ui.menu,name:menu_company_list"
+msgid "Companies"
+msgstr "Empresas"
+
+msgctxt "model:ir.ui.menu,name:menu_company_tree"
+msgid "Companies"
+msgstr "Empresas"
+
+msgctxt "model:ir.ui.menu,name:menu_employee_form"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "odt:party.letter:0"
+msgid "Best Regards,"
+msgstr "Atentamente,"
+
+msgctxt "odt:party.letter:0"
+msgid "Date:"
+msgstr "Fecha:"
+
+msgctxt "odt:party.letter:0"
+msgid "Dear Madams and Sirs,"
+msgstr "Estimados señores y señoras,"
+
+msgctxt "odt:party.letter:0"
+msgid "E-Mail:"
+msgstr "Correo electrónico:"
+
+msgctxt "odt:party.letter:0"
+msgid "Phone:"
+msgstr "Teléfono:"
+
+msgctxt "odt:party.letter:0"
+msgid "Subject:"
+msgstr "Asunto:"
+
+msgctxt "odt:party.letter:0"
+msgid "VAT Number:"
+msgstr ""
+
+msgctxt "view:company.company.config.init:0"
+msgid "Create Company"
+msgstr "Crear empresa"
+
+msgctxt "view:company.company.config.init:0"
+msgid "You can now add your company into the system."
+msgstr "Ahora puede añadir su empresa al sistema."
+
+msgctxt "view:company.company:0"
+msgid "Addresses"
+msgstr "Direcciones"
+
+msgctxt "view:company.company:0"
+msgid "Companies"
+msgstr "Empresas"
+
+msgctxt "view:company.company:0"
+msgid "Company"
+msgstr "Empresa"
+
+msgctxt "view:company.company:0"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "view:company.company:0"
+msgid "General"
+msgstr "General"
+
+msgctxt "view:company.company:0"
+msgid "Reports"
+msgstr "Informes"
+
+msgctxt "view:company.employee:0"
+msgid "Addresses"
+msgstr "Direcciones"
+
+msgctxt "view:company.employee:0"
+msgid "Employee"
+msgstr "Empleado"
+
+msgctxt "view:company.employee:0"
+msgid "Employees"
+msgstr "Empleados"
+
+msgctxt "view:company.employee:0"
+msgid "General"
+msgstr "General"
+
+msgctxt "wizard_button:company.company.config,company,add:0"
+msgid "Add"
+msgstr "Añadir"
+
+msgctxt "wizard_button:company.company.config,company,end:0"
+msgid "Cancel"
+msgstr "Cancelar"
+
+msgctxt "wizard_button:company.company.config,init,company:0"
+msgid "Ok"
+msgstr "Aceptar"
+
+msgctxt "wizard_button:company.company.config,init,end:0"
+msgid "Cancel"
+msgstr "Cancelar"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
new file mode 100644
index 0000000..e02959b
--- /dev/null
+++ b/locale/fr_FR.po
@@ -0,0 +1,241 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:company.company:0"
+msgid "You can not create recursive companies!"
+msgstr "Vous ne pouvez pas créer des sociétés récursives !"
+
+msgctxt "error:res.user:0"
+msgid "You can not set a company that is not a child of your main company!"
+msgstr ""
+"Vous ne pouvez pas choisir une société qui n'est pas enfant de votre société"
+" principale !"
+
+msgctxt "field:company.company,childs:0"
+msgid "Children"
+msgstr "Enfants"
+
+msgctxt "field:company.company,currency:0"
+msgid "Currency"
+msgstr "Devise"
+
+msgctxt "field:company.company,employees:0"
+msgid "Employees"
+msgstr "Employés"
+
+msgctxt "field:company.company,footer:0"
+msgid "Footer"
+msgstr "Pied de Page"
+
+msgctxt "field:company.company,header:0"
+msgid "Header"
+msgstr "Entête de Page"
+
+msgctxt "field:company.company,parent:0"
+msgid "Parent"
+msgstr "Parent"
+
+msgctxt "field:company.company,party:0"
+msgid "Party"
+msgstr "Tiers"
+
+msgctxt "field:company.company,rec_name:0"
+msgid "Name"
+msgstr "Nom"
+
+msgctxt "field:company.employee,company:0"
+msgid "Company"
+msgstr "Société"
+
+msgctxt "field:company.employee,party:0"
+msgid "Party"
+msgstr "Tiers"
+
+msgctxt "field:company.employee,rec_name:0"
+msgid "Name"
+msgstr "Nom"
+
+msgctxt "field:ir.cron,companies:0"
+msgid "Companies"
+msgstr "Sociétés"
+
+msgctxt "field:ir.cron-company.company,company:0"
+msgid "Company"
+msgstr "Société"
+
+msgctxt "field:ir.cron-company.company,cron:0"
+msgid "Cron"
+msgstr "Cron"
+
+msgctxt "field:ir.cron-company.company,rec_name:0"
+msgid "Name"
+msgstr "Nom"
+
+msgctxt "field:ir.property,company:0"
+msgid "Company"
+msgstr "Société"
+
+msgctxt "field:ir.sequence,company:0"
+msgid "Company"
+msgstr "Société"
+
+msgctxt "field:ir.sequence.strict,company:0"
+msgid "Company"
+msgstr "Société"
+
+msgctxt "field:res.user,companies:0"
+msgid "Current Companies"
+msgstr "Sociétés courantes"
+
+msgctxt "field:res.user,company:0"
+msgid "Current Company"
+msgstr "Société courante"
+
+msgctxt "field:res.user,employee:0"
+msgid "Employee"
+msgstr "Employé"
+
+msgctxt "field:res.user,main_company:0"
+msgid "Main Company"
+msgstr "Société principale"
+
+msgctxt "help:ir.cron,companies:0"
+msgid "Companies registered for this cron"
+msgstr "Sociétés enregistrées pour ce planificateur"
+
+msgctxt "model:company.company,name:0"
+msgid "Company"
+msgstr "Société"
+
+msgctxt "model:company.company.config.init,name:0"
+msgid "Company Config Init"
+msgstr "Société config - Init"
+
+msgctxt "model:company.employee,name:0"
+msgid "Employee"
+msgstr "Employé"
+
+msgctxt "model:ir.action,name:act_company_list"
+msgid "Companies"
+msgstr "Sociétés"
+
+msgctxt "model:ir.action,name:act_company_tree"
+msgid "Companies"
+msgstr "Sociétés"
+
+msgctxt "model:ir.action,name:act_employee_form"
+msgid "Employees"
+msgstr "Employés"
+
+msgctxt "model:ir.action,name:report_letter"
+msgid "Letter"
+msgstr "Lettre"
+
+msgctxt "model:ir.cron-company.company,name:0"
+msgid "ir.cron-company.company"
+msgstr ""
+
+msgctxt "model:ir.ui.menu,name:menu_company_list"
+msgid "Companies"
+msgstr "Sociétés"
+
+msgctxt "model:ir.ui.menu,name:menu_company_tree"
+msgid "Companies"
+msgstr "Sociétés"
+
+msgctxt "model:ir.ui.menu,name:menu_employee_form"
+msgid "Employees"
+msgstr "Employés"
+
+msgctxt "odt:party.letter:0"
+msgid "Best Regards,"
+msgstr "Bien cordialement,"
+
+msgctxt "odt:party.letter:0"
+msgid "Date:"
+msgstr "Date :"
+
+msgctxt "odt:party.letter:0"
+msgid "Dear Madams and Sirs,"
+msgstr "Chère madame, cher monsieur,"
+
+msgctxt "odt:party.letter:0"
+msgid "E-Mail:"
+msgstr "E-Mail :"
+
+msgctxt "odt:party.letter:0"
+msgid "Phone:"
+msgstr "Téléphone"
+
+msgctxt "odt:party.letter:0"
+msgid "Subject:"
+msgstr "Sujet :"
+
+msgctxt "odt:party.letter:0"
+msgid "VAT Number:"
+msgstr "Numéro TVA :"
+
+msgctxt "view:company.company.config.init:0"
+msgid "Create Company"
+msgstr "Créer une société"
+
+msgctxt "view:company.company.config.init:0"
+msgid "You can now add your company into the system."
+msgstr "Vous pouvez maintenant ajouter votre société dans le système."
+
+msgctxt "view:company.company:0"
+msgid "Addresses"
+msgstr "Adresses"
+
+msgctxt "view:company.company:0"
+msgid "Companies"
+msgstr "Sociétés"
+
+msgctxt "view:company.company:0"
+msgid "Company"
+msgstr "Société"
+
+msgctxt "view:company.company:0"
+msgid "Employees"
+msgstr "Employés"
+
+msgctxt "view:company.company:0"
+msgid "General"
+msgstr "Général"
+
+msgctxt "view:company.company:0"
+msgid "Reports"
+msgstr "Rapports"
+
+msgctxt "view:company.employee:0"
+msgid "Addresses"
+msgstr "Adresses"
+
+msgctxt "view:company.employee:0"
+msgid "Employee"
+msgstr "Employé"
+
+msgctxt "view:company.employee:0"
+msgid "Employees"
+msgstr "Employés"
+
+msgctxt "view:company.employee:0"
+msgid "General"
+msgstr "Général"
+
+msgctxt "wizard_button:company.company.config,company,add:0"
+msgid "Add"
+msgstr "Ajouter"
+
+msgctxt "wizard_button:company.company.config,company,end:0"
+msgid "Cancel"
+msgstr "Annuler"
+
+msgctxt "wizard_button:company.company.config,init,company:0"
+msgid "Ok"
+msgstr "Ok"
+
+msgctxt "wizard_button:company.company.config,init,end:0"
+msgid "Cancel"
+msgstr "Annuler"
diff --git a/locale/nl_NL.po b/locale/nl_NL.po
new file mode 100644
index 0000000..76d37a2
--- /dev/null
+++ b/locale/nl_NL.po
@@ -0,0 +1,227 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:company.company:0"
+msgid "You can not create recursive companies!"
+msgstr "U kunt geen bedrijven aanmaken die naar zichzelf verwijzen!"
+
+msgctxt "error:res.user:0"
+msgid "You can not set a company that is not a child of your main company!"
+msgstr ""
+"U kunt geen bedrijf kiezen dat geen onderdeel uitmaakt van het "
+"moederbedrijf!"
+
+msgctxt "field:company.company,childs:0"
+msgid "Children"
+msgstr "Onderliggende niveaus"
+
+msgctxt "field:company.company,currency:0"
+msgid "Currency"
+msgstr "Valuta"
+
+msgctxt "field:company.company,employees:0"
+msgid "Employees"
+msgstr "Werknemers"
+
+msgctxt "field:company.company,footer:0"
+msgid "Footer"
+msgstr "Werknemers"
+
+msgctxt "field:company.company,header:0"
+msgid "Header"
+msgstr "Werknemers"
+
+msgctxt "field:company.company,parent:0"
+msgid "Parent"
+msgstr "Bovenliggend niveau"
+
+msgctxt "field:company.company,party:0"
+msgid "Party"
+msgstr "Relatie"
+
+msgctxt "field:company.company,rec_name:0"
+msgid "Name"
+msgstr "Naam"
+
+msgctxt "field:company.employee,company:0"
+msgid "Company"
+msgstr "Bedrijf"
+
+msgctxt "field:company.employee,party:0"
+msgid "Party"
+msgstr "Relatie"
+
+msgctxt "field:company.employee,rec_name:0"
+msgid "Name"
+msgstr "Naam"
+
+msgctxt "field:ir.cron,companies:0"
+msgid "Companies"
+msgstr "Bedrijven"
+
+msgctxt "field:ir.cron-company.company,company:0"
+msgid "Company"
+msgstr "Bedrijf"
+
+msgctxt "field:ir.cron-company.company,cron:0"
+msgid "Cron"
+msgstr "Cyclische opdracht"
+
+msgctxt "field:ir.cron-company.company,rec_name:0"
+msgid "Name"
+msgstr "Naam"
+
+msgctxt "field:ir.property,company:0"
+msgid "Company"
+msgstr "Bedrijf"
+
+msgctxt "field:ir.sequence,company:0"
+msgid "Company"
+msgstr "Bedrijf"
+
+msgctxt "field:ir.sequence.strict,company:0"
+msgid "Company"
+msgstr "Bedrijf"
+
+msgctxt "field:res.user,companies:0"
+msgid "Current Companies"
+msgstr "Huidige bedrijven"
+
+msgctxt "field:res.user,company:0"
+msgid "Current Company"
+msgstr "Huidig bedrijf"
+
+msgctxt "field:res.user,employee:0"
+msgid "Employee"
+msgstr "Werknemer"
+
+msgctxt "field:res.user,main_company:0"
+msgid "Main Company"
+msgstr "Moederbedrijf"
+
+msgctxt "help:ir.cron,companies:0"
+msgid "Companies registered for this cron"
+msgstr "Bedrijven aangesloten op deze cyclische opdracht"
+
+msgctxt "model:company.company,name:0"
+msgid "Company"
+msgstr "Bedrijf"
+
+msgctxt "model:company.company.config.init,name:0"
+msgid "Company Config Init"
+msgstr "Bedrijfsinstellingen gaan maken"
+
+msgctxt "model:company.employee,name:0"
+msgid "Employee"
+msgstr "Werknemer"
+
+#, fuzzy
+msgctxt "model:ir.action,name:act_company_list"
+msgid "Companies"
+msgstr "Bedrijven"
+
+msgctxt "model:ir.action,name:act_company_tree"
+msgid "Companies"
+msgstr "Bedrijven"
+
+msgctxt "model:ir.action,name:act_employee_form"
+msgid "Employees"
+msgstr "Werknemers"
+
+msgctxt "model:ir.action,name:report_letter"
+msgid "Letter"
+msgstr "Brief"
+
+msgctxt "model:ir.cron-company.company,name:0"
+msgid "ir.cron-company.company"
+msgstr ""
+
+#, fuzzy
+msgctxt "model:ir.ui.menu,name:menu_company_list"
+msgid "Companies"
+msgstr "Bedrijven"
+
+msgctxt "model:ir.ui.menu,name:menu_company_tree"
+msgid "Companies"
+msgstr "Bedrijven"
+
+msgctxt "model:ir.ui.menu,name:menu_employee_form"
+msgid "Employees"
+msgstr "Werknemers"
+
+msgctxt "odt:party.letter:0"
+msgid "Best Regards,"
+msgstr "Met vriendelijke groet,"
+
+msgctxt "odt:party.letter:0"
+msgid "Date:"
+msgstr "Datum:"
+
+msgctxt "odt:party.letter:0"
+msgid "Dear Madams and Sirs,"
+msgstr "Geachte heer/mevrouw,"
+
+msgctxt "odt:party.letter:0"
+msgid "E-Mail:"
+msgstr "E-mail:"
+
+msgctxt "odt:party.letter:0"
+msgid "Phone:"
+msgstr "Telefoon:"
+
+msgctxt "odt:party.letter:0"
+msgid "Subject:"
+msgstr "Betreft:"
+
+msgctxt "odt:party.letter:0"
+msgid "VAT Number:"
+msgstr "BTW-nummer:"
+
+msgctxt "view:company.company.config.init:0"
+msgid "Create Company"
+msgstr "Bedrijf aanmaken"
+
+msgctxt "view:company.company.config.init:0"
+msgid "You can now add your company into the system."
+msgstr "U kunt nu uw eigen bedrijf toevoegen aan het systeem."
+
+msgctxt "view:company.company:0"
+msgid "Companies"
+msgstr "Bedrijven"
+
+msgctxt "view:company.company:0"
+msgid "Company"
+msgstr "Bedrijf"
+
+msgctxt "view:company.company:0"
+msgid "Employees"
+msgstr "Werknemers"
+
+msgctxt "view:company.company:0"
+msgid "Reports"
+msgstr "Rapportage"
+
+msgctxt "view:company.employee:0"
+msgid "Employee"
+msgstr "Werknemer"
+
+msgctxt "view:company.employee:0"
+msgid "Employees"
+msgstr "Werknemers"
+
+msgctxt "wizard_button:company.company.config,company,add:0"
+msgid "Add"
+msgstr "Toevoegen"
+
+msgctxt "wizard_button:company.company.config,company,end:0"
+msgid "Cancel"
+msgstr "Annuleren"
+
+msgctxt "wizard_button:company.company.config,init,company:0"
+msgid "Ok"
+msgstr "Oké"
+
+msgctxt "wizard_button:company.company.config,init,end:0"
+msgid "Cancel"
+msgstr "Annuleren"
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
new file mode 100644
index 0000000..9c21bd1
--- /dev/null
+++ b/locale/ru_RU.po
@@ -0,0 +1,232 @@
+#
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "error:company.company:0"
+msgid "You can not create recursive companies!"
+msgstr "Вы не можете создать взаимоподчинённые организации"
+
+msgctxt "error:res.user:0"
+msgid "You can not set a company that is not a child of your main company!"
+msgstr ""
+"вы не можете установить учетную организацию, отсутвуют подразделения вашей "
+"компании"
+
+msgctxt "field:company.company,childs:0"
+msgid "Children"
+msgstr "Подчиненый"
+
+msgctxt "field:company.company,currency:0"
+msgid "Currency"
+msgstr "Валюта"
+
+msgctxt "field:company.company,employees:0"
+msgid "Employees"
+msgstr "Сотрудники"
+
+msgctxt "field:company.company,footer:0"
+msgid "Footer"
+msgstr "Нижний колонтитул"
+
+msgctxt "field:company.company,header:0"
+msgid "Header"
+msgstr "Верхний колонтитул"
+
+msgctxt "field:company.company,parent:0"
+msgid "Parent"
+msgstr "Основной"
+
+msgctxt "field:company.company,party:0"
+msgid "Party"
+msgstr "Контрагент"
+
+msgctxt "field:company.company,rec_name:0"
+msgid "Name"
+msgstr "Наименование"
+
+msgctxt "field:company.employee,company:0"
+msgid "Company"
+msgstr "Учет.орг."
+
+msgctxt "field:company.employee,party:0"
+msgid "Party"
+msgstr "Контрагент"
+
+msgctxt "field:company.employee,rec_name:0"
+msgid "Name"
+msgstr "Наименование"
+
+msgctxt "field:ir.cron,companies:0"
+msgid "Companies"
+msgstr "Организация"
+
+msgctxt "field:ir.cron-company.company,company:0"
+msgid "Company"
+msgstr "Учет.орг."
+
+msgctxt "field:ir.cron-company.company,cron:0"
+msgid "Cron"
+msgstr "Планировщик"
+
+msgctxt "field:ir.cron-company.company,rec_name:0"
+msgid "Name"
+msgstr "Наименование"
+
+msgctxt "field:ir.property,company:0"
+msgid "Company"
+msgstr "Учет.орг."
+
+msgctxt "field:ir.sequence,company:0"
+msgid "Company"
+msgstr "Учет.орг."
+
+msgctxt "field:ir.sequence.strict,company:0"
+msgid "Company"
+msgstr "Учет.орг."
+
+msgctxt "field:res.user,companies:0"
+msgid "Current Companies"
+msgstr "Текущие организации"
+
+msgctxt "field:res.user,company:0"
+msgid "Current Company"
+msgstr "Текущая организация"
+
+msgctxt "field:res.user,employee:0"
+msgid "Employee"
+msgstr "Сотрудник"
+
+msgctxt "field:res.user,main_company:0"
+msgid "Main Company"
+msgstr "Основная организация"
+
+msgctxt "help:ir.cron,companies:0"
+msgid "Companies registered for this cron"
+msgstr "Организации зарегистрированные для этого планировщика"
+
+msgctxt "model:company.company,name:0"
+msgid "Company"
+msgstr "Учет.орг."
+
+msgctxt "model:company.company.config.init,name:0"
+msgid "Company Config Init"
+msgstr "Конфигурация модуля предприятия"
+
+msgctxt "model:company.employee,name:0"
+msgid "Employee"
+msgstr "Сотрудник"
+
+#, fuzzy
+msgctxt "model:ir.action,name:act_company_list"
+msgid "Companies"
+msgstr "Организация"
+
+msgctxt "model:ir.action,name:act_company_tree"
+msgid "Companies"
+msgstr "Организация"
+
+msgctxt "model:ir.action,name:act_employee_form"
+msgid "Employees"
+msgstr "Сотрудники"
+
+msgctxt "model:ir.action,name:report_letter"
+msgid "Letter"
+msgstr "Письмо"
+
+msgctxt "model:ir.cron-company.company,name:0"
+msgid "ir.cron-company.company"
+msgstr "Планировщик"
+
+#, fuzzy
+msgctxt "model:ir.ui.menu,name:menu_company_list"
+msgid "Companies"
+msgstr "Организация"
+
+msgctxt "model:ir.ui.menu,name:menu_company_tree"
+msgid "Companies"
+msgstr "Организация"
+
+msgctxt "model:ir.ui.menu,name:menu_employee_form"
+msgid "Employees"
+msgstr "Сотрудники"
+
+msgctxt "odt:party.letter:0"
+msgid "Best Regards,"
+msgstr "С уважением,"
+
+msgctxt "odt:party.letter:0"
+msgid "Date:"
+msgstr "Дата:"
+
+msgctxt "odt:party.letter:0"
+msgid "Dear Madams and Sirs,"
+msgstr "Уважаемые дамы и годпода,"
+
+msgctxt "odt:party.letter:0"
+msgid "E-Mail:"
+msgstr "E-Mail:"
+
+msgctxt "odt:party.letter:0"
+msgid "Phone:"
+msgstr "Телефон:"
+
+msgctxt "odt:party.letter:0"
+msgid "Subject:"
+msgstr "Тема:"
+
+msgctxt "odt:party.letter:0"
+msgid "VAT Number:"
+msgstr ""
+
+msgctxt "view:company.company.config.init:0"
+msgid "Create Company"
+msgstr "Создать организацию"
+
+msgctxt "view:company.company.config.init:0"
+msgid "You can now add your company into the system."
+msgstr "Теперь вы можете добавить организацию в систему"
+
+msgctxt "view:company.company:0"
+msgid "Companies"
+msgstr "Организация"
+
+msgctxt "view:company.company:0"
+msgid "Company"
+msgstr "Учет.орг."
+
+msgctxt "view:company.company:0"
+msgid "Employees"
+msgstr "Сотрудники"
+
+msgctxt "view:company.company:0"
+msgid "Reports"
+msgstr "Отчеты"
+
+msgctxt "view:company.employee:0"
+msgid "Employee"
+msgstr "Сотрудник"
+
+#, fuzzy
+msgctxt "view:company.employee:0"
+msgid "Employees"
+msgstr "Сотрудники"
+
+msgctxt "view:company.employee:0"
+msgid "Employess"
+msgstr "Сотрудники"
+
+msgctxt "wizard_button:company.company.config,company,add:0"
+msgid "Add"
+msgstr "Добавить"
+
+msgctxt "wizard_button:company.company.config,company,end:0"
+msgid "Cancel"
+msgstr "Отменить"
+
+msgctxt "wizard_button:company.company.config,init,company:0"
+msgid "Ok"
+msgstr "Да"
+
+msgctxt "wizard_button:company.company.config,init,end:0"
+msgid "Cancel"
+msgstr "Отменить"
diff --git a/nl_NL.csv b/nl_NL.csv
deleted file mode 100644
index 1aab01c..0000000
--- a/nl_NL.csv
+++ /dev/null
@@ -1,58 +0,0 @@
-type,name,res_id,src,value,fuzzy
-error,company.company,0,You can not create recursive companies!,U kunt geen bedrijven aanmaken die naar zichzelf verwijzen!,0
-error,res.user,0,You can not set a company that is not a child of your main company!,U kunt geen bedrijf kiezen dat geen onderdeel uitmaakt van het moederbedrijf!,0
-field,"company.company,childs",0,Children,Onderliggende niveaus,0
-field,"company.company,currency",0,Currency,Valuta,0
-field,"company.company,employees",0,Employees,Werknemers,0
-field,"company.company,footer",0,Footer,Werknemers,0
-field,"company.company,header",0,Header,Werknemers,0
-field,"company.company,parent",0,Parent,Bovenliggend niveau,0
-field,"company.company,party",0,Party,Relatie,0
-field,"company.company,rec_name",0,Name,Naam,0
-field,"company.employee,company",0,Company,Bedrijf,0
-field,"company.employee,party",0,Party,Relatie,0
-field,"company.employee,rec_name",0,Name,Naam,0
-field,"ir.cron,companies",0,Companies,Bedrijven,0
-field,"ir.cron-company.company,company",0,Company,Bedrijf,0
-field,"ir.cron-company.company,cron",0,Cron,Cyclische opdracht,0
-field,"ir.cron-company.company,rec_name",0,Name,Naam,0
-field,"ir.property,company",0,Company,Bedrijf,0
-field,"ir.sequence,company",0,Company,Bedrijf,0
-field,"ir.sequence.strict,company",0,Company,Bedrijf,0
-field,"res.user,companies",0,Current Companies,Huidige bedrijven,0
-field,"res.user,company",0,Current Company,Huidig bedrijf,0
-field,"res.user,employee",0,Employee,Werknemer,0
-field,"res.user,main_company",0,Main Company,Moederbedrijf,0
-help,"ir.cron,companies",0,Companies registered for this cron,Bedrijven aangesloten op deze cyclische opdracht,0
-model,"company.company,name",0,Company,Bedrijf,0
-model,"company.company.config.init,name",0,Company Config Init,Bedrijfsinstellingen gaan maken,0
-model,"company.employee,name",0,Employee,Werknemer,0
-model,"ir.action,name",act_company_form,Companies,Bedrijven,0
-model,"ir.action,name",act_company_form2,Companies,Bedrijven,0
-model,"ir.action,name",act_company_tree,Companies,Bedrijven,0
-model,"ir.action,name",act_employee_form,Employees,Werknemers,0
-model,"ir.action,name",report_letter,Letter,Brief,0
-model,"ir.cron-company.company,name",0,ir.cron-company.company,,0
-model,"ir.ui.menu,name",menu_company_form,Edit Companies,Bedrijven aanpassen,0
-model,"ir.ui.menu,name",menu_company_form2,New Company,Nieuw bedrijf,0
-model,"ir.ui.menu,name",menu_company_tree,Companies,Bedrijven,0
-model,"ir.ui.menu,name",menu_employee_form,Employees,Werknemers,0
-odt,party.letter,0,"Best Regards,","Met vriendelijke groet,",0
-odt,party.letter,0,Date:,Datum:,0
-odt,party.letter,0,"Dear Madams and Sirs,","Geachte heer/mevrouw,",0
-odt,party.letter,0,E-Mail:,E-mail:,0
-odt,party.letter,0,Phone:,Telefoon:,0
-odt,party.letter,0,Subject:,Betreft:,0
-odt,party.letter,0,VAT Number:,BTW-nummer:,0
-view,company.company,0,Companies,Bedrijven,0
-view,company.company,0,Company,Bedrijf,0
-view,company.company,0,Employees,Werknemers,0
-view,company.company,0,Reports,Rapportage,0
-view,company.company.config.init,0,Create Company,Bedrijf aanmaken,0
-view,company.company.config.init,0,You can now add your company into the system.,U kunt nu uw eigen bedrijf toevoegen aan het systeem.,0
-view,company.employee,0,Employee,Werknemer,0
-view,company.employee,0,Employees,Werknemers,0
-wizard_button,"company.company.config,company,add",0,Add,Toevoegen,0
-wizard_button,"company.company.config,company,end",0,Cancel,Annuleren,0
-wizard_button,"company.company.config,init,company",0,Ok,Oké,0
-wizard_button,"company.company.config,init,end",0,Cancel,Annuleren,0
diff --git a/party.py b/party.py
new file mode 100644
index 0000000..ef4b845
--- /dev/null
+++ b/party.py
@@ -0,0 +1,21 @@
+#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 Model
+from trytond.pyson import Eval
+
+
+class Configuration(Model):
+ _name = 'party.configuration'
+
+ def __init__(self):
+ super(Configuration, self).__init__()
+
+ self.party_sequence = copy.copy(self.party_sequence)
+ self.party_sequence.domain = copy.copy(self.party_sequence.domain)
+ self.party_sequence.domain = [
+ self.party_sequence.domain,
+ ('company', 'in', [Eval('context', {}).get('company'), False])]
+
+Configuration()
diff --git a/ru_RU.csv b/ru_RU.csv
deleted file mode 100644
index ba8b79c..0000000
--- a/ru_RU.csv
+++ /dev/null
@@ -1,57 +0,0 @@
-type,name,res_id,src,value,fuzzy
-error,company.company,0,You can not create recursive companies!,Вы не можете создать взаимоподчинённые организации,0
-error,res.user,0,You can not set a company that is not a child of your main company!,"вы не можете установить учетную организацию, отсутвуют подразделения вашей компании",0
-field,"company.company,childs",0,Children,Подчиненый,0
-field,"company.company,currency",0,Currency,Валюта,0
-field,"company.company,employees",0,Employees,Сотрудники,0
-field,"company.company,footer",0,Footer,Нижний колонтитул,0
-field,"company.company,header",0,Header,Верхний колонтитул,0
-field,"company.company,parent",0,Parent,Основной,0
-field,"company.company,party",0,Party,Контрагент,0
-field,"company.company,rec_name",0,Name,Наименование,0
-field,"company.employee,company",0,Company,Учет.орг.,0
-field,"company.employee,party",0,Party,Контрагент,0
-field,"company.employee,rec_name",0,Name,Наименование,0
-field,"ir.cron,companies",0,Companies,Организация,0
-field,"ir.cron-company.company,company",0,Company,Учет.орг.,0
-field,"ir.cron-company.company,cron",0,Cron,Планировщик,0
-field,"ir.cron-company.company,rec_name",0,Name,Наименование,0
-field,"ir.property,company",0,Company,Учет.орг.,0
-field,"ir.sequence,company",0,Company,Учет.орг.,0
-field,"ir.sequence.strict,company",0,Company,Учет.орг.,0
-field,"res.user,companies",0,Current Companies,Текущие организации,0
-field,"res.user,company",0,Current Company,Текущая организация,0
-field,"res.user,employee",0,Employee,Сотрудник,0
-field,"res.user,main_company",0,Main Company,Основная организация,0
-help,"ir.cron,companies",0,Companies registered for this cron,Организации зарегистрированные для этого планировщика,0
-model,"company.company,name",0,Company,Учет.орг.,0
-model,"company.company.config.init,name",0,Company Config Init,Конфигурация модуля предприятия,0
-model,"company.employee,name",0,Employee,Сотрудник,0
-model,"ir.action,name",act_company_form,Companies,Организация,0
-model,"ir.action,name",act_company_form2,Companies,Организация,0
-model,"ir.action,name",act_company_tree,Companies,Организация,0
-model,"ir.action,name",act_employee_form,Employees,Сотрудники,0
-model,"ir.action,name",report_letter,Letter,Письмо,0
-model,"ir.cron-company.company,name",0,ir.cron-company.company,Планировщик,0
-model,"ir.ui.menu,name",menu_company_form,Edit Companies,Редактирование организации,0
-model,"ir.ui.menu,name",menu_company_form2,New Company,Новая организация,0
-model,"ir.ui.menu,name",menu_company_tree,Companies,Организация,0
-model,"ir.ui.menu,name",menu_employee_form,Employees,Сотрудники,0
-odt,party.letter,0,"Best Regards,","С уважением,",0
-odt,party.letter,0,Date:,Дата:,0
-odt,party.letter,0,"Dear Madams and Sirs,","Уважаемые дамы и годпода,",0
-odt,party.letter,0,E-Mail:,E-Mail:,0
-odt,party.letter,0,Phone:,Телефон:,0
-odt,party.letter,0,Subject:,Тема:,0
-view,company.company,0,Companies,Организация,0
-view,company.company,0,Company,Учет.орг.,0
-view,company.company,0,Employees,Сотрудники,0
-view,company.company,0,Reports,Отчеты,0
-view,company.company.config.init,0,Create Company,Создать организацию,0
-view,company.company.config.init,0,You can now add your company into the system.,Теперь вы можете добавить организацию в систему,0
-view,company.employee,0,Employee,Сотрудник,0
-view,company.employee,0,Employess,Сотрудники,0
-wizard_button,"company.company.config,company,add",0,Add,Добавить,0
-wizard_button,"company.company.config,company,end",0,Cancel,Отменить,0
-wizard_button,"company.company.config,init,company",0,Ok,Да,0
-wizard_button,"company.company.config,init,end",0,Cancel,Отменить,0
diff --git a/setup.py b/setup.py
index 3db1eda..d4da235 100644
--- a/setup.py
+++ b/setup.py
@@ -40,12 +40,14 @@ setup(name='trytond_company',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Plugins',
+ 'Framework :: Tryton',
'Intended Audience :: Developers',
'Intended Audience :: Financial and Insurance Industry',
'Intended Audience :: Legal Industry',
'Intended Audience :: Manufacturing',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: Bulgarian',
+ 'Natural Language :: Czech',
'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: French',
@@ -53,7 +55,6 @@ setup(name='trytond_company',
'Natural Language :: Russian',
'Natural Language :: Spanish',
'Operating System :: OS Independent',
- 'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Office/Business',
diff --git a/tests/test_company.py b/tests/test_company.py
index b7b8901..946a176 100644
--- a/tests/test_company.py
+++ b/tests/test_company.py
@@ -1,7 +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.
-from __future__ import with_statement
import sys, os
DIR = os.path.abspath(os.path.normpath(os.path.join(__file__,
'..', '..', '..', '..', '..', 'trytond')))
@@ -10,7 +9,8 @@ if os.path.isdir(DIR):
import unittest
import trytond.tests.test_tryton
-from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT, test_view
+from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT, test_view,\
+ test_depends
from trytond.transaction import Transaction
@@ -24,6 +24,7 @@ class CompanyTestCase(unittest.TestCase):
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):
'''
@@ -31,6 +32,12 @@ class CompanyTestCase(unittest.TestCase):
'''
test_view('company')
+ def test0006depends(self):
+ '''
+ Test depends.
+ '''
+ test_depends()
+
def test0010company(self):
'''
Create company.
@@ -87,6 +94,63 @@ class CompanyTestCase(unittest.TestCase):
})
transaction.cursor.commit()
+ def test0040user(self):
+ '''
+ Test user company
+ '''
+ with Transaction().start(DB_NAME, USER, CONTEXT) as transaction:
+ currency1_id = self.currency.search([
+ ('code', '=', 'cu1'),
+ ], 0, 1, None)[0]
+
+ company1_id = self.company.search([
+ ('name', '=', 'B2CK'),
+ ], 0, 1, None)[0]
+
+ company2_id = self.company.create({
+ 'name': 'B2CK Branch',
+ 'parent': company1_id,
+ 'currency': currency1_id,
+ })
+ user1_id = self.user.create({
+ 'name': 'Test 1',
+ 'login': 'test1',
+ 'main_company': company1_id,
+ 'company': company1_id,
+ })
+ user2_id = self.user.create({
+ 'name': 'Test 2',
+ 'login': 'test2',
+ 'main_company': company2_id,
+ 'company': company2_id,
+ })
+ self.assert_(user1_id)
+
+ with transaction.set_user(user1_id):
+ company_id = self.user.read(user1_id, ['company'])['company']
+ self.assertEqual(company_id, company1_id)
+
+ user1, user2 = self.user.browse([user1_id, user2_id])
+ self.assertEqual(user1.company.id, company1_id)
+ self.assertEqual(user2.company.id, company2_id)
+
+ with transaction.set_context({'company': company2_id}):
+ company_id = self.user.read(user1_id, ['company'])['company']
+ self.assertEqual(company_id, company2_id)
+
+ user1, user2 = self.user.browse([user1_id, user2_id])
+ self.assertEqual(user1.company.id, company2_id)
+ self.assertEqual(user2.company.id, company2_id)
+
+ with transaction.set_context({'company': False}):
+ company_id = self.user.read(user1_id, ['company'])['company']
+ self.assertEqual(company_id, False)
+
+ user1, user2 = self.user.browse([user1_id, user2_id])
+ self.assertEqual(user1.company.id, False)
+ self.assertEqual(user2.company.id, company2_id)
+
+
def suite():
suite = trytond.tests.test_tryton.suite()
from trytond.modules.currency.tests import test_currency
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index df9e9bb..84b6640 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond-company
-Version: 2.0.1
+Version: 2.2.0
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,17 +12,19 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
-Download-URL: http://downloads.tryton.org/2.0/
+Download-URL: http://downloads.tryton.org/2.2/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Plugins
+Classifier: Framework :: Tryton
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Legal Industry
Classifier: Intended Audience :: Manufacturing
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Natural Language :: Bulgarian
+Classifier: Natural Language :: Czech
Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
Classifier: Natural Language :: French
@@ -30,7 +32,6 @@ Classifier: Natural Language :: German
Classifier: Natural Language :: Russian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2.5
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Office/Business
diff --git a/trytond_company.egg-info/SOURCES.txt b/trytond_company.egg-info/SOURCES.txt
index 2c7f8c0..e7c75f7 100644
--- a/trytond_company.egg-info/SOURCES.txt
+++ b/trytond_company.egg-info/SOURCES.txt
@@ -4,25 +4,27 @@ INSTALL
LICENSE
MANIFEST.in
README
-bg_BG.csv
company.xml
cron.xml
-de_DE.csv
-es_CO.csv
-es_ES.csv
-fr_FR.csv
header_A4.odt
letter.odt
-nl_NL.csv
-ru_RU.csv
setup.py
./__init__.py
./__tryton__.py
./company.py
./cron.py
+./party.py
./tests/__init__.py
./tests/test_company.py
doc/index.rst
+locale/bg_BG.po
+locale/cs_CZ.po
+locale/de_DE.po
+locale/es_CO.po
+locale/es_ES.po
+locale/fr_FR.po
+locale/nl_NL.po
+locale/ru_RU.po
trytond_company.egg-info/PKG-INFO
trytond_company.egg-info/SOURCES.txt
trytond_company.egg-info/dependency_links.txt
diff --git a/trytond_company.egg-info/requires.txt b/trytond_company.egg-info/requires.txt
index 90f90eb..357954b 100644
--- a/trytond_company.egg-info/requires.txt
+++ b/trytond_company.egg-info/requires.txt
@@ -1,3 +1,3 @@
-trytond_party >= 2.0, < 2.1
-trytond_currency >= 2.0, < 2.1
-trytond >= 2.0, < 2.1
\ No newline at end of file
+trytond_party >= 2.2, < 2.3
+trytond_currency >= 2.2, < 2.3
+trytond >= 2.2, < 2.3
\ No newline at end of file
commit e4475c293958963e08e45050acf4acde5a716863
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Oct 3 14:15:57 2011 +0200
Adding upstream version 2.0.1.
diff --git a/CHANGELOG b/CHANGELOG
index 1dbcd35..d373589 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.0.1 - 2011-10-01
+* Bug fixes (see mercurial logs for details)
+
Version 2.0.0 - 2011-04-27
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index ec25e57..187769d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond_company
-Version: 2.0.0
+Version: 2.0.1
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
diff --git a/__tryton__.py b/__tryton__.py
index 619703b..327eec9 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -9,7 +9,7 @@
'name_es_ES': 'Empresa',
'name_fr_FR': 'Société',
'name_nl_NL': 'Bedrijf',
- 'version': '2.0.0',
+ 'version': '2.0.1',
'author': 'B2CK',
'email': 'info at b2ck.com',
'website': 'http://www.tryton.org/',
diff --git a/company.py b/company.py
index adbeb6a..283e1ef 100644
--- a/company.py
+++ b/company.py
@@ -180,7 +180,10 @@ class Property(ModelSQL, ModelView):
def _set_values(self, name, model, res_id, val, field_id):
user_obj = self.pool.get('res.user')
- user = user_obj.browse(Transaction().user)
+ user_id = Transaction().user
+ if user_id == 0:
+ user_id = Transaction().context.get('user', user_id)
+ user = user_obj.browse(user_id)
res = super(Property, self)._set_values(name, model, res_id, val,
field_id)
if user:
@@ -188,7 +191,7 @@ class Property(ModelSQL, ModelView):
return res
def search(self, domain, offset=0, limit=None, order=None, count=False):
- if Transaction().user == 0:
+ if Transaction().user == 0 and not 'user' in Transaction().context:
domain = ['AND', domain[:], ('company', '=', False)]
return super(Property, self).search(domain, offset=offset,
limit=limit, order=order, count=count)
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 80eb5a6..df9e9bb 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond-company
-Version: 2.0.0
+Version: 2.0.1
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
commit fa53a6bef2c86a3e7c1b25acdbb340fac23f9903
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Tue May 24 19:12:45 2011 +0200
Adding upstream version 2.0.0.
diff --git a/CHANGELOG b/CHANGELOG
index b285d68..1dbcd35 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.0.0 - 2011-04-27
+* Bug fixes (see mercurial logs for details)
+
Version 1.8.0 - 2010-11-01
* Bug fixes (see mercurial logs for details)
diff --git a/COPYRIGHT b/COPYRIGHT
index cca7db9..3d2324b 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2010 Cédric Krier.
-Copyright (C) 2008-2010 Bertrand Chenal.
-Copyright (C) 2008-2010 B2CK SPRL.
+Copyright (C) 2008-2011 Cédric Krier.
+Copyright (C) 2008-2011 Bertrand Chenal.
+Copyright (C) 2008-2011 B2CK SPRL.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/PKG-INFO b/PKG-INFO
index 437f77b..ec25e57 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond_company
-Version: 1.8.0
+Version: 2.0.0
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,7 +12,7 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
-Download-URL: http://downloads.tryton.org/1.8/
+Download-URL: http://downloads.tryton.org/2.0/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
@@ -22,10 +22,15 @@ Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Legal Industry
Classifier: Intended Audience :: Manufacturing
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: Natural Language :: Bulgarian
+Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
Classifier: Natural Language :: French
Classifier: Natural Language :: German
+Classifier: Natural Language :: Russian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.5
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Office/Business
diff --git a/__tryton__.py b/__tryton__.py
index e5ab516..619703b 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -1,12 +1,15 @@
+# -*- coding: utf-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.
{
'name': 'Company',
+ 'name_bg_BG': 'Фирма',
'name_de_DE': 'Unternehmen',
'name_es_CO': 'Compañía',
'name_es_ES': 'Empresa',
'name_fr_FR': 'Société',
- 'version': '1.8.0',
+ 'name_nl_NL': 'Bedrijf',
+ 'version': '2.0.0',
'author': 'B2CK',
'email': 'info at b2ck.com',
'website': 'http://www.tryton.org/',
@@ -17,6 +20,13 @@ Define new report parser for report with company header.
Add letter template on party.
Make the scheduler run on each companies.
''',
+ 'description_bg_BG': ''' - Задаване на фирма и служители
+ - Добавяне на основна и текуща фирма според предпочитания на потребителите
+ - Добавяне на фирма при предпочитания
+ - Задаване на нов анализатор на справки с фирмен горен колонтитул
+ - Добавяне на шаблон на писмо за партньор
+ - Възможност планировщика да работи на всяка фирма
+''',
'description_de_DE': ''' - Ermöglicht die Eingabe von Umternehmen und Mitarbeitern.
- Fügt Haupt- und aktuelles Unternehmen zu den Benutzereinstellungen hinzu.
- Fügt das Unternehmen den Eigenschaften hinzu.
@@ -45,6 +55,20 @@ Défini un nouveau moteur de rapport gérant une entête par société.
Ajoute un canva de lettre par tiers.
Lance les planificateurs sur chaque société.
''',
+ 'description_nl_NL': ''' - Definieert bedrijf en werknemers.
+ - Voegt moederbedrijf en huidig bedrijf toe aan gebruikers voorkeuren.
+ - Voegt bedrijf toe aan eigenschappen.
+ - Definieert nieuwe rapport routine voor een rapport met 'bedrijfskop'.
+ - Voegt briefsjabloon toe aan relatie.
+ - Initieert automatisch herhalende taken voor elk bedrijf.
+''',
+ 'description_ru_RU': '''Учет организаций и сотрудников.
+ - Добавление основной и дочерних организаций
+ - Добавление учетных организаций и свойств
+ - Настройка отчетов для печати на фирменных бланках.
+ - Добавление шаблона письма.
+ - Устанавливает планировщика на работу с каждой учетной организацией.
+''',
'depends': [
'ir',
'res',
@@ -56,9 +80,12 @@ Lance les planificateurs sur chaque société.
'cron.xml',
],
'translation': [
+ 'bg_BG.csv',
'de_DE.csv',
'es_CO.csv',
'es_ES.csv',
'fr_FR.csv',
+ 'nl_NL.csv',
+ 'ru_RU.csv',
]
}
diff --git a/bg_BG.csv b/bg_BG.csv
new file mode 100644
index 0000000..d748c63
--- /dev/null
+++ b/bg_BG.csv
@@ -0,0 +1,57 @@
+type,name,res_id,src,value,fuzzy
+error,company.company,0,You can not create recursive companies!,Не може да създавате взаимно вложени фирми!,0
+error,res.user,0,You can not set a company that is not a child of your main company!,Не може да изберете фирма която не е подчинена на основната фирма!,0
+field,"company.company,childs",0,Children,Деца,0
+field,"company.company,currency",0,Currency,Валута,0
+field,"company.company,employees",0,Employees,Служители,0
+field,"company.company,footer",0,Footer,Долен колонтитул,0
+field,"company.company,header",0,Header,Горен колонтитул,0
+field,"company.company,parent",0,Parent,Родител,0
+field,"company.company,party",0,Party,Партньор,0
+field,"company.company,rec_name",0,Name,Име,0
+field,"company.employee,company",0,Company,Фирма,0
+field,"company.employee,party",0,Party,Партньор,0
+field,"company.employee,rec_name",0,Name,Име,0
+field,"ir.cron,companies",0,Companies,Фирми,0
+field,"ir.cron-company.company,company",0,Company,Фирма,0
+field,"ir.cron-company.company,cron",0,Cron,Планировщик,0
+field,"ir.cron-company.company,rec_name",0,Name,Име,0
+field,"ir.property,company",0,Company,Фирма,0
+field,"ir.sequence,company",0,Company,Фирма,0
+field,"ir.sequence.strict,company",0,Company,Фирма,0
+field,"res.user,companies",0,Current Companies,Текущи фирми,0
+field,"res.user,company",0,Current Company,Текуща фирма,0
+field,"res.user,employee",0,Employee,Служител,0
+field,"res.user,main_company",0,Main Company,Основна фирма,0
+help,"ir.cron,companies",0,Companies registered for this cron,Фирми регистрирани за този планировщик,0
+model,"company.company,name",0,Company,Фирма,0
+model,"company.company.config.init,name",0,Company Config Init,Начално инициализиране на фирма,0
+model,"company.employee,name",0,Employee,Служител,0
+model,"ir.action,name",,Companies,Фирми,0
+model,"ir.action,name",act_company_form,Companies,Фирми,0
+model,"ir.action,name",act_company_tree,Companies,Фирми,0
+model,"ir.action,name",act_employee_form,Employees,Служители,0
+model,"ir.action,name",report_letter,Letter,Писмо,0
+model,"ir.cron-company.company,name",0,ir.cron-company.company,,0
+model,"ir.ui.menu,name",,New Company,Нова фирма,0
+model,"ir.ui.menu,name",menu_company_form,New Company,Нова фирма,0
+model,"ir.ui.menu,name",menu_company_tree,Companies,Фирми,0
+model,"ir.ui.menu,name",menu_employee_form,Employees,Служители,0
+odt,party.letter,0,"Best Regards,","С уважение,",0
+odt,party.letter,0,Date:,Дата:,0
+odt,party.letter,0,"Dear Madams and Sirs,","Уважаеми дами и годпода,",0
+odt,party.letter,0,E-Mail:,E-Mail:,0
+odt,party.letter,0,Phone:,Телефон:,0
+odt,party.letter,0,Subject:,Относно:,0
+view,company.company,0,Companies,Фирми,0
+view,company.company,0,Company,Фирма,0
+view,company.company,0,Employees,Служители,0
+view,company.company,0,Reports,Справки,0
+view,company.company.config.init,0,Create Company,Създаване на фирма,0
+view,company.company.config.init,0,You can now add your company into the system.,Сега може да добавите фирмата си към системата,0
+view,company.employee,0,Employee,Служител,0
+view,company.employee,0,Employees,Служители,0
+wizard_button,"company.company.config,company,add",0,Add,Добавяне,0
+wizard_button,"company.company.config,company,end",0,Cancel,Отказ,0
+wizard_button,"company.company.config,init,company",0,Ok,Добре,0
+wizard_button,"company.company.config,init,end",0,Cancel,Отказ,0
diff --git a/company.xml b/company.xml
index af32523..4257220 100644
--- a/company.xml
+++ b/company.xml
@@ -26,7 +26,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="parent"/>
</xpath>
<xpath
- expr="/form/field[@name="active"]"
+ expr="/form/group[@id="checkboxes"]"
position="after">
<label name="currency"/>
<field name="currency"/>
@@ -63,6 +63,20 @@ this repository contains the full copyright notices and license terms. -->
<field name="name" select="1"/>
<field name="currency" select="1"/>
<field name="vat_code" select="1"/>
+ <field name="parent" tree_invisible="1"/>
+ <field name="childs" tree_invisible="1"/>
+ </tree>
+ ]]>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="company_view_list">
+ <field name="model">company.company</field>
+ <field name="type">tree</field>
+ <field name="priority" eval="10"/>
+ <field name="arch" type="xml">
+ <![CDATA[
+ <tree string="Companies">
+ <field name="name" select="1"/>
</tree>
]]>
</field>
@@ -70,57 +84,60 @@ 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="view_type">tree</field>
<field name="domain">[('parent', '=', False)]</field>
</record>
<record model="ir.action.act_window.view"
id="act_company_tree_view1">
- <field name="sequence" eval="1"/>
+ <field name="sequence" eval="10"/>
<field name="view" ref="company_view_tree"/>
<field name="act_window" ref="act_company_tree"/>
</record>
+ <record model="ir.action.act_window.view"
+ id="act_company_tree_view2">
+ <field name="sequence" eval="20"/>
+ <field name="view" ref="company_view_form"/>
+ <field name="act_window" ref="act_company_tree"/>
+ </record>
<menuitem parent="party.menu_configuration" action="act_company_tree"
id="menu_company_tree"/>
- <record model="ir.action.act_window" id="act_company_form">
+ <record model="ir.action.act_window" id="act_company_list">
<field name="name">Companies</field>
<field name="res_model">company.company</field>
- <field name="view_type">form</field>
</record>
<record model="ir.action.act_window.view"
- id="act_company_form_view1">
+ id="act_company_list_view1">
<field name="sequence" eval="10"/>
- <field name="view" ref="company_view_tree"/>
- <field name="act_window" ref="act_company_form"/>
+ <field name="view" ref="company_view_list"/>
+ <field name="act_window" ref="act_company_list"/>
</record>
<record model="ir.action.act_window.view"
- id="act_company_form_view2">
+ id="act_company_list_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="company_view_form"/>
- <field name="act_window" ref="act_company_form"/>
+ <field name="act_window" ref="act_company_list"/>
</record>
- <menuitem parent="menu_company_tree" action="act_company_form"
- id="menu_company_form" name="Edit Companies"/>
+ <menuitem parent="menu_company_tree" action="act_company_list"
+ id="menu_company_list"/>
- <record model="ir.action.act_window" id="act_company_form2">
+ <record model="ir.action.act_window" id="act_company_form">
<field name="name">Companies</field>
<field name="res_model">company.company</field>
- <field name="view_type">form</field>
</record>
<record model="ir.action.act_window.view"
- id="act_company_form2_view1">
+ id="act_company_form_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="company_view_form"/>
- <field name="act_window" ref="act_company_form2"/>
+ <field name="act_window" ref="act_company_form"/>
</record>
<record model="ir.action.act_window.view"
- id="act_company_form2_view2">
+ id="act_company_form_view2">
<field name="sequence" eval="20"/>
- <field name="view" ref="company_view_tree"/>
- <field name="act_window" ref="act_company_form2"/>
+ <field name="view" ref="company_view_list"/>
+ <field name="act_window" ref="act_company_form"/>
</record>
- <menuitem parent="menu_company_tree" action="act_company_form2"
- id="menu_company_form2" name="New Company"/>
+ <menuitem parent="menu_company_tree" action="act_company_form"
+ id="menu_company_form" name="New Company"/>
<record model="ir.model.access" id="access_company">
<field name="model" search="[('model', '=', 'company.company')]"/>
@@ -351,7 +368,6 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.action.act_window" id="act_employee_form">
<field name="name">Employees</field>
<field name="res_model">company.employee</field>
- <field name="view_type">form</field>
</record>
<record model="ir.action.act_window.view" id="act_employee_form_view1">
<field name="sequence" eval="10"/>
diff --git a/de_DE.csv b/de_DE.csv
index 3bf70fe..3213c0c 100644
--- a/de_DE.csv
+++ b/de_DE.csv
@@ -38,13 +38,13 @@ model,"company.company,name",0,Company,Unternehmen,0
model,"company.company.config.init,name",0,Company Config Init,Unternehmen Konfiguration Init,0
model,"company.employee,name",0,Employee,Mitarbeiter,0
model,"ir.action,name",act_company_form,Companies,Unternehmen,0
-model,"ir.action,name",act_company_form2,Companies,Unternehmen,0
+model,"ir.action,name",act_company_list,Companies,Unternehmen,0
model,"ir.action,name",act_company_tree,Companies,Unternehmen,0
model,"ir.action,name",act_employee_form,Employees,Mitarbeiter,0
model,"ir.action,name",report_letter,Letter,Brief,0
model,"ir.cron-company.company,name",0,ir.cron-company.company,ir.cron-company.company,0
-model,"ir.ui.menu,name",menu_company_form,Edit Companies,Unternehmen bearbeiten,0
-model,"ir.ui.menu,name",menu_company_form2,New Company,Neues Unternehmen,0
+model,"ir.ui.menu,name",menu_company_form,New Company,Neues Unternehmen,0
+model,"ir.ui.menu,name",menu_company_list,Companies,Unternehmen,0
model,"ir.ui.menu,name",menu_company_tree,Companies,Unternehmen,0
model,"ir.ui.menu,name",menu_employee_form,Employees,Mitarbeiter,0
odt,party.letter,0,"Best Regards,","Mit freundlichen Grüßen,",0
diff --git a/fr_FR.csv b/fr_FR.csv
index 5651d07..15c3f15 100644
--- a/fr_FR.csv
+++ b/fr_FR.csv
@@ -28,13 +28,13 @@ model,"company.company,name",0,Company,Société,0
model,"company.company.config.init,name",0,Company Config Init,Société config - Init,0
model,"company.employee,name",0,Employee,Employé,0
model,"ir.action,name",act_company_form,Companies,Sociétés,0
-model,"ir.action,name",act_company_form2,Companies,Sociétés,0
+model,"ir.action,name",act_company_list,Companies,Sociétés,1
model,"ir.action,name",act_company_tree,Companies,Sociétés,0
model,"ir.action,name",act_employee_form,Employees,Employés,0
model,"ir.action,name",report_letter,Letter,Lettre,0
model,"ir.cron-company.company,name",0,ir.cron-company.company,,0
-model,"ir.ui.menu,name",menu_company_form,Edit Companies,Éditer les sociétés,0
-model,"ir.ui.menu,name",menu_company_form2,New Company,Nouvelle société,0
+model,"ir.ui.menu,name",menu_company_form,New Company,Nouvelle société,0
+model,"ir.ui.menu,name",menu_company_list,Companies,Sociétés,1
model,"ir.ui.menu,name",menu_company_tree,Companies,Sociétés,0
model,"ir.ui.menu,name",menu_employee_form,Employees,Employés,0
odt,party.letter,0,"Best Regards,","Bien cordialement,",0
diff --git a/nl_NL.csv b/nl_NL.csv
new file mode 100644
index 0000000..1aab01c
--- /dev/null
+++ b/nl_NL.csv
@@ -0,0 +1,58 @@
+type,name,res_id,src,value,fuzzy
+error,company.company,0,You can not create recursive companies!,U kunt geen bedrijven aanmaken die naar zichzelf verwijzen!,0
+error,res.user,0,You can not set a company that is not a child of your main company!,U kunt geen bedrijf kiezen dat geen onderdeel uitmaakt van het moederbedrijf!,0
+field,"company.company,childs",0,Children,Onderliggende niveaus,0
+field,"company.company,currency",0,Currency,Valuta,0
+field,"company.company,employees",0,Employees,Werknemers,0
+field,"company.company,footer",0,Footer,Werknemers,0
+field,"company.company,header",0,Header,Werknemers,0
+field,"company.company,parent",0,Parent,Bovenliggend niveau,0
+field,"company.company,party",0,Party,Relatie,0
+field,"company.company,rec_name",0,Name,Naam,0
+field,"company.employee,company",0,Company,Bedrijf,0
+field,"company.employee,party",0,Party,Relatie,0
+field,"company.employee,rec_name",0,Name,Naam,0
+field,"ir.cron,companies",0,Companies,Bedrijven,0
+field,"ir.cron-company.company,company",0,Company,Bedrijf,0
+field,"ir.cron-company.company,cron",0,Cron,Cyclische opdracht,0
+field,"ir.cron-company.company,rec_name",0,Name,Naam,0
+field,"ir.property,company",0,Company,Bedrijf,0
+field,"ir.sequence,company",0,Company,Bedrijf,0
+field,"ir.sequence.strict,company",0,Company,Bedrijf,0
+field,"res.user,companies",0,Current Companies,Huidige bedrijven,0
+field,"res.user,company",0,Current Company,Huidig bedrijf,0
+field,"res.user,employee",0,Employee,Werknemer,0
+field,"res.user,main_company",0,Main Company,Moederbedrijf,0
+help,"ir.cron,companies",0,Companies registered for this cron,Bedrijven aangesloten op deze cyclische opdracht,0
+model,"company.company,name",0,Company,Bedrijf,0
+model,"company.company.config.init,name",0,Company Config Init,Bedrijfsinstellingen gaan maken,0
+model,"company.employee,name",0,Employee,Werknemer,0
+model,"ir.action,name",act_company_form,Companies,Bedrijven,0
+model,"ir.action,name",act_company_form2,Companies,Bedrijven,0
+model,"ir.action,name",act_company_tree,Companies,Bedrijven,0
+model,"ir.action,name",act_employee_form,Employees,Werknemers,0
+model,"ir.action,name",report_letter,Letter,Brief,0
+model,"ir.cron-company.company,name",0,ir.cron-company.company,,0
+model,"ir.ui.menu,name",menu_company_form,Edit Companies,Bedrijven aanpassen,0
+model,"ir.ui.menu,name",menu_company_form2,New Company,Nieuw bedrijf,0
+model,"ir.ui.menu,name",menu_company_tree,Companies,Bedrijven,0
+model,"ir.ui.menu,name",menu_employee_form,Employees,Werknemers,0
+odt,party.letter,0,"Best Regards,","Met vriendelijke groet,",0
+odt,party.letter,0,Date:,Datum:,0
+odt,party.letter,0,"Dear Madams and Sirs,","Geachte heer/mevrouw,",0
+odt,party.letter,0,E-Mail:,E-mail:,0
+odt,party.letter,0,Phone:,Telefoon:,0
+odt,party.letter,0,Subject:,Betreft:,0
+odt,party.letter,0,VAT Number:,BTW-nummer:,0
+view,company.company,0,Companies,Bedrijven,0
+view,company.company,0,Company,Bedrijf,0
+view,company.company,0,Employees,Werknemers,0
+view,company.company,0,Reports,Rapportage,0
+view,company.company.config.init,0,Create Company,Bedrijf aanmaken,0
+view,company.company.config.init,0,You can now add your company into the system.,U kunt nu uw eigen bedrijf toevoegen aan het systeem.,0
+view,company.employee,0,Employee,Werknemer,0
+view,company.employee,0,Employees,Werknemers,0
+wizard_button,"company.company.config,company,add",0,Add,Toevoegen,0
+wizard_button,"company.company.config,company,end",0,Cancel,Annuleren,0
+wizard_button,"company.company.config,init,company",0,Ok,Oké,0
+wizard_button,"company.company.config,init,end",0,Cancel,Annuleren,0
diff --git a/ru_RU.csv b/ru_RU.csv
new file mode 100644
index 0000000..ba8b79c
--- /dev/null
+++ b/ru_RU.csv
@@ -0,0 +1,57 @@
+type,name,res_id,src,value,fuzzy
+error,company.company,0,You can not create recursive companies!,Вы не можете создать взаимоподчинённые организации,0
+error,res.user,0,You can not set a company that is not a child of your main company!,"вы не можете установить учетную организацию, отсутвуют подразделения вашей компании",0
+field,"company.company,childs",0,Children,Подчиненый,0
+field,"company.company,currency",0,Currency,Валюта,0
+field,"company.company,employees",0,Employees,Сотрудники,0
+field,"company.company,footer",0,Footer,Нижний колонтитул,0
+field,"company.company,header",0,Header,Верхний колонтитул,0
+field,"company.company,parent",0,Parent,Основной,0
+field,"company.company,party",0,Party,Контрагент,0
+field,"company.company,rec_name",0,Name,Наименование,0
+field,"company.employee,company",0,Company,Учет.орг.,0
+field,"company.employee,party",0,Party,Контрагент,0
+field,"company.employee,rec_name",0,Name,Наименование,0
+field,"ir.cron,companies",0,Companies,Организация,0
+field,"ir.cron-company.company,company",0,Company,Учет.орг.,0
+field,"ir.cron-company.company,cron",0,Cron,Планировщик,0
+field,"ir.cron-company.company,rec_name",0,Name,Наименование,0
+field,"ir.property,company",0,Company,Учет.орг.,0
+field,"ir.sequence,company",0,Company,Учет.орг.,0
+field,"ir.sequence.strict,company",0,Company,Учет.орг.,0
+field,"res.user,companies",0,Current Companies,Текущие организации,0
+field,"res.user,company",0,Current Company,Текущая организация,0
+field,"res.user,employee",0,Employee,Сотрудник,0
+field,"res.user,main_company",0,Main Company,Основная организация,0
+help,"ir.cron,companies",0,Companies registered for this cron,Организации зарегистрированные для этого планировщика,0
+model,"company.company,name",0,Company,Учет.орг.,0
+model,"company.company.config.init,name",0,Company Config Init,Конфигурация модуля предприятия,0
+model,"company.employee,name",0,Employee,Сотрудник,0
+model,"ir.action,name",act_company_form,Companies,Организация,0
+model,"ir.action,name",act_company_form2,Companies,Организация,0
+model,"ir.action,name",act_company_tree,Companies,Организация,0
+model,"ir.action,name",act_employee_form,Employees,Сотрудники,0
+model,"ir.action,name",report_letter,Letter,Письмо,0
+model,"ir.cron-company.company,name",0,ir.cron-company.company,Планировщик,0
+model,"ir.ui.menu,name",menu_company_form,Edit Companies,Редактирование организации,0
+model,"ir.ui.menu,name",menu_company_form2,New Company,Новая организация,0
+model,"ir.ui.menu,name",menu_company_tree,Companies,Организация,0
+model,"ir.ui.menu,name",menu_employee_form,Employees,Сотрудники,0
+odt,party.letter,0,"Best Regards,","С уважением,",0
+odt,party.letter,0,Date:,Дата:,0
+odt,party.letter,0,"Dear Madams and Sirs,","Уважаемые дамы и годпода,",0
+odt,party.letter,0,E-Mail:,E-Mail:,0
+odt,party.letter,0,Phone:,Телефон:,0
+odt,party.letter,0,Subject:,Тема:,0
+view,company.company,0,Companies,Организация,0
+view,company.company,0,Company,Учет.орг.,0
+view,company.company,0,Employees,Сотрудники,0
+view,company.company,0,Reports,Отчеты,0
+view,company.company.config.init,0,Create Company,Создать организацию,0
+view,company.company.config.init,0,You can now add your company into the system.,Теперь вы можете добавить организацию в систему,0
+view,company.employee,0,Employee,Сотрудник,0
+view,company.employee,0,Employess,Сотрудники,0
+wizard_button,"company.company.config,company,add",0,Add,Добавить,0
+wizard_button,"company.company.config,company,end",0,Cancel,Отменить,0
+wizard_button,"company.company.config,init,company",0,Ok,Да,0
+wizard_button,"company.company.config,init,end",0,Cancel,Отменить,0
diff --git a/setup.py b/setup.py
index fbd654b..3db1eda 100644
--- a/setup.py
+++ b/setup.py
@@ -45,12 +45,17 @@ setup(name='trytond_company',
'Intended Audience :: Legal Industry',
'Intended Audience :: Manufacturing',
'License :: OSI Approved :: GNU General Public License (GPL)',
+ 'Natural Language :: Bulgarian',
+ 'Natural Language :: Dutch',
'Natural Language :: English',
'Natural Language :: French',
'Natural Language :: German',
+ 'Natural Language :: Russian',
'Natural Language :: Spanish',
'Operating System :: OS Independent',
- 'Programming Language :: Python',
+ 'Programming Language :: Python :: 2.5',
+ 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7',
'Topic :: Office/Business',
],
license='GPL-3',
diff --git a/tests/test_company.py b/tests/test_company.py
index c7562e5..b7b8901 100644
--- a/tests/test_company.py
+++ b/tests/test_company.py
@@ -71,7 +71,6 @@ class CompanyTestCase(unittest.TestCase):
company1_id, {
'parent': company2_id,
})
- transaction.cursor.commit()
def test0030employe(self):
'''
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 4f5d031..80eb5a6 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond-company
-Version: 1.8.0
+Version: 2.0.0
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,7 +12,7 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
-Download-URL: http://downloads.tryton.org/1.8/
+Download-URL: http://downloads.tryton.org/2.0/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
@@ -22,10 +22,15 @@ Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Legal Industry
Classifier: Intended Audience :: Manufacturing
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: Natural Language :: Bulgarian
+Classifier: Natural Language :: Dutch
Classifier: Natural Language :: English
Classifier: Natural Language :: French
Classifier: Natural Language :: German
+Classifier: Natural Language :: Russian
Classifier: Natural Language :: Spanish
Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python
+Classifier: Programming Language :: Python :: 2.5
+Classifier: Programming Language :: Python :: 2.6
+Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Office/Business
diff --git a/trytond_company.egg-info/SOURCES.txt b/trytond_company.egg-info/SOURCES.txt
index 67f40ad..2c7f8c0 100644
--- a/trytond_company.egg-info/SOURCES.txt
+++ b/trytond_company.egg-info/SOURCES.txt
@@ -4,6 +4,7 @@ INSTALL
LICENSE
MANIFEST.in
README
+bg_BG.csv
company.xml
cron.xml
de_DE.csv
@@ -12,6 +13,8 @@ es_ES.csv
fr_FR.csv
header_A4.odt
letter.odt
+nl_NL.csv
+ru_RU.csv
setup.py
./__init__.py
./__tryton__.py
diff --git a/trytond_company.egg-info/requires.txt b/trytond_company.egg-info/requires.txt
index 1e8dc79..90f90eb 100644
--- a/trytond_company.egg-info/requires.txt
+++ b/trytond_company.egg-info/requires.txt
@@ -1,3 +1,3 @@
-trytond_party >= 1.8, < 1.9
-trytond_currency >= 1.8, < 1.9
-trytond >= 1.8, < 1.9
\ No newline at end of file
+trytond_party >= 2.0, < 2.1
+trytond_currency >= 2.0, < 2.1
+trytond >= 2.0, < 2.1
\ No newline at end of file
commit e798e556d2c35d5d0d10d40d35593f5d1c73ff7e
Author: Daniel Baumann <daniel at debian.org>
Date: Thu Nov 4 20:12:16 2010 +0100
Adding upstream version 1.8.0.
diff --git a/CHANGELOG b/CHANGELOG
index d312d03..b285d68 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 1.8.0 - 2010-11-01
+* Bug fixes (see mercurial logs for details)
+
Version 1.6.0 - 2010-05-11
* Bug fixes (see mercurial logs for details)
diff --git a/INSTALL b/INSTALL
index dbe8e52..2234c4f 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@ Installing trytond_company
Prerequisites
-------------
- * Python 2.4 or later (http://www.python.org/)
+ * Python 2.5 or later (http://www.python.org/)
* trytond (http://www.tryton.org/)
* trytond_party (http://www.tryton.org/)
* trytond_currency (http://www.tryton.org/)
diff --git a/PKG-INFO b/PKG-INFO
index 4974e61..437f77b 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond_company
-Version: 1.6.0
+Version: 1.8.0
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,7 +12,7 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
-Download-URL: http://downloads.tryton.org/1.6/
+Download-URL: http://downloads.tryton.org/1.8/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff --git a/__tryton__.py b/__tryton__.py
index 922693d..e5ab516 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -6,7 +6,7 @@
'name_es_CO': 'Compañía',
'name_es_ES': 'Empresa',
'name_fr_FR': 'Société',
- 'version': '1.6.0',
+ 'version': '1.8.0',
'author': 'B2CK',
'email': 'info at b2ck.com',
'website': 'http://www.tryton.org/',
diff --git a/company.py b/company.py
index 1ab1f84..adbeb6a 100644
--- a/company.py
+++ b/company.py
@@ -1,11 +1,12 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
-"Company"
+from __future__ import with_statement
import copy
from trytond.model import ModelView, ModelSQL, fields
from trytond.wizard import Wizard
from trytond.report import Report
from trytond.pyson import Eval, If, In, Get
+from trytond.transaction import Transaction
class Company(ModelSQL, ModelView):
@@ -32,7 +33,7 @@ class Company(ModelSQL, ModelView):
'recursive_companies': 'You can not create recursive companies!',
})
- def copy(self, cursor, user, ids, default=None, context=None):
+ def copy(self, ids, default=None):
party_obj = self.pool.get('party.party')
int_id = False
@@ -43,22 +44,19 @@ class Company(ModelSQL, ModelView):
default = {}
default = default.copy()
new_ids = []
- for company in self.browse(cursor, user, ids, context=context):
- default['party'] = party_obj.copy(cursor, user, company.party.id,
- context=context)
- new_id = super(Company, self).copy(cursor, user, company.id,
- default=default, context=context)
+ for company in self.browse(ids):
+ default['party'] = party_obj.copy(company.party.id)
+ new_id = super(Company, self).copy(company.id, default=default)
new_ids.append(new_id)
if int_id:
return new_ids[0]
return new_ids
- def write(self, cursor, user, ids, vals, context=None):
- res = super(Company, self).write(cursor, user, ids, vals,
- context=context)
+ def write(self, ids, vals):
+ res = super(Company, self).write(ids, vals)
# Restart the cache on the domain_get method
- self.pool.get('ir.rule').domain_get(cursor.dbname)
+ self.pool.get('ir.rule').domain_get.reset()
return res
Company()
@@ -99,21 +97,17 @@ class User(ModelSQL, ModelView):
'a child of your main company!',
})
- def default_main_company(self, cursor, user, context=None):
- if context is None:
- context = {}
- if context.get('company'):
- return context['company']
- return False
+ def default_main_company(self):
+ return Transaction().context.get('company') or False
- def default_company(self, cursor, user, context=None):
- return self.default_main_company(cursor, user, context=context)
+ def default_company(self):
+ return self.default_main_company()
- def get_companies(self, cursor, user_id, ids, name, context=None):
+ def get_companies(self, ids, name):
company_obj = self.pool.get('company.company')
res = {}
company_childs = {}
- for user in self.browse(cursor, user_id, ids, context=context):
+ for user in self.browse(ids):
res[user.id] = []
company_id = False
if user.company:
@@ -124,30 +118,29 @@ class User(ModelSQL, ModelView):
if company_id in company_childs:
company_ids = company_childs[company_id]
else:
- company_ids = company_obj.search(cursor, user_id, [
+ company_ids = company_obj.search([
('parent', 'child_of', [company_id]),
- ], context=context)
+ ])
company_childs[company_id] = company_ids
if company_ids:
res[user.id].extend(company_ids)
return res
- def get_status_bar(self, cursor, user_id, ids, name, context=None):
- res = super(User, self).get_status_bar(cursor, user_id, ids, name,
- context=context)
- for user in self.browse(cursor, user_id, ids, context=context):
+ def get_status_bar(self, ids, name):
+ res = super(User, self).get_status_bar(ids, name)
+ for user in self.browse(ids):
if user.company:
res[user.id] += ' ' + user.company.name
return res
- def on_change_main_company(self, cursor, user, vals, context=None):
+ def on_change_main_company(self, vals):
return {'company': vals.get('main_company', False)}
- def check_company(self, cursor, user_id, ids):
+ def check_company(self, ids):
company_obj = self.pool.get('company.company')
- for user in self.browse(cursor, user_id, ids):
+ for user in self.browse(ids):
if user.main_company:
- companies = company_obj.search(cursor, user_id, [
+ companies = company_obj.search([
('parent', 'child_of', [user.main_company.id]),
])
if user.company.id and (user.company.id not in companies):
@@ -156,23 +149,21 @@ class User(ModelSQL, ModelView):
return False
return True
- def _get_preferences(self, cursor, user_id, user, context_only=False,
- context=None):
- res = super(User, self)._get_preferences(cursor, user_id, user,
- context_only=context_only, context=context)
+ def _get_preferences(self, user, context_only=False):
+ res = super(User, self)._get_preferences(user,
+ context_only=context_only)
if not context_only:
res['main_company'] = user.main_company.id
if user.employee:
res['employee'] = user.employee.id
return res
- def get_preferences_fields_view(self, cursor, user_id, context=None):
+ def get_preferences_fields_view(self):
company_obj = self.pool.get('company.company')
- user = self.browse(cursor, user_id, user_id, context=context)
+ user = self.browse(Transaction().user)
- res = super(User, self).get_preferences_fields_view(cursor, user_id,
- context=context)
+ res = super(User, self).get_preferences_fields_view()
res = copy.deepcopy(res)
return res
@@ -187,22 +178,20 @@ class Property(ModelSQL, ModelView):
Get(Eval('context', {}), 'company', 0)),
])
- def _set_values(self, cursor, user_id, name, model, res_id, val, field_id,
- context=None):
+ def _set_values(self, name, model, res_id, val, field_id):
user_obj = self.pool.get('res.user')
- user = user_obj.browse(cursor, user_id, user_id, context=context)
- res = super(Property, self)._set_values(cursor, user_id, name, model,
- res_id, val, field_id, context=context)
- if user_id:
+ user = user_obj.browse(Transaction().user)
+ res = super(Property, self)._set_values(name, model, res_id, val,
+ field_id)
+ if user:
res['company'] = user.company.id
return res
- def search(self, cursor, user, domain, offset=0, limit=None, order=None,
- context=None, count=False):
- if user == 0:
+ def search(self, domain, offset=0, limit=None, order=None, count=False):
+ if Transaction().user == 0:
domain = ['AND', domain[:], ('company', '=', False)]
- return super(Property, self).search(cursor, user, domain, offset=offset,
- limit=limit, order=order, context=context, count=count)
+ return super(Property, self).search(domain, offset=offset,
+ limit=limit, order=order, count=count)
Property()
@@ -219,12 +208,8 @@ class Sequence(ModelSQL, ModelView):
super(Sequence, self).__init__()
self._order.insert(0, ('company', 'ASC'))
- def default_company(self, cursor, user, context=None):
- if context is None:
- context = {}
- if context.get('company'):
- return context['company']
- return False
+ def default_company(self):
+ return Transaction().context.get('company') or False
Sequence()
@@ -276,19 +261,18 @@ class CompanyConfig(Wizard):
},
}
- def _add(self, cursor, user, data, context=None):
+ def _add(self, data):
company_obj = self.pool.get('company.company')
user_obj = self.pool.get('res.user')
- company_id = company_obj.create(cursor, user, data['form'],
- context=context)
- user_ids = user_obj.search(cursor, user, [
+ company_id = company_obj.create(data['form'])
+ user_ids = user_obj.search([
('main_company', '=', False),
- ], context=context)
- user_obj.write(cursor, user, user_ids, {
+ ])
+ user_obj.write(user_ids, {
'main_company': company_id,
'company': company_id,
- }, context=context)
+ })
return {}
CompanyConfig()
@@ -296,32 +280,16 @@ CompanyConfig()
class CompanyReport(Report):
- def parse(self, cursor, user_id, report, objects, datas, context):
- user_obj = self.pool.get('res.user')
-
- user = user_obj.browse(cursor, user_id, user_id, context)
- if context is None:
- context = {}
- context = context.copy()
- context['company'] = user.company
-
- return super(CompanyReport, self).parse(cursor, user_id, report,
- objects, datas, context)
+ def parse(self, report, objects, datas, localcontext=None):
+ user = self.pool.get('res.user').browse(Transaction().user)
+ if localcontext is None:
+ localcontext = {}
+ localcontext['company'] = user.company
+ return super(CompanyReport, self).parse(report, objects, datas,
+ localcontext=localcontext)
class LetterReport(CompanyReport):
_name = 'party.letter'
- def parse(self, cursor, user_id, report, objects, datas, context):
- user_obj = self.pool.get('res.user')
-
- user = user_obj.browse(cursor, user_id, user_id, context)
- if context is None:
- context = {}
- context = context.copy()
- context['user'] = user
-
- return super(LetterReport, self).parse(cursor, user_id, report,
- objects, datas, context)
-
LetterReport()
diff --git a/cron.py b/cron.py
index 4fabeaa..7cfcca2 100644
--- a/cron.py
+++ b/cron.py
@@ -1,6 +1,7 @@
#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
class Cron(ModelSQL, ModelView):
"Cron"
@@ -8,19 +9,22 @@ class Cron(ModelSQL, ModelView):
companies = fields.Many2Many('ir.cron-company.company', 'cron', 'company',
'Companies', help='Companies registered for this cron')
- def _callback(self, cursor, cron):
+ def _callback(self, cron):
+ cursor = Transaction().cursor
cursor.execute("SELECT company from cron_company_rel "
"WHERE cron = %s", (cron['id'],))
for company, in cursor.fetchall():
- cursor.execute("UPDATE res_user SET company = %s, main_company = %s "
- "WHERE id = %s", (company, company, cron['user']))
- super(Cron, self)._callback(cursor, cron)
- cursor.execute("UPDATE res_user SET company = NULL, main_company = NULL "
- "WHERE id = %s", (cron['user'],))
+ cursor.execute(
+ "UPDATE res_user SET company = %s, main_company = %s "
+ "WHERE id = %s", (company, company, cron['user']))
+ super(Cron, self)._callback(cron)
+ cursor.execute(
+ "UPDATE res_user SET company = NULL, main_company = NULL "
+ "WHERE id = %s", (cron['user'],))
- def default_companies(self, cursor, user, context=None):
+ def default_companies(self):
company_obj = self.pool.get('company.company')
- return company_obj.search(cursor, user, [], context=context)
+ return company_obj.search([])
Cron()
diff --git a/de_DE.csv b/de_DE.csv
index d31e045..3bf70fe 100644
--- a/de_DE.csv
+++ b/de_DE.csv
@@ -1,5 +1,5 @@
type,name,res_id,src,value,fuzzy
-error,company.company,0,You can not create recursive companies!,Unternehmen können nicht rekursiv angelegt werden,0
+error,company.company,0,You can not create recursive companies!,Unternehmen können nicht rekursiv angelegt werden!,0
error,res.user,0,You can not set a company that is not a child of your main company!,Das Unternehmen muss ein Tochterunternehmen (untergeordnet) des Hauptunternehmens sein,0
field,"company.company,childs",0,Children,Untergeordnet (Unternehmen),0
field,"company.company,create_date",0,Creation date,Erstellungsdatum,0
@@ -34,33 +34,34 @@ field,"res.user,company",0,Current Company,Aktuelles Unternehmen,0
field,"res.user,employee",0,Employee,Mitarbeiter,0
field,"res.user,main_company",0,Main Company,Mutterbetrieb,0
help,"ir.cron,companies",0,Companies registered for this cron,"Unternehmen, für welche dieser Job durchgeführt werden soll",0
-model,"company.company.config.init,name",0,Company Config Init,Unternehmen Konfiguration Init,0
model,"company.company,name",0,Company,Unternehmen,0
+model,"company.company.config.init,name",0,Company Config Init,Unternehmen Konfiguration Init,0
model,"company.employee,name",0,Employee,Mitarbeiter,0
-model,"ir.action,name",act_company_tree,Companies,Unternehmen,0
model,"ir.action,name",act_company_form,Companies,Unternehmen,0
model,"ir.action,name",act_company_form2,Companies,Unternehmen,0
+model,"ir.action,name",act_company_tree,Companies,Unternehmen,0
model,"ir.action,name",act_employee_form,Employees,Mitarbeiter,0
model,"ir.action,name",report_letter,Letter,Brief,0
model,"ir.cron-company.company,name",0,ir.cron-company.company,ir.cron-company.company,0
-model,"ir.ui.menu,name",menu_company_tree,Companies,Unternehmen,0
model,"ir.ui.menu,name",menu_company_form,Edit Companies,Unternehmen bearbeiten,0
-model,"ir.ui.menu,name",menu_employee_form,Employees,Mitarbeiter,0
model,"ir.ui.menu,name",menu_company_form2,New Company,Neues Unternehmen,0
+model,"ir.ui.menu,name",menu_company_tree,Companies,Unternehmen,0
+model,"ir.ui.menu,name",menu_employee_form,Employees,Mitarbeiter,0
odt,party.letter,0,"Best Regards,","Mit freundlichen Grüßen,",0
odt,party.letter,0,Date:,Datum:,0
odt,party.letter,0,"Dear Madams and Sirs,","Sehr geehrte Damen und Herren,",0
odt,party.letter,0,E-Mail:,E-Mail:,0
odt,party.letter,0,Phone:,Telefon:,0
odt,party.letter,0,Subject:,Betreff:,0
+odt,party.letter,0,VAT Number:,USt-ID-Nr.:,0
view,company.company,0,Addresses,Adressen,0
view,company.company,0,Companies,Unternehmen,0
view,company.company,0,Company,Unternehmen,0
view,company.company,0,Employees,Mitarbeiter,0
-view,company.company,0,_Employees,_Mitarbeiter,0
view,company.company,0,General,Allgemein,0
-view,company.company,0,_General,_Allgemein,0
view,company.company,0,Reports,Berichte,0
+view,company.company,0,_Employees,_Mitarbeiter,0
+view,company.company,0,_General,_Allgemein,0
view,company.company,0,_Reports,_Berichte,0
view,company.company.config.init,0,Create Company,Unternehmen anlegen,0
view,company.company.config.init,0,You can now add your company into the system.,Sie können nun Ihr Unternehmen dem System hinzufügen!,0
diff --git a/fr_FR.csv b/fr_FR.csv
index ac1eca9..5651d07 100644
--- a/fr_FR.csv
+++ b/fr_FR.csv
@@ -24,25 +24,26 @@ field,"res.user,company",0,Current Company,Société courante,0
field,"res.user,employee",0,Employee,Employé,0
field,"res.user,main_company",0,Main Company,Société principale,0
help,"ir.cron,companies",0,Companies registered for this cron,Sociétés enregistrées pour ce planificateur,0
-model,"company.company.config.init,name",0,Company Config Init,Société config - Init,0
model,"company.company,name",0,Company,Société,0
+model,"company.company.config.init,name",0,Company Config Init,Société config - Init,0
model,"company.employee,name",0,Employee,Employé,0
-model,"ir.action,name",act_company_tree,Companies,Sociétés,0
model,"ir.action,name",act_company_form,Companies,Sociétés,0
model,"ir.action,name",act_company_form2,Companies,Sociétés,0
+model,"ir.action,name",act_company_tree,Companies,Sociétés,0
model,"ir.action,name",act_employee_form,Employees,Employés,0
model,"ir.action,name",report_letter,Letter,Lettre,0
model,"ir.cron-company.company,name",0,ir.cron-company.company,,0
-model,"ir.ui.menu,name",menu_company_tree,Companies,Sociétés,0
model,"ir.ui.menu,name",menu_company_form,Edit Companies,Éditer les sociétés,0
-model,"ir.ui.menu,name",menu_employee_form,Employees,Employés,0
model,"ir.ui.menu,name",menu_company_form2,New Company,Nouvelle société,0
+model,"ir.ui.menu,name",menu_company_tree,Companies,Sociétés,0
+model,"ir.ui.menu,name",menu_employee_form,Employees,Employés,0
odt,party.letter,0,"Best Regards,","Bien cordialement,",0
odt,party.letter,0,Date:,Date :,0
odt,party.letter,0,"Dear Madams and Sirs,","Chère madame, cher monsieur,",0
odt,party.letter,0,E-Mail:,E-Mail :,0
odt,party.letter,0,Phone:,Téléphone,0
odt,party.letter,0,Subject:,Sujet :,0
+odt,party.letter,0,VAT Number:,Numéro TVA :,0
view,company.company,0,Addresses,Adresses,0
view,company.company,0,Companies,Sociétés,0
view,company.company,0,Company,Société,0
diff --git a/header_A4.odt b/header_A4.odt
index 32530b4..d3f3fc4 100644
Binary files a/header_A4.odt and b/header_A4.odt differ
diff --git a/tests/test_company.py b/tests/test_company.py
index 680c91a..c7562e5 100644
--- a/tests/test_company.py
+++ b/tests/test_company.py
@@ -1,7 +1,7 @@
#!/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.
-
+from __future__ import with_statement
import sys, os
DIR = os.path.abspath(os.path.normpath(os.path.join(__file__,
'..', '..', '..', '..', '..', 'trytond')))
@@ -10,7 +10,8 @@ if os.path.isdir(DIR):
import unittest
import trytond.tests.test_tryton
-from trytond.tests.test_tryton import POOL, DB, USER, CONTEXT, test_view
+from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT, test_view
+from trytond.transaction import Transaction
class CompanyTestCase(unittest.TestCase):
@@ -28,67 +29,64 @@ class CompanyTestCase(unittest.TestCase):
'''
Test views.
'''
- self.assertRaises(Exception, test_view('company'))
+ test_view('company')
def test0010company(self):
'''
Create company.
'''
- cursor = DB.cursor()
- currency1_id = self.currency.search(cursor, USER, [
- ('code', '=', 'cu1'),
- ], 0, 1, None, CONTEXT)[0]
-
- company1_id = self.company.create(cursor, USER, {
- 'name': 'B2CK',
- 'currency': currency1_id,
- }, CONTEXT)
- self.assert_(company1_id)
- cursor.commit()
- cursor.close()
+ with Transaction().start(DB_NAME, USER, CONTEXT) as transaction:
+ currency1_id = self.currency.search([
+ ('code', '=', 'cu1'),
+ ], 0, 1, None)[0]
+
+ company1_id = self.company.create({
+ 'name': 'B2CK',
+ 'currency': currency1_id,
+ })
+ self.assert_(company1_id)
+ transaction.cursor.commit()
def test0020company_recursion(self):
'''
Test company recursion.
'''
- cursor = DB.cursor()
- currency1_id = self.currency.search(cursor, USER, [
- ('code', '=', 'cu1'),
- ], 0, 1, None, CONTEXT)[0]
-
- company1_id = self.company.search(cursor, USER, [
- ('name', '=', 'B2CK'),
- ], 0, 1, None, CONTEXT)[0]
-
- company2_id = self.company.create(cursor, USER, {
- 'name': 'B2CK Branch',
- 'parent': company1_id,
- 'currency': currency1_id,
- }, CONTEXT)
- self.assert_(company2_id)
-
- self.failUnlessRaises(Exception, self.company.write,
- cursor, USER, company1_id, {
- 'parent': company2_id,
- }, CONTEXT)
- cursor.commit()
- cursor.close()
+ with Transaction().start(DB_NAME, USER, CONTEXT) as transaction:
+ currency1_id = self.currency.search([
+ ('code', '=', 'cu1'),
+ ], 0, 1, None)[0]
+
+ company1_id = self.company.search([
+ ('name', '=', 'B2CK'),
+ ], 0, 1, None)[0]
+
+ company2_id = self.company.create({
+ 'name': 'B2CK Branch',
+ 'parent': company1_id,
+ 'currency': currency1_id,
+ })
+ self.assert_(company2_id)
+
+ self.failUnlessRaises(Exception, self.company.write,
+ company1_id, {
+ 'parent': company2_id,
+ })
+ transaction.cursor.commit()
def test0030employe(self):
'''
Create employee.
'''
- cursor = DB.cursor()
- company1_id = self.company.search(cursor, USER, [
- ('name', '=', 'B2CK'),
- ], 0, 1, None, CONTEXT)[0]
-
- employee1_id = self.employee.create(cursor, USER, {
- 'name': 'Employee1',
- 'company': company1_id,
- }, CONTEXT)
- cursor.commit()
- cursor.close()
+ with Transaction().start(DB_NAME, USER, CONTEXT) as transaction:
+ company1_id = self.company.search([
+ ('name', '=', 'B2CK'),
+ ], 0, 1, None)[0]
+
+ employee1_id = self.employee.create({
+ 'name': 'Employee1',
+ 'company': company1_id,
+ })
+ transaction.cursor.commit()
def suite():
suite = trytond.tests.test_tryton.suite()
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 332c4f2..4f5d031 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond-company
-Version: 1.6.0
+Version: 1.8.0
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,7 +12,7 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
-Download-URL: http://downloads.tryton.org/1.6/
+Download-URL: http://downloads.tryton.org/1.8/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff --git a/trytond_company.egg-info/requires.txt b/trytond_company.egg-info/requires.txt
index 0e1ed43..1e8dc79 100644
--- a/trytond_company.egg-info/requires.txt
+++ b/trytond_company.egg-info/requires.txt
@@ -1,3 +1,3 @@
-trytond_party >= 1.6, < 1.7
-trytond_currency >= 1.6, < 1.7
-trytond >= 1.6, < 1.7
\ No newline at end of file
+trytond_party >= 1.8, < 1.9
+trytond_currency >= 1.8, < 1.9
+trytond >= 1.8, < 1.9
\ No newline at end of file
commit 93e0268956489189cde7c242484210a5826555d8
Author: Mathias Behrle <mathiasb at mbsolutions.selfip.biz>
Date: Wed May 12 13:42:39 2010 +0200
Adding upstream version 1.6.0.
diff --git a/CHANGELOG b/CHANGELOG
index 17937a7..d312d03 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-Version 1.4.1 - 2009-11-24
+Version 1.6.0 - 2010-05-11
* Bug fixes (see mercurial logs for details)
Version 1.4.0 - 2009-10-19
diff --git a/COPYRIGHT b/COPYRIGHT
index 313ec81..cca7db9 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2008 Cédric Krier.
-Copyright (C) 2008 Bertrand Chenal.
-Copyright (C) 2008 B2CK SPRL.
+Copyright (C) 2008-2010 Cédric Krier.
+Copyright (C) 2008-2010 Bertrand Chenal.
+Copyright (C) 2008-2010 B2CK SPRL.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/MANIFEST.in b/MANIFEST.in
index c61b52d..7b252be 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,10 +1,10 @@
include INSTALL
include README
include TODO
-include COPYRIGHT
include CHANGELOG
+include COPYRIGHT
include LICENSE
include *.xml
include *.odt
include *.csv
-include tests/*
+include doc/*
diff --git a/PKG-INFO b/PKG-INFO
index 10c19bf..4974e61 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond_company
-Version: 1.4.1
+Version: 1.6.0
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,7 +12,7 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
-Download-URL: http://downloads.tryton.org/1.4/
+Download-URL: http://downloads.tryton.org/1.6/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff --git a/__tryton__.py b/__tryton__.py
index cb7f497..922693d 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -6,7 +6,7 @@
'name_es_CO': 'Compañía',
'name_es_ES': 'Empresa',
'name_fr_FR': 'Société',
- 'version': '1.4.1',
+ 'version': '1.6.0',
'author': 'B2CK',
'email': 'info at b2ck.com',
'website': 'http://www.tryton.org/',
diff --git a/company.py b/company.py
index 7abb4eb..1ab1f84 100644
--- a/company.py
+++ b/company.py
@@ -5,6 +5,7 @@ import copy
from trytond.model import ModelView, ModelSQL, fields
from trytond.wizard import Wizard
from trytond.report import Report
+from trytond.pyson import Eval, If, In, Get
class Company(ModelSQL, ModelView):
@@ -80,12 +81,12 @@ class User(ModelSQL, ModelView):
main_company = fields.Many2One('company.company', 'Main Company',
on_change=['main_company'])
company = fields.Many2One('company.company', 'Current Company',
- domain=["('parent', 'child_of', [main_company], 'parent')"],
+ domain=[('parent', 'child_of', [Eval('main_company')], 'parent')],
depends=['main_company'])
- companies = fields.Function('get_companies', type='many2many',
- relation='company.company', string='Current Companies')
+ companies = fields.Function(fields.One2Many('company.company', None,
+ 'Current Companies'), 'get_companies')
employee = fields.Many2One('company.employee', 'Employee',
- domain=["('company', 'child_of', [main_company], 'parent')"])
+ domain=[('company', 'child_of', [Eval('main_company')], 'parent')])
def __init__(self):
super(User, self).__init__()
@@ -99,7 +100,6 @@ class User(ModelSQL, ModelView):
})
def default_main_company(self, cursor, user, context=None):
- company_obj = self.pool.get('company.company')
if context is None:
context = {}
if context.get('company'):
@@ -109,7 +109,7 @@ class User(ModelSQL, ModelView):
def default_company(self, cursor, user, context=None):
return self.default_main_company(cursor, user, context=context)
- def get_companies(self, cursor, user_id, ids, name, arg, context=None):
+ def get_companies(self, cursor, user_id, ids, name, context=None):
company_obj = self.pool.get('company.company')
res = {}
company_childs = {}
@@ -132,15 +132,15 @@ class User(ModelSQL, ModelView):
res[user.id].extend(company_ids)
return res
- def get_status_bar(self, cursor, user_id, ids, name, arg, context=None):
- res = super(User, self).get_status_bar(cursor, user_id, ids, name, arg,
+ def get_status_bar(self, cursor, user_id, ids, name, context=None):
+ res = super(User, self).get_status_bar(cursor, user_id, ids, name,
context=context)
for user in self.browse(cursor, user_id, ids, context=context):
if user.company:
res[user.id] += ' ' + user.company.name
return res
- def on_change_main_company(self, cursor, user, ids, vals, context=None):
+ def on_change_main_company(self, cursor, user, vals, context=None):
return {'company': vals.get('main_company', False)}
def check_company(self, cursor, user_id, ids):
@@ -182,8 +182,10 @@ User()
class Property(ModelSQL, ModelView):
_name = 'ir.property'
company = fields.Many2One('company.company', 'Company',
- domain=["('id', 'company' in context and '=' or '!=', " \
- "context.get('company', 0))"])
+ domain=[
+ ('id', If(In('company', Eval('context', {})), '=', '!='),
+ Get(Eval('context', {}), 'company', 0)),
+ ])
def _set_values(self, cursor, user_id, name, model, res_id, val, field_id,
context=None):
@@ -208,15 +210,16 @@ Property()
class Sequence(ModelSQL, ModelView):
_name = 'ir.sequence'
company = fields.Many2One('company.company', 'Company',
- domain=["('id', 'company' in context and '=' or '!=', " \
- "context.get('company', 0))"])
+ domain=[
+ ('id', If(In('company', Eval('context', {})), '=', '!='),
+ Get(Eval('context', {}), 'company', 0)),
+ ])
def __init__(self):
super(Sequence, self).__init__()
self._order.insert(0, ('company', 'ASC'))
def default_company(self, cursor, user, context=None):
- company_obj = self.pool.get('company.company')
if context is None:
context = {}
if context.get('company'):
diff --git a/company.xml b/company.xml
index af7a542..af32523 100644
--- a/company.xml
+++ b/company.xml
@@ -62,6 +62,7 @@ this repository contains the full copyright notices and license terms. -->
<tree string="Companies">
<field name="name" select="1"/>
<field name="currency" select="1"/>
+ <field name="vat_code" select="1"/>
</tree>
]]>
</field>
@@ -339,7 +340,7 @@ this repository contains the full copyright notices and license terms. -->
<field name="type">tree</field>
<field name="arch" type="xml">
<![CDATA[
- <tree string="Employess">
+ <tree string="Employees">
<field name="name" select="1"/>
<field name="company" select="1"/>
</tree>
diff --git a/de_DE.csv b/de_DE.csv
index 5b7edc8..d31e045 100644
--- a/de_DE.csv
+++ b/de_DE.csv
@@ -66,7 +66,7 @@ view,company.company.config.init,0,Create Company,Unternehmen anlegen,0
view,company.company.config.init,0,You can now add your company into the system.,Sie können nun Ihr Unternehmen dem System hinzufügen!,0
view,company.employee,0,Addresses,Adressen,0
view,company.employee,0,Employee,Mitarbeiter,0
-view,company.employee,0,Employess,Mitarbeiter,0
+view,company.employee,0,Employees,Mitarbeiter,0
view,company.employee,0,General,Allgemein,0
view,company.employee,0,_General,_Allgemein,0
wizard_button,"company.company.config,company,add",0,Add,Hinzufügen,0
diff --git a/doc/index.rst b/doc/index.rst
new file mode 100644
index 0000000..e8af59b
--- /dev/null
+++ b/doc/index.rst
@@ -0,0 +1,36 @@
+Company Module
+##############
+
+The company module defines the concepts of company and employee and
+extend the user model.
+
+
+Company
+*******
+
+The company model extends the party model and add several fields: the
+currency, the list of employees and header and footer texts for
+reports. There is also a parent company field which allow to setup
+companies in a tree structure. The company model represent the actual
+organisation the users of Tryton are members of.
+
+
+Employee
+********
+
+The employee model extend the party model with a company field. The
+employee model represent the actual employees of the companies defined
+in Tryton. An employee can be optionally linked to a user trough the
+user form.
+
+
+User
+****
+
+Are added to the user model: a main company, a company and an employee
+field. The company field defines the current company of the user, this
+current company will influence the data this user see in Tryton: most
+of the records that are linked to a company will only be available for
+users in this very company. The main company define which current
+company a user can choose: either the main company itself or one of
+the children companies.
diff --git a/es_CO.csv b/es_CO.csv
index 7078790..5b41261 100644
--- a/es_CO.csv
+++ b/es_CO.csv
@@ -53,7 +53,7 @@ view,company.company.config.init,0,Create Company,Crear Compañía,0
view,company.company.config.init,0,You can now add your company into the system.,Ahora puede añadir su compañía al sistema.,0
view,company.employee,0,Addresses,Direcciones,0
view,company.employee,0,Employee,Empleado,0
-view,company.employee,0,Employess,Empleados,0
+view,company.employee,0,Employees,Empleados,0
view,company.employee,0,General,General,0
wizard_button,"company.company.config,company,add",0,Add,Adicionar,0
wizard_button,"company.company.config,company,end",0,Cancel,Cancelar,0
diff --git a/es_ES.csv b/es_ES.csv
index 538b508..ebdcdc5 100644
--- a/es_ES.csv
+++ b/es_ES.csv
@@ -53,7 +53,7 @@ view,company.company.config.init,0,Create Company,Crear empresa,0
view,company.company.config.init,0,You can now add your company into the system.,Ahora puede añadir su empresa al sistema.,0
view,company.employee,0,Addresses,Direcciones,0
view,company.employee,0,Employee,Empleado,0
-view,company.employee,0,Employess,Empleados,0
+view,company.employee,0,Employees,Empleados,0
view,company.employee,0,General,General,0
wizard_button,"company.company.config,company,add",0,Add,Añadir,0
wizard_button,"company.company.config,company,end",0,Cancel,Cancelar,0
diff --git a/fr_FR.csv b/fr_FR.csv
index 746ece8..ac1eca9 100644
--- a/fr_FR.csv
+++ b/fr_FR.csv
@@ -53,7 +53,7 @@ view,company.company.config.init,0,Create Company,Créer une société,0
view,company.company.config.init,0,You can now add your company into the system.,Vous pouvez maintenant ajouter votre société dans le système.,0
view,company.employee,0,Addresses,Adresses,0
view,company.employee,0,Employee,Employé,0
-view,company.employee,0,Employess,Employés,0
+view,company.employee,0,Employees,Employés,0
view,company.employee,0,General,Général,0
wizard_button,"company.company.config,company,add",0,Add,Ajouter,0
wizard_button,"company.company.config,company,end",0,Cancel,Annuler,0
diff --git a/setup.py b/setup.py
index 14849e8..fbd654b 100644
--- a/setup.py
+++ b/setup.py
@@ -2,19 +2,22 @@
#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, find_packages
+from setuptools import setup
import re
-info = eval(file('__tryton__.py').read())
+info = eval(open('__tryton__.py').read())
+major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
+major_version = int(major_version)
+minor_version = int(minor_version)
requires = []
for dep in info.get('depends', []):
if not re.match(r'(ir|res|workflow|webdav)(\W|$)', dep):
- requires.append('trytond_' + dep)
-
-major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
-requires.append('trytond >= %s.%s' % (major_version, minor_version))
-requires.append('trytond < %s.%s' % (major_version, int(minor_version) + 1))
+ requires.append('trytond_%s >= %s.%s, < %s.%s' %
+ (dep, major_version, minor_version, major_version,
+ minor_version + 1))
+requires.append('trytond >= %s.%s, < %s.%s' %
+ (major_version, minor_version, major_version, minor_version + 1))
setup(name='trytond_company',
version=info.get('version', '0.0.1'),
@@ -27,6 +30,7 @@ setup(name='trytond_company',
package_dir={'trytond.modules.company': '.'},
packages=[
'trytond.modules.company',
+ 'trytond.modules.company.tests',
],
package_data={
'trytond.modules.company': info.get('xml', []) \
@@ -56,4 +60,6 @@ setup(name='trytond_company',
[trytond.modules]
company = trytond.modules.company
""",
+ test_suite='tests',
+ test_loader='trytond.test_loader:Loader',
)
diff --git a/tests/__init__.py b/tests/__init__.py
index 82283ac..31b9c4a 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,4 +1,4 @@
#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 *
+from test_company import suite
diff --git a/tests/test_company.py b/tests/test_company.py
index 9505219..680c91a 100644
--- a/tests/test_company.py
+++ b/tests/test_company.py
@@ -10,7 +10,7 @@ if os.path.isdir(DIR):
import unittest
import trytond.tests.test_tryton
-from trytond.tests.test_tryton import RPCProxy, CONTEXT, SOCK, test_view
+from trytond.tests.test_tryton import POOL, DB, USER, CONTEXT, test_view
class CompanyTestCase(unittest.TestCase):
@@ -20,9 +20,9 @@ class CompanyTestCase(unittest.TestCase):
def setUp(self):
trytond.tests.test_tryton.install_module('company')
- self.company = RPCProxy('company.company')
- self.employee = RPCProxy('company.employee')
- self.currency = RPCProxy('currency.currency')
+ self.company = POOL.get('company.company')
+ self.employee = POOL.get('company.employee')
+ self.currency = POOL.get('currency.currency')
def test0005views(self):
'''
@@ -34,29 +34,33 @@ class CompanyTestCase(unittest.TestCase):
'''
Create company.
'''
- currency1_id = self.currency.search([
- ('code', '=', 'EUR'),
+ cursor = DB.cursor()
+ currency1_id = self.currency.search(cursor, USER, [
+ ('code', '=', 'cu1'),
], 0, 1, None, CONTEXT)[0]
- company1_id = self.company.create({
+ company1_id = self.company.create(cursor, USER, {
'name': 'B2CK',
'currency': currency1_id,
}, CONTEXT)
self.assert_(company1_id)
+ cursor.commit()
+ cursor.close()
def test0020company_recursion(self):
'''
Test company recursion.
'''
- currency1_id = self.currency.search([
- ('code', '=', 'EUR'),
+ cursor = DB.cursor()
+ currency1_id = self.currency.search(cursor, USER, [
+ ('code', '=', 'cu1'),
], 0, 1, None, CONTEXT)[0]
- company1_id = self.company.search([
+ company1_id = self.company.search(cursor, USER, [
('name', '=', 'B2CK'),
], 0, 1, None, CONTEXT)[0]
- company2_id = self.company.create({
+ company2_id = self.company.create(cursor, USER, {
'name': 'B2CK Branch',
'parent': company1_id,
'currency': currency1_id,
@@ -64,29 +68,36 @@ class CompanyTestCase(unittest.TestCase):
self.assert_(company2_id)
self.failUnlessRaises(Exception, self.company.write,
- company1_id, {
+ cursor, USER, company1_id, {
'parent': company2_id,
}, CONTEXT)
+ cursor.commit()
+ cursor.close()
def test0030employe(self):
'''
Create employee.
'''
- company1_id = self.company.search([
+ cursor = DB.cursor()
+ company1_id = self.company.search(cursor, USER, [
('name', '=', 'B2CK'),
], 0, 1, None, CONTEXT)[0]
- employee1_id = self.employee.create({
+ employee1_id = self.employee.create(cursor, USER, {
'name': 'Employee1',
'company': company1_id,
}, CONTEXT)
+ cursor.commit()
+ cursor.close()
def suite():
- return unittest.TestLoader().loadTestsFromTestCase(CompanyTestCase)
+ suite = trytond.tests.test_tryton.suite()
+ from trytond.modules.currency.tests import test_currency
+ for test in test_currency.suite():
+ if test not in suite:
+ suite.addTest(test)
+ suite.addTests(unittest.TestLoader().loadTestsFromTestCase(CompanyTestCase))
+ return suite
if __name__ == '__main__':
- suiteTrytond = trytond.tests.test_tryton.suite()
- suiteCompany = suite()
- alltests = unittest.TestSuite([suiteTrytond, suiteCompany])
- unittest.TextTestRunner(verbosity=2).run(alltests)
- SOCK.disconnect()
+ unittest.TextTestRunner(verbosity=2).run(suite())
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 8bd9585..332c4f2 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond-company
-Version: 1.4.1
+Version: 1.6.0
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,7 +12,7 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
-Download-URL: http://downloads.tryton.org/1.4/
+Download-URL: http://downloads.tryton.org/1.6/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff --git a/trytond_company.egg-info/SOURCES.txt b/trytond_company.egg-info/SOURCES.txt
index e4fa3bc..67f40ad 100644
--- a/trytond_company.egg-info/SOURCES.txt
+++ b/trytond_company.egg-info/SOURCES.txt
@@ -17,8 +17,9 @@ setup.py
./__tryton__.py
./company.py
./cron.py
-tests/__init__.py
-tests/test_company.py
+./tests/__init__.py
+./tests/test_company.py
+doc/index.rst
trytond_company.egg-info/PKG-INFO
trytond_company.egg-info/SOURCES.txt
trytond_company.egg-info/dependency_links.txt
diff --git a/trytond_company.egg-info/requires.txt b/trytond_company.egg-info/requires.txt
index 5f95951..0e1ed43 100644
--- a/trytond_company.egg-info/requires.txt
+++ b/trytond_company.egg-info/requires.txt
@@ -1,4 +1,3 @@
-trytond_party
-trytond_currency
-trytond >= 1.4
-trytond < 1.5
\ No newline at end of file
+trytond_party >= 1.6, < 1.7
+trytond_currency >= 1.6, < 1.7
+trytond >= 1.6, < 1.7
\ No newline at end of file
commit a4ca373eb292261e41beb1028b3c884153986cf8
Author: Daniel Baumann <daniel at debian.org>
Date: Wed Nov 25 13:03:42 2009 +0100
Adding upstream version 1.4.1.
diff --git a/CHANGELOG b/CHANGELOG
index 7431e33..17937a7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 1.4.1 - 2009-11-24
+* Bug fixes (see mercurial logs for details)
+
Version 1.4.0 - 2009-10-19
* Bug fixes (see mercurial logs for details)
* Remove monkey patch for CompanyReport
diff --git a/PKG-INFO b/PKG-INFO
index 2d99bcc..10c19bf 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond_company
-Version: 1.4.0
+Version: 1.4.1
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
diff --git a/__tryton__.py b/__tryton__.py
index fe76f56..cb7f497 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -6,7 +6,7 @@
'name_es_CO': 'Compañía',
'name_es_ES': 'Empresa',
'name_fr_FR': 'Société',
- 'version': '1.4.0',
+ 'version': '1.4.1',
'author': 'B2CK',
'email': 'info at b2ck.com',
'website': 'http://www.tryton.org/',
diff --git a/company.py b/company.py
index 096e5ef..7abb4eb 100644
--- a/company.py
+++ b/company.py
@@ -182,7 +182,8 @@ User()
class Property(ModelSQL, ModelView):
_name = 'ir.property'
company = fields.Many2One('company.company', 'Company',
- domain=["('id', '=', context.get('company', 0))"])
+ domain=["('id', 'company' in context and '=' or '!=', " \
+ "context.get('company', 0))"])
def _set_values(self, cursor, user_id, name, model, res_id, val, field_id,
context=None):
@@ -207,7 +208,8 @@ Property()
class Sequence(ModelSQL, ModelView):
_name = 'ir.sequence'
company = fields.Many2One('company.company', 'Company',
- domain=["('id', '=', context.get('company', False))"])
+ domain=["('id', 'company' in context and '=' or '!=', " \
+ "context.get('company', 0))"])
def __init__(self):
super(Sequence, self).__init__()
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 55be94b..8bd9585 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond-company
-Version: 1.4.0
+Version: 1.4.1
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
commit f2643b3d685b0b09bbcef2cb416d781acd54b8f4
Author: Daniel Baumann <daniel at debian.org>
Date: Mon Oct 19 22:00:21 2009 +0200
Adding upstream version 1.4.0.
diff --git a/CHANGELOG b/CHANGELOG
index d28f483..7431e33 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+Version 1.4.0 - 2009-10-19
+* Bug fixes (see mercurial logs for details)
+* Remove monkey patch for CompanyReport
+
Version 1.2.0 - 2009-04-20
* Bug fixes (see mercurial logs for details)
* Allow egg installation
diff --git a/INSTALL b/INSTALL
index f5c1f6d..dbe8e52 100644
--- a/INSTALL
+++ b/INSTALL
@@ -5,7 +5,7 @@ Prerequisites
-------------
* Python 2.4 or later (http://www.python.org/)
- * trytond 1.1.x (http://www.tryton.org/)
+ * trytond (http://www.tryton.org/)
* trytond_party (http://www.tryton.org/)
* trytond_currency (http://www.tryton.org/)
diff --git a/PKG-INFO b/PKG-INFO
index c674b6d..2d99bcc 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond_company
-Version: 1.2.0
+Version: 1.4.0
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,7 +12,7 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
-Download-URL: http://downloads.tryton.org/1.2/
+Download-URL: http://downloads.tryton.org/1.4/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff --git a/__init__.py b/__init__.py
index df31a3b..9125c89 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,4 +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 company import *
from cron import *
diff --git a/__tryton__.py b/__tryton__.py
index 2838259..fe76f56 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -4,9 +4,9 @@
'name': 'Company',
'name_de_DE': 'Unternehmen',
'name_es_CO': 'Compañía',
- 'name_es_ES': 'Compañía',
- 'name_fr_FR': 'Compagnie',
- 'version': '1.2.0',
+ 'name_es_ES': 'Empresa',
+ 'name_fr_FR': 'Société',
+ 'version': '1.4.0',
'author': 'B2CK',
'email': 'info at b2ck.com',
'website': 'http://www.tryton.org/',
@@ -31,19 +31,19 @@ Make the scheduler run on each companies.
- Añade plantilla de carta a un tercero.
- Se ejecuta el agendador por compañía.
''',
- 'description_es_ES': ''' - Define compañía y empleados.
- - Añade compañía principal y predeterminada de acuerdo a preferencia de usuarios.
- - Añade compañía a las propiedades.
- - Define un nuevo reporteador para los encabezados de los reportes por compañía.
- - Añade plantilla de carta a un tercero.
- - Se ejecuta el agendador por compañía.
+ 'description_es_ES': '''Define empresa y empleados.
+ - Añade la empresa principal y predeterminada en las preferencias de los usuarios.
+ - Añade empresa a las propiedades.
+ - Define un nuevo analizador de informe para los informes con el encabezado de la empresa.
+ - Añade una plantilla de carta en terceros.
+ - Hace que el programador de tareas se ejecute por empresa.
''',
- 'description_fr_FR': '''Defini compagnie et employé.
-Ajoute les compagnies principale et courante dans les préférences de l'utilisateur.
-Ajoute la compagnie sur les propriétés.
-Défini un nouveau moteur de rapport gérant une entête par compagnie.
+ 'description_fr_FR': '''Défini société et employé.
+Ajoute les sociétés principale et courante dans les préférences de l'utilisateur.
+Ajoute la société sur les propriétés.
+Défini un nouveau moteur de rapport gérant une entête par société.
Ajoute un canva de lettre par tiers.
-Lance les planificateurs sur chaque compagnie.
+Lance les planificateurs sur chaque société.
''',
'depends': [
'ir',
@@ -56,9 +56,9 @@ Lance les planificateurs sur chaque compagnie.
'cron.xml',
],
'translation': [
- 'fr_FR.csv',
+ 'de_DE.csv',
'es_CO.csv',
'es_ES.csv',
- 'de_DE.csv',
+ 'fr_FR.csv',
]
}
diff --git a/company.py b/company.py
index 4f61e7b..096e5ef 100644
--- a/company.py
+++ b/company.py
@@ -80,12 +80,12 @@ class User(ModelSQL, ModelView):
main_company = fields.Many2One('company.company', 'Main Company',
on_change=['main_company'])
company = fields.Many2One('company.company', 'Current Company',
- domain="[('parent', 'child_of', [main_company], 'parent')]",
+ domain=["('parent', 'child_of', [main_company], 'parent')"],
depends=['main_company'])
companies = fields.Function('get_companies', type='many2many',
relation='company.company', string='Current Companies')
employee = fields.Many2One('company.employee', 'Employee',
- domain="[('company', 'child_of', [main_company], 'parent')]")
+ domain=["('company', 'child_of', [main_company], 'parent')"])
def __init__(self):
super(User, self).__init__()
@@ -182,7 +182,7 @@ User()
class Property(ModelSQL, ModelView):
_name = 'ir.property'
company = fields.Many2One('company.company', 'Company',
- domain="[('id', '=', context.get('company', 0))]")
+ domain=["('id', '=', context.get('company', 0))"])
def _set_values(self, cursor, user_id, name, model, res_id, val, field_id,
context=None):
@@ -194,13 +194,20 @@ class Property(ModelSQL, ModelView):
res['company'] = user.company.id
return res
+ def search(self, cursor, user, domain, offset=0, limit=None, order=None,
+ context=None, count=False):
+ if user == 0:
+ domain = ['AND', domain[:], ('company', '=', False)]
+ return super(Property, self).search(cursor, user, domain, offset=offset,
+ limit=limit, order=order, context=context, count=count)
+
Property()
class Sequence(ModelSQL, ModelView):
_name = 'ir.sequence'
company = fields.Many2One('company.company', 'Company',
- domain="[('id', '=', context.get('company', False))]")
+ domain=["('id', '=', context.get('company', False))"])
def __init__(self):
super(Sequence, self).__init__()
@@ -296,9 +303,6 @@ class CompanyReport(Report):
return super(CompanyReport, self).parse(cursor, user_id, report,
objects, datas, context)
-import trytond.report
-trytond.report.CompanyReport = CompanyReport
-
class LetterReport(CompanyReport):
_name = 'party.letter'
diff --git a/company.xml b/company.xml
index b2c8712..af7a542 100644
--- a/company.xml
+++ b/company.xml
@@ -382,7 +382,7 @@ this repository contains the full copyright notices and license terms. -->
</record>
<record model="ir.action.report" id="report_letter">
- <field name="name">_Letter</field>
+ <field name="name">Letter</field>
<field name="model">party.party</field>
<field name="report_name">party.letter</field>
<field name="report">company/letter.odt</field>
diff --git a/cron.xml b/cron.xml
index f735baa..fc92901 100644
--- a/cron.xml
+++ b/cron.xml
@@ -1,5 +1,6 @@
<?xml version="1.0"?>
-<!-- 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. -->
<tryton>
<data>
diff --git a/de_DE.csv b/de_DE.csv
index ba08408..5b7edc8 100644
--- a/de_DE.csv
+++ b/de_DE.csv
@@ -41,7 +41,7 @@ model,"ir.action,name",act_company_tree,Companies,Unternehmen,0
model,"ir.action,name",act_company_form,Companies,Unternehmen,0
model,"ir.action,name",act_company_form2,Companies,Unternehmen,0
model,"ir.action,name",act_employee_form,Employees,Mitarbeiter,0
-model,"ir.action,name",report_letter,_Letter,_Brief,0
+model,"ir.action,name",report_letter,Letter,Brief,0
model,"ir.cron-company.company,name",0,ir.cron-company.company,ir.cron-company.company,0
model,"ir.ui.menu,name",menu_company_tree,Companies,Unternehmen,0
model,"ir.ui.menu,name",menu_company_form,Edit Companies,Unternehmen bearbeiten,0
diff --git a/es_CO.csv b/es_CO.csv
index 1532ff0..7078790 100644
--- a/es_CO.csv
+++ b/es_CO.csv
@@ -19,6 +19,7 @@ field,"ir.cron-company.company,rec_name",0,Name,Nombre,0
field,"ir.property,company",0,Company,Compañía,0
field,"ir.sequence,company",0,Company,Compañía,0
field,"ir.sequence.strict,company",0,Company,Compañía,0
+field,"res.user,companies",0,Current Companies,Compañías en Curso,0
field,"res.user,company",0,Current Company,Compañía Actual,0
field,"res.user,employee",0,Employee,Empleado,0
field,"res.user,main_company",0,Main Company,Compañía Principal,0
@@ -30,7 +31,7 @@ model,"ir.action,name",act_company_tree,Companies,Compañías,0
model,"ir.action,name",act_company_form,Companies,Compañías,0
model,"ir.action,name",act_company_form2,Companies,Compañías,0
model,"ir.action,name",act_employee_form,Employees,Empleados,0
-model,"ir.action,name",report_letter,_Letter,_Carta,0
+model,"ir.action,name",report_letter,Letter,Carta,0
model,"ir.cron-company.company,name",0,ir.cron-company.company,ir.cron-company.company,0
model,"ir.ui.menu,name",menu_company_tree,Companies,Compañías,0
model,"ir.ui.menu,name",menu_company_form,Edit Companies,Editar Compañías,0
diff --git a/es_ES.csv b/es_ES.csv
index d5dc390..538b508 100644
--- a/es_ES.csv
+++ b/es_ES.csv
@@ -8,38 +8,38 @@ field,"company.company,footer",0,Footer,Pie de página,0
field,"company.company,header",0,Header,Encabezado,0
field,"company.company,parent",0,Parent,Padre,0
field,"company.company,party",0,Party,Tercero,0
-field,"company.company,rec_name",0,Name,Nombre del campo,1
+field,"company.company,rec_name",0,Name,Nombre,0
field,"company.employee,company",0,Company,Empresa,0
field,"company.employee,party",0,Party,Tercero,0
-field,"company.employee,rec_name",0,Name,Nombre del campo,1
+field,"company.employee,rec_name",0,Name,Nombre,0
field,"ir.cron,companies",0,Companies,Empresas,0
-field,"ir.cron-company.company,company",0,Company,Empresa,1
-field,"ir.cron-company.company,cron",0,Cron,Cron,1
-field,"ir.cron-company.company,rec_name",0,Name,Nombre del campo,1
+field,"ir.cron-company.company,company",0,Company,Empresa,0
+field,"ir.cron-company.company,cron",0,Cron,Programador de tareas,0
+field,"ir.cron-company.company,rec_name",0,Name,Nombre,0
field,"ir.property,company",0,Company,Empresa,0
-field,"ir.sequence,company",0,Company,Empresa,1
-field,"ir.sequence.strict,company",0,Company,Empresa,1
-field,"res.user,companies",0,Current Companies,,0
+field,"ir.sequence,company",0,Company,Empresa,0
+field,"ir.sequence.strict,company",0,Company,Empresa,0
+field,"res.user,companies",0,Current Companies,Empresas actuales,0
field,"res.user,company",0,Current Company,Empresa actual,0
field,"res.user,employee",0,Employee,Empleado,0
field,"res.user,main_company",0,Main Company,Empresa principal,0
help,"ir.cron,companies",0,Companies registered for this cron,Empresas registradas en este programador de tareas,0
-model,"company.company.config.init,name",0,Company Config Init,,0
-model,"company.company,name",0,Company,Empresa,1
-model,"company.employee,name",0,Employee,Empleado,1
+model,"company.company.config.init,name",0,Company Config Init,Inicialización de la configuración de la empresa,0
+model,"company.company,name",0,Company,Empresa,0
+model,"company.employee,name",0,Employee,Empleado,0
model,"ir.action,name",act_company_tree,Companies,Empresas,0
model,"ir.action,name",act_company_form,Companies,Empresas,0
-model,"ir.action,name",act_company_form2,Companies,Empresas,1
+model,"ir.action,name",act_company_form2,Companies,Empresas,0
model,"ir.action,name",act_employee_form,Employees,Empleados,0
-model,"ir.action,name",report_letter,_Letter,_Carta,0
-model,"ir.cron-company.company,name",0,ir.cron-company.company,,0
+model,"ir.action,name",report_letter,Letter,Carta,0
+model,"ir.cron-company.company,name",0,ir.cron-company.company,ir.cron-company.company,0
model,"ir.ui.menu,name",menu_company_tree,Companies,Empresas,0
model,"ir.ui.menu,name",menu_company_form,Edit Companies,Editar empresas,0
model,"ir.ui.menu,name",menu_employee_form,Employees,Empleados,0
model,"ir.ui.menu,name",menu_company_form2,New Company,Nueva empresa,0
odt,party.letter,0,"Best Regards,","Atentamente,",0
odt,party.letter,0,Date:,Fecha:,0
-odt,party.letter,0,"Dear Madams and Sirs,","Estimados señoras y señores,",0
+odt,party.letter,0,"Dear Madams and Sirs,","Estimados señores y señoras,",0
odt,party.letter,0,E-Mail:,Correo electrónico:,0
odt,party.letter,0,Phone:,Teléfono:,0
odt,party.letter,0,Subject:,Asunto:,0
diff --git a/fr_FR.csv b/fr_FR.csv
index 79e9bc7..746ece8 100644
--- a/fr_FR.csv
+++ b/fr_FR.csv
@@ -31,7 +31,7 @@ model,"ir.action,name",act_company_tree,Companies,Sociétés,0
model,"ir.action,name",act_company_form,Companies,Sociétés,0
model,"ir.action,name",act_company_form2,Companies,Sociétés,0
model,"ir.action,name",act_employee_form,Employees,Employés,0
-model,"ir.action,name",report_letter,_Letter,_Lettre,0
+model,"ir.action,name",report_letter,Letter,Lettre,0
model,"ir.cron-company.company,name",0,ir.cron-company.company,,0
model,"ir.ui.menu,name",menu_company_tree,Companies,Sociétés,0
model,"ir.ui.menu,name",menu_company_form,Edit Companies,Éditer les sociétés,0
diff --git a/setup.py b/setup.py
index 6590ace..14849e8 100644
--- a/setup.py
+++ b/setup.py
@@ -9,17 +9,12 @@ info = eval(file('__tryton__.py').read())
requires = []
for dep in info.get('depends', []):
- match = re.compile(
- '(ir|res|workflow|webdav)((\s|$|<|>|<=|>=|==|!=).*?$)').match(dep)
- if match:
- continue
- else:
- dep = 'trytond_' + dep
- requires.append(dep)
+ if not re.match(r'(ir|res|workflow|webdav)(\W|$)', dep):
+ requires.append('trytond_' + dep)
major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
requires.append('trytond >= %s.%s' % (major_version, minor_version))
-requires.append('trytond < %s.%s' % (major_version, str(int(minor_version) + 1)))
+requires.append('trytond < %s.%s' % (major_version, int(minor_version) + 1))
setup(name='trytond_company',
version=info.get('version', '0.0.1'),
diff --git a/tests/__init__.py b/tests/__init__.py
index 9d3ed87..82283ac 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,3 +1,4 @@
-#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 *
diff --git a/tests/test_company.py b/tests/test_company.py
index 53d469b..9505219 100644
--- a/tests/test_company.py
+++ b/tests/test_company.py
@@ -10,7 +10,7 @@ if os.path.isdir(DIR):
import unittest
import trytond.tests.test_tryton
-from trytond.tests.test_tryton import RPCProxy, CONTEXT, SOCK
+from trytond.tests.test_tryton import RPCProxy, CONTEXT, SOCK, test_view
class CompanyTestCase(unittest.TestCase):
@@ -24,6 +24,12 @@ class CompanyTestCase(unittest.TestCase):
self.employee = RPCProxy('company.employee')
self.currency = RPCProxy('currency.currency')
+ def test0005views(self):
+ '''
+ Test views.
+ '''
+ self.assertRaises(Exception, test_view('company'))
+
def test0010company(self):
'''
Create company.
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 886fc44..55be94b 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond-company
-Version: 1.2.0
+Version: 1.4.0
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,7 +12,7 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
-Download-URL: http://downloads.tryton.org/1.2/
+Download-URL: http://downloads.tryton.org/1.4/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff --git a/trytond_company.egg-info/requires.txt b/trytond_company.egg-info/requires.txt
index c9cb40c..5f95951 100644
--- a/trytond_company.egg-info/requires.txt
+++ b/trytond_company.egg-info/requires.txt
@@ -1,4 +1,4 @@
trytond_party
trytond_currency
-trytond >= 1.2
-trytond < 1.3
\ No newline at end of file
+trytond >= 1.4
+trytond < 1.5
\ No newline at end of file
commit 7898ead8dd9dfb98a6a21d826dbd0965282e2fe2
Author: Daniel Baumann <daniel at debian.org>
Date: Tue Apr 21 11:06:52 2009 +0200
Adding upstream version 1.2.0.
diff --git a/CHANGELOG b/CHANGELOG
index 030425c..d28f483 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,10 +1,5 @@
-Version 1.0.3 - 2009-03-02
-* Some bug fixes (see mercurial logs for details)
-
-Version 1.0.2 - 2009-01-06
-* Some bug fixes (see mercurial logs for details)
-
-Version 1.0.1 - 2008-12-01
+Version 1.2.0 - 2009-04-20
+* Bug fixes (see mercurial logs for details)
* Allow egg installation
Version 1.0.0 - 2008-11-17
diff --git a/INSTALL b/INSTALL
index 7a03d71..f5c1f6d 100644
--- a/INSTALL
+++ b/INSTALL
@@ -5,14 +5,14 @@ Prerequisites
-------------
* Python 2.4 or later (http://www.python.org/)
- * trytond 0.0.x (http://www.tryton.org/)
+ * trytond 1.1.x (http://www.tryton.org/)
* trytond_party (http://www.tryton.org/)
* trytond_currency (http://www.tryton.org/)
Installation
------------
-Once you've downloaded and unpacked a trytond_company source release, enter the
+Once you've downloaded and unpacked the trytond_company source release, enter the
directory where the archive was unpacked, and run:
python setup.py install
diff --git a/PKG-INFO b/PKG-INFO
index c124e9a..c674b6d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond_company
-Version: 1.0.3
+Version: 1.2.0
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,7 +12,7 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
-Download-URL: http://downloads.tryton.org/1.0/
+Download-URL: http://downloads.tryton.org/1.2/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff --git a/__tryton__.py b/__tryton__.py
index 6540542..2838259 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -3,9 +3,10 @@
{
'name': 'Company',
'name_de_DE': 'Unternehmen',
- 'name_fr_FR': 'Compagnie',
+ 'name_es_CO': 'Compañía',
'name_es_ES': 'Compañía',
- 'version': '1.0.3',
+ 'name_fr_FR': 'Compagnie',
+ 'version': '1.2.0',
'author': 'B2CK',
'email': 'info at b2ck.com',
'website': 'http://www.tryton.org/',
@@ -23,12 +24,12 @@ Make the scheduler run on each companies.
- Fügt den Kontakten die Berichtsvorlage für Briefe hinzu.
- Initialisiert die Aufgaben des Zeitplaners für jedes Unternehmen.
''',
- 'description_fr_FR': '''Defini compagnie et employé.
-Ajoute les compagnies principale et courante dans les préférences de l'utilisateur.
-Ajoute la compagnie sur les propriétés.
-Défini un nouveau moteur de rapport gérant une entête par compagnie.
-Ajoute un canva de lettre par tiers.
-Lance les planificateurs sur chaque compagnie.
+ 'description_es_CO': ''' - Define compañía y empleados.
+ - Añade compañía principal y predeterminada de acuerdo a preferencia de usuarios.
+ - Añade compañía a las propiedades.
+ - Define un nuevo reporteador para los encabezados de los reportes por compañía.
+ - Añade plantilla de carta a un tercero.
+ - Se ejecuta el agendador por compañía.
''',
'description_es_ES': ''' - Define compañía y empleados.
- Añade compañía principal y predeterminada de acuerdo a preferencia de usuarios.
@@ -37,6 +38,13 @@ Lance les planificateurs sur chaque compagnie.
- Añade plantilla de carta a un tercero.
- Se ejecuta el agendador por compañía.
''',
+ 'description_fr_FR': '''Defini compagnie et employé.
+Ajoute les compagnies principale et courante dans les préférences de l'utilisateur.
+Ajoute la compagnie sur les propriétés.
+Défini un nouveau moteur de rapport gérant une entête par compagnie.
+Ajoute un canva de lettre par tiers.
+Lance les planificateurs sur chaque compagnie.
+''',
'depends': [
'ir',
'res',
@@ -49,7 +57,8 @@ Lance les planificateurs sur chaque compagnie.
],
'translation': [
'fr_FR.csv',
- 'de_DE.csv',
+ 'es_CO.csv',
'es_ES.csv',
+ 'de_DE.csv',
]
}
diff --git a/company.py b/company.py
index 9c5668c..4f61e7b 100644
--- a/company.py
+++ b/company.py
@@ -1,14 +1,13 @@
#This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
"Company"
-
import copy
-from trytond.osv import fields, OSV
-from trytond.wizard import Wizard, WizardOSV
+from trytond.model import ModelView, ModelSQL, fields
+from trytond.wizard import Wizard
from trytond.report import Report
-class Company(OSV):
+class Company(ModelSQL, ModelView):
'Company'
_name = 'company.company'
_description = __doc__
@@ -17,7 +16,7 @@ class Company(OSV):
party = fields.Many2One('party.party', 'Party', required=True,
ondelete='CASCADE')
parent = fields.Many2One('company.company', 'Parent')
- childs = fields.One2Many('company.company', 'parent', 'Childs')
+ childs = fields.One2Many('company.company', 'parent', 'Children')
header = fields.Text('Header')
footer = fields.Text('Footer')
currency = fields.Many2One('currency.currency', 'Currency', required=True)
@@ -32,6 +31,28 @@ class Company(OSV):
'recursive_companies': 'You can not create recursive companies!',
})
+ def copy(self, cursor, user, ids, default=None, context=None):
+ party_obj = self.pool.get('party.party')
+
+ int_id = False
+ if isinstance(ids, (int, long)):
+ int_id = True
+ ids = [ids]
+ if default is None:
+ default = {}
+ default = default.copy()
+ new_ids = []
+ for company in self.browse(cursor, user, ids, context=context):
+ default['party'] = party_obj.copy(cursor, user, company.party.id,
+ context=context)
+ new_id = super(Company, self).copy(cursor, user, company.id,
+ default=default, context=context)
+ new_ids.append(new_id)
+
+ if int_id:
+ return new_ids[0]
+ return new_ids
+
def write(self, cursor, user, ids, vals, context=None):
res = super(Company, self).write(cursor, user, ids, vals,
context=context)
@@ -42,7 +63,7 @@ class Company(OSV):
Company()
-class Employee(OSV):
+class Employee(ModelSQL, ModelView):
'Employee'
_name = 'company.employee'
_description = __doc__
@@ -54,12 +75,15 @@ class Employee(OSV):
Employee()
-class User(OSV):
+class User(ModelSQL, ModelView):
_name = 'res.user'
main_company = fields.Many2One('company.company', 'Main Company',
on_change=['main_company'])
company = fields.Many2One('company.company', 'Current Company',
- domain="[('parent', 'child_of', [main_company], 'parent')]")
+ domain="[('parent', 'child_of', [main_company], 'parent')]",
+ depends=['main_company'])
+ companies = fields.Function('get_companies', type='many2many',
+ relation='company.company', string='Current Companies')
employee = fields.Many2One('company.employee', 'Employee',
domain="[('company', 'child_of', [main_company], 'parent')]")
@@ -74,6 +98,40 @@ class User(OSV):
'a child of your main company!',
})
+ def default_main_company(self, cursor, user, context=None):
+ company_obj = self.pool.get('company.company')
+ if context is None:
+ context = {}
+ if context.get('company'):
+ return context['company']
+ return False
+
+ def default_company(self, cursor, user, context=None):
+ return self.default_main_company(cursor, user, context=context)
+
+ def get_companies(self, cursor, user_id, ids, name, arg, context=None):
+ company_obj = self.pool.get('company.company')
+ res = {}
+ company_childs = {}
+ for user in self.browse(cursor, user_id, ids, context=context):
+ res[user.id] = []
+ company_id = False
+ if user.company:
+ company_id = user.company.id
+ elif user.main_company:
+ company_id = user.main_company.id
+ if company_id:
+ if company_id in company_childs:
+ company_ids = company_childs[company_id]
+ else:
+ company_ids = company_obj.search(cursor, user_id, [
+ ('parent', 'child_of', [company_id]),
+ ], context=context)
+ company_childs[company_id] = company_ids
+ if company_ids:
+ res[user.id].extend(company_ids)
+ return res
+
def get_status_bar(self, cursor, user_id, ids, name, arg, context=None):
res = super(User, self).get_status_bar(cursor, user_id, ids, name, arg,
context=context)
@@ -98,10 +156,10 @@ class User(OSV):
return False
return True
- def get_preferences(self, cursor, user_id, context_only=False, context=None):
- res = super(User, self).get_preferences(cursor, user_id,
+ def _get_preferences(self, cursor, user_id, user, context_only=False,
+ context=None):
+ res = super(User, self)._get_preferences(cursor, user_id, user,
context_only=context_only, context=context)
- user = self.browse(cursor, 0, user_id, context=context)
if not context_only:
res['main_company'] = user.main_company.id
if user.employee:
@@ -115,46 +173,60 @@ class User(OSV):
res = super(User, self).get_preferences_fields_view(cursor, user_id,
context=context)
- fields = self.fields_get(cursor, user_id, fields_names=['main_company'],
- context=context)
- res['fields'].update(fields)
-
- company = res['fields']['company']
- company['type'] = 'selection'
- del company['relation']
- company['selection'] = company_obj.name_search(cursor, user_id, args=[
- ('parent', 'child_of', [user.main_company.id]),
- ], context=context)
-
+ res = copy.deepcopy(res)
return res
User()
-class Property(OSV):
+class Property(ModelSQL, ModelView):
_name = 'ir.property'
- company = fields.Many2One('company.company', 'Company')
+ company = fields.Many2One('company.company', 'Company',
+ domain="[('id', '=', context.get('company', 0))]")
- def set(self, cursor, user_id, name, model, res_id, val, context=None):
- if context is None:
- context = {}
- ctx = context.copy()
- ctx['user'] = user_id
- res = super(Property, self).set(cursor, user_id, name, model, res_id, val,
- context=context)
- if res and user_id:
- user_obj = self.pool.get('res.user')
- user = user_obj.browse(cursor, user_id, user_id, context=context)
- self.write(cursor, 0, res, {
- 'company': user.company.id,
- }, context=ctx)
+ def _set_values(self, cursor, user_id, name, model, res_id, val, field_id,
+ context=None):
+ user_obj = self.pool.get('res.user')
+ user = user_obj.browse(cursor, user_id, user_id, context=context)
+ res = super(Property, self)._set_values(cursor, user_id, name, model,
+ res_id, val, field_id, context=context)
+ if user_id:
+ res['company'] = user.company.id
return res
Property()
-class CompanyConfigInit(WizardOSV):
+class Sequence(ModelSQL, ModelView):
+ _name = 'ir.sequence'
+ company = fields.Many2One('company.company', 'Company',
+ domain="[('id', '=', context.get('company', False))]")
+
+ def __init__(self):
+ super(Sequence, self).__init__()
+ self._order.insert(0, ('company', 'ASC'))
+
+ def default_company(self, cursor, user, context=None):
+ company_obj = self.pool.get('company.company')
+ if context is None:
+ context = {}
+ if context.get('company'):
+ return context['company']
+ return False
+
+Sequence()
+
+
+class SequenceStrict(Sequence):
+ _name = 'ir.sequence.strict'
+
+SequenceStrict()
+
+
+class CompanyConfigInit(ModelView):
+ 'Company Config Init'
_name = 'company.company.config.init'
+ _description = __doc__
CompanyConfigInit()
diff --git a/company.xml b/company.xml
index 920628c..b2c8712 100644
--- a/company.xml
+++ b/company.xml
@@ -6,43 +6,50 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="company_view_form">
<field name="model">company.company</field>
<field name="type">form</field>
+ <field name="inherit" ref="party.party_view_form"/>
<field name="arch" type="xml">
<![CDATA[
- <form string="Company">
- <label name="name"/>
- <field name="name" colspan="3"/>
- <label name="parent"/>
- <field name="parent"/>
- <label name="currency"/>
- <field name="currency"/>
- <label name="vat_country"/>
- <field name="vat_country"/>
- <label name="vat_number"/>
- <field name="vat_number"/>
- <notebook colspan="4">
- <page string="General">
- <field name="addresses" mode="form,tree" colspan="4" width="600">
- <tree string="Addresses" sequence="sequence">
- <field name="sequence" tree_invisible="1"/>
- <field name="name"/>
- <field name="phone"/>
- <field name="email"/>
- <field name="active"/>
- </tree>
- </field>
- </page>
- <page string="Employees" col="1">
+ <data>
+ <xpath
+ expr="/form"
+ position="replace_attributes">
+ <form string="Company"/>
+ </xpath>
+ <xpath
+ expr="/form/label[@name="code"]"
+ position="replace">
+ <label name="parent"/>
+ </xpath>
+ <xpath
+ expr="/form/field[@name="code"]"
+ position="replace">
+ <field name="parent"/>
+ </xpath>
+ <xpath
+ expr="/form/field[@name="active"]"
+ position="after">
+ <label name="currency"/>
+ <field name="currency"/>
+ <label name="vat_country"/>
+ <field name="vat_country"/>
+ <label name="vat_number"/>
+ <field name="vat_number"/>
+ </xpath>
+ <xpath
+ expr="/form/notebook/page[@id="general"]"
+ position="after">
+ <page string="Employees" col="1" id="employees">
<separator name="employees"/>
<field name="employees"/>
</page>
- <page string="Reports" col="1">
+ <page string="Reports" col="1" id="reports">
<separator name="header"/>
<field name="header"/>
<separator name="footer"/>
<field name="footer"/>
</page>
- </notebook>
- </form>
+ </xpath>
+ </data>
]]>
</field>
</record>
@@ -71,8 +78,9 @@ this repository contains the full copyright notices and license terms. -->
<field name="view" ref="company_view_tree"/>
<field name="act_window" ref="act_company_tree"/>
</record>
- <menuitem parent="party.menu_party" action="act_company_tree"
+ <menuitem parent="party.menu_configuration" action="act_company_tree"
id="menu_company_tree"/>
+
<record model="ir.action.act_window" id="act_company_form">
<field name="name">Companies</field>
<field name="res_model">company.company</field>
@@ -80,18 +88,55 @@ this repository contains the full copyright notices and license terms. -->
</record>
<record model="ir.action.act_window.view"
id="act_company_form_view1">
- <field name="sequence" eval="1"/>
+ <field name="sequence" eval="10"/>
<field name="view" ref="company_view_tree"/>
<field name="act_window" ref="act_company_form"/>
</record>
<record model="ir.action.act_window.view"
id="act_company_form_view2">
- <field name="sequence" eval="2"/>
+ <field name="sequence" eval="20"/>
<field name="view" ref="company_view_form"/>
<field name="act_window" ref="act_company_form"/>
</record>
<menuitem parent="menu_company_tree" action="act_company_form"
id="menu_company_form" name="Edit Companies"/>
+
+ <record model="ir.action.act_window" id="act_company_form2">
+ <field name="name">Companies</field>
+ <field name="res_model">company.company</field>
+ <field name="view_type">form</field>
+ </record>
+ <record model="ir.action.act_window.view"
+ id="act_company_form2_view1">
+ <field name="sequence" eval="10"/>
+ <field name="view" ref="company_view_form"/>
+ <field name="act_window" ref="act_company_form2"/>
+ </record>
+ <record model="ir.action.act_window.view"
+ id="act_company_form2_view2">
+ <field name="sequence" eval="20"/>
+ <field name="view" ref="company_view_tree"/>
+ <field name="act_window" ref="act_company_form2"/>
+ </record>
+ <menuitem parent="menu_company_tree" action="act_company_form2"
+ id="menu_company_form2" name="New Company"/>
+
+ <record model="ir.model.access" id="access_company">
+ <field name="model" search="[('model', '=', 'company.company')]"/>
+ <field name="perm_read" eval="True"/>
+ <field name="perm_write" eval="False"/>
+ <field name="perm_create" eval="False"/>
+ <field name="perm_delete" eval="False"/>
+ </record>
+ <record model="ir.model.access" id="access_company_admin">
+ <field name="model" search="[('model', '=', 'company.company')]"/>
+ <field name="group" ref="party.group_party_admin"/>
+ <field name="perm_read" eval="True"/>
+ <field name="perm_write" eval="True"/>
+ <field name="perm_create" eval="True"/>
+ <field name="perm_delete" eval="True"/>
+ </record>
+
<record model="ir.ui.view" id="user_view_form">
<field name="model">res.user</field>
<field name="inherit" ref="res.user_view_form"/>
@@ -112,6 +157,22 @@ this repository contains the full copyright notices and license terms. -->
]]>
</field>
</record>
+ <record model="ir.ui.view" id="user_view_form_preferences">
+ <field name="model">res.user</field>
+ <field name="inherit" ref="res.user_view_form_preferences"/>
+ <field name="arch" type="xml">
+ <![CDATA[
+ <data>
+ <xpath
+ expr="/form/notebook/page/separator[@name="signature"]"
+ position="before">
+ <label name="company"/>
+ <field name="company"/>
+ </xpath>
+ </data>
+ ]]>
+ </field>
+ </record>
<record model="ir.ui.view" id="property_view_form">
<field name="model">ir.property</field>
<field name="inherit" ref="ir.property_view_form"/>
@@ -161,6 +222,72 @@ this repository contains the full copyright notices and license terms. -->
<field name="rule_group" ref="rule_group_property"/>
</record>
+ <record model="ir.ui.view" id="sequence_view_form">
+ <field name="model">ir.sequence</field>
+ <field name="inherit" ref="ir.sequence_view_form"/>
+ <field name="arch" type="xml">
+ <![CDATA[
+ <data>
+ <xpath
+ expr="/form/field[@name="active"]"
+ position="after">
+ <label name="company"/>
+ <field name="company" colspan="3"/>
+ </xpath>
+ </data>
+ ]]>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="sequence_view_tree">
+ <field name="model">ir.sequence</field>
+ <field name="inherit" ref="ir.sequence_view_tree"/>
+ <field name="arch" type="xml">
+ <![CDATA[
+ <data>
+ <xpath
+ expr="/tree/field[@name="code"]"
+ position="after">
+ <field name="company" select="2"/>
+ </xpath>
+ </data>
+ ]]>
+ </field>
+ </record>
+
+ <record model="ir.rule.group" id="rule_group_sequence">
+ <field name="model" search="[('model', '=', 'ir.sequence')]"/>
+ <field name="global_p" eval="True"/>
+ </record>
+ <record model="ir.rule" id="rule_sequence1">
+ <field name="field" search="[('name', '=', 'company'), ('model.model', '=', 'ir.sequence')]"/>
+ <field name="operator">=</field>
+ <field name="operand">User/Current Company</field>
+ <field name="rule_group" ref="rule_group_sequence"/>
+ </record>
+ <record model="ir.rule" id="rule_sequence2">
+ <field name="field" search="[('name', '=', 'company'), ('model.model', '=', 'ir.sequence')]"/>
+ <field name="operator">=</field>
+ <field name="operand">False</field>
+ <field name="rule_group" ref="rule_group_sequence"/>
+ </record>
+
+ <record model="ir.rule.group" id="rule_group_sequence_strict">
+ <field name="model" search="[('model', '=', 'ir.sequence.strict')]"/>
+ <field name="global_p" eval="True"/>
+ </record>
+ <record model="ir.rule" id="rule_sequence_strict1">
+ <field name="field" search="[('name', '=', 'company'), ('model.model', '=', 'ir.sequence.strict')]"/>
+ <field name="operator">=</field>
+ <field name="operand">User/Current Company</field>
+ <field name="rule_group" ref="rule_group_sequence_strict"/>
+ </record>
+ <record model="ir.rule" id="rule_sequence_strict2">
+ <field name="field" search="[('name', '=', 'company'), ('model.model', '=', 'ir.sequence.strict')]"/>
+ <field name="operator">=</field>
+ <field name="operand">False</field>
+ <field name="rule_group" ref="rule_group_sequence_strict"/>
+ </record>
+
<record model="ir.ui.view" id="company_config_init_view_form">
<field name="model">company.company.config.init</field>
<field name="type">form</field>
@@ -168,9 +295,9 @@ this repository contains the full copyright notices and license terms. -->
<![CDATA[
<form string="Create Company" col="2">
<image name="tryton-dialog-information"/>
- <group col="1">
+ <group col="1" id="labels">
<label string="You can now add your company into the system."
- align="0.0"/>
+ align="0.0" id="add"/>
</group>
</form>
]]>
@@ -184,29 +311,26 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="employee_view_form">
<field name="model">company.employee</field>
<field name="type">form</field>
+ <field name="inherit" ref="party.party_view_form"/>
<field name="arch" type="xml">
<![CDATA[
- <form string="Employee" col="6">
- <label name="name"/>
- <field name="name" xexpand="1"/>
- <label name="company"/>
- <field name="company"/>
- <label name="active"/>
- <field name="active" xexpand="0" width="100"/>
- <notebook colspan="6">
- <page string="General">
- <field name="addresses" mode="form,tree" colspan="4" width="600">
- <tree string="Addresses" sequence="sequence">
- <field name="sequence" tree_invisible="1"/>
- <field name="name"/>
- <field name="phone"/>
- <field name="email"/>
- <field name="active"/>
- </tree>
- </field>
- </page>
- </notebook>
- </form>
+ <data>
+ <xpath
+ expr="/form"
+ position="replace_attributes">
+ <form string="Employee"/>
+ </xpath>
+ <xpath
+ expr="/form/label[@name="code"]"
+ position="replace">
+ <label name="company"/>
+ </xpath>
+ <xpath
+ expr="/form/field[@name="code"]"
+ position="replace">
+ <field name="company"/>
+ </xpath>
+ </data>
]]>
</field>
</record>
@@ -217,7 +341,7 @@ this repository contains the full copyright notices and license terms. -->
<![CDATA[
<tree string="Employess">
<field name="name" select="1"/>
- <field name="company"/>
+ <field name="company" select="1"/>
</tree>
]]>
</field>
@@ -238,9 +362,25 @@ this repository contains the full copyright notices and license terms. -->
<field name="view" ref="employee_view_form"/>
<field name="act_window" ref="act_employee_form"/>
</record>
- <menuitem parent="menu_company_tree" action="act_employee_form"
+ <menuitem parent="party.menu_configuration" action="act_employee_form"
id="menu_employee_form"/>
+ <record model="ir.model.access" id="access_employee">
+ <field name="model" search="[('model', '=', 'company.employee')]"/>
+ <field name="perm_read" eval="True"/>
+ <field name="perm_write" eval="False"/>
+ <field name="perm_create" eval="False"/>
+ <field name="perm_delete" eval="False"/>
+ </record>
+ <record model="ir.model.access" id="access_employee_admin">
+ <field name="model" search="[('model', '=', 'company.employee')]"/>
+ <field name="group" ref="party.group_party_admin"/>
+ <field name="perm_read" eval="True"/>
+ <field name="perm_write" eval="True"/>
+ <field name="perm_create" eval="True"/>
+ <field name="perm_delete" eval="True"/>
+ </record>
+
<record model="ir.action.report" id="report_letter">
<field name="name">_Letter</field>
<field name="model">party.party</field>
diff --git a/cron.py b/cron.py
index 15d7053..4fabeaa 100644
--- a/cron.py
+++ b/cron.py
@@ -1,13 +1,12 @@
#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.osv import fields, OSV
+from trytond.model import ModelView, ModelSQL, fields
-class Cron(OSV):
+class Cron(ModelSQL, ModelView):
"Cron"
_name = "ir.cron"
- companies = fields.Many2Many(
- 'company.company', 'cron_company_rel', 'cron', 'company', 'Companies',
- help='Companies registered for this cron')
+ companies = fields.Many2Many('ir.cron-company.company', 'cron', 'company',
+ 'Companies', help='Companies registered for this cron')
def _callback(self, cursor, cron):
cursor.execute("SELECT company from cron_company_rel "
@@ -24,3 +23,15 @@ class Cron(OSV):
return company_obj.search(cursor, user, [], context=context)
Cron()
+
+
+class CronCompany(ModelSQL):
+ 'Cron - Company'
+ _name = 'ir.cron-company.company'
+ _table = 'cron_company_rel'
+ cron = fields.Many2One('ir.cron', 'Cron', ondelete='CASCADE',
+ required=True, select=1)
+ company = fields.Many2One('company.company', 'Company', ondelete='CASCADE',
+ required=True, select=1)
+
+CronCompany()
diff --git a/de_DE.csv b/de_DE.csv
index bd21ba5..ba08408 100644
--- a/de_DE.csv
+++ b/de_DE.csv
@@ -1,7 +1,7 @@
type,name,res_id,src,value,fuzzy
error,company.company,0,You can not create recursive companies!,Unternehmen können nicht rekursiv angelegt werden,0
error,res.user,0,You can not set a company that is not a child of your main company!,Das Unternehmen muss ein Tochterunternehmen (untergeordnet) des Hauptunternehmens sein,0
-field,"company.company,childs",0,Childs,Untergeordnet (Unternehmen),0
+field,"company.company,childs",0,Children,Untergeordnet (Unternehmen),0
field,"company.company,create_date",0,Creation date,Erstellungsdatum,0
field,"company.company,create_uid",0,Creation user,Ersteller,0
field,"company.company,currency",0,Currency,Währung,0
@@ -11,6 +11,7 @@ field,"company.company,header",0,Header,Dokumentenkopf,0
field,"company.company,id",0,ID,ID,0
field,"company.company,parent",0,Parent,Übergeordnet (Unternehmen),0
field,"company.company,party",0,Party,Partei,0
+field,"company.company,rec_name",0,Name,Name,0
field,"company.company,write_date",0,Last modification date,Zuletzt geändert am,0
field,"company.company,write_uid",0,Last modification by,Zuletzt geändert von,0
field,"company.employee,company",0,Company,Unternehmen,0
@@ -18,21 +19,34 @@ field,"company.employee,create_date",0,Creation date,Erstellungsdatum,0
field,"company.employee,create_uid",0,Creation user,Ersteller,0
field,"company.employee,id",0,ID,ID,0
field,"company.employee,party",0,Party,Partei,0
+field,"company.employee,rec_name",0,Name,Name,0
field,"company.employee,write_date",0,Last modification date,Zuletzt geändert am,0
field,"company.employee,write_uid",0,Last modification by,Zuletzt geändert von,0
field,"ir.cron,companies",0,Companies,Unternehmen,0
+field,"ir.cron-company.company,company",0,Company,Unternehmen,0
+field,"ir.cron-company.company,cron",0,Cron,Cron,0
+field,"ir.cron-company.company,rec_name",0,Name,Name,0
field,"ir.property,company",0,Company,Unternehmen,0
+field,"ir.sequence,company",0,Company,Unternehmen,0
+field,"ir.sequence.strict,company",0,Company,Unternehmen,0
+field,"res.user,companies",0,Current Companies,Aktuelle Unternehmen,0
field,"res.user,company",0,Current Company,Aktuelles Unternehmen,0
field,"res.user,employee",0,Employee,Mitarbeiter,0
field,"res.user,main_company",0,Main Company,Mutterbetrieb,0
help,"ir.cron,companies",0,Companies registered for this cron,"Unternehmen, für welche dieser Job durchgeführt werden soll",0
+model,"company.company.config.init,name",0,Company Config Init,Unternehmen Konfiguration Init,0
+model,"company.company,name",0,Company,Unternehmen,0
+model,"company.employee,name",0,Employee,Mitarbeiter,0
model,"ir.action,name",act_company_tree,Companies,Unternehmen,0
model,"ir.action,name",act_company_form,Companies,Unternehmen,0
+model,"ir.action,name",act_company_form2,Companies,Unternehmen,0
model,"ir.action,name",act_employee_form,Employees,Mitarbeiter,0
model,"ir.action,name",report_letter,_Letter,_Brief,0
+model,"ir.cron-company.company,name",0,ir.cron-company.company,ir.cron-company.company,0
model,"ir.ui.menu,name",menu_company_tree,Companies,Unternehmen,0
model,"ir.ui.menu,name",menu_company_form,Edit Companies,Unternehmen bearbeiten,0
model,"ir.ui.menu,name",menu_employee_form,Employees,Mitarbeiter,0
+model,"ir.ui.menu,name",menu_company_form2,New Company,Neues Unternehmen,0
odt,party.letter,0,"Best Regards,","Mit freundlichen Grüßen,",0
odt,party.letter,0,Date:,Datum:,0
odt,party.letter,0,"Dear Madams and Sirs,","Sehr geehrte Damen und Herren,",0
@@ -43,14 +57,18 @@ view,company.company,0,Addresses,Adressen,0
view,company.company,0,Companies,Unternehmen,0
view,company.company,0,Company,Unternehmen,0
view,company.company,0,Employees,Mitarbeiter,0
+view,company.company,0,_Employees,_Mitarbeiter,0
view,company.company,0,General,Allgemein,0
+view,company.company,0,_General,_Allgemein,0
view,company.company,0,Reports,Berichte,0
+view,company.company,0,_Reports,_Berichte,0
view,company.company.config.init,0,Create Company,Unternehmen anlegen,0
view,company.company.config.init,0,You can now add your company into the system.,Sie können nun Ihr Unternehmen dem System hinzufügen!,0
view,company.employee,0,Addresses,Adressen,0
view,company.employee,0,Employee,Mitarbeiter,0
view,company.employee,0,Employess,Mitarbeiter,0
view,company.employee,0,General,Allgemein,0
+view,company.employee,0,_General,_Allgemein,0
wizard_button,"company.company.config,company,add",0,Add,Hinzufügen,0
wizard_button,"company.company.config,company,end",0,Cancel,Abbrechen,0
wizard_button,"company.company.config,init,company",0,Ok,OK,0
diff --git a/es_ES.csv b/es_CO.csv
similarity index 76%
copy from es_ES.csv
copy to es_CO.csv
index 3cc0ee1..1532ff0 100644
--- a/es_ES.csv
+++ b/es_CO.csv
@@ -1,28 +1,41 @@
type,name,res_id,src,value,fuzzy
error,company.company,0,You can not create recursive companies!,No puede crear compañías recursivas!,0
error,res.user,0,You can not set a company that is not a child of your main company!,No puede establecer una compañía que no es hija de su compañía principal!,0
-field,"company.company,childs",0,Childs,Hij at s,0
+field,"company.company,childs",0,Children,Hij at s,0
field,"company.company,currency",0,Currency,Moneda,0
field,"company.company,employees",0,Employees,Empleados,0
field,"company.company,footer",0,Footer,Pie de página,0
field,"company.company,header",0,Header,Encabezado,0
field,"company.company,parent",0,Parent,Padre,0
field,"company.company,party",0,Party,Tercero,0
+field,"company.company,rec_name",0,Name,Nombre,0
field,"company.employee,company",0,Company,Compañía,0
field,"company.employee,party",0,Party,Tercero,0
+field,"company.employee,rec_name",0,Name,Nombre,0
field,"ir.cron,companies",0,Companies,Compañías,0
+field,"ir.cron-company.company,company",0,Company,Compañía,0
+field,"ir.cron-company.company,cron",0,Cron,Agendador,0
+field,"ir.cron-company.company,rec_name",0,Name,Nombre,0
field,"ir.property,company",0,Company,Compañía,0
+field,"ir.sequence,company",0,Company,Compañía,0
+field,"ir.sequence.strict,company",0,Company,Compañía,0
field,"res.user,company",0,Current Company,Compañía Actual,0
field,"res.user,employee",0,Employee,Empleado,0
field,"res.user,main_company",0,Main Company,Compañía Principal,0
help,"ir.cron,companies",0,Companies registered for this cron,Compañías registradas para este lanzador,0
+model,"company.company.config.init,name",0,Company Config Init,Configuración inicial de Compañía,0
+model,"company.company,name",0,Company,Compañía,0
+model,"company.employee,name",0,Employee,Empleado,0
model,"ir.action,name",act_company_tree,Companies,Compañías,0
model,"ir.action,name",act_company_form,Companies,Compañías,0
+model,"ir.action,name",act_company_form2,Companies,Compañías,0
model,"ir.action,name",act_employee_form,Employees,Empleados,0
model,"ir.action,name",report_letter,_Letter,_Carta,0
+model,"ir.cron-company.company,name",0,ir.cron-company.company,ir.cron-company.company,0
model,"ir.ui.menu,name",menu_company_tree,Companies,Compañías,0
model,"ir.ui.menu,name",menu_company_form,Edit Companies,Editar Compañías,0
model,"ir.ui.menu,name",menu_employee_form,Employees,Empleados,0
+model,"ir.ui.menu,name",menu_company_form2,New Company,Nueva Compañía,0
odt,party.letter,0,"Best Regards,","Atentamente,",0
odt,party.letter,0,Date:,Fecha:,0
odt,party.letter,0,"Dear Madams and Sirs,","Estimados Señoras y Señores,",0
diff --git a/es_ES.csv b/es_ES.csv
index 3cc0ee1..d5dc390 100644
--- a/es_ES.csv
+++ b/es_ES.csv
@@ -1,47 +1,61 @@
type,name,res_id,src,value,fuzzy
-error,company.company,0,You can not create recursive companies!,No puede crear compañías recursivas!,0
-error,res.user,0,You can not set a company that is not a child of your main company!,No puede establecer una compañía que no es hija de su compañía principal!,0
-field,"company.company,childs",0,Childs,Hij at s,0
-field,"company.company,currency",0,Currency,Moneda,0
+error,company.company,0,You can not create recursive companies!,No puede crear empresas recursivas,0
+error,res.user,0,You can not set a company that is not a child of your main company!,No puede establecer una empresa que no es hija de su empresa principal,0
+field,"company.company,childs",0,Children,Hijos,0
+field,"company.company,currency",0,Currency,Divisa,0
field,"company.company,employees",0,Employees,Empleados,0
field,"company.company,footer",0,Footer,Pie de página,0
field,"company.company,header",0,Header,Encabezado,0
field,"company.company,parent",0,Parent,Padre,0
field,"company.company,party",0,Party,Tercero,0
-field,"company.employee,company",0,Company,Compañía,0
+field,"company.company,rec_name",0,Name,Nombre del campo,1
+field,"company.employee,company",0,Company,Empresa,0
field,"company.employee,party",0,Party,Tercero,0
-field,"ir.cron,companies",0,Companies,Compañías,0
-field,"ir.property,company",0,Company,Compañía,0
-field,"res.user,company",0,Current Company,Compañía Actual,0
+field,"company.employee,rec_name",0,Name,Nombre del campo,1
+field,"ir.cron,companies",0,Companies,Empresas,0
+field,"ir.cron-company.company,company",0,Company,Empresa,1
+field,"ir.cron-company.company,cron",0,Cron,Cron,1
+field,"ir.cron-company.company,rec_name",0,Name,Nombre del campo,1
+field,"ir.property,company",0,Company,Empresa,0
+field,"ir.sequence,company",0,Company,Empresa,1
+field,"ir.sequence.strict,company",0,Company,Empresa,1
+field,"res.user,companies",0,Current Companies,,0
+field,"res.user,company",0,Current Company,Empresa actual,0
field,"res.user,employee",0,Employee,Empleado,0
-field,"res.user,main_company",0,Main Company,Compañía Principal,0
-help,"ir.cron,companies",0,Companies registered for this cron,Compañías registradas para este lanzador,0
-model,"ir.action,name",act_company_tree,Companies,Compañías,0
-model,"ir.action,name",act_company_form,Companies,Compañías,0
+field,"res.user,main_company",0,Main Company,Empresa principal,0
+help,"ir.cron,companies",0,Companies registered for this cron,Empresas registradas en este programador de tareas,0
+model,"company.company.config.init,name",0,Company Config Init,,0
+model,"company.company,name",0,Company,Empresa,1
+model,"company.employee,name",0,Employee,Empleado,1
+model,"ir.action,name",act_company_tree,Companies,Empresas,0
+model,"ir.action,name",act_company_form,Companies,Empresas,0
+model,"ir.action,name",act_company_form2,Companies,Empresas,1
model,"ir.action,name",act_employee_form,Employees,Empleados,0
model,"ir.action,name",report_letter,_Letter,_Carta,0
-model,"ir.ui.menu,name",menu_company_tree,Companies,Compañías,0
-model,"ir.ui.menu,name",menu_company_form,Edit Companies,Editar Compañías,0
+model,"ir.cron-company.company,name",0,ir.cron-company.company,,0
+model,"ir.ui.menu,name",menu_company_tree,Companies,Empresas,0
+model,"ir.ui.menu,name",menu_company_form,Edit Companies,Editar empresas,0
model,"ir.ui.menu,name",menu_employee_form,Employees,Empleados,0
+model,"ir.ui.menu,name",menu_company_form2,New Company,Nueva empresa,0
odt,party.letter,0,"Best Regards,","Atentamente,",0
odt,party.letter,0,Date:,Fecha:,0
-odt,party.letter,0,"Dear Madams and Sirs,","Estimados Señoras y Señores,",0
+odt,party.letter,0,"Dear Madams and Sirs,","Estimados señoras y señores,",0
odt,party.letter,0,E-Mail:,Correo electrónico:,0
odt,party.letter,0,Phone:,Teléfono:,0
-odt,party.letter,0,Subject:,Título:,0
+odt,party.letter,0,Subject:,Asunto:,0
view,company.company,0,Addresses,Direcciones,0
-view,company.company,0,Companies,Compañías,0
-view,company.company,0,Company,Compañía,0
+view,company.company,0,Companies,Empresas,0
+view,company.company,0,Company,Empresa,0
view,company.company,0,Employees,Empleados,0
view,company.company,0,General,General,0
-view,company.company,0,Reports,Reportes,0
-view,company.company.config.init,0,Create Company,Crear Compañía,0
-view,company.company.config.init,0,You can now add your company into the system.,Ahora puede añadir su compañía al sistema.,0
+view,company.company,0,Reports,Informes,0
+view,company.company.config.init,0,Create Company,Crear empresa,0
+view,company.company.config.init,0,You can now add your company into the system.,Ahora puede añadir su empresa al sistema.,0
view,company.employee,0,Addresses,Direcciones,0
view,company.employee,0,Employee,Empleado,0
view,company.employee,0,Employess,Empleados,0
view,company.employee,0,General,General,0
-wizard_button,"company.company.config,company,add",0,Add,Adicionar,0
+wizard_button,"company.company.config,company,add",0,Add,Añadir,0
wizard_button,"company.company.config,company,end",0,Cancel,Cancelar,0
wizard_button,"company.company.config,init,company",0,Ok,Aceptar,0
wizard_button,"company.company.config,init,end",0,Cancel,Cancelar,0
diff --git a/fr_FR.csv b/fr_FR.csv
index 9da10b9..79e9bc7 100644
--- a/fr_FR.csv
+++ b/fr_FR.csv
@@ -1,30 +1,56 @@
type,name,res_id,src,value,fuzzy
-error,company.company,0,You can not create recursive companies!,Vous ne pouvez pas créer des compagnies recursives !,0
-error,res.user,0,You can not set a company that is not a child of your main company!,Vous ne pouvez pas mettre une compagnie qui n'est pas une enfant de votre compagnie principale !,0
-field,"company.company,childs",0,Childs,Enfants,0
+error,company.company,0,You can not create recursive companies!,Vous ne pouvez pas créer des sociétés récursives !,0
+error,res.user,0,You can not set a company that is not a child of your main company!,Vous ne pouvez pas choisir une société qui n'est pas enfant de votre société principale !,0
+field,"company.company,childs",0,Children,Enfants,0
field,"company.company,currency",0,Currency,Devise,0
field,"company.company,employees",0,Employees,Employés,0
field,"company.company,footer",0,Footer,Pied de Page,0
field,"company.company,header",0,Header,Entête de Page,0
field,"company.company,parent",0,Parent,Parent,0
field,"company.company,party",0,Party,Tiers,0
-field,"company.employee,company",0,Company,Compagnie,0
+field,"company.company,rec_name",0,Name,Nom,0
+field,"company.employee,company",0,Company,Société,0
field,"company.employee,party",0,Party,Tiers,0
-field,"ir.property,company",0,Company,Compagnie,0
-field,"res.user,company",0,Current Company,Compagnie Courrante,0
+field,"company.employee,rec_name",0,Name,Nom,0
+field,"ir.cron,companies",0,Companies,Sociétés,0
+field,"ir.cron-company.company,company",0,Company,Société,0
+field,"ir.cron-company.company,cron",0,Cron,Cron,0
+field,"ir.cron-company.company,rec_name",0,Name,Nom,0
+field,"ir.property,company",0,Company,Société,0
+field,"ir.sequence,company",0,Company,Société,0
+field,"ir.sequence.strict,company",0,Company,Société,0
+field,"res.user,companies",0,Current Companies,Sociétés courantes,0
+field,"res.user,company",0,Current Company,Société courante,0
field,"res.user,employee",0,Employee,Employé,0
-field,"res.user,main_company",0,Main Company,Compagnie Principale,0
-model,"ir.ui.menu,name",menu_company_tree,Companies,Compagnies,0
-model,"ir.ui.menu,name",menu_company_form,Edit Companies,Éditer les Compagnies,0
+field,"res.user,main_company",0,Main Company,Société principale,0
+help,"ir.cron,companies",0,Companies registered for this cron,Sociétés enregistrées pour ce planificateur,0
+model,"company.company.config.init,name",0,Company Config Init,Société config - Init,0
+model,"company.company,name",0,Company,Société,0
+model,"company.employee,name",0,Employee,Employé,0
+model,"ir.action,name",act_company_tree,Companies,Sociétés,0
+model,"ir.action,name",act_company_form,Companies,Sociétés,0
+model,"ir.action,name",act_company_form2,Companies,Sociétés,0
+model,"ir.action,name",act_employee_form,Employees,Employés,0
+model,"ir.action,name",report_letter,_Letter,_Lettre,0
+model,"ir.cron-company.company,name",0,ir.cron-company.company,,0
+model,"ir.ui.menu,name",menu_company_tree,Companies,Sociétés,0
+model,"ir.ui.menu,name",menu_company_form,Edit Companies,Éditer les sociétés,0
model,"ir.ui.menu,name",menu_employee_form,Employees,Employés,0
+model,"ir.ui.menu,name",menu_company_form2,New Company,Nouvelle société,0
+odt,party.letter,0,"Best Regards,","Bien cordialement,",0
+odt,party.letter,0,Date:,Date :,0
+odt,party.letter,0,"Dear Madams and Sirs,","Chère madame, cher monsieur,",0
+odt,party.letter,0,E-Mail:,E-Mail :,0
+odt,party.letter,0,Phone:,Téléphone,0
+odt,party.letter,0,Subject:,Sujet :,0
view,company.company,0,Addresses,Adresses,0
-view,company.company,0,Companies,Compagnies,0
-view,company.company,0,Company,Compagnie,0
+view,company.company,0,Companies,Sociétés,0
+view,company.company,0,Company,Société,0
view,company.company,0,Employees,Employés,0
view,company.company,0,General,Général,0
view,company.company,0,Reports,Rapports,0
-view,company.company.config.init,0,Create Company,Créer un Compagnie,0
-view,company.company.config.init,0,You can now add your company into the system.,Vous pouvez maintenant ajouter votre companie dans le système.,0
+view,company.company.config.init,0,Create Company,Créer une société,0
+view,company.company.config.init,0,You can now add your company into the system.,Vous pouvez maintenant ajouter votre société dans le système.,0
view,company.employee,0,Addresses,Adresses,0
view,company.employee,0,Employee,Employé,0
view,company.employee,0,Employess,Employés,0
diff --git a/header_A4.odt b/header_A4.odt
index 3001f0b..32530b4 100644
Binary files a/header_A4.odt and b/header_A4.odt differ
diff --git a/letter.odt b/letter.odt
index af29e1f..9b38d1c 100644
Binary files a/letter.odt and b/letter.odt differ
diff --git a/tests/test_company.py b/tests/test_company.py
index 8a2a7eb..53d469b 100644
--- a/tests/test_company.py
+++ b/tests/test_company.py
@@ -1,5 +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.
import sys, os
DIR = os.path.abspath(os.path.normpath(os.path.join(__file__,
@@ -8,8 +9,8 @@ if os.path.isdir(DIR):
sys.path.insert(0, os.path.dirname(DIR))
import unittest
-import trytond.tests
-from trytond.tests import RPCProxy, CONTEXT, SOCK
+import trytond.tests.test_tryton
+from trytond.tests.test_tryton import RPCProxy, CONTEXT, SOCK
class CompanyTestCase(unittest.TestCase):
@@ -18,7 +19,7 @@ class CompanyTestCase(unittest.TestCase):
'''
def setUp(self):
- trytond.tests.install_module('company')
+ trytond.tests.test_tryton.install_module('company')
self.company = RPCProxy('company.company')
self.employee = RPCProxy('company.employee')
self.currency = RPCProxy('currency.currency')
@@ -78,7 +79,7 @@ def suite():
return unittest.TestLoader().loadTestsFromTestCase(CompanyTestCase)
if __name__ == '__main__':
- suiteTrytond = trytond.tests.suite()
+ suiteTrytond = trytond.tests.test_tryton.suite()
suiteCompany = suite()
alltests = unittest.TestSuite([suiteTrytond, suiteCompany])
unittest.TextTestRunner(verbosity=2).run(alltests)
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 0230e68..886fc44 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond-company
-Version: 1.0.3
+Version: 1.2.0
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,7 +12,7 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
-Download-URL: http://downloads.tryton.org/1.0/
+Download-URL: http://downloads.tryton.org/1.2/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff --git a/trytond_company.egg-info/SOURCES.txt b/trytond_company.egg-info/SOURCES.txt
index 5c36441..e4fa3bc 100644
--- a/trytond_company.egg-info/SOURCES.txt
+++ b/trytond_company.egg-info/SOURCES.txt
@@ -7,6 +7,7 @@ README
company.xml
cron.xml
de_DE.csv
+es_CO.csv
es_ES.csv
fr_FR.csv
header_A4.odt
diff --git a/trytond_company.egg-info/requires.txt b/trytond_company.egg-info/requires.txt
index 600b830..c9cb40c 100644
--- a/trytond_company.egg-info/requires.txt
+++ b/trytond_company.egg-info/requires.txt
@@ -1,4 +1,4 @@
trytond_party
trytond_currency
-trytond >= 1.0
-trytond < 1.1
\ No newline at end of file
+trytond >= 1.2
+trytond < 1.3
\ No newline at end of file
commit bc81278986489d08cc12cb53b6bc4cb68c207e6c
Author: Daniel Baumann <daniel at debian.org>
Date: Mon Mar 23 07:56:06 2009 +0100
Adding upstream version 1.0.3.
diff --git a/CHANGELOG b/CHANGELOG
index bf8a718..030425c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 1.0.3 - 2009-03-02
+* Some bug fixes (see mercurial logs for details)
+
Version 1.0.2 - 2009-01-06
* Some bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index 089e77f..c124e9a 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond_company
-Version: 1.0.2
+Version: 1.0.3
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
diff --git a/__tryton__.py b/__tryton__.py
index 0ea4675..6540542 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -5,7 +5,7 @@
'name_de_DE': 'Unternehmen',
'name_fr_FR': 'Compagnie',
'name_es_ES': 'Compañía',
- 'version': '1.0.2',
+ 'version': '1.0.3',
'author': 'B2CK',
'email': 'info at b2ck.com',
'website': 'http://www.tryton.org/',
diff --git a/company.py b/company.py
index f59f135..9c5668c 100644
--- a/company.py
+++ b/company.py
@@ -136,14 +136,18 @@ class Property(OSV):
company = fields.Many2One('company.company', 'Company')
def set(self, cursor, user_id, name, model, res_id, val, context=None):
+ if context is None:
+ context = {}
+ ctx = context.copy()
+ ctx['user'] = user_id
res = super(Property, self).set(cursor, user_id, name, model, res_id, val,
context=context)
if res and user_id:
user_obj = self.pool.get('res.user')
user = user_obj.browse(cursor, user_id, user_id, context=context)
- self.write(cursor, user_id, res, {
+ self.write(cursor, 0, res, {
'company': user.company.id,
- }, context=context)
+ }, context=ctx)
return res
Property()
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 012e6d8..0230e68 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond-company
-Version: 1.0.2
+Version: 1.0.3
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
commit c9f20fc608855c5b4e2726bd4b5bb61aafdac7c0
Author: Daniel Baumann <daniel at debian.org>
Date: Mon Mar 23 07:01:36 2009 +0100
Adding upstream version 1.0.2.
diff --git a/CHANGELOG b/CHANGELOG
index 9801fce..bf8a718 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 1.0.2 - 2009-01-06
+* Some bug fixes (see mercurial logs for details)
+
Version 1.0.1 - 2008-12-01
* Allow egg installation
diff --git a/PKG-INFO b/PKG-INFO
index c2eed02..089e77f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond_company
-Version: 1.0.1
+Version: 1.0.2
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
diff --git a/__tryton__.py b/__tryton__.py
index d29d794..0ea4675 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -5,7 +5,7 @@
'name_de_DE': 'Unternehmen',
'name_fr_FR': 'Compagnie',
'name_es_ES': 'Compañía',
- 'version': '1.0.1',
+ 'version': '1.0.2',
'author': 'B2CK',
'email': 'info at b2ck.com',
'website': 'http://www.tryton.org/',
diff --git a/header_A4.odt b/header_A4.odt
index 9d63e13..3001f0b 100644
Binary files a/header_A4.odt and b/header_A4.odt differ
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index f90d179..012e6d8 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond-company
-Version: 1.0.1
+Version: 1.0.2
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
commit 50907fa0d69c18232e10f96c0450e22c55b16263
Author: Daniel Baumann <daniel at debian.org>
Date: Wed Jan 28 14:07:32 2009 +0100
Adding upstream version 1.0.1.
diff --git a/CHANGELOG b/CHANGELOG
index eacaaef..9801fce 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,2 +1,5 @@
+Version 1.0.1 - 2008-12-01
+* Allow egg installation
+
Version 1.0.0 - 2008-11-17
* Initial release
diff --git a/PKG-INFO b/PKG-INFO
index f737e67..c2eed02 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond_company
-Version: 1.0.0
+Version: 1.0.1
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,6 +12,7 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
+Download-URL: http://downloads.tryton.org/1.0/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff --git a/__tryton__.py b/__tryton__.py
index 853f52b..d29d794 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -5,7 +5,7 @@
'name_de_DE': 'Unternehmen',
'name_fr_FR': 'Compagnie',
'name_es_ES': 'Compañía',
- 'version': '1.0.0',
+ 'version': '1.0.1',
'author': 'B2CK',
'email': 'info at b2ck.com',
'website': 'http://www.tryton.org/',
diff --git a/setup.py b/setup.py
index c67c87a..6590ace 100644
--- a/setup.py
+++ b/setup.py
@@ -27,6 +27,8 @@ setup(name='trytond_company',
author=info.get('author', ''),
author_email=info.get('email', ''),
url=info.get('website', ''),
+ download_url="http://downloads.tryton.org/" + \
+ info.get('version', '0.0.1').rsplit('.', 1)[0] + '/',
package_dir={'trytond.modules.company': '.'},
packages=[
'trytond.modules.company',
@@ -54,4 +56,9 @@ setup(name='trytond_company',
],
license='GPL-3',
install_requires=requires,
+ zip_safe=False,
+ entry_points="""
+ [trytond.modules]
+ company = trytond.modules.company
+ """,
)
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
index 6671f74..f90d179 100644
--- a/trytond_company.egg-info/PKG-INFO
+++ b/trytond_company.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: trytond-company
-Version: 1.0.0
+Version: 1.0.1
Summary: Define company and employee.
Add main and current company on users preferences.
Add company on properties.
@@ -12,6 +12,7 @@ Home-page: http://www.tryton.org/
Author: B2CK
Author-email: info at b2ck.com
License: GPL-3
+Download-URL: http://downloads.tryton.org/1.0/
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff --git a/trytond_company.egg-info/SOURCES.txt b/trytond_company.egg-info/SOURCES.txt
index d55e67b..5c36441 100644
--- a/trytond_company.egg-info/SOURCES.txt
+++ b/trytond_company.egg-info/SOURCES.txt
@@ -21,5 +21,7 @@ tests/test_company.py
trytond_company.egg-info/PKG-INFO
trytond_company.egg-info/SOURCES.txt
trytond_company.egg-info/dependency_links.txt
+trytond_company.egg-info/entry_points.txt
+trytond_company.egg-info/not-zip-safe
trytond_company.egg-info/requires.txt
trytond_company.egg-info/top_level.txt
\ No newline at end of file
diff --git a/trytond_company.egg-info/entry_points.txt b/trytond_company.egg-info/entry_points.txt
new file mode 100644
index 0000000..bcbe7d5
--- /dev/null
+++ b/trytond_company.egg-info/entry_points.txt
@@ -0,0 +1,4 @@
+
+ [trytond.modules]
+ company = trytond.modules.company
+
\ No newline at end of file
diff --git a/trytond_company.egg-info/not-zip-safe b/trytond_company.egg-info/not-zip-safe
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/trytond_company.egg-info/not-zip-safe
@@ -0,0 +1 @@
+
commit 21861367f4303b36173459e7b41b8c73cee948dc
Author: Daniel Baumann <daniel at debian.org>
Date: Tue Nov 18 13:05:54 2008 +0100
Adding upstream version 1.0.0.
diff --git a/CHANGELOG b/CHANGELOG
new file mode 100644
index 0000000..eacaaef
--- /dev/null
+++ b/CHANGELOG
@@ -0,0 +1,2 @@
+Version 1.0.0 - 2008-11-17
+* Initial release
diff --git a/COPYRIGHT b/COPYRIGHT
new file mode 100644
index 0000000..313ec81
--- /dev/null
+++ b/COPYRIGHT
@@ -0,0 +1,16 @@
+Copyright (C) 2008 Cédric Krier.
+Copyright (C) 2008 Bertrand Chenal.
+Copyright (C) 2008 B2CK SPRL.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU 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 General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..7a03d71
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,31 @@
+Installing trytond_company
+==========================
+
+Prerequisites
+-------------
+
+ * Python 2.4 or later (http://www.python.org/)
+ * trytond 0.0.x (http://www.tryton.org/)
+ * trytond_party (http://www.tryton.org/)
+ * trytond_currency (http://www.tryton.org/)
+
+Installation
+------------
+
+Once you've downloaded and unpacked a trytond_company source release, enter the
+directory where the archive was unpacked, and run:
+
+ python setup.py install
+
+Note that you may need administrator/root privileges for this step, as
+this command will by default attempt to install module to the Python
+site-packages directory on your system.
+
+For advanced options, please refer to the easy_install and/or the distutils
+documentation:
+
+ http://peak.telecommunity.com/DevCenter/EasyInstall
+ http://docs.python.org/inst/inst.html
+
+To use without installation, extract the archive into ``trytond/modules`` with
+the directory name company.
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..c61b52d
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,10 @@
+include INSTALL
+include README
+include TODO
+include COPYRIGHT
+include CHANGELOG
+include LICENSE
+include *.xml
+include *.odt
+include *.csv
+include tests/*
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..f737e67
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,30 @@
+Metadata-Version: 1.0
+Name: trytond_company
+Version: 1.0.0
+Summary: Define company and employee.
+Add main and current company on users preferences.
+Add company on properties.
+Define new report parser for report with company header.
+Add letter template on party.
+Make the scheduler run on each companies.
+
+Home-page: http://www.tryton.org/
+Author: B2CK
+Author-email: info at b2ck.com
+License: GPL-3
+Description: UNKNOWN
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Plugins
+Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: Financial and Insurance Industry
+Classifier: Intended Audience :: Legal Industry
+Classifier: Intended Audience :: Manufacturing
+Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: Natural Language :: English
+Classifier: Natural Language :: French
+Classifier: Natural Language :: German
+Classifier: Natural Language :: Spanish
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Topic :: Office/Business
diff --git a/README b/README
new file mode 100644
index 0000000..d5d8f6a
--- /dev/null
+++ b/README
@@ -0,0 +1,36 @@
+trytond_company
+===============
+
+The company module of the Tryton application platform.
+See __tryton__.py
+
+Installing
+----------
+
+See INSTALL
+
+Support
+-------
+
+If you encounter any problems with Tryton, please don't hesitate to ask
+questions on the Tryton bug tracker, mailing list, wiki or IRC channel:
+
+ http://bugs.tryton.org/
+ http://groups.tryton.org/
+ http://wiki.tryton.org/
+ irc://irc.freenode.net/tryton
+
+License
+-------
+
+See LICENSE
+
+Copyright
+---------
+
+See COPYRIGHT
+
+
+For more information please visit the Tryton web site:
+
+ http://www.tryton.org/
diff --git a/__init__.py b/__init__.py
new file mode 100644
index 0000000..df31a3b
--- /dev/null
+++ b/__init__.py
@@ -0,0 +1,4 @@
+#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 company import *
+from cron import *
diff --git a/__tryton__.py b/__tryton__.py
new file mode 100644
index 0000000..853f52b
--- /dev/null
+++ b/__tryton__.py
@@ -0,0 +1,55 @@
+#This file is part of Tryton. The COPYRIGHT file at the top level of
+#this repository contains the full copyright notices and license terms.
+{
+ 'name': 'Company',
+ 'name_de_DE': 'Unternehmen',
+ 'name_fr_FR': 'Compagnie',
+ 'name_es_ES': 'Compañía',
+ 'version': '1.0.0',
+ 'author': 'B2CK',
+ 'email': 'info at b2ck.com',
+ 'website': 'http://www.tryton.org/',
+ 'description': '''Define company and employee.
+Add main and current company on users preferences.
+Add company on properties.
+Define new report parser for report with company header.
+Add letter template on party.
+Make the scheduler run on each companies.
+''',
+ 'description_de_DE': ''' - Ermöglicht die Eingabe von Umternehmen und Mitarbeitern.
+ - Fügt Haupt- und aktuelles Unternehmen zu den Benutzereinstellungen hinzu.
+ - Fügt das Unternehmen den Eigenschaften hinzu.
+ - Ermöglicht die Definition eines neuen Berichtsanalysierers mit Unternehmen im Berichtskopf.
+ - Fügt den Kontakten die Berichtsvorlage für Briefe hinzu.
+ - Initialisiert die Aufgaben des Zeitplaners für jedes Unternehmen.
+''',
+ 'description_fr_FR': '''Defini compagnie et employé.
+Ajoute les compagnies principale et courante dans les préférences de l'utilisateur.
+Ajoute la compagnie sur les propriétés.
+Défini un nouveau moteur de rapport gérant une entête par compagnie.
+Ajoute un canva de lettre par tiers.
+Lance les planificateurs sur chaque compagnie.
+''',
+ 'description_es_ES': ''' - Define compañía y empleados.
+ - Añade compañía principal y predeterminada de acuerdo a preferencia de usuarios.
+ - Añade compañía a las propiedades.
+ - Define un nuevo reporteador para los encabezados de los reportes por compañía.
+ - Añade plantilla de carta a un tercero.
+ - Se ejecuta el agendador por compañía.
+''',
+ 'depends': [
+ 'ir',
+ 'res',
+ 'party',
+ 'currency',
+ ],
+ 'xml': [
+ 'company.xml',
+ 'cron.xml',
+ ],
+ 'translation': [
+ 'fr_FR.csv',
+ 'de_DE.csv',
+ 'es_ES.csv',
+ ]
+}
diff --git a/company.py b/company.py
new file mode 100644
index 0000000..f59f135
--- /dev/null
+++ b/company.py
@@ -0,0 +1,242 @@
+#This file is part of Tryton. The COPYRIGHT file at the top level of
+#this repository contains the full copyright notices and license terms.
+"Company"
+
+import copy
+from trytond.osv import fields, OSV
+from trytond.wizard import Wizard, WizardOSV
+from trytond.report import Report
+
+
+class Company(OSV):
+ 'Company'
+ _name = 'company.company'
+ _description = __doc__
+ _inherits = {'party.party': 'party'}
+
+ party = fields.Many2One('party.party', 'Party', required=True,
+ ondelete='CASCADE')
+ parent = fields.Many2One('company.company', 'Parent')
+ childs = fields.One2Many('company.company', 'parent', 'Childs')
+ header = fields.Text('Header')
+ footer = fields.Text('Footer')
+ currency = fields.Many2One('currency.currency', 'Currency', required=True)
+ employees = fields.One2Many('company.employee', 'company', 'Employees')
+
+ def __init__(self):
+ super(Company, self).__init__()
+ self._constraints += [
+ ('check_recursion', 'recursive_companies'),
+ ]
+ self._error_messages.update({
+ 'recursive_companies': 'You can not create recursive companies!',
+ })
+
+ def write(self, cursor, user, ids, vals, context=None):
+ res = super(Company, self).write(cursor, user, ids, vals,
+ context=context)
+ # Restart the cache on the domain_get method
+ self.pool.get('ir.rule').domain_get(cursor.dbname)
+ return res
+
+Company()
+
+
+class Employee(OSV):
+ 'Employee'
+ _name = 'company.employee'
+ _description = __doc__
+ _inherits = {'party.party': 'party'}
+
+ party = fields.Many2One('party.party', 'Party', required=True)
+ company = fields.Many2One('company.company', 'Company', required=True)
+
+Employee()
+
+
+class User(OSV):
+ _name = 'res.user'
+ main_company = fields.Many2One('company.company', 'Main Company',
+ on_change=['main_company'])
+ company = fields.Many2One('company.company', 'Current Company',
+ domain="[('parent', 'child_of', [main_company], 'parent')]")
+ employee = fields.Many2One('company.employee', 'Employee',
+ domain="[('company', 'child_of', [main_company], 'parent')]")
+
+ def __init__(self):
+ super(User, self).__init__()
+ self._context_fields.insert(0, 'company')
+ self._constraints += [
+ ('check_company', 'child_company'),
+ ]
+ self._error_messages.update({
+ 'child_company': 'You can not set a company that is not ' \
+ 'a child of your main company!',
+ })
+
+ def get_status_bar(self, cursor, user_id, ids, name, arg, context=None):
+ res = super(User, self).get_status_bar(cursor, user_id, ids, name, arg,
+ context=context)
+ for user in self.browse(cursor, user_id, ids, context=context):
+ if user.company:
+ res[user.id] += ' ' + user.company.name
+ return res
+
+ def on_change_main_company(self, cursor, user, ids, vals, context=None):
+ return {'company': vals.get('main_company', False)}
+
+ def check_company(self, cursor, user_id, ids):
+ company_obj = self.pool.get('company.company')
+ for user in self.browse(cursor, user_id, ids):
+ if user.main_company:
+ companies = company_obj.search(cursor, user_id, [
+ ('parent', 'child_of', [user.main_company.id]),
+ ])
+ if user.company.id and (user.company.id not in companies):
+ return False
+ elif user.company:
+ return False
+ return True
+
+ def get_preferences(self, cursor, user_id, context_only=False, context=None):
+ res = super(User, self).get_preferences(cursor, user_id,
+ context_only=context_only, context=context)
+ user = self.browse(cursor, 0, user_id, context=context)
+ if not context_only:
+ res['main_company'] = user.main_company.id
+ if user.employee:
+ res['employee'] = user.employee.id
+ return res
+
+ def get_preferences_fields_view(self, cursor, user_id, context=None):
+ company_obj = self.pool.get('company.company')
+
+ user = self.browse(cursor, user_id, user_id, context=context)
+
+ res = super(User, self).get_preferences_fields_view(cursor, user_id,
+ context=context)
+ fields = self.fields_get(cursor, user_id, fields_names=['main_company'],
+ context=context)
+ res['fields'].update(fields)
+
+ company = res['fields']['company']
+ company['type'] = 'selection'
+ del company['relation']
+ company['selection'] = company_obj.name_search(cursor, user_id, args=[
+ ('parent', 'child_of', [user.main_company.id]),
+ ], context=context)
+
+ return res
+
+User()
+
+
+class Property(OSV):
+ _name = 'ir.property'
+ company = fields.Many2One('company.company', 'Company')
+
+ def set(self, cursor, user_id, name, model, res_id, val, context=None):
+ res = super(Property, self).set(cursor, user_id, name, model, res_id, val,
+ context=context)
+ if res and user_id:
+ user_obj = self.pool.get('res.user')
+ user = user_obj.browse(cursor, user_id, user_id, context=context)
+ self.write(cursor, user_id, res, {
+ 'company': user.company.id,
+ }, context=context)
+ return res
+
+Property()
+
+
+class CompanyConfigInit(WizardOSV):
+ _name = 'company.company.config.init'
+
+CompanyConfigInit()
+
+
+class CompanyConfig(Wizard):
+ 'Configure companies'
+ _name = 'company.company.config'
+ states = {
+ 'init': {
+ 'result': {
+ 'type': 'form',
+ 'object': 'company.company.config.init',
+ 'state': [
+ ('end', 'Cancel', 'tryton-cancel'),
+ ('company', 'Ok', 'tryton-ok', True),
+ ],
+ },
+ },
+ 'company': {
+ 'result': {
+ 'type': 'form',
+ 'object': 'company.company',
+ 'state': [
+ ('end', 'Cancel', 'tryton-cancel'),
+ ('add', 'Add', 'tryton-ok', True),
+ ],
+ },
+ },
+ 'add': {
+ 'result': {
+ 'type': 'action',
+ 'action': '_add',
+ 'state': 'end',
+ },
+ },
+ }
+
+ def _add(self, cursor, user, data, context=None):
+ company_obj = self.pool.get('company.company')
+ user_obj = self.pool.get('res.user')
+
+ company_id = company_obj.create(cursor, user, data['form'],
+ context=context)
+ user_ids = user_obj.search(cursor, user, [
+ ('main_company', '=', False),
+ ], context=context)
+ user_obj.write(cursor, user, user_ids, {
+ 'main_company': company_id,
+ 'company': company_id,
+ }, context=context)
+ return {}
+
+CompanyConfig()
+
+
+class CompanyReport(Report):
+
+ def parse(self, cursor, user_id, report, objects, datas, context):
+ user_obj = self.pool.get('res.user')
+
+ user = user_obj.browse(cursor, user_id, user_id, context)
+ if context is None:
+ context = {}
+ context = context.copy()
+ context['company'] = user.company
+
+ return super(CompanyReport, self).parse(cursor, user_id, report,
+ objects, datas, context)
+
+import trytond.report
+trytond.report.CompanyReport = CompanyReport
+
+
+class LetterReport(CompanyReport):
+ _name = 'party.letter'
+
+ def parse(self, cursor, user_id, report, objects, datas, context):
+ user_obj = self.pool.get('res.user')
+
+ user = user_obj.browse(cursor, user_id, user_id, context)
+ if context is None:
+ context = {}
+ context = context.copy()
+ context['user'] = user
+
+ return super(LetterReport, self).parse(cursor, user_id, report,
+ objects, datas, context)
+
+LetterReport()
diff --git a/company.xml b/company.xml
new file mode 100644
index 0000000..920628c
--- /dev/null
+++ b/company.xml
@@ -0,0 +1,257 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<tryton>
+ <data>
+ <record model="ir.ui.view" id="company_view_form">
+ <field name="model">company.company</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <![CDATA[
+ <form string="Company">
+ <label name="name"/>
+ <field name="name" colspan="3"/>
+ <label name="parent"/>
+ <field name="parent"/>
+ <label name="currency"/>
+ <field name="currency"/>
+ <label name="vat_country"/>
+ <field name="vat_country"/>
+ <label name="vat_number"/>
+ <field name="vat_number"/>
+ <notebook colspan="4">
+ <page string="General">
+ <field name="addresses" mode="form,tree" colspan="4" width="600">
+ <tree string="Addresses" sequence="sequence">
+ <field name="sequence" tree_invisible="1"/>
+ <field name="name"/>
+ <field name="phone"/>
+ <field name="email"/>
+ <field name="active"/>
+ </tree>
+ </field>
+ </page>
+ <page string="Employees" col="1">
+ <separator name="employees"/>
+ <field name="employees"/>
+ </page>
+ <page string="Reports" col="1">
+ <separator name="header"/>
+ <field name="header"/>
+ <separator name="footer"/>
+ <field name="footer"/>
+ </page>
+ </notebook>
+ </form>
+ ]]>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="company_view_tree">
+ <field name="model">company.company</field>
+ <field name="type">tree</field>
+ <field name="field_childs">childs</field>
+ <field name="arch" type="xml">
+ <![CDATA[
+ <tree string="Companies">
+ <field name="name" select="1"/>
+ <field name="currency" select="1"/>
+ </tree>
+ ]]>
+ </field>
+ </record>
+ <record model="ir.action.act_window" id="act_company_tree">
+ <field name="name">Companies</field>
+ <field name="res_model">company.company</field>
+ <field name="view_type">tree</field>
+ <field name="domain">[('parent', '=', False)]</field>
+ </record>
+ <record model="ir.action.act_window.view"
+ id="act_company_tree_view1">
+ <field name="sequence" eval="1"/>
+ <field name="view" ref="company_view_tree"/>
+ <field name="act_window" ref="act_company_tree"/>
+ </record>
+ <menuitem parent="party.menu_party" action="act_company_tree"
+ id="menu_company_tree"/>
+ <record model="ir.action.act_window" id="act_company_form">
+ <field name="name">Companies</field>
+ <field name="res_model">company.company</field>
+ <field name="view_type">form</field>
+ </record>
+ <record model="ir.action.act_window.view"
+ id="act_company_form_view1">
+ <field name="sequence" eval="1"/>
+ <field name="view" ref="company_view_tree"/>
+ <field name="act_window" ref="act_company_form"/>
+ </record>
+ <record model="ir.action.act_window.view"
+ id="act_company_form_view2">
+ <field name="sequence" eval="2"/>
+ <field name="view" ref="company_view_form"/>
+ <field name="act_window" ref="act_company_form"/>
+ </record>
+ <menuitem parent="menu_company_tree" action="act_company_form"
+ id="menu_company_form" name="Edit Companies"/>
+ <record model="ir.ui.view" id="user_view_form">
+ <field name="model">res.user</field>
+ <field name="inherit" ref="res.user_view_form"/>
+ <field name="arch" type="xml">
+ <![CDATA[
+ <data>
+ <xpath
+ expr="/form/notebook/page/separator[@name="signature"]"
+ position="before">
+ <label name="main_company"/>
+ <field name="main_company"/>
+ <label name="company"/>
+ <field name="company"/>
+ <label name="employee"/>
+ <field name="employee"/>
+ </xpath>
+ </data>
+ ]]>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="property_view_form">
+ <field name="model">ir.property</field>
+ <field name="inherit" ref="ir.property_view_form"/>
+ <field name="arch" type="xml">
+ <![CDATA[
+ <data>
+ <xpath
+ expr="/form/field[@name="name"]"
+ position="after">
+ <label name="company"/>
+ <field name="company" colspan="3"/>
+ </xpath>
+ </data>
+ ]]>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="property_view_tree">
+ <field name="model">ir.property</field>
+ <field name="inherit" ref="ir.property_view_tree"/>
+ <field name="arch" type="xml">
+ <![CDATA[
+ <data>
+ <xpath
+ expr="/tree/field[@name="name"]"
+ position="after">
+ <field name="company" select="1"/>
+ </xpath>
+ </data>
+ ]]>
+ </field>
+ </record>
+
+ <record model="ir.rule.group" id="rule_group_property">
+ <field name="model" search="[('model', '=', 'ir.property')]"/>
+ <field name="global_p" eval="True"/>
+ </record>
+ <record model="ir.rule" id="rule_property1">
+ <field name="field" search="[('name', '=', 'company'), ('model.model', '=', 'ir.property')]"/>
+ <field name="operator">=</field>
+ <field name="operand">User/Current Company</field>
+ <field name="rule_group" ref="rule_group_property"/>
+ </record>
+ <record model="ir.rule" id="rule_property2">
+ <field name="field" search="[('name', '=', 'company'), ('model.model', '=', 'ir.property')]"/>
+ <field name="operator">=</field>
+ <field name="operand">False</field>
+ <field name="rule_group" ref="rule_group_property"/>
+ </record>
+
+ <record model="ir.ui.view" id="company_config_init_view_form">
+ <field name="model">company.company.config.init</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <![CDATA[
+ <form string="Create Company" col="2">
+ <image name="tryton-dialog-information"/>
+ <group col="1">
+ <label string="You can now add your company into the system."
+ align="0.0"/>
+ </group>
+ </form>
+ ]]>
+ </field>
+ </record>
+ <record model="ir.module.module.config_wizard.item"
+ id="config_wizard_item_company">
+ <field name="name">company.company.config</field>
+ </record>
+
+ <record model="ir.ui.view" id="employee_view_form">
+ <field name="model">company.employee</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <![CDATA[
+ <form string="Employee" col="6">
+ <label name="name"/>
+ <field name="name" xexpand="1"/>
+ <label name="company"/>
+ <field name="company"/>
+ <label name="active"/>
+ <field name="active" xexpand="0" width="100"/>
+ <notebook colspan="6">
+ <page string="General">
+ <field name="addresses" mode="form,tree" colspan="4" width="600">
+ <tree string="Addresses" sequence="sequence">
+ <field name="sequence" tree_invisible="1"/>
+ <field name="name"/>
+ <field name="phone"/>
+ <field name="email"/>
+ <field name="active"/>
+ </tree>
+ </field>
+ </page>
+ </notebook>
+ </form>
+ ]]>
+ </field>
+ </record>
+ <record model="ir.ui.view" id="employee_view_tree">
+ <field name="model">company.employee</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <![CDATA[
+ <tree string="Employess">
+ <field name="name" select="1"/>
+ <field name="company"/>
+ </tree>
+ ]]>
+ </field>
+ </record>
+
+ <record model="ir.action.act_window" id="act_employee_form">
+ <field name="name">Employees</field>
+ <field name="res_model">company.employee</field>
+ <field name="view_type">form</field>
+ </record>
+ <record model="ir.action.act_window.view" id="act_employee_form_view1">
+ <field name="sequence" eval="10"/>
+ <field name="view" ref="employee_view_tree"/>
+ <field name="act_window" ref="act_employee_form"/>
+ </record>
+ <record model="ir.action.act_window.view" id="act_employee_form_view2">
+ <field name="sequence" eval="20"/>
+ <field name="view" ref="employee_view_form"/>
+ <field name="act_window" ref="act_employee_form"/>
+ </record>
+ <menuitem parent="menu_company_tree" action="act_employee_form"
+ id="menu_employee_form"/>
+
+ <record model="ir.action.report" id="report_letter">
+ <field name="name">_Letter</field>
+ <field name="model">party.party</field>
+ <field name="report_name">party.letter</field>
+ <field name="report">company/letter.odt</field>
+ <field name="style">company/header_A4.odt</field>
+ </record>
+ <record model="ir.action.keyword" id="report_letter_party">
+ <field name="keyword">form_print</field>
+ <field name="model">party.party,0</field>
+ <field name="action" ref="report_letter"/>
+ </record>
+ </data>
+</tryton>
diff --git a/cron.py b/cron.py
new file mode 100644
index 0000000..15d7053
--- /dev/null
+++ b/cron.py
@@ -0,0 +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.
+from trytond.osv import fields, OSV
+
+class Cron(OSV):
+ "Cron"
+ _name = "ir.cron"
+ companies = fields.Many2Many(
+ 'company.company', 'cron_company_rel', 'cron', 'company', 'Companies',
+ help='Companies registered for this cron')
+
+ def _callback(self, cursor, cron):
+ cursor.execute("SELECT company from cron_company_rel "
+ "WHERE cron = %s", (cron['id'],))
+ for company, in cursor.fetchall():
+ cursor.execute("UPDATE res_user SET company = %s, main_company = %s "
+ "WHERE id = %s", (company, company, cron['user']))
+ super(Cron, self)._callback(cursor, cron)
+ cursor.execute("UPDATE res_user SET company = NULL, main_company = NULL "
+ "WHERE id = %s", (cron['user'],))
+
+ def default_companies(self, cursor, user, context=None):
+ company_obj = self.pool.get('company.company')
+ return company_obj.search(cursor, user, [], context=context)
+
+Cron()
diff --git a/cron.xml b/cron.xml
new file mode 100644
index 0000000..f735baa
--- /dev/null
+++ b/cron.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton. The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. -->
+<tryton>
+ <data>
+
+ <record model="ir.ui.view" id="cron_view_form">
+ <field name="model">ir.cron</field>
+ <field name="inherit" ref="ir.cron_view_form"/>
+ <field name="arch" type="xml">
+ <![CDATA[
+ <data>
+ <xpath
+ expr="/form/field[@name="args"]"
+ position="after">
+ <separator name="companies" colspan="6"/>
+ <field name="companies" colspan="6"/>
+ </xpath>
+ </data>
+ ]]>
+ </field>
+ </record>
+ </data>
+</tryton>
diff --git a/de_DE.csv b/de_DE.csv
new file mode 100644
index 0000000..bd21ba5
--- /dev/null
+++ b/de_DE.csv
@@ -0,0 +1,57 @@
+type,name,res_id,src,value,fuzzy
+error,company.company,0,You can not create recursive companies!,Unternehmen können nicht rekursiv angelegt werden,0
+error,res.user,0,You can not set a company that is not a child of your main company!,Das Unternehmen muss ein Tochterunternehmen (untergeordnet) des Hauptunternehmens sein,0
+field,"company.company,childs",0,Childs,Untergeordnet (Unternehmen),0
+field,"company.company,create_date",0,Creation date,Erstellungsdatum,0
+field,"company.company,create_uid",0,Creation user,Ersteller,0
+field,"company.company,currency",0,Currency,Währung,0
+field,"company.company,employees",0,Employees,Mitarbeiter,0
+field,"company.company,footer",0,Footer,Dokumentenfuß,0
+field,"company.company,header",0,Header,Dokumentenkopf,0
+field,"company.company,id",0,ID,ID,0
+field,"company.company,parent",0,Parent,Übergeordnet (Unternehmen),0
+field,"company.company,party",0,Party,Partei,0
+field,"company.company,write_date",0,Last modification date,Zuletzt geändert am,0
+field,"company.company,write_uid",0,Last modification by,Zuletzt geändert von,0
+field,"company.employee,company",0,Company,Unternehmen,0
+field,"company.employee,create_date",0,Creation date,Erstellungsdatum,0
+field,"company.employee,create_uid",0,Creation user,Ersteller,0
+field,"company.employee,id",0,ID,ID,0
+field,"company.employee,party",0,Party,Partei,0
+field,"company.employee,write_date",0,Last modification date,Zuletzt geändert am,0
+field,"company.employee,write_uid",0,Last modification by,Zuletzt geändert von,0
+field,"ir.cron,companies",0,Companies,Unternehmen,0
+field,"ir.property,company",0,Company,Unternehmen,0
+field,"res.user,company",0,Current Company,Aktuelles Unternehmen,0
+field,"res.user,employee",0,Employee,Mitarbeiter,0
+field,"res.user,main_company",0,Main Company,Mutterbetrieb,0
+help,"ir.cron,companies",0,Companies registered for this cron,"Unternehmen, für welche dieser Job durchgeführt werden soll",0
+model,"ir.action,name",act_company_tree,Companies,Unternehmen,0
+model,"ir.action,name",act_company_form,Companies,Unternehmen,0
+model,"ir.action,name",act_employee_form,Employees,Mitarbeiter,0
+model,"ir.action,name",report_letter,_Letter,_Brief,0
+model,"ir.ui.menu,name",menu_company_tree,Companies,Unternehmen,0
+model,"ir.ui.menu,name",menu_company_form,Edit Companies,Unternehmen bearbeiten,0
+model,"ir.ui.menu,name",menu_employee_form,Employees,Mitarbeiter,0
+odt,party.letter,0,"Best Regards,","Mit freundlichen Grüßen,",0
+odt,party.letter,0,Date:,Datum:,0
+odt,party.letter,0,"Dear Madams and Sirs,","Sehr geehrte Damen und Herren,",0
+odt,party.letter,0,E-Mail:,E-Mail:,0
+odt,party.letter,0,Phone:,Telefon:,0
+odt,party.letter,0,Subject:,Betreff:,0
+view,company.company,0,Addresses,Adressen,0
+view,company.company,0,Companies,Unternehmen,0
+view,company.company,0,Company,Unternehmen,0
+view,company.company,0,Employees,Mitarbeiter,0
+view,company.company,0,General,Allgemein,0
+view,company.company,0,Reports,Berichte,0
+view,company.company.config.init,0,Create Company,Unternehmen anlegen,0
+view,company.company.config.init,0,You can now add your company into the system.,Sie können nun Ihr Unternehmen dem System hinzufügen!,0
+view,company.employee,0,Addresses,Adressen,0
+view,company.employee,0,Employee,Mitarbeiter,0
+view,company.employee,0,Employess,Mitarbeiter,0
+view,company.employee,0,General,Allgemein,0
+wizard_button,"company.company.config,company,add",0,Add,Hinzufügen,0
+wizard_button,"company.company.config,company,end",0,Cancel,Abbrechen,0
+wizard_button,"company.company.config,init,company",0,Ok,OK,0
+wizard_button,"company.company.config,init,end",0,Cancel,Abbrechen,0
diff --git a/es_ES.csv b/es_ES.csv
new file mode 100644
index 0000000..3cc0ee1
--- /dev/null
+++ b/es_ES.csv
@@ -0,0 +1,47 @@
+type,name,res_id,src,value,fuzzy
+error,company.company,0,You can not create recursive companies!,No puede crear compañías recursivas!,0
+error,res.user,0,You can not set a company that is not a child of your main company!,No puede establecer una compañía que no es hija de su compañía principal!,0
+field,"company.company,childs",0,Childs,Hij at s,0
+field,"company.company,currency",0,Currency,Moneda,0
+field,"company.company,employees",0,Employees,Empleados,0
+field,"company.company,footer",0,Footer,Pie de página,0
+field,"company.company,header",0,Header,Encabezado,0
+field,"company.company,parent",0,Parent,Padre,0
+field,"company.company,party",0,Party,Tercero,0
+field,"company.employee,company",0,Company,Compañía,0
+field,"company.employee,party",0,Party,Tercero,0
+field,"ir.cron,companies",0,Companies,Compañías,0
+field,"ir.property,company",0,Company,Compañía,0
+field,"res.user,company",0,Current Company,Compañía Actual,0
+field,"res.user,employee",0,Employee,Empleado,0
+field,"res.user,main_company",0,Main Company,Compañía Principal,0
+help,"ir.cron,companies",0,Companies registered for this cron,Compañías registradas para este lanzador,0
+model,"ir.action,name",act_company_tree,Companies,Compañías,0
+model,"ir.action,name",act_company_form,Companies,Compañías,0
+model,"ir.action,name",act_employee_form,Employees,Empleados,0
+model,"ir.action,name",report_letter,_Letter,_Carta,0
+model,"ir.ui.menu,name",menu_company_tree,Companies,Compañías,0
+model,"ir.ui.menu,name",menu_company_form,Edit Companies,Editar Compañías,0
+model,"ir.ui.menu,name",menu_employee_form,Employees,Empleados,0
+odt,party.letter,0,"Best Regards,","Atentamente,",0
+odt,party.letter,0,Date:,Fecha:,0
+odt,party.letter,0,"Dear Madams and Sirs,","Estimados Señoras y Señores,",0
+odt,party.letter,0,E-Mail:,Correo electrónico:,0
+odt,party.letter,0,Phone:,Teléfono:,0
+odt,party.letter,0,Subject:,Título:,0
+view,company.company,0,Addresses,Direcciones,0
+view,company.company,0,Companies,Compañías,0
+view,company.company,0,Company,Compañía,0
+view,company.company,0,Employees,Empleados,0
+view,company.company,0,General,General,0
+view,company.company,0,Reports,Reportes,0
+view,company.company.config.init,0,Create Company,Crear Compañía,0
+view,company.company.config.init,0,You can now add your company into the system.,Ahora puede añadir su compañía al sistema.,0
+view,company.employee,0,Addresses,Direcciones,0
+view,company.employee,0,Employee,Empleado,0
+view,company.employee,0,Employess,Empleados,0
+view,company.employee,0,General,General,0
+wizard_button,"company.company.config,company,add",0,Add,Adicionar,0
+wizard_button,"company.company.config,company,end",0,Cancel,Cancelar,0
+wizard_button,"company.company.config,init,company",0,Ok,Aceptar,0
+wizard_button,"company.company.config,init,end",0,Cancel,Cancelar,0
diff --git a/fr_FR.csv b/fr_FR.csv
new file mode 100644
index 0000000..9da10b9
--- /dev/null
+++ b/fr_FR.csv
@@ -0,0 +1,35 @@
+type,name,res_id,src,value,fuzzy
+error,company.company,0,You can not create recursive companies!,Vous ne pouvez pas créer des compagnies recursives !,0
+error,res.user,0,You can not set a company that is not a child of your main company!,Vous ne pouvez pas mettre une compagnie qui n'est pas une enfant de votre compagnie principale !,0
+field,"company.company,childs",0,Childs,Enfants,0
+field,"company.company,currency",0,Currency,Devise,0
+field,"company.company,employees",0,Employees,Employés,0
+field,"company.company,footer",0,Footer,Pied de Page,0
+field,"company.company,header",0,Header,Entête de Page,0
+field,"company.company,parent",0,Parent,Parent,0
+field,"company.company,party",0,Party,Tiers,0
+field,"company.employee,company",0,Company,Compagnie,0
+field,"company.employee,party",0,Party,Tiers,0
+field,"ir.property,company",0,Company,Compagnie,0
+field,"res.user,company",0,Current Company,Compagnie Courrante,0
+field,"res.user,employee",0,Employee,Employé,0
+field,"res.user,main_company",0,Main Company,Compagnie Principale,0
+model,"ir.ui.menu,name",menu_company_tree,Companies,Compagnies,0
+model,"ir.ui.menu,name",menu_company_form,Edit Companies,Éditer les Compagnies,0
+model,"ir.ui.menu,name",menu_employee_form,Employees,Employés,0
+view,company.company,0,Addresses,Adresses,0
+view,company.company,0,Companies,Compagnies,0
+view,company.company,0,Company,Compagnie,0
+view,company.company,0,Employees,Employés,0
+view,company.company,0,General,Général,0
+view,company.company,0,Reports,Rapports,0
+view,company.company.config.init,0,Create Company,Créer un Compagnie,0
+view,company.company.config.init,0,You can now add your company into the system.,Vous pouvez maintenant ajouter votre companie dans le système.,0
+view,company.employee,0,Addresses,Adresses,0
+view,company.employee,0,Employee,Employé,0
+view,company.employee,0,Employess,Employés,0
+view,company.employee,0,General,Général,0
+wizard_button,"company.company.config,company,add",0,Add,Ajouter,0
+wizard_button,"company.company.config,company,end",0,Cancel,Annuler,0
+wizard_button,"company.company.config,init,company",0,Ok,Ok,0
+wizard_button,"company.company.config,init,end",0,Cancel,Annuler,0
diff --git a/header_A4.odt b/header_A4.odt
new file mode 100644
index 0000000..9d63e13
Binary files /dev/null and b/header_A4.odt differ
diff --git a/letter.odt b/letter.odt
new file mode 100644
index 0000000..af29e1f
Binary files /dev/null and b/letter.odt differ
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..861a9f5
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,5 @@
+[egg_info]
+tag_build =
+tag_date = 0
+tag_svn_revision = 0
+
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..c67c87a
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,57 @@
+#!/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.
+
+from setuptools import setup, find_packages
+import re
+
+info = eval(file('__tryton__.py').read())
+
+requires = []
+for dep in info.get('depends', []):
+ match = re.compile(
+ '(ir|res|workflow|webdav)((\s|$|<|>|<=|>=|==|!=).*?$)').match(dep)
+ if match:
+ continue
+ else:
+ dep = 'trytond_' + dep
+ requires.append(dep)
+
+major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
+requires.append('trytond >= %s.%s' % (major_version, minor_version))
+requires.append('trytond < %s.%s' % (major_version, str(int(minor_version) + 1)))
+
+setup(name='trytond_company',
+ version=info.get('version', '0.0.1'),
+ description=info.get('description', ''),
+ author=info.get('author', ''),
+ author_email=info.get('email', ''),
+ url=info.get('website', ''),
+ package_dir={'trytond.modules.company': '.'},
+ packages=[
+ 'trytond.modules.company',
+ ],
+ package_data={
+ 'trytond.modules.company': info.get('xml', []) \
+ + info.get('translation', []) \
+ + ['header_A4.odt', 'letter.odt'],
+ },
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Plugins',
+ 'Intended Audience :: Developers',
+ 'Intended Audience :: Financial and Insurance Industry',
+ 'Intended Audience :: Legal Industry',
+ 'Intended Audience :: Manufacturing',
+ 'License :: OSI Approved :: GNU General Public License (GPL)',
+ 'Natural Language :: English',
+ 'Natural Language :: French',
+ 'Natural Language :: German',
+ 'Natural Language :: Spanish',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ 'Topic :: Office/Business',
+ ],
+ license='GPL-3',
+ install_requires=requires,
+)
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000..9d3ed87
--- /dev/null
+++ b/tests/__init__.py
@@ -0,0 +1,3 @@
+#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 *
diff --git a/tests/test_company.py b/tests/test_company.py
new file mode 100644
index 0000000..8a2a7eb
--- /dev/null
+++ b/tests/test_company.py
@@ -0,0 +1,85 @@
+#!/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.
+
+import sys, os
+DIR = os.path.abspath(os.path.normpath(os.path.join(__file__,
+ '..', '..', '..', '..', '..', 'trytond')))
+if os.path.isdir(DIR):
+ sys.path.insert(0, os.path.dirname(DIR))
+
+import unittest
+import trytond.tests
+from trytond.tests import RPCProxy, CONTEXT, SOCK
+
+
+class CompanyTestCase(unittest.TestCase):
+ '''
+ Test Company module.
+ '''
+
+ def setUp(self):
+ trytond.tests.install_module('company')
+ self.company = RPCProxy('company.company')
+ self.employee = RPCProxy('company.employee')
+ self.currency = RPCProxy('currency.currency')
+
+ def test0010company(self):
+ '''
+ Create company.
+ '''
+ currency1_id = self.currency.search([
+ ('code', '=', 'EUR'),
+ ], 0, 1, None, CONTEXT)[0]
+
+ company1_id = self.company.create({
+ 'name': 'B2CK',
+ 'currency': currency1_id,
+ }, CONTEXT)
+ self.assert_(company1_id)
+
+ def test0020company_recursion(self):
+ '''
+ Test company recursion.
+ '''
+ currency1_id = self.currency.search([
+ ('code', '=', 'EUR'),
+ ], 0, 1, None, CONTEXT)[0]
+
+ company1_id = self.company.search([
+ ('name', '=', 'B2CK'),
+ ], 0, 1, None, CONTEXT)[0]
+
+ company2_id = self.company.create({
+ 'name': 'B2CK Branch',
+ 'parent': company1_id,
+ 'currency': currency1_id,
+ }, CONTEXT)
+ self.assert_(company2_id)
+
+ self.failUnlessRaises(Exception, self.company.write,
+ company1_id, {
+ 'parent': company2_id,
+ }, CONTEXT)
+
+ def test0030employe(self):
+ '''
+ Create employee.
+ '''
+ company1_id = self.company.search([
+ ('name', '=', 'B2CK'),
+ ], 0, 1, None, CONTEXT)[0]
+
+ employee1_id = self.employee.create({
+ 'name': 'Employee1',
+ 'company': company1_id,
+ }, CONTEXT)
+
+def suite():
+ return unittest.TestLoader().loadTestsFromTestCase(CompanyTestCase)
+
+if __name__ == '__main__':
+ suiteTrytond = trytond.tests.suite()
+ suiteCompany = suite()
+ alltests = unittest.TestSuite([suiteTrytond, suiteCompany])
+ unittest.TextTestRunner(verbosity=2).run(alltests)
+ SOCK.disconnect()
diff --git a/trytond_company.egg-info/PKG-INFO b/trytond_company.egg-info/PKG-INFO
new file mode 100644
index 0000000..6671f74
--- /dev/null
+++ b/trytond_company.egg-info/PKG-INFO
@@ -0,0 +1,30 @@
+Metadata-Version: 1.0
+Name: trytond-company
+Version: 1.0.0
+Summary: Define company and employee.
+Add main and current company on users preferences.
+Add company on properties.
+Define new report parser for report with company header.
+Add letter template on party.
+Make the scheduler run on each companies.
+
+Home-page: http://www.tryton.org/
+Author: B2CK
+Author-email: info at b2ck.com
+License: GPL-3
+Description: UNKNOWN
+Platform: UNKNOWN
+Classifier: Development Status :: 5 - Production/Stable
+Classifier: Environment :: Plugins
+Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: Financial and Insurance Industry
+Classifier: Intended Audience :: Legal Industry
+Classifier: Intended Audience :: Manufacturing
+Classifier: License :: OSI Approved :: GNU General Public License (GPL)
+Classifier: Natural Language :: English
+Classifier: Natural Language :: French
+Classifier: Natural Language :: German
+Classifier: Natural Language :: Spanish
+Classifier: Operating System :: OS Independent
+Classifier: Programming Language :: Python
+Classifier: Topic :: Office/Business
diff --git a/trytond_company.egg-info/SOURCES.txt b/trytond_company.egg-info/SOURCES.txt
new file mode 100644
index 0000000..d55e67b
--- /dev/null
+++ b/trytond_company.egg-info/SOURCES.txt
@@ -0,0 +1,25 @@
+CHANGELOG
+COPYRIGHT
+INSTALL
+LICENSE
+MANIFEST.in
+README
+company.xml
+cron.xml
+de_DE.csv
+es_ES.csv
+fr_FR.csv
+header_A4.odt
+letter.odt
+setup.py
+./__init__.py
+./__tryton__.py
+./company.py
+./cron.py
+tests/__init__.py
+tests/test_company.py
+trytond_company.egg-info/PKG-INFO
+trytond_company.egg-info/SOURCES.txt
+trytond_company.egg-info/dependency_links.txt
+trytond_company.egg-info/requires.txt
+trytond_company.egg-info/top_level.txt
\ No newline at end of file
diff --git a/trytond_company.egg-info/dependency_links.txt b/trytond_company.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/trytond_company.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/trytond_company.egg-info/requires.txt b/trytond_company.egg-info/requires.txt
new file mode 100644
index 0000000..600b830
--- /dev/null
+++ b/trytond_company.egg-info/requires.txt
@@ -0,0 +1,4 @@
+trytond_party
+trytond_currency
+trytond >= 1.0
+trytond < 1.1
\ No newline at end of file
diff --git a/trytond_company.egg-info/top_level.txt b/trytond_company.egg-info/top_level.txt
new file mode 100644
index 0000000..93df119
--- /dev/null
+++ b/trytond_company.egg-info/top_level.txt
@@ -0,0 +1 @@
+trytond
--
tryton-modules-company
More information about the tryton-debian-vcs
mailing list