[tryton-debian-vcs] tryton-modules-project-revenue branch upstream updated. upstream/2.8.0-1-g6522cd8

git repository hosting tryton-debian-vcs at m9s.biz
Mon Nov 25 19:36:40 UTC 2013


The following commit has been merged in the upstream branch:
http://debian.tryton.org/gitweb/?p=packages/tryton-modules-project-revenue.git;a=commitdiff;h=upstream/2.8.0-1-g6522cd8

commit 6522cd8eca1eaa2a1ab52f4863ec2bd8116c3d66
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Nov 24 17:27:50 2013 +0100

    Adding upstream version 3.0.0.

diff --git a/CHANGELOG b/CHANGELOG
index ef04e90..e1758e6 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/INSTALL b/INSTALL
index 0b61f09..f9df19b 100644
--- a/INSTALL
+++ b/INSTALL
@@ -8,6 +8,7 @@ Prerequisites
  * trytond (http://www.tryton.org/)
  * trytond_project (http://www.tryton.org/)
  * trytond_timesheet (http://www.tryton.org/)
+ * trytond_timesheet_cost (http://www.tryton.org/)
  * trytond_company (http://www.tryton.org/)
  * trytond_product (http://www.tryton.org/)
 
diff --git a/PKG-INFO b/PKG-INFO
index 9a033cc..3f5f925 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_project_revenue
-Version: 2.8.0
+Version: 3.0.0
 Summary: Tryton module to add cost/revenue on project
 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_project_revenue
         =======================
         
@@ -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/__init__.py b/__init__.py
index ec6eaf4..587601f 100644
--- a/__init__.py
+++ b/__init__.py
@@ -2,14 +2,10 @@
 #this repository contains the full copyright notices and license terms.
 
 from trytond.pool import Pool
-from .service import *
 from .work import *
 
 
 def register():
     Pool.register(
-        Employee,
-        EmployeeCostPrice,
-        TimesheetLine,
         Work,
         module='project_revenue', type_='model')
diff --git a/locale/bg_BG.po b/locale/bg_BG.po
index d2818a5..27cdbeb 100644
--- a/locale/bg_BG.po
+++ b/locale/bg_BG.po
@@ -2,62 +2,6 @@
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
-msgctxt "error:company.employee_cost_price:"
-msgid "A employee can only have one cost price by date."
-msgstr ""
-
-msgctxt "field:company.employee,cost_price:"
-msgid "Cost Price"
-msgstr "Фабрична цена"
-
-msgctxt "field:company.employee,cost_prices:"
-msgid "Cost Prices"
-msgstr "Себестойност"
-
-msgctxt "field:company.employee,currency_digits:"
-msgid "Currency Digits"
-msgstr "Цифри за валута"
-
-msgctxt "field:company.employee_cost_price,cost_price:"
-msgid "Cost Price"
-msgstr "Фабрична цена"
-
-msgctxt "field:company.employee_cost_price,create_date:"
-msgid "Create Date"
-msgstr "Създадено на"
-
-msgctxt "field:company.employee_cost_price,create_uid:"
-msgid "Create User"
-msgstr "Създадено от"
-
-msgctxt "field:company.employee_cost_price,currency_digits:"
-msgid "Currency Digits"
-msgstr "Цифри за валута"
-
-msgctxt "field:company.employee_cost_price,date:"
-msgid "Date"
-msgstr "Дата"
-
-msgctxt "field:company.employee_cost_price,employee:"
-msgid "Employee"
-msgstr "Служител"
-
-msgctxt "field:company.employee_cost_price,id:"
-msgid "ID"
-msgstr "ID"
-
-msgctxt "field:company.employee_cost_price,rec_name:"
-msgid "Name"
-msgstr "Име"
-
-msgctxt "field:company.employee_cost_price,write_date:"
-msgid "Write Date"
-msgstr "Променено на"
-
-msgctxt "field:company.employee_cost_price,write_uid:"
-msgid "Write User"
-msgstr "Променено от"
-
 msgctxt "field:project.work,cost:"
 msgid "Cost"
 msgstr "Разход"
@@ -78,30 +22,6 @@ msgctxt "field:project.work,revenue:"
 msgid "Revenue"
 msgstr "Приход"
 
-msgctxt "help:company.employee,cost_price:"
-msgid "Hourly cost price for this Employee"
-msgstr "Себестойност за час за този служител"
-
-msgctxt "help:company.employee,cost_prices:"
-msgid "List of hourly cost price over time"
-msgstr "Списък на себестойност за час през времето"
-
-msgctxt "help:company.employee_cost_price,cost_price:"
-msgid "Hourly cost price"
-msgstr "Себестойност за час"
-
-msgctxt "model:company.employee_cost_price,name:"
-msgid "Employee Cost Price"
-msgstr "Себестойност на клиент"
-
-msgctxt "view:company.employee:"
-msgid "Cost"
-msgstr "Разход"
-
-msgctxt "view:company.employee_cost_price:"
-msgid "Cost Prices"
-msgstr "Себестойност"
-
 msgctxt "view:project.work:"
 msgid "Cost"
 msgstr "Разход"
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index ee83412..5264e89 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -2,62 +2,6 @@
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
-msgctxt "error:company.employee_cost_price:"
-msgid "A employee can only have one cost price by date."
-msgstr "Un empleat només pot tenir un preu de cost per data."
-
-msgctxt "field:company.employee,cost_price:"
-msgid "Cost Price"
-msgstr "Preu de cost"
-
-msgctxt "field:company.employee,cost_prices:"
-msgid "Cost Prices"
-msgstr "Preus de cost"
-
-msgctxt "field:company.employee,currency_digits:"
-msgid "Currency Digits"
-msgstr "Decimals de la moneda"
-
-msgctxt "field:company.employee_cost_price,cost_price:"
-msgid "Cost Price"
-msgstr "Preu de cost"
-
-msgctxt "field:company.employee_cost_price,create_date:"
-msgid "Create Date"
-msgstr "Data creació"
-
-msgctxt "field:company.employee_cost_price,create_uid:"
-msgid "Create User"
-msgstr "Usuari creació"
-
-msgctxt "field:company.employee_cost_price,currency_digits:"
-msgid "Currency Digits"
-msgstr "Decimals de la moneda"
-
-msgctxt "field:company.employee_cost_price,date:"
-msgid "Date"
-msgstr "Data"
-
-msgctxt "field:company.employee_cost_price,employee:"
-msgid "Employee"
-msgstr "Empleat"
-
-msgctxt "field:company.employee_cost_price,id:"
-msgid "ID"
-msgstr "ID"
-
-msgctxt "field:company.employee_cost_price,rec_name:"
-msgid "Name"
-msgstr "Nom"
-
-msgctxt "field:company.employee_cost_price,write_date:"
-msgid "Write Date"
-msgstr "Data modificació"
-
-msgctxt "field:company.employee_cost_price,write_uid:"
-msgid "Write User"
-msgstr "Usuari modificació"
-
 msgctxt "field:project.work,cost:"
 msgid "Cost"
 msgstr "Cost"
@@ -78,30 +22,6 @@ msgctxt "field:project.work,revenue:"
 msgid "Revenue"
 msgstr "Benefici"
 
-msgctxt "help:company.employee,cost_price:"
-msgid "Hourly cost price for this Employee"
-msgstr "Preu de cost per hora per a aquest empleat"
-
-msgctxt "help:company.employee,cost_prices:"
-msgid "List of hourly cost price over time"
-msgstr "Llista de preu de cost per hora a través del temps"
-
-msgctxt "help:company.employee_cost_price,cost_price:"
-msgid "Hourly cost price"
-msgstr "Preu de cost per hora"
-
-msgctxt "model:company.employee_cost_price,name:"
-msgid "Employee Cost Price"
-msgstr "Preu de cost de l'empleat"
-
-msgctxt "view:company.employee:"
-msgid "Cost"
-msgstr "Cost"
-
-msgctxt "view:company.employee_cost_price:"
-msgid "Cost Prices"
-msgstr "Preus de cost"
-
 msgctxt "view:project.work:"
 msgid "Cost"
 msgstr "Cost"
diff --git a/locale/cs_CZ.po b/locale/cs_CZ.po
index 69b56c6..bfce1c1 100644
--- a/locale/cs_CZ.po
+++ b/locale/cs_CZ.po
@@ -2,62 +2,6 @@
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
-msgctxt "error:company.employee_cost_price:"
-msgid "A employee can only have one cost price by date."
-msgstr ""
-
-msgctxt "field:company.employee,cost_price:"
-msgid "Cost Price"
-msgstr ""
-
-msgctxt "field:company.employee,cost_prices:"
-msgid "Cost Prices"
-msgstr ""
-
-msgctxt "field:company.employee,currency_digits:"
-msgid "Currency Digits"
-msgstr ""
-
-msgctxt "field:company.employee_cost_price,cost_price:"
-msgid "Cost Price"
-msgstr ""
-
-msgctxt "field:company.employee_cost_price,create_date:"
-msgid "Create Date"
-msgstr ""
-
-msgctxt "field:company.employee_cost_price,create_uid:"
-msgid "Create User"
-msgstr ""
-
-msgctxt "field:company.employee_cost_price,currency_digits:"
-msgid "Currency Digits"
-msgstr ""
-
-msgctxt "field:company.employee_cost_price,date:"
-msgid "Date"
-msgstr ""
-
-msgctxt "field:company.employee_cost_price,employee:"
-msgid "Employee"
-msgstr ""
-
-msgctxt "field:company.employee_cost_price,id:"
-msgid "ID"
-msgstr ""
-
-msgctxt "field:company.employee_cost_price,rec_name:"
-msgid "Name"
-msgstr ""
-
-msgctxt "field:company.employee_cost_price,write_date:"
-msgid "Write Date"
-msgstr ""
-
-msgctxt "field:company.employee_cost_price,write_uid:"
-msgid "Write User"
-msgstr ""
-
 msgctxt "field:project.work,cost:"
 msgid "Cost"
 msgstr ""
@@ -77,27 +21,3 @@ msgstr ""
 msgctxt "field:project.work,revenue:"
 msgid "Revenue"
 msgstr ""
-
-msgctxt "help:company.employee,cost_price:"
-msgid "Hourly cost price for this Employee"
-msgstr ""
-
-msgctxt "help:company.employee,cost_prices:"
-msgid "List of hourly cost price over time"
-msgstr ""
-
-msgctxt "help:company.employee_cost_price,cost_price:"
-msgid "Hourly cost price"
-msgstr ""
-
-msgctxt "model:company.employee_cost_price,name:"
-msgid "Employee Cost Price"
-msgstr ""
-
-msgctxt "view:company.employee:"
-msgid "Cost"
-msgstr ""
-
-msgctxt "view:company.employee_cost_price:"
-msgid "Cost Prices"
-msgstr ""
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 1d38158..4227c32 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -2,64 +2,6 @@
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
-msgctxt "error:company.employee_cost_price:"
-msgid "A employee can only have one cost price by date."
-msgstr ""
-"Es kann nur ein Kostenpreis pro Datum für einen Mitarbeiter eingetragen "
-"werden."
-
-msgctxt "field:company.employee,cost_price:"
-msgid "Cost Price"
-msgstr "Kostenpreis"
-
-msgctxt "field:company.employee,cost_prices:"
-msgid "Cost Prices"
-msgstr "Kostenpreise"
-
-msgctxt "field:company.employee,currency_digits:"
-msgid "Currency Digits"
-msgstr "Währung (signifikante Stellen)"
-
-msgctxt "field:company.employee_cost_price,cost_price:"
-msgid "Cost Price"
-msgstr "Einkaufspreis"
-
-msgctxt "field:company.employee_cost_price,create_date:"
-msgid "Create Date"
-msgstr "Erstellungsdatum"
-
-msgctxt "field:company.employee_cost_price,create_uid:"
-msgid "Create User"
-msgstr "Erstellt durch"
-
-msgctxt "field:company.employee_cost_price,currency_digits:"
-msgid "Currency Digits"
-msgstr "Währung (signifikante Stellen)"
-
-msgctxt "field:company.employee_cost_price,date:"
-msgid "Date"
-msgstr "Datum"
-
-msgctxt "field:company.employee_cost_price,employee:"
-msgid "Employee"
-msgstr "Mitarbeiter"
-
-msgctxt "field:company.employee_cost_price,id:"
-msgid "ID"
-msgstr "ID"
-
-msgctxt "field:company.employee_cost_price,rec_name:"
-msgid "Name"
-msgstr "Name"
-
-msgctxt "field:company.employee_cost_price,write_date:"
-msgid "Write Date"
-msgstr "Zuletzt geändert"
-
-msgctxt "field:company.employee_cost_price,write_uid:"
-msgid "Write User"
-msgstr "Letzte Änderung durch"
-
 msgctxt "field:project.work,cost:"
 msgid "Cost"
 msgstr "Kosten"
@@ -80,30 +22,6 @@ msgctxt "field:project.work,revenue:"
 msgid "Revenue"
 msgstr "Ertrag"
 
-msgctxt "help:company.employee,cost_price:"
-msgid "Hourly cost price for this Employee"
-msgstr "Kostenpreis pro Stunde für diesen Mitarbeiter"
-
-msgctxt "help:company.employee,cost_prices:"
-msgid "List of hourly cost price over time"
-msgstr "Liste der Kostenpreise pro Stunde über die Zeit"
-
-msgctxt "help:company.employee_cost_price,cost_price:"
-msgid "Hourly cost price"
-msgstr "Kostenpreis pro Stunde"
-
-msgctxt "model:company.employee_cost_price,name:"
-msgid "Employee Cost Price"
-msgstr "Mitarbeiter Kostenpreis"
-
-msgctxt "view:company.employee:"
-msgid "Cost"
-msgstr "Kosten"
-
-msgctxt "view:company.employee_cost_price:"
-msgid "Cost Prices"
-msgstr "Kostenpreise"
-
 msgctxt "view:project.work:"
 msgid "Cost"
 msgstr "Kosten"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index 47ecc1f..f9c1549 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -2,69 +2,13 @@
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
-msgctxt "error:company.employee_cost_price:"
-msgid "A employee can only have one cost price by date."
-msgstr "Un empleado sólo puede disponer de un precio de costo por fecha."
-
-msgctxt "field:company.employee,cost_price:"
-msgid "Cost Price"
-msgstr "Precio de costo"
-
-msgctxt "field:company.employee,cost_prices:"
-msgid "Cost Prices"
-msgstr "Precios de costo"
-
-msgctxt "field:company.employee,currency_digits:"
-msgid "Currency Digits"
-msgstr "Dígitos de divisa"
-
-msgctxt "field:company.employee_cost_price,cost_price:"
-msgid "Cost Price"
-msgstr "Precio de costo"
-
-msgctxt "field:company.employee_cost_price,create_date:"
-msgid "Create Date"
-msgstr "Fecha creación"
-
-msgctxt "field:company.employee_cost_price,create_uid:"
-msgid "Create User"
-msgstr "Usuario creación"
-
-msgctxt "field:company.employee_cost_price,currency_digits:"
-msgid "Currency Digits"
-msgstr "Dígitos de divisa"
-
-msgctxt "field:company.employee_cost_price,date:"
-msgid "Date"
-msgstr "Fecha"
-
-msgctxt "field:company.employee_cost_price,employee:"
-msgid "Employee"
-msgstr "Empleado"
-
-msgctxt "field:company.employee_cost_price,id:"
-msgid "ID"
-msgstr "ID"
-
-msgctxt "field:company.employee_cost_price,rec_name:"
-msgid "Name"
-msgstr "Nombre"
-
-msgctxt "field:company.employee_cost_price,write_date:"
-msgid "Write Date"
-msgstr "Fecha modificación"
-
-msgctxt "field:company.employee_cost_price,write_uid:"
-msgid "Write User"
-msgstr "Usuario modificación"
-
 msgctxt "field:project.work,cost:"
 msgid "Cost"
 msgstr "Costo"
 
 msgctxt "field:project.work,currency_digits:"
 msgid "Currency Digits"
-msgstr "Dígitos de divisa"
+msgstr "Dígitos de moneda"
 
 msgctxt "field:project.work,list_price:"
 msgid "List Price"
@@ -78,30 +22,6 @@ msgctxt "field:project.work,revenue:"
 msgid "Revenue"
 msgstr "Ingresos"
 
-msgctxt "help:company.employee,cost_price:"
-msgid "Hourly cost price for this Employee"
-msgstr "Precio de costo por hora para este empleado"
-
-msgctxt "help:company.employee,cost_prices:"
-msgid "List of hourly cost price over time"
-msgstr "Lista de precio de costo por hora a lo largo del tiempo"
-
-msgctxt "help:company.employee_cost_price,cost_price:"
-msgid "Hourly cost price"
-msgstr "Precio de costo por hora"
-
-msgctxt "model:company.employee_cost_price,name:"
-msgid "Employee Cost Price"
-msgstr "Precio de costo del empleado"
-
-msgctxt "view:company.employee:"
-msgid "Cost"
-msgstr "Costo"
-
-msgctxt "view:company.employee_cost_price:"
-msgid "Cost Prices"
-msgstr "Precios de costo"
-
 msgctxt "view:project.work:"
 msgid "Cost"
 msgstr "Costo"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index a7047eb..557d5bf 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -2,62 +2,6 @@
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
-msgctxt "error:company.employee_cost_price:"
-msgid "A employee can only have one cost price by date."
-msgstr ""
-
-msgctxt "field:company.employee,cost_price:"
-msgid "Cost Price"
-msgstr "Precio de Costo"
-
-msgctxt "field:company.employee,cost_prices:"
-msgid "Cost Prices"
-msgstr "Precios de Costo"
-
-msgctxt "field:company.employee,currency_digits:"
-msgid "Currency Digits"
-msgstr "Gestión de Moneda"
-
-msgctxt "field:company.employee_cost_price,cost_price:"
-msgid "Cost Price"
-msgstr "Precio de Costo"
-
-msgctxt "field:company.employee_cost_price,create_date:"
-msgid "Create Date"
-msgstr "Fecha de Creación"
-
-msgctxt "field:company.employee_cost_price,create_uid:"
-msgid "Create User"
-msgstr "Creado por Usuario"
-
-msgctxt "field:company.employee_cost_price,currency_digits:"
-msgid "Currency Digits"
-msgstr "Decimales de Moneda"
-
-msgctxt "field:company.employee_cost_price,date:"
-msgid "Date"
-msgstr "Fecha"
-
-msgctxt "field:company.employee_cost_price,employee:"
-msgid "Employee"
-msgstr "Empleado"
-
-msgctxt "field:company.employee_cost_price,id:"
-msgid "ID"
-msgstr "ID"
-
-msgctxt "field:company.employee_cost_price,rec_name:"
-msgid "Name"
-msgstr "Nombre de Contacto"
-
-msgctxt "field:company.employee_cost_price,write_date:"
-msgid "Write Date"
-msgstr "Fecha de Modificación"
-
-msgctxt "field:company.employee_cost_price,write_uid:"
-msgid "Write User"
-msgstr "Modificado por Usuario"
-
 msgctxt "field:project.work,cost:"
 msgid "Cost"
 msgstr "Costo"
@@ -68,40 +12,16 @@ msgstr "Decimales de Moneda"
 
 msgctxt "field:project.work,list_price:"
 msgid "List Price"
-msgstr "Precio de Lista"
+msgstr "Precio de Venta"
 
 msgctxt "field:project.work,product:"
 msgid "Product"
-msgstr "Productos"
+msgstr "Producto"
 
 msgctxt "field:project.work,revenue:"
 msgid "Revenue"
 msgstr "Ingresos"
 
-msgctxt "help:company.employee,cost_price:"
-msgid "Hourly cost price for this Employee"
-msgstr "Costo por hora del empleado"
-
-msgctxt "help:company.employee,cost_prices:"
-msgid "List of hourly cost price over time"
-msgstr "Lista de costo por hora de tiempo extra"
-
-msgctxt "help:company.employee_cost_price,cost_price:"
-msgid "Hourly cost price"
-msgstr "Costo por hora"
-
-msgctxt "model:company.employee_cost_price,name:"
-msgid "Employee Cost Price"
-msgstr "Costo por Empleado"
-
-msgctxt "view:company.employee:"
-msgid "Cost"
-msgstr "Costo"
-
-msgctxt "view:company.employee_cost_price:"
-msgid "Cost Prices"
-msgstr "Precio de Costo"
-
 msgctxt "view:project.work:"
 msgid "Cost"
 msgstr "Costo"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index a866d37..e2e2fa1 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -2,62 +2,6 @@
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
-msgctxt "error:company.employee_cost_price:"
-msgid "A employee can only have one cost price by date."
-msgstr "Un empleado sólo puede disponer de un precio de coste por fecha."
-
-msgctxt "field:company.employee,cost_price:"
-msgid "Cost Price"
-msgstr "Precio de coste"
-
-msgctxt "field:company.employee,cost_prices:"
-msgid "Cost Prices"
-msgstr "Precios de coste"
-
-msgctxt "field:company.employee,currency_digits:"
-msgid "Currency Digits"
-msgstr "Decimales de la moneda"
-
-msgctxt "field:company.employee_cost_price,cost_price:"
-msgid "Cost Price"
-msgstr "Precio de coste"
-
-msgctxt "field:company.employee_cost_price,create_date:"
-msgid "Create Date"
-msgstr "Fecha creación"
-
-msgctxt "field:company.employee_cost_price,create_uid:"
-msgid "Create User"
-msgstr "Usuario creación"
-
-msgctxt "field:company.employee_cost_price,currency_digits:"
-msgid "Currency Digits"
-msgstr "Decimales de la moneda"
-
-msgctxt "field:company.employee_cost_price,date:"
-msgid "Date"
-msgstr "Fecha"
-
-msgctxt "field:company.employee_cost_price,employee:"
-msgid "Employee"
-msgstr "Empleado"
-
-msgctxt "field:company.employee_cost_price,id:"
-msgid "ID"
-msgstr "ID"
-
-msgctxt "field:company.employee_cost_price,rec_name:"
-msgid "Name"
-msgstr "Nombre"
-
-msgctxt "field:company.employee_cost_price,write_date:"
-msgid "Write Date"
-msgstr "Fecha modificación"
-
-msgctxt "field:company.employee_cost_price,write_uid:"
-msgid "Write User"
-msgstr "Usuario modificación"
-
 msgctxt "field:project.work,cost:"
 msgid "Cost"
 msgstr "Coste"
@@ -78,30 +22,6 @@ msgctxt "field:project.work,revenue:"
 msgid "Revenue"
 msgstr "Ingresos"
 
-msgctxt "help:company.employee,cost_price:"
-msgid "Hourly cost price for this Employee"
-msgstr "Precio de coste por hora para este empleado."
-
-msgctxt "help:company.employee,cost_prices:"
-msgid "List of hourly cost price over time"
-msgstr "Lista de precio de coste por hora a lo largo del tiempo."
-
-msgctxt "help:company.employee_cost_price,cost_price:"
-msgid "Hourly cost price"
-msgstr "Precio de coste por hora."
-
-msgctxt "model:company.employee_cost_price,name:"
-msgid "Employee Cost Price"
-msgstr "Precio de coste del empleado"
-
-msgctxt "view:company.employee:"
-msgid "Cost"
-msgstr "Coste"
-
-msgctxt "view:company.employee_cost_price:"
-msgid "Cost Prices"
-msgstr "Precios de coste"
-
 msgctxt "view:project.work:"
 msgid "Cost"
 msgstr "Coste"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index ca5ff9d..7e1da76 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -2,62 +2,6 @@
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
-msgctxt "error:company.employee_cost_price:"
-msgid "A employee can only have one cost price by date."
-msgstr "Un employé ne peut avoir qu'un seul prix de revient par date."
-
-msgctxt "field:company.employee,cost_price:"
-msgid "Cost Price"
-msgstr "Prix de Revient"
-
-msgctxt "field:company.employee,cost_prices:"
-msgid "Cost Prices"
-msgstr "Prix de revient"
-
-msgctxt "field:company.employee,currency_digits:"
-msgid "Currency Digits"
-msgstr "Décimales de la devise"
-
-msgctxt "field:company.employee_cost_price,cost_price:"
-msgid "Cost Price"
-msgstr "Prix de Revient"
-
-msgctxt "field:company.employee_cost_price,create_date:"
-msgid "Create Date"
-msgstr "Date de création"
-
-msgctxt "field:company.employee_cost_price,create_uid:"
-msgid "Create User"
-msgstr "Créé par"
-
-msgctxt "field:company.employee_cost_price,currency_digits:"
-msgid "Currency Digits"
-msgstr "Décimales de la devise"
-
-msgctxt "field:company.employee_cost_price,date:"
-msgid "Date"
-msgstr "Date"
-
-msgctxt "field:company.employee_cost_price,employee:"
-msgid "Employee"
-msgstr "Employé"
-
-msgctxt "field:company.employee_cost_price,id:"
-msgid "ID"
-msgstr "ID"
-
-msgctxt "field:company.employee_cost_price,rec_name:"
-msgid "Name"
-msgstr "Nom"
-
-msgctxt "field:company.employee_cost_price,write_date:"
-msgid "Write Date"
-msgstr "Date de mise à jour"
-
-msgctxt "field:company.employee_cost_price,write_uid:"
-msgid "Write User"
-msgstr "Mis à jour par"
-
 msgctxt "field:project.work,cost:"
 msgid "Cost"
 msgstr "Coût"
@@ -78,30 +22,6 @@ msgctxt "field:project.work,revenue:"
 msgid "Revenue"
 msgstr "Revenu"
 
-msgctxt "help:company.employee,cost_price:"
-msgid "Hourly cost price for this Employee"
-msgstr "Prix de revient horaire de cet employé"
-
-msgctxt "help:company.employee,cost_prices:"
-msgid "List of hourly cost price over time"
-msgstr "Liste du prix de revient horaire au cours du temps"
-
-msgctxt "help:company.employee_cost_price,cost_price:"
-msgid "Hourly cost price"
-msgstr "Prix de revient horaire"
-
-msgctxt "model:company.employee_cost_price,name:"
-msgid "Employee Cost Price"
-msgstr "Prix de revient de l'employé"
-
-msgctxt "view:company.employee:"
-msgid "Cost"
-msgstr "Coût"
-
-msgctxt "view:company.employee_cost_price:"
-msgid "Cost Prices"
-msgstr "Prix de revient"
-
 msgctxt "view:project.work:"
 msgid "Cost"
 msgstr "Coût"
diff --git a/locale/nl_NL.po b/locale/nl_NL.po
index 65a3bc7..ff670b0 100644
--- a/locale/nl_NL.po
+++ b/locale/nl_NL.po
@@ -2,69 +2,6 @@
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
-msgctxt "error:company.employee_cost_price:"
-msgid "A employee can only have one cost price by date."
-msgstr ""
-
-#, fuzzy
-msgctxt "field:company.employee,cost_price:"
-msgid "Cost Price"
-msgstr "Kostprijs"
-
-msgctxt "field:company.employee,cost_prices:"
-msgid "Cost Prices"
-msgstr ""
-
-#, fuzzy
-msgctxt "field:company.employee,currency_digits:"
-msgid "Currency Digits"
-msgstr "Valuta decimalen"
-
-#, fuzzy
-msgctxt "field:company.employee_cost_price,cost_price:"
-msgid "Cost Price"
-msgstr "Kostprijs"
-
-msgctxt "field:company.employee_cost_price,create_date:"
-msgid "Create Date"
-msgstr ""
-
-msgctxt "field:company.employee_cost_price,create_uid:"
-msgid "Create User"
-msgstr ""
-
-#, fuzzy
-msgctxt "field:company.employee_cost_price,currency_digits:"
-msgid "Currency Digits"
-msgstr "Valuta decimalen"
-
-#, fuzzy
-msgctxt "field:company.employee_cost_price,date:"
-msgid "Date"
-msgstr "Vervaldatum"
-
-#, fuzzy
-msgctxt "field:company.employee_cost_price,employee:"
-msgid "Employee"
-msgstr "Werknemer"
-
-msgctxt "field:company.employee_cost_price,id:"
-msgid "ID"
-msgstr ""
-
-#, fuzzy
-msgctxt "field:company.employee_cost_price,rec_name:"
-msgid "Name"
-msgstr "Naam bijlage"
-
-msgctxt "field:company.employee_cost_price,write_date:"
-msgid "Write Date"
-msgstr ""
-
-msgctxt "field:company.employee_cost_price,write_uid:"
-msgid "Write User"
-msgstr ""
-
 msgctxt "field:project.work,cost:"
 msgid "Cost"
 msgstr ""
@@ -88,27 +25,3 @@ msgstr "Producten"
 msgctxt "field:project.work,revenue:"
 msgid "Revenue"
 msgstr "Opbrengst"
-
-msgctxt "help:company.employee,cost_price:"
-msgid "Hourly cost price for this Employee"
-msgstr ""
-
-msgctxt "help:company.employee,cost_prices:"
-msgid "List of hourly cost price over time"
-msgstr ""
-
-msgctxt "help:company.employee_cost_price,cost_price:"
-msgid "Hourly cost price"
-msgstr ""
-
-msgctxt "model:company.employee_cost_price,name:"
-msgid "Employee Cost Price"
-msgstr ""
-
-msgctxt "view:company.employee:"
-msgid "Cost"
-msgstr ""
-
-msgctxt "view:company.employee_cost_price:"
-msgid "Cost Prices"
-msgstr ""
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
index 4470de9..37adc4f 100644
--- a/locale/ru_RU.po
+++ b/locale/ru_RU.po
@@ -2,62 +2,6 @@
 msgid ""
 msgstr "Content-Type: text/plain; charset=utf-8\n"
 
-msgctxt "error:company.employee_cost_price:"
-msgid "A employee can only have one cost price by date."
-msgstr "У сотрудника может быть только одна себестоимость за день."
-
-msgctxt "field:company.employee,cost_price:"
-msgid "Cost Price"
-msgstr "Себестоимость"
-
-msgctxt "field:company.employee,cost_prices:"
-msgid "Cost Prices"
-msgstr "Себестоимость"
-
-msgctxt "field:company.employee,currency_digits:"
-msgid "Currency Digits"
-msgstr "Кол-во цифр валюты"
-
-msgctxt "field:company.employee_cost_price,cost_price:"
-msgid "Cost Price"
-msgstr "Себестоимость"
-
-msgctxt "field:company.employee_cost_price,create_date:"
-msgid "Create Date"
-msgstr "Дата создания"
-
-msgctxt "field:company.employee_cost_price,create_uid:"
-msgid "Create User"
-msgstr "Создано пользователем"
-
-msgctxt "field:company.employee_cost_price,currency_digits:"
-msgid "Currency Digits"
-msgstr "Кол-во цифр валюты"
-
-msgctxt "field:company.employee_cost_price,date:"
-msgid "Date"
-msgstr "Дата"
-
-msgctxt "field:company.employee_cost_price,employee:"
-msgid "Employee"
-msgstr "Сотрудник"
-
-msgctxt "field:company.employee_cost_price,id:"
-msgid "ID"
-msgstr "ID"
-
-msgctxt "field:company.employee_cost_price,rec_name:"
-msgid "Name"
-msgstr "Наименование"
-
-msgctxt "field:company.employee_cost_price,write_date:"
-msgid "Write Date"
-msgstr "Дата изменения"
-
-msgctxt "field:company.employee_cost_price,write_uid:"
-msgid "Write User"
-msgstr "Изменено пользователем"
-
 msgctxt "field:project.work,cost:"
 msgid "Cost"
 msgstr "Стоимость"
@@ -77,27 +21,3 @@ msgstr "Продукт"
 msgctxt "field:project.work,revenue:"
 msgid "Revenue"
 msgstr "Доходы"
-
-msgctxt "help:company.employee,cost_price:"
-msgid "Hourly cost price for this Employee"
-msgstr "Часовая себестоимость для этого сотрудника"
-
-msgctxt "help:company.employee,cost_prices:"
-msgid "List of hourly cost price over time"
-msgstr "Список часовой себестоимости по времени"
-
-msgctxt "help:company.employee_cost_price,cost_price:"
-msgid "Hourly cost price"
-msgstr "Часовая себестоимость"
-
-msgctxt "model:company.employee_cost_price,name:"
-msgid "Employee Cost Price"
-msgstr "Себестоимость сотрудника"
-
-msgctxt "view:company.employee:"
-msgid "Cost"
-msgstr "Стоимость"
-
-msgctxt "view:company.employee_cost_price:"
-msgid "Cost Prices"
-msgstr "Себестоимость"
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
new file mode 100644
index 0000000..9bd05d7
--- /dev/null
+++ b/locale/sl_SI.po
@@ -0,0 +1,23 @@
+# 
+msgid ""
+msgstr "Content-Type: text/plain; charset=utf-8\n"
+
+msgctxt "field:project.work,cost:"
+msgid "Cost"
+msgstr "Strošek"
+
+msgctxt "field:project.work,currency_digits:"
+msgid "Currency Digits"
+msgstr "Decimalke"
+
+msgctxt "field:project.work,list_price:"
+msgid "List Price"
+msgstr "Prodajna cena"
+
+msgctxt "field:project.work,product:"
+msgid "Product"
+msgstr "Izdelek"
+
+msgctxt "field:project.work,revenue:"
+msgid "Revenue"
+msgstr "Prihodki"
diff --git a/service.py b/service.py
deleted file mode 100644
index 8a80468..0000000
--- a/service.py
+++ /dev/null
@@ -1,140 +0,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.
-from decimal import Decimal
-from trytond.model import ModelView, ModelSQL, fields
-from trytond.pyson import Eval
-from trytond.cache import Cache
-from trytond.transaction import Transaction
-from trytond.pool import Pool, PoolMeta
-
-__all__ = ['Employee', 'EmployeeCostPrice']
-__metaclass__ = PoolMeta
-
-
-class Employee:
-    __name__ = 'company.employee'
-    cost_price = fields.Function(fields.Numeric('Cost Price',
-        digits=(16, Eval('currency_digits', 2)), depends=['currency_digits'],
-        help="Hourly cost price for this Employee"), 'get_cost_price')
-    cost_prices = fields.One2Many('company.employee_cost_price', 'employee',
-            'Cost Prices', help="List of hourly cost price over time")
-    currency_digits = fields.Function(fields.Integer('Currency Digits',
-            on_change_with=['company']), 'on_change_with_currency_digits')
-    _cost_prices_cache = Cache('company_employee.cost_prices')
-
-    def get_cost_price(self, name):
-        '''
-        Return the cost price at the date given in the context or the
-        current date
-        '''
-        ctx_date = Transaction().context.get('date', None)
-        return self.compute_cost_price(ctx_date)
-
-    def compute_cost_price(self, date=None):
-        pool = Pool()
-        Date = pool.get('ir.date')
-        CostPrice = pool.get('company.employee_cost_price')
-
-        # Get from cache employee costs or fetch them from the db
-        employee_costs = self._cost_prices_cache.get(self.id)
-        if employee_costs is None:
-            cost_prices = CostPrice.search([
-                    ('employee', '=', self.id),
-                    ], order=[('date', 'ASC')])
-
-            employee_costs = []
-            for cost_price in cost_prices:
-                employee_costs.append(
-                    (cost_price.date, cost_price.cost_price))
-            self._cost_prices_cache.set(self.id, employee_costs)
-
-        if date is None:
-            date = Date.today()
-        # compute the cost price for the given date
-        cost = 0
-        if employee_costs and date >= employee_costs[0][0]:
-            for edate, ecost in employee_costs:
-                if date >= edate:
-                    cost = ecost
-                else:
-                    break
-        return cost
-
-    def on_change_with_currency_digits(self, name=None):
-        if self.company:
-            return self.company.currency.digits
-        return 2
-
-    @staticmethod
-    def default_currency_digits():
-        Company = Pool().get('company.company')
-        company = Transaction().context.get('company')
-        if company:
-            company = Company(company)
-            return company.currency.digits
-        return 2
-
-
-class EmployeeCostPrice(ModelSQL, ModelView):
-    'Employee Cost Price'
-    __name__ = 'company.employee_cost_price'
-    _rec_name = 'date'
-    date = fields.Date('Date', required=True, select=True)
-    cost_price = fields.Numeric('Cost Price',
-            digits=(16, Eval('currency_digits', 2)),
-            required=True, depends=['currency_digits'],
-            help="Hourly cost price")
-    employee = fields.Many2One('company.employee', 'Employee')
-    currency_digits = fields.Function(fields.Integer('Currency Digits',
-            on_change_with=['employee']), 'on_change_with_currency_digits')
-
-    @classmethod
-    def __setup__(cls):
-        super(EmployeeCostPrice, cls).__setup__()
-        cls._sql_constraints = [
-            ('date_cost_price_uniq', 'UNIQUE(date, cost_price)',
-                'A employee can only have one cost price by date.'),
-            ]
-        cls._order.insert(0, ('date', 'DESC'))
-
-    @staticmethod
-    def default_cost_price():
-        return Decimal(0)
-
-    @staticmethod
-    def default_date():
-        Date = Pool().get('ir.date')
-        return Date.today()
-
-    @classmethod
-    def delete(cls, prices):
-        Employee = Pool().get('company.employee')
-        super(EmployeeCostPrice, cls).delete(prices)
-        Employee._cost_prices_cache.clear()
-
-    @classmethod
-    def create(cls, vlist):
-        Employee = Pool().get('company.employee')
-        prices = super(EmployeeCostPrice, cls).create(vlist)
-        Employee._cost_prices_cache.clear()
-        return prices
-
-    @classmethod
-    def write(cls, prices, vals):
-        Employee = Pool().get('company.employee')
-        super(EmployeeCostPrice, cls).write(prices, vals)
-        Employee._cost_prices_cache.clear()
-
-    def on_change_with_currency_digits(self, name=None):
-        if self.employee:
-            return self.employee.company.currency.digits
-        return 2
-
-    @staticmethod
-    def default_currency_digits():
-        Company = Pool().get('company.company')
-        company = Transaction().context.get('company')
-        if company:
-            company = Company(company)
-            return company.currency.digits
-        return 2
diff --git a/service.xml b/service.xml
deleted file mode 100644
index 375e04f..0000000
--- a/service.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?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="cost_price_view_form">
-            <field name="model">company.employee_cost_price</field>
-            <field name="type">form</field>
-            <field name="name">employee_cost_price_form</field>
-        </record>
-
-        <record model="ir.ui.view" id="cost_price_view_tree">
-            <field name="model">company.employee_cost_price</field>
-            <field name="type">tree</field>
-            <field name="name">employee_cost_price_tree</field>
-        </record>
-
-
-        <record model="ir.ui.view" id="employee_view_form">
-            <field name="model">company.employee</field>
-            <field name="inherit" ref="company.employee_view_form"/>
-            <field name="name">employee_form</field>
-        </record>
-    </data>
-</tryton>
diff --git a/setup.py b/setup.py
index 0042749..65568cf 100644
--- a/setup.py
+++ b/setup.py
@@ -64,6 +64,7 @@ setup(name='trytond_project_revenue',
         '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 4f77c86..910bb7c 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_project_revenue import suite
+
+__all__ = ['suite']
diff --git a/tests/test_project_revenue.py b/tests/test_project_revenue.py
index f29ad77..94cdec1 100644
--- a/tests/test_project_revenue.py
+++ b/tests/test_project_revenue.py
@@ -10,13 +10,9 @@ if os.path.isdir(DIR):
     sys.path.insert(0, os.path.dirname(DIR))
 
 import unittest
-import datetime
-from decimal import Decimal
 
 import trytond.tests.test_tryton
-from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT, test_view,\
-    test_depends
-from trytond.transaction import Transaction
+from trytond.tests.test_tryton import test_view, test_depends
 
 
 class ProjectRevenueTestCase(unittest.TestCase):
@@ -26,10 +22,6 @@ class ProjectRevenueTestCase(unittest.TestCase):
 
     def setUp(self):
         trytond.tests.test_tryton.install_module('project_revenue')
-        self.party = POOL.get('party.party')
-        self.employee = POOL.get('company.employee')
-        self.employee_cost_price = POOL.get('company.employee_cost_price')
-        self.company = POOL.get('company.company')
 
     def test0005views(self):
         '''
@@ -43,46 +35,9 @@ class ProjectRevenueTestCase(unittest.TestCase):
         '''
         test_depends()
 
-    def test0010compute_cost_price(self):
-        '''
-        Test compute_cost_price
-        '''
-        cost_prices = [
-            (datetime.date(2011, 1, 1), Decimal(10)),
-            (datetime.date(2012, 1, 1), Decimal(15)),
-            (datetime.date(2013, 1, 1), Decimal(20)),
-            ]
-        test_prices = [
-            (datetime.date(2010, 1, 1), 0),
-            (datetime.date(2011, 1, 1), Decimal(10)),
-            (datetime.date(2011, 6, 1), Decimal(10)),
-            (datetime.date(2012, 1, 1), Decimal(15)),
-            (datetime.date(2012, 6, 1), Decimal(15)),
-            (datetime.date(2013, 1, 1), Decimal(20)),
-            (datetime.date(2013, 6, 1), Decimal(20)),
-            ]
-        with Transaction().start(DB_NAME, USER, context=CONTEXT):
-            company, = self.company.search([('rec_name', '=', 'B2CK')])
-            party = self.party(name='Pam Beesly')
-            party.save()
-            employee = self.employee(party=party.id,
-                company=company)
-            employee.save()
-            for date, cost_price in cost_prices:
-                self.employee_cost_price(
-                    employee=employee,
-                    date=date,
-                    cost_price=cost_price).save()
-            for date, cost_price in test_prices:
-                self.assertEqual(employee.compute_cost_price(date), cost_price)
-
 
 def suite():
     suite = trytond.tests.test_tryton.suite()
-    from trytond.modules.company.tests import test_company
-    for test in test_company.suite():
-        if test not in suite:
-            suite.addTest(test)
     suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
         ProjectRevenueTestCase))
     return suite
diff --git a/tryton.cfg b/tryton.cfg
index 3f2e6cb..475c48d 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,11 +1,11 @@
 [tryton]
-version=2.8.0
+version=3.0.0
 depends:
     ir
     project
     timesheet
+    timesheet_cost
     company
     product
 xml:
-    service.xml
     work.xml
diff --git a/trytond_project_revenue.egg-info/PKG-INFO b/trytond_project_revenue.egg-info/PKG-INFO
index 04b4256..21456a6 100644
--- a/trytond_project_revenue.egg-info/PKG-INFO
+++ b/trytond_project_revenue.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-project-revenue
-Version: 2.8.0
+Version: 3.0.0
 Summary: Tryton module to add cost/revenue on project
 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_project_revenue
         =======================
         
@@ -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_project_revenue.egg-info/SOURCES.txt b/trytond_project_revenue.egg-info/SOURCES.txt
index 9414023..ad0fd51 100644
--- a/trytond_project_revenue.egg-info/SOURCES.txt
+++ b/trytond_project_revenue.egg-info/SOURCES.txt
@@ -4,12 +4,10 @@ INSTALL
 LICENSE
 MANIFEST.in
 README
-service.xml
 setup.py
 tryton.cfg
 work.xml
 ./__init__.py
-./service.py
 ./work.py
 ./tests/__init__.py
 ./tests/test_project_revenue.py
@@ -23,6 +21,7 @@ locale/es_ES.po
 locale/fr_FR.po
 locale/nl_NL.po
 locale/ru_RU.po
+locale/sl_SI.po
 trytond_project_revenue.egg-info/PKG-INFO
 trytond_project_revenue.egg-info/SOURCES.txt
 trytond_project_revenue.egg-info/dependency_links.txt
@@ -30,9 +29,6 @@ trytond_project_revenue.egg-info/entry_points.txt
 trytond_project_revenue.egg-info/not-zip-safe
 trytond_project_revenue.egg-info/requires.txt
 trytond_project_revenue.egg-info/top_level.txt
-view/employee_cost_price_form.xml
-view/employee_cost_price_tree.xml
-view/employee_form.xml
 view/work_form.xml
 view/work_list2.xml
 view/work_tree.xml
\ No newline at end of file
diff --git a/trytond_project_revenue.egg-info/requires.txt b/trytond_project_revenue.egg-info/requires.txt
index 34972e8..40d7800 100644
--- a/trytond_project_revenue.egg-info/requires.txt
+++ b/trytond_project_revenue.egg-info/requires.txt
@@ -1,5 +1,6 @@
-trytond_project >= 2.8, < 2.9
-trytond_timesheet >= 2.8, < 2.9
-trytond_company >= 2.8, < 2.9
-trytond_product >= 2.8, < 2.9
-trytond >= 2.8, < 2.9
\ No newline at end of file
+trytond_project >= 3.0, < 3.1
+trytond_timesheet >= 3.0, < 3.1
+trytond_timesheet_cost >= 3.0, < 3.1
+trytond_company >= 3.0, < 3.1
+trytond_product >= 3.0, < 3.1
+trytond >= 3.0, < 3.1
\ No newline at end of file
diff --git a/view/employee_cost_price_form.xml b/view/employee_cost_price_form.xml
deleted file mode 100644
index 7d670c9..0000000
--- a/view/employee_cost_price_form.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?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="Cost Prices">
-    <label name="date"/>
-    <field name="date"/>
-    <label name="cost_price"/>
-    <field name="cost_price"/>
-    <label name="employee"/>
-    <field name="employee"/>
-</form>
diff --git a/view/employee_cost_price_tree.xml b/view/employee_cost_price_tree.xml
deleted file mode 100644
index 93d4c90..0000000
--- a/view/employee_cost_price_tree.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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="Cost Prices">
-    <field name="date"/>
-    <field name="cost_price"/>
-</tree>
diff --git a/view/employee_form.xml b/view/employee_form.xml
deleted file mode 100644
index 21ccb41..0000000
--- a/view/employee_form.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?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='company']" position="after">
-        <separator string="Cost" id="cost_prices" colspan="4"/>
-        <label name="cost_price"/>
-        <field name="cost_price"/>
-        <field name="cost_prices" colspan="4"/>
-    </xpath>
-</data>
diff --git a/work.py b/work.py
index b280929..d53a68b 100644
--- a/work.py
+++ b/work.py
@@ -1,37 +1,25 @@
 #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 decimal import Decimal
+import datetime
+
 from trytond.model import fields
-from trytond.pyson import Eval
+from trytond.pyson import Eval, Id
 from trytond.transaction import Transaction
 from trytond.pool import Pool, PoolMeta
+from trytond.tools import reduce_ids
 
-__all__ = ['TimesheetLine', 'Work']
+__all__ = ['Work']
 __metaclass__ = PoolMeta
 
 
-class TimesheetLine:
-    __name__ = 'timesheet.line'
-
-    def compute_cost(self):
-        Currency = Pool().get('currency.currency')
-
-        cost_price = self.employee.compute_cost_price(date=self.date)
-
-        line_company = self.employee.company
-        work_company = self.work.company
-        if (line_company != work_company and
-                line_company.currency != work_company.currency):
-            with Transaction().set_context(date=self.date):
-                cost_price = Currency.compute(line_company.currency,
-                    cost_price, work_company.currency)
-
-        return Decimal(str(self.hours)) * cost_price
-
-
 class Work:
     __name__ = 'project.work'
     product = fields.Many2One('product.product', 'Product',
+        domain=[
+            ('type', '=', 'service'),
+            ('default_uom_category', '=', Id('product', 'uom_cat_time')),
+            ],
         states={
             'invisible': ~Eval('timesheet_available'),
             },
@@ -53,12 +41,51 @@ class Work:
 
     @classmethod
     def get_cost(cls, works, name):
+        pool = Pool()
+        Employee = pool.get('company.employee')
+        Line = pool.get('timesheet.line')
+        Work = pool.get('timesheet.work')
+        transaction = Transaction()
+        cursor = transaction.cursor
+        in_max = cursor.IN_MAX
+
         works += cls.search([
                 ('parent', 'child_of', [w.id for w in works]),
                 ('active', '=', True)]) + works
-
-        return cls.sum_tree(works, lambda w: (sum(t.compute_cost()
-                    for t in w.work.timesheet_lines) or Decimal(0)))
+        costs = dict.fromkeys([w.id for w in works], 0)
+        works_to_timesheet = dict((w.work.id, w.id) for w in works)
+
+        table_w = Work.__table__()
+        table_c = Work.__table__()
+        line = Line.__table__()
+
+        timesheet_work_ids = works_to_timesheet.keys()
+        employee_ids = set()
+        for i in range(0, len(timesheet_work_ids), in_max):
+            sub_ids = timesheet_work_ids[i:i + in_max]
+            red_sql = reduce_ids(table_w.id, sub_ids)
+            cursor.execute(*table_w.join(table_c,
+                    condition=(table_c.left >= table_w.left)
+                    & (table_c.right <= table_w.right)
+                    ).join(line, condition=line.work == table_c.id
+                    ).select(line.employee,
+                    where=red_sql,
+                    group_by=line.employee))
+            employee_ids |= set(r[0] for r in cursor.fetchall())
+        for employee in Employee.browse(list(employee_ids)):
+            employee_costs = employee.get_employee_costs()
+            to_date = None
+            for from_date, cost in reversed(employee_costs):
+                with transaction.set_context(
+                        from_date=from_date,
+                        to_date=to_date,
+                        employees=[employee.id]):
+                    for timesheet_work in Work.browse(timesheet_work_ids):
+                        work_id = works_to_timesheet[timesheet_work.id]
+                        costs[work_id] += (
+                            Decimal(str(timesheet_work.hours)) * cost)
+                to_date = from_date - datetime.timedelta(1)
+        return costs
 
     @classmethod
     def get_revenue(cls, works, name):
-- 
tryton-modules-project-revenue



More information about the tryton-debian-vcs mailing list