[tryton-debian-vcs] tryton-modules-sale-opportunity branch debian updated. debian/2.8.2-1-4-gbd533dd
git repository hosting
tryton-debian-vcs at m9s.biz
Mon Nov 25 19:37:13 UTC 2013
The following commit has been merged in the debian branch:
http://debian.tryton.org/gitweb/?p=packages/tryton-modules-sale-opportunity.git;a=commitdiff;h=debian/2.8.2-1-4-gbd533dd
commit bd533dd16428549e07d876a2802797ea86cf7713
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Nov 25 20:30:25 2013 +0100
Releasing debian version 3.0.0-1.
diff --git a/debian/changelog b/debian/changelog
index 56b10a9..5d0f5f4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+tryton-modules-sale-opportunity (3.0.0-1) unstable; urgency=low
+
+ * Merging upstream version 3.0.0.
+ * Updating to standards version 3.9.5, no changes needed.
+ * Changing to buildsystem pybuild.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Mon, 25 Nov 2013 17:55:08 +0100
+
tryton-modules-sale-opportunity (2.8.2-1) unstable; urgency=low
* Merging upstream version 2.8.2.
commit b1cd6604317793391287380a7d3aff7c3a743ec6
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Nov 24 19:51:52 2013 +0100
Changing to buildsystem pybuild.
diff --git a/debian/control b/debian/control
index 1ae1430..6cdeaa2 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,8 @@ Section: python
Priority: optional
Maintainer: Debian Tryton Maintainers <maintainers at debian.tryton.org>
Uploaders: Mathias Behrle <mathiasb at m9s.biz>
-Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools
+Build-Depends:
+ debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools, dh-python
Standards-Version: 3.9.5
Homepage: http://www.tryton.org/
Vcs-Browser: http://debian.tryton.org/gitweb/?p=packages/tryton-modules-sale-opportunity.git
diff --git a/debian/rules b/debian/rules
index 30074ad..5b8c326 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,24 +1,17 @@
#!/usr/bin/make -f
-MAJOR := $(shell python setup.py --version | awk -F "." '{print $$1 "." $$2}')
-PACKAGE_NAME := $(shell python setup.py --name)
-
-%:
- dh ${@} --with python2
+# needed for pbuilder
+export LC_ALL=C.UTF-8
-override_dh_auto_clean:
- dh_auto_clean
+MAJOR := $(shell python setup.py --version | awk -F "." '{print $$1 "." $$2}')
+PACKAGE_NAME := tryton-modules-$(shell python setup.py --name | sed s/^trytond_// | sed s/_/-/g)
+export PYBUILD_DESTDIR_python2=debian/${PACKAGE_NAME}
-override_dh_auto_build:
- mv $(PACKAGE_NAME).egg-info $(PACKAGE_NAME).hen-info
- mv PKG-INFO PKG-INFO.hen
- dh_auto_build
+# Don't run tests for Tryton modules, they try to download dependencies from pypi
+export PYBUILD_DISABLE_python2.7=test
-override_dh_auto_install:
- dh_auto_install
- rm -rf *.egg-info
- mv $(PACKAGE_NAME).hen-info $(PACKAGE_NAME).egg-info
- mv PKG-INFO.hen PKG-INFO
+%:
+ dh ${@} --with python2 --buildsystem=pybuild
override_dh_gencontrol:
dh_gencontrol -- -Vversion:major="$(MAJOR)"
commit d6efd62c20d567e960bdce35682fec1ed9750238
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Nov 24 19:14:21 2013 +0100
Updating to standards version 3.9.5, no changes needed.
diff --git a/debian/control b/debian/control
index f1371c6..1ae1430 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: optional
Maintainer: Debian Tryton Maintainers <maintainers at debian.tryton.org>
Uploaders: Mathias Behrle <mathiasb at m9s.biz>
Build-Depends: debhelper (>= 9), python (>= 2.6.6-3~), python-setuptools
-Standards-Version: 3.9.4
+Standards-Version: 3.9.5
Homepage: http://www.tryton.org/
Vcs-Browser: http://debian.tryton.org/gitweb/?p=packages/tryton-modules-sale-opportunity.git
Vcs-Git: git://debian.tryton.org/packages/tryton-modules-sale-opportunity.git
commit 07ebd4c2a72a9903c7d395069c68f0135055ed3c
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sun Nov 24 17:27:57 2013 +0100
Merging upstream version 3.0.0.
diff --git a/CHANGELOG b/CHANGELOG
index 633ca6c..6db1f6b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,8 +1,6 @@
-Version 2.8.2 - 2013-10-01
-* Bug fixes (see mercurial logs for details)
-
-Version 2.8.1 - 2013-07-22
+Version 3.0.0 - 2013-10-21
* Bug fixes (see mercurial logs for details)
+* Make party optional in leads
Version 2.8.0 - 2013-04-22
* Bug fixes (see mercurial logs for details)
diff --git a/INSTALL b/INSTALL
index 8162037..5db00b9 100644
--- a/INSTALL
+++ b/INSTALL
@@ -6,6 +6,7 @@ Prerequisites
* Python 2.6 or later (http://www.python.org/)
* trytond (http://www.tryton.org/)
+ * python-sql (http://code.google.com/p/python-sql/)
* trytond_party (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 71580de..74896c8 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_sale_opportunity
-Version: 2.8.2
+Version: 3.0.0
Summary: Tryton module with leads and opportunities
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_sale_opportunity
========================
@@ -59,6 +59,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 538945e..336ed57 100644
--- a/__init__.py
+++ b/__init__.py
@@ -3,6 +3,7 @@
from trytond.pool import Pool
from .opportunity import *
+from .configuration import *
def register():
@@ -14,6 +15,7 @@ def register():
OpenSaleOpportunityEmployeeStart,
SaleOpportunityMonthly,
SaleOpportunityEmployeeMonthly,
+ Configuration,
module='sale_opportunity', type_='model')
Pool.register(
OpenSaleOpportunityEmployee,
diff --git a/configuration.py b/configuration.py
new file mode 100644
index 0000000..fb3c7d5
--- /dev/null
+++ b/configuration.py
@@ -0,0 +1,19 @@
+#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 fields
+from trytond.pyson import Eval
+from trytond.pool import PoolMeta
+
+__all__ = ['Configuration']
+__metaclass__ = PoolMeta
+
+
+class Configuration:
+ 'Sale Configuration'
+ __name__ = 'sale.configuration'
+ sale_opportunity_sequence = fields.Property(fields.Many2One('ir.sequence',
+ 'Opportunity Reference Sequence', domain=[
+ ('company', 'in', [Eval('context', {}).get('company', -1),
+ None]),
+ ('code', '=', 'sale.opportunity'),
+ ], required=True))
diff --git a/configuration.xml b/configuration.xml
new file mode 100644
index 0000000..927e517
--- /dev/null
+++ b/configuration.xml
@@ -0,0 +1,20 @@
+<?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="sale_opportunity_configuration_view_form">
+ <field name="model">sale.configuration</field>
+ <field name="inherit" ref="sale.sale_configuration_view_form"/>
+ <field name="name">configuration_form</field>
+ </record>
+
+ <record model="ir.property" id="property_sale_opportunity_sequence">
+ <field name="field"
+ search="[('model.model', '=', 'sale.configuration'), ('name', '=', 'sale_opportunity_sequence')]"/>
+ <field name="value"
+ eval="'ir.sequence,' + str(ref('sequence_sale_opportunity'))"/>
+ </record>
+ </data>
+</tryton>
diff --git a/locale/bg_BG.po b/locale/bg_BG.po
index 84940ee..4080ff5 100644
--- a/locale/bg_BG.po
+++ b/locale/bg_BG.po
@@ -10,6 +10,10 @@ msgctxt "error:sale.opportunity:"
msgid "Sale Opportunity \"%s\" must be cancelled before deletion."
msgstr ""
+msgctxt "field:sale.configuration,sale_opportunity_sequence:"
+msgid "Opportunity Reference Sequence"
+msgstr ""
+
msgctxt "field:sale.opportunity,address:"
msgid "Address"
msgstr "Адрес"
@@ -86,6 +90,11 @@ msgctxt "field:sale.opportunity,rec_name:"
msgid "Name"
msgstr "Име"
+#, fuzzy
+msgctxt "field:sale.opportunity,reference:"
+msgid "Reference"
+msgstr "Препратка"
+
msgctxt "field:sale.opportunity,sale:"
msgid "Sale"
msgstr "Продажба"
@@ -563,6 +572,16 @@ msgctxt ""
msgid "Opportunities"
msgstr ""
+#, fuzzy
+msgctxt "model:ir.sequence,name:sequence_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Възможност за продажба"
+
+#, fuzzy
+msgctxt "model:ir.sequence.type,name:sequence_type_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Възможност за продажба"
+
msgctxt "model:ir.ui.menu,name:menu_opportunity_employee_monthly_form"
msgid "Opportunities per Employee per Month"
msgstr "Възможности по служител по месец"
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 422ee8e..371c82f 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -10,6 +10,10 @@ msgctxt "error:sale.opportunity:"
msgid "Sale Opportunity \"%s\" must be cancelled before deletion."
msgstr "Heu de cancel·lar l 'oportunitat \"%s\" abans de ser eliminat."
+msgctxt "field:sale.configuration,sale_opportunity_sequence:"
+msgid "Opportunity Reference Sequence"
+msgstr "Seqüència referència oportunitat"
+
msgctxt "field:sale.opportunity,address:"
msgid "Address"
msgstr "Adreça"
@@ -86,6 +90,10 @@ msgctxt "field:sale.opportunity,rec_name:"
msgid "Name"
msgstr "Nom"
+msgctxt "field:sale.opportunity,reference:"
+msgid "Reference"
+msgstr "Referència"
+
msgctxt "field:sale.opportunity,sale:"
msgid "Sale"
msgstr "Venda"
@@ -560,6 +568,14 @@ msgctxt ""
msgid "Opportunities"
msgstr "Oportunitats"
+msgctxt "model:ir.sequence,name:sequence_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Oportunitat"
+
+msgctxt "model:ir.sequence.type,name:sequence_type_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Oportunitat"
+
msgctxt "model:ir.ui.menu,name:menu_opportunity_employee_monthly_form"
msgid "Opportunities per Employee per Month"
msgstr "Oportunitats per treballador i mes"
diff --git a/locale/cs_CZ.po b/locale/cs_CZ.po
index 0d98d4c..9e9271a 100644
--- a/locale/cs_CZ.po
+++ b/locale/cs_CZ.po
@@ -10,6 +10,10 @@ msgctxt "error:sale.opportunity:"
msgid "Sale Opportunity \"%s\" must be cancelled before deletion."
msgstr ""
+msgctxt "field:sale.configuration,sale_opportunity_sequence:"
+msgid "Opportunity Reference Sequence"
+msgstr ""
+
msgctxt "field:sale.opportunity,address:"
msgid "Address"
msgstr ""
@@ -86,6 +90,10 @@ msgctxt "field:sale.opportunity,rec_name:"
msgid "Name"
msgstr ""
+msgctxt "field:sale.opportunity,reference:"
+msgid "Reference"
+msgstr ""
+
msgctxt "field:sale.opportunity,sale:"
msgid "Sale"
msgstr ""
@@ -560,6 +568,14 @@ msgctxt ""
msgid "Opportunities"
msgstr ""
+msgctxt "model:ir.sequence,name:sequence_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr ""
+
+msgctxt "model:ir.sequence.type,name:sequence_type_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr ""
+
msgctxt "model:ir.ui.menu,name:menu_opportunity_employee_monthly_form"
msgid "Opportunities per Employee per Month"
msgstr ""
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 6f7453d..e7274f1 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -12,6 +12,10 @@ msgstr ""
"Verkaufschance \"%s\" muss annulliert werden, bevor sie gelöscht werden "
"kann."
+msgctxt "field:sale.configuration,sale_opportunity_sequence:"
+msgid "Opportunity Reference Sequence"
+msgstr "Nummernkreis Verkaufschance Beleg"
+
msgctxt "field:sale.opportunity,address:"
msgid "Address"
msgstr "Adresse"
@@ -88,6 +92,10 @@ msgctxt "field:sale.opportunity,rec_name:"
msgid "Name"
msgstr "Name"
+msgctxt "field:sale.opportunity,reference:"
+msgid "Reference"
+msgstr "Beleg"
+
msgctxt "field:sale.opportunity,sale:"
msgid "Sale"
msgstr "Verkauf"
@@ -562,6 +570,14 @@ msgctxt ""
msgid "Opportunities"
msgstr "Verkaufschancen"
+msgctxt "model:ir.sequence,name:sequence_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Verkaufschance"
+
+msgctxt "model:ir.sequence.type,name:sequence_type_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Verkaufschance"
+
msgctxt "model:ir.ui.menu,name:menu_opportunity_employee_monthly_form"
msgid "Opportunities per Employee per Month"
msgstr "Verkaufschancen pro Mitarbeiter pro Monat"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index 34b5ec1..cecc48d 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -10,6 +10,10 @@ msgctxt "error:sale.opportunity:"
msgid "Sale Opportunity \"%s\" must be cancelled before deletion."
msgstr "Debe cancelar la oportunidad «%s» antes de eliminar."
+msgctxt "field:sale.configuration,sale_opportunity_sequence:"
+msgid "Opportunity Reference Sequence"
+msgstr "Secuencia de referencia de oportunidad"
+
msgctxt "field:sale.opportunity,address:"
msgid "Address"
msgstr "Dirección"
@@ -36,11 +40,11 @@ msgstr "Usuario creación"
msgctxt "field:sale.opportunity,currency:"
msgid "Currency"
-msgstr "Divisa"
+msgstr "Moneda"
msgctxt "field:sale.opportunity,currency_digits:"
msgid "Currency Digits"
-msgstr "Dígitos de divisa"
+msgstr "Dígitos de moneda"
msgctxt "field:sale.opportunity,description:"
msgid "Description"
@@ -86,6 +90,10 @@ msgctxt "field:sale.opportunity,rec_name:"
msgid "Name"
msgstr "Nombre"
+msgctxt "field:sale.opportunity,reference:"
+msgid "Reference"
+msgstr "Referencia"
+
msgctxt "field:sale.opportunity,sale:"
msgid "Sale"
msgstr "Venta"
@@ -276,11 +284,11 @@ msgstr "Usuario creación"
msgctxt "field:sale.opportunity_employee,currency:"
msgid "Currency"
-msgstr "Divisa"
+msgstr "Moneda"
msgctxt "field:sale.opportunity_employee,currency_digits:"
msgid "Currency Digits"
-msgstr "Dígitos de divisa"
+msgstr "Dígitos de moneda"
msgctxt "field:sale.opportunity_employee,employee:"
msgid "Employee"
@@ -356,11 +364,11 @@ msgstr "Usuario creación"
msgctxt "field:sale.opportunity_employee_monthly,currency:"
msgid "Currency"
-msgstr "Divisa"
+msgstr "Moneda"
msgctxt "field:sale.opportunity_employee_monthly,currency_digits:"
msgid "Currency Digits"
-msgstr "Dígitos de divisa"
+msgstr "Dígitos de moneda"
msgctxt "field:sale.opportunity_employee_monthly,employee:"
msgid "Employee"
@@ -432,11 +440,11 @@ msgstr "Usuario creación"
msgctxt "field:sale.opportunity_monthly,currency:"
msgid "Currency"
-msgstr "Divisa"
+msgstr "Moneda"
msgctxt "field:sale.opportunity_monthly,currency_digits:"
msgid "Currency Digits"
-msgstr "Dígitos de divisa"
+msgstr "Dígitos de moneda"
msgctxt "field:sale.opportunity_monthly,id:"
msgid "ID"
@@ -560,6 +568,14 @@ msgctxt ""
msgid "Opportunities"
msgstr "Oportunidades"
+msgctxt "model:ir.sequence,name:sequence_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Oportunidad de venta"
+
+msgctxt "model:ir.sequence.type,name:sequence_type_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Oportunidad de venta"
+
msgctxt "model:ir.ui.menu,name:menu_opportunity_employee_monthly_form"
msgid "Opportunities per Employee per Month"
msgstr "Oportunidades por empleado y mes"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index 39cc7e7..9007cc9 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -10,6 +10,10 @@ msgctxt "error:sale.opportunity:"
msgid "Sale Opportunity \"%s\" must be cancelled before deletion."
msgstr "La Oportunidad de Venta \"%s\" debe ser cancelada antes de ser eliminada."
+msgctxt "field:sale.configuration,sale_opportunity_sequence:"
+msgid "Opportunity Reference Sequence"
+msgstr "Secuencia de Referencia de Oportunidad"
+
msgctxt "field:sale.opportunity,address:"
msgid "Address"
msgstr "Dirección"
@@ -86,6 +90,10 @@ msgctxt "field:sale.opportunity,rec_name:"
msgid "Name"
msgstr "Nombre"
+msgctxt "field:sale.opportunity,reference:"
+msgid "Reference"
+msgstr "Referencia"
+
msgctxt "field:sale.opportunity,sale:"
msgid "Sale"
msgstr "Venta"
@@ -560,6 +568,14 @@ msgctxt ""
msgid "Opportunities"
msgstr "Oportunidades"
+msgctxt "model:ir.sequence,name:sequence_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Oportunidad de Venta"
+
+msgctxt "model:ir.sequence.type,name:sequence_type_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Oportunidad de Venta"
+
msgctxt "model:ir.ui.menu,name:menu_opportunity_employee_monthly_form"
msgid "Opportunities per Employee per Month"
msgstr "Oportunidades por Empleado por Mes"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index 1933e0c..1303ede 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -8,7 +8,11 @@ msgstr "La probabilidad debe estar entre 0 y 100."
msgctxt "error:sale.opportunity:"
msgid "Sale Opportunity \"%s\" must be cancelled before deletion."
-msgstr "Debe cancelar la oportunidad \"%s\" antes de borrar."
+msgstr "Debe cancelar la oportunidad \"%s\" antes de borrarla."
+
+msgctxt "field:sale.configuration,sale_opportunity_sequence:"
+msgid "Opportunity Reference Sequence"
+msgstr "Secuencia referencia oportunidad"
msgctxt "field:sale.opportunity,address:"
msgid "Address"
@@ -80,12 +84,16 @@ msgstr "Plazo de pago"
msgctxt "field:sale.opportunity,probability:"
msgid "Conversion Probability"
-msgstr "Probabilidad de conversión"
+msgstr "Probabilidad de éxito"
msgctxt "field:sale.opportunity,rec_name:"
msgid "Name"
msgstr "Nombre"
+msgctxt "field:sale.opportunity,reference:"
+msgid "Reference"
+msgstr "Referencia"
+
msgctxt "field:sale.opportunity,sale:"
msgid "Sale"
msgstr "Venta"
@@ -164,7 +172,7 @@ msgstr "Tercero"
msgctxt "field:sale.opportunity.history,probability:"
msgid "Conversion Probability"
-msgstr "Probabilidad de conversión"
+msgstr "Probabilidad de éxito"
msgctxt "field:sale.opportunity.history,rec_name:"
msgid "Name"
@@ -252,19 +260,19 @@ msgstr "Empresa"
msgctxt "field:sale.opportunity_employee,conversion_amount_rate:"
msgid "Conversion Amount Rate"
-msgstr "Tasa de importe convertido"
+msgstr "Porcentaje conseguido (sobre importe total)"
msgctxt "field:sale.opportunity_employee,conversion_rate:"
msgid "Conversion Rate"
-msgstr "Tasa de conversión"
+msgstr "Porcentaje conseguido (sobre el número)"
msgctxt "field:sale.opportunity_employee,converted:"
msgid "Converted"
-msgstr "Convertida"
+msgstr "Conseguidas"
msgctxt "field:sale.opportunity_employee,converted_amount:"
msgid "Converted Amount"
-msgstr "Importe convertido"
+msgstr "Importe conseguido"
msgctxt "field:sale.opportunity_employee,create_date:"
msgid "Create Date"
@@ -332,19 +340,19 @@ msgstr "Empresa"
msgctxt "field:sale.opportunity_employee_monthly,conversion_amount_rate:"
msgid "Conversion Amount Rate"
-msgstr "Tasa de importe convertido"
+msgstr "Porcentaje conseguido (sobre importe total)"
msgctxt "field:sale.opportunity_employee_monthly,conversion_rate:"
msgid "Conversion Rate"
-msgstr "Tasa de conversión"
+msgstr "Porcentaje conseguido (sobre el número)"
msgctxt "field:sale.opportunity_employee_monthly,converted:"
msgid "Converted"
-msgstr "Convertida"
+msgstr "Conseguidas"
msgctxt "field:sale.opportunity_employee_monthly,converted_amount:"
msgid "Converted Amount"
-msgstr "Importe convertido"
+msgstr "Importe conseguido"
msgctxt "field:sale.opportunity_employee_monthly,create_date:"
msgid "Create Date"
@@ -372,7 +380,7 @@ msgstr "ID"
msgctxt "field:sale.opportunity_employee_monthly,lost:"
msgid "Lost"
-msgstr "Perdida"
+msgstr "Perdidas"
msgctxt "field:sale.opportunity_employee_monthly,month:"
msgid "Month"
@@ -416,11 +424,11 @@ msgstr "Tasa de conversión"
msgctxt "field:sale.opportunity_monthly,converted:"
msgid "Converted"
-msgstr "Convertida"
+msgstr "Conseguidas"
msgctxt "field:sale.opportunity_monthly,converted_amount:"
msgid "Converted Amount"
-msgstr "Importe convertido"
+msgstr "Importe conseguido"
msgctxt "field:sale.opportunity_monthly,create_date:"
msgid "Create Date"
@@ -444,7 +452,7 @@ msgstr "ID"
msgctxt "field:sale.opportunity_monthly,lost:"
msgid "Lost"
-msgstr "Perdida"
+msgstr "Perdidas"
msgctxt "field:sale.opportunity_monthly,month:"
msgid "Month"
@@ -543,7 +551,7 @@ msgstr "Cancelada"
msgctxt ""
"model:ir.action.act_window.domain,name:act_opportunity_form_domain_converted"
msgid "Converted"
-msgstr "Convertida"
+msgstr "Conseguida"
msgctxt ""
"model:ir.action.act_window.domain,name:act_opportunity_form_domain_leads"
@@ -560,6 +568,14 @@ msgctxt ""
msgid "Opportunities"
msgstr "Oportunidades"
+msgctxt "model:ir.sequence,name:sequence_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Oportunidades"
+
+msgctxt "model:ir.sequence.type,name:sequence_type_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Oportunidades"
+
msgctxt "model:ir.ui.menu,name:menu_opportunity_employee_monthly_form"
msgid "Opportunities per Employee per Month"
msgstr "Oportunidades por empleado y mes"
@@ -594,7 +610,7 @@ msgstr "Historial de oportunidades"
msgctxt "model:sale.opportunity.line,name:"
msgid "Sale Opportunity Line"
-msgstr "Línia de oportunidad"
+msgstr "Línea de oportunidad"
msgctxt "model:sale.opportunity_employee,name:"
msgid "Sale Opportunity per Employee"
@@ -618,7 +634,7 @@ msgstr "Cancelada"
msgctxt "selection:sale.opportunity,state:"
msgid "Converted"
-msgstr "Convertida"
+msgstr "Conseguida"
msgctxt "selection:sale.opportunity,state:"
msgid "Lead"
@@ -638,7 +654,7 @@ msgstr "Cancelada"
msgctxt "selection:sale.opportunity.history,state:"
msgid "Converted"
-msgstr "Convertida"
+msgstr "Conseguida"
msgctxt "selection:sale.opportunity.history,state:"
msgid "Lead"
@@ -662,11 +678,11 @@ msgstr "Iniciativa/Oportunidad"
msgctxt "view:sale.opportunity.line:"
msgid "Sale Lead/Opportunity Line"
-msgstr "Línia iniciativa/oportunidad"
+msgstr "Línea iniciativa/oportunidad"
msgctxt "view:sale.opportunity.line:"
msgid "Sales Leads/Opportunities Lines"
-msgstr "Línias Iniciativas/Oportunidades"
+msgstr "Líneas Iniciativas/Oportunidades"
msgctxt "view:sale.opportunity:"
msgid "Cancel"
@@ -678,7 +694,7 @@ msgstr "Convertir a oportunidad"
msgctxt "view:sale.opportunity:"
msgid "Convert to Sale"
-msgstr "Convertir a pedido"
+msgstr "Convertir a pedido de venta"
msgctxt "view:sale.opportunity:"
msgid "Lead/Opportunity"
@@ -710,7 +726,7 @@ msgstr "Oportunidades por empleado"
msgctxt "view:sale.opportunity_employee_monthly:"
msgid "Sale Opportunities per Month"
-msgstr "Oportunidades por mes"
+msgstr "Oportunidades por empleado y mes"
msgctxt "view:sale.opportunity_monthly:"
msgid "Sale Opportunities per Month"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 627f76c..f0cd616 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -10,6 +10,10 @@ msgctxt "error:sale.opportunity:"
msgid "Sale Opportunity \"%s\" must be cancelled before deletion."
msgstr "L'opportunité de vente \"%s\" doit être annulée avant sa suppression."
+msgctxt "field:sale.configuration,sale_opportunity_sequence:"
+msgid "Opportunity Reference Sequence"
+msgstr "Séquence de référence d'opportunité"
+
msgctxt "field:sale.opportunity,address:"
msgid "Address"
msgstr "Adresse"
@@ -86,6 +90,10 @@ msgctxt "field:sale.opportunity,rec_name:"
msgid "Name"
msgstr "Nom"
+msgctxt "field:sale.opportunity,reference:"
+msgid "Reference"
+msgstr "Référence"
+
msgctxt "field:sale.opportunity,sale:"
msgid "Sale"
msgstr "Vente"
@@ -520,11 +528,11 @@ msgstr "Opportunités par employé"
msgctxt "model:ir.action,name:act_opportunity_form"
msgid "Leads and Opportunities"
-msgstr "Opportunités"
+msgstr "Prospects et opportunités"
msgctxt "model:ir.action,name:act_opportunity_form2"
msgid "Sales Leads/Opportunities"
-msgstr "Contacts commerciaux / Opportunités de vente"
+msgstr "Prospects / Opportunités de ventes"
msgctxt "model:ir.action,name:act_opportunity_monthly_form"
msgid "Opportunities per Month"
@@ -548,7 +556,7 @@ msgstr "Convertie"
msgctxt ""
"model:ir.action.act_window.domain,name:act_opportunity_form_domain_leads"
msgid "Leads"
-msgstr "Leads"
+msgstr "Prospects"
msgctxt ""
"model:ir.action.act_window.domain,name:act_opportunity_form_domain_lost"
@@ -560,6 +568,14 @@ msgctxt ""
msgid "Opportunities"
msgstr "Opportunités"
+msgctxt "model:ir.sequence,name:sequence_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Opportunité de vente"
+
+msgctxt "model:ir.sequence.type,name:sequence_type_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Opportunité de vente"
+
msgctxt "model:ir.ui.menu,name:menu_opportunity_employee_monthly_form"
msgid "Opportunities per Employee per Month"
msgstr "Opportunités par employé par mois"
@@ -570,7 +586,7 @@ msgstr "Opportunités par employé"
msgctxt "model:ir.ui.menu,name:menu_opportunity_form"
msgid "Leads and Opportunities"
-msgstr "Contacts et opportunités de vente"
+msgstr "Prospects et opportunités"
msgctxt "model:ir.ui.menu,name:menu_opportunity_monthly_form"
msgid "Opportunities per Month"
@@ -666,7 +682,7 @@ msgstr "Ligne de contact / Opportunité de vente"
msgctxt "view:sale.opportunity.line:"
msgid "Sales Leads/Opportunities Lines"
-msgstr "Lignes de contacts / Opportunités de vente"
+msgstr "Lignes de prospects / opportunités de vente"
msgctxt "view:sale.opportunity:"
msgid "Cancel"
@@ -694,7 +710,7 @@ msgstr "Contact commercial / Opportunité de vente"
msgctxt "view:sale.opportunity:"
msgid "Sales Leads/Opportunities"
-msgstr "Contacts commerciaux / Opportunités"
+msgstr "Prospects / Opportunités de ventes"
msgctxt "view:sale.opportunity:"
msgid "Set as Lead"
diff --git a/locale/nl_NL.po b/locale/nl_NL.po
index ba8c17a..b757949 100644
--- a/locale/nl_NL.po
+++ b/locale/nl_NL.po
@@ -10,6 +10,10 @@ msgctxt "error:sale.opportunity:"
msgid "Sale Opportunity \"%s\" must be cancelled before deletion."
msgstr ""
+msgctxt "field:sale.configuration,sale_opportunity_sequence:"
+msgid "Opportunity Reference Sequence"
+msgstr ""
+
#, fuzzy
msgctxt "field:sale.opportunity,address:"
msgid "Address"
@@ -100,6 +104,11 @@ msgid "Name"
msgstr "Naam bijlage"
#, fuzzy
+msgctxt "field:sale.opportunity,reference:"
+msgid "Reference"
+msgstr "Referentie"
+
+#, fuzzy
msgctxt "field:sale.opportunity,sale:"
msgid "Sale"
msgstr "Verkoop"
@@ -627,6 +636,14 @@ msgctxt ""
msgid "Opportunities"
msgstr ""
+msgctxt "model:ir.sequence,name:sequence_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr ""
+
+msgctxt "model:ir.sequence.type,name:sequence_type_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr ""
+
msgctxt "model:ir.ui.menu,name:menu_opportunity_employee_monthly_form"
msgid "Opportunities per Employee per Month"
msgstr ""
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
index f0c2acb..d216595 100644
--- a/locale/ru_RU.po
+++ b/locale/ru_RU.po
@@ -10,6 +10,10 @@ msgctxt "error:sale.opportunity:"
msgid "Sale Opportunity \"%s\" must be cancelled before deletion."
msgstr "Продажа Возможной \"%s\" должна быть отменена перед удалением."
+msgctxt "field:sale.configuration,sale_opportunity_sequence:"
+msgid "Opportunity Reference Sequence"
+msgstr ""
+
msgctxt "field:sale.opportunity,address:"
msgid "Address"
msgstr "Адрес"
@@ -86,6 +90,11 @@ msgctxt "field:sale.opportunity,rec_name:"
msgid "Name"
msgstr "Наименование"
+#, fuzzy
+msgctxt "field:sale.opportunity,reference:"
+msgid "Reference"
+msgstr "Ссылка"
+
msgctxt "field:sale.opportunity,sale:"
msgid "Sale"
msgstr "Продажа"
@@ -560,6 +569,16 @@ msgctxt ""
msgid "Opportunities"
msgstr "Возможные продажи"
+#, fuzzy
+msgctxt "model:ir.sequence,name:sequence_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Продажа Возможной"
+
+#, fuzzy
+msgctxt "model:ir.sequence.type,name:sequence_type_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Продажа Возможной"
+
msgctxt "model:ir.ui.menu,name:menu_opportunity_employee_monthly_form"
msgid "Opportunities per Employee per Month"
msgstr "Возможные продажи по сотрудникам по месяцам"
diff --git a/locale/de_DE.po b/locale/sl_SI.po
similarity index 75%
copy from locale/de_DE.po
copy to locale/sl_SI.po
index 6f7453d..784f937 100644
--- a/locale/de_DE.po
+++ b/locale/sl_SI.po
@@ -4,61 +4,63 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "error:sale.opportunity:"
msgid "Probability must be between 0 and 100."
-msgstr "Wahrscheinlichkeit muss zwischen 0 und 100 liegen."
+msgstr "Verjetnost mora biti med 0 in 100"
msgctxt "error:sale.opportunity:"
msgid "Sale Opportunity \"%s\" must be cancelled before deletion."
-msgstr ""
-"Verkaufschance \"%s\" muss annulliert werden, bevor sie gelöscht werden "
-"kann."
+msgstr "Prodajna priložnost \"%s\" more biti pred brisanjem preklicana."
+
+msgctxt "field:sale.configuration,sale_opportunity_sequence:"
+msgid "Opportunity Reference Sequence"
+msgstr "Štetje priložnosti"
msgctxt "field:sale.opportunity,address:"
msgid "Address"
-msgstr "Adresse"
+msgstr "Naslov"
msgctxt "field:sale.opportunity,amount:"
msgid "Amount"
-msgstr "Betrag"
+msgstr "Znesek"
msgctxt "field:sale.opportunity,comment:"
msgid "Comment"
-msgstr "Kommentar"
+msgstr "Opomba"
msgctxt "field:sale.opportunity,company:"
msgid "Company"
-msgstr "Unternehmen"
+msgstr "Podjetje"
msgctxt "field:sale.opportunity,create_date:"
msgid "Create Date"
-msgstr "Erstellungsdatum"
+msgstr "Ustvarjeno"
msgctxt "field:sale.opportunity,create_uid:"
msgid "Create User"
-msgstr "Erstellt durch"
+msgstr "Ustvaril"
msgctxt "field:sale.opportunity,currency:"
msgid "Currency"
-msgstr "Währung"
+msgstr "Valuta"
msgctxt "field:sale.opportunity,currency_digits:"
msgid "Currency Digits"
-msgstr "Währung (signifikante Stellen)"
+msgstr "Decimalke"
msgctxt "field:sale.opportunity,description:"
msgid "Description"
-msgstr "Bezeichnung"
+msgstr "Opis"
msgctxt "field:sale.opportunity,employee:"
msgid "Employee"
-msgstr "Mitarbeiter"
+msgstr "Zaposlenec"
msgctxt "field:sale.opportunity,end_date:"
msgid "End Date"
-msgstr "Enddatum"
+msgstr "Končni datum"
msgctxt "field:sale.opportunity,history:"
msgid "History"
-msgstr "Historie"
+msgstr "Zgodovina"
msgctxt "field:sale.opportunity,id:"
msgid "ID"
@@ -66,83 +68,87 @@ msgstr "ID"
msgctxt "field:sale.opportunity,lines:"
msgid "Lines"
-msgstr "Positionen"
+msgstr "Postavke"
msgctxt "field:sale.opportunity,lost_reason:"
msgid "Reason for loss"
-msgstr "Ursache für Verlust"
+msgstr "Razlog za zapravljeno priložnost"
msgctxt "field:sale.opportunity,party:"
msgid "Party"
-msgstr "Partei"
+msgstr "Stranka"
msgctxt "field:sale.opportunity,payment_term:"
msgid "Payment Term"
-msgstr "Zahlungsbedingung"
+msgstr "Plačilni rok"
msgctxt "field:sale.opportunity,probability:"
msgid "Conversion Probability"
-msgstr "Umwandlungswahrscheinlichkeit"
+msgstr "Verjetnost pretvorbe"
msgctxt "field:sale.opportunity,rec_name:"
msgid "Name"
-msgstr "Name"
+msgstr "Ime"
+
+msgctxt "field:sale.opportunity,reference:"
+msgid "Reference"
+msgstr "Sklic"
msgctxt "field:sale.opportunity,sale:"
msgid "Sale"
-msgstr "Verkauf"
+msgstr "Prodajni nalog"
msgctxt "field:sale.opportunity,start_date:"
msgid "Start Date"
-msgstr "Anfangsdatum"
+msgstr "Začetni datum"
msgctxt "field:sale.opportunity,state:"
msgid "State"
-msgstr "Status"
+msgstr "Stanje"
msgctxt "field:sale.opportunity,write_date:"
msgid "Write Date"
-msgstr "Zuletzt geändert"
+msgstr "Zapisano"
msgctxt "field:sale.opportunity,write_uid:"
msgid "Write User"
-msgstr "Letzte Änderung durch"
+msgstr "Zapisal"
msgctxt "field:sale.opportunity.history,address:"
msgid "Address"
-msgstr "Adresse"
+msgstr "Naslov"
msgctxt "field:sale.opportunity.history,comment:"
msgid "Comment"
-msgstr "Kommentar"
+msgstr "Opomba"
msgctxt "field:sale.opportunity.history,company:"
msgid "Company"
-msgstr "Unternehmen"
+msgstr "Podjetje"
msgctxt "field:sale.opportunity.history,create_date:"
msgid "Create Date"
-msgstr "Erstellungsdatum"
+msgstr "Ustvarjeno"
msgctxt "field:sale.opportunity.history,create_uid:"
msgid "Create User"
-msgstr "Erstellt durch"
+msgstr "Ustvaril"
msgctxt "field:sale.opportunity.history,date:"
msgid "Change Date"
-msgstr "Änderungsdatum"
+msgstr "Spremenjeno"
msgctxt "field:sale.opportunity.history,description:"
msgid "Description"
-msgstr "Bezeichnung"
+msgstr "Opis"
msgctxt "field:sale.opportunity.history,employee:"
msgid "Employee"
-msgstr "Mitarbeiter"
+msgstr "Zaposlenec"
msgctxt "field:sale.opportunity.history,end_date:"
msgid "End Date"
-msgstr "Enddatum"
+msgstr "Končni datum"
msgctxt "field:sale.opportunity.history,id:"
msgid "ID"
@@ -150,55 +156,55 @@ msgstr "ID"
msgctxt "field:sale.opportunity.history,lines:"
msgid "Lines"
-msgstr "Positionen"
+msgstr "Postavke"
msgctxt "field:sale.opportunity.history,lost_reason:"
msgid "Reason for loss"
-msgstr "Ursache für Verlust"
+msgstr "Razlog za zapravljeno priložnost"
msgctxt "field:sale.opportunity.history,opportunity:"
msgid "Sale Opportunity"
-msgstr "Verkaufschance"
+msgstr "Prodajna priložnost"
msgctxt "field:sale.opportunity.history,party:"
msgid "Party"
-msgstr "Partei"
+msgstr "Stranka"
msgctxt "field:sale.opportunity.history,probability:"
msgid "Conversion Probability"
-msgstr "Umwandlungswahrscheinlichkeit"
+msgstr "Verjetnost pretvorbe"
msgctxt "field:sale.opportunity.history,rec_name:"
msgid "Name"
-msgstr "Name"
+msgstr "Ime"
msgctxt "field:sale.opportunity.history,start_date:"
msgid "Start Date"
-msgstr "Anfangsdatum"
+msgstr "Začetni datum"
msgctxt "field:sale.opportunity.history,state:"
msgid "State"
-msgstr "Status"
+msgstr "Stanje"
msgctxt "field:sale.opportunity.history,user:"
msgid "User"
-msgstr "Benutzer"
+msgstr "Uporabnik"
msgctxt "field:sale.opportunity.history,write_date:"
msgid "Write Date"
-msgstr "Zuletzt geändert"
+msgstr "Zapisano"
msgctxt "field:sale.opportunity.history,write_uid:"
msgid "Write User"
-msgstr "Letzte Änderung durch"
+msgstr "Zapisal"
msgctxt "field:sale.opportunity.line,create_date:"
msgid "Create Date"
-msgstr "Erstellungsdatum"
+msgstr "Ustvarjeno"
msgctxt "field:sale.opportunity.line,create_uid:"
msgid "Create User"
-msgstr "Erstellt durch"
+msgstr "Ustvaril"
msgctxt "field:sale.opportunity.line,id:"
msgid "ID"
@@ -206,87 +212,87 @@ msgstr "ID"
msgctxt "field:sale.opportunity.line,opportunity:"
msgid "Opportunity"
-msgstr "Verkaufschance"
+msgstr "Priložnost"
msgctxt "field:sale.opportunity.line,product:"
msgid "Product"
-msgstr "Artikel"
+msgstr "Izdelek"
msgctxt "field:sale.opportunity.line,quantity:"
msgid "Quantity"
-msgstr "Anzahl"
+msgstr "Količina"
msgctxt "field:sale.opportunity.line,rec_name:"
msgid "Name"
-msgstr "Name"
+msgstr "Ime"
msgctxt "field:sale.opportunity.line,sale_line:"
msgid "Sale Line"
-msgstr "Position Verkauf"
+msgstr "Prodajna postavka"
msgctxt "field:sale.opportunity.line,sequence:"
msgid "Sequence"
-msgstr "Reihenfolge"
+msgstr "Zap.št."
msgctxt "field:sale.opportunity.line,unit:"
msgid "Unit"
-msgstr "Einheit"
+msgstr "Enota"
msgctxt "field:sale.opportunity.line,unit_digits:"
msgid "Unit Digits"
-msgstr "Einheit Anzahl Stellen"
+msgstr "Decimalke"
msgctxt "field:sale.opportunity.line,write_date:"
msgid "Write Date"
-msgstr "Zuletzt geändert"
+msgstr "Zapisano"
msgctxt "field:sale.opportunity.line,write_uid:"
msgid "Write User"
-msgstr "Letzte Änderung durch"
+msgstr "Zapisal"
msgctxt "field:sale.opportunity_employee,amount:"
msgid "Amount"
-msgstr "Betrag"
+msgstr "Znesek"
msgctxt "field:sale.opportunity_employee,company:"
msgid "Company"
-msgstr "Unternehmen"
+msgstr "Podjetje"
msgctxt "field:sale.opportunity_employee,conversion_amount_rate:"
msgid "Conversion Amount Rate"
-msgstr "Umwandlungsrate Betrag"
+msgstr "Stopnja pretvorjenega zneska"
msgctxt "field:sale.opportunity_employee,conversion_rate:"
msgid "Conversion Rate"
-msgstr "Umwandlungsrate"
+msgstr "Stopnja pretvorbe"
msgctxt "field:sale.opportunity_employee,converted:"
msgid "Converted"
-msgstr "Umgewandelt"
+msgstr "Pretvorjeno"
msgctxt "field:sale.opportunity_employee,converted_amount:"
msgid "Converted Amount"
-msgstr "Umgewandelter Betrag"
+msgstr "Pretvorjen znesek"
msgctxt "field:sale.opportunity_employee,create_date:"
msgid "Create Date"
-msgstr "Erstellungsdatum"
+msgstr "Ustvarjeno"
msgctxt "field:sale.opportunity_employee,create_uid:"
msgid "Create User"
-msgstr "Erstellt durch"
+msgstr "Ustvaril"
msgctxt "field:sale.opportunity_employee,currency:"
msgid "Currency"
-msgstr "Währung"
+msgstr "Valuta"
msgctxt "field:sale.opportunity_employee,currency_digits:"
msgid "Currency Digits"
-msgstr "Währung (signifikante Stellen)"
+msgstr "Decimalke"
msgctxt "field:sale.opportunity_employee,employee:"
msgid "Employee"
-msgstr "Mitarbeiter"
+msgstr "Zaposlenec"
msgctxt "field:sale.opportunity_employee,id:"
msgid "ID"
@@ -294,27 +300,27 @@ msgstr "ID"
msgctxt "field:sale.opportunity_employee,lost:"
msgid "Lost"
-msgstr "Verlust"
+msgstr "Zapravljeno"
msgctxt "field:sale.opportunity_employee,number:"
msgid "Number"
-msgstr "Nummer"
+msgstr "Številka"
msgctxt "field:sale.opportunity_employee,rec_name:"
msgid "Name"
-msgstr "Name"
+msgstr "Ime"
msgctxt "field:sale.opportunity_employee,write_date:"
msgid "Write Date"
-msgstr "Zuletzt geändert"
+msgstr "Zapisano"
msgctxt "field:sale.opportunity_employee,write_uid:"
msgid "Write User"
-msgstr "Letzte Änderung durch"
+msgstr "Zapisal"
msgctxt "field:sale.opportunity_employee.open.start,end_date:"
msgid "End Date"
-msgstr "Enddatum"
+msgstr "Končni datum"
msgctxt "field:sale.opportunity_employee.open.start,id:"
msgid "ID"
@@ -322,51 +328,51 @@ msgstr "ID"
msgctxt "field:sale.opportunity_employee.open.start,start_date:"
msgid "Start Date"
-msgstr "Anfangsdatum"
+msgstr "Začetni datum"
msgctxt "field:sale.opportunity_employee_monthly,amount:"
msgid "Amount"
-msgstr "Betrag"
+msgstr "Znesek"
msgctxt "field:sale.opportunity_employee_monthly,company:"
msgid "Company"
-msgstr "Unternehmen"
+msgstr "Podjetje"
msgctxt "field:sale.opportunity_employee_monthly,conversion_amount_rate:"
msgid "Conversion Amount Rate"
-msgstr "Umwandlungsrate Betrag"
+msgstr "Stopnja pretvorjenega zneska"
msgctxt "field:sale.opportunity_employee_monthly,conversion_rate:"
msgid "Conversion Rate"
-msgstr "Umwandlungsrate"
+msgstr "Stopnja pretvorbe"
msgctxt "field:sale.opportunity_employee_monthly,converted:"
msgid "Converted"
-msgstr "Umgewandelt"
+msgstr "Pretvorjeno"
msgctxt "field:sale.opportunity_employee_monthly,converted_amount:"
msgid "Converted Amount"
-msgstr "Umgewandelter Betrag"
+msgstr "Pretvorjen znesek"
msgctxt "field:sale.opportunity_employee_monthly,create_date:"
msgid "Create Date"
-msgstr "Erstellungsdatum"
+msgstr "Ustvarjeno"
msgctxt "field:sale.opportunity_employee_monthly,create_uid:"
msgid "Create User"
-msgstr "Erstellt durch"
+msgstr "Ustvaril"
msgctxt "field:sale.opportunity_employee_monthly,currency:"
msgid "Currency"
-msgstr "Währung"
+msgstr "Valuta"
msgctxt "field:sale.opportunity_employee_monthly,currency_digits:"
msgid "Currency Digits"
-msgstr "Währung (signifikante Stellen)"
+msgstr "Decimalke"
msgctxt "field:sale.opportunity_employee_monthly,employee:"
msgid "Employee"
-msgstr "Mitarbeiter"
+msgstr "Zaposlenec"
msgctxt "field:sale.opportunity_employee_monthly,id:"
msgid "ID"
@@ -374,71 +380,71 @@ msgstr "ID"
msgctxt "field:sale.opportunity_employee_monthly,lost:"
msgid "Lost"
-msgstr "Verlust"
+msgstr "Zapravljeno"
msgctxt "field:sale.opportunity_employee_monthly,month:"
msgid "Month"
-msgstr "Monat"
+msgstr "Mesec"
msgctxt "field:sale.opportunity_employee_monthly,number:"
msgid "Number"
-msgstr "Nummer"
+msgstr "Številka"
msgctxt "field:sale.opportunity_employee_monthly,rec_name:"
msgid "Name"
-msgstr "Name"
+msgstr "Ime"
msgctxt "field:sale.opportunity_employee_monthly,write_date:"
msgid "Write Date"
-msgstr "Zuletzt geändert"
+msgstr "Zapisano"
msgctxt "field:sale.opportunity_employee_monthly,write_uid:"
msgid "Write User"
-msgstr "Letzte Änderung durch"
+msgstr "Zapisal"
msgctxt "field:sale.opportunity_employee_monthly,year:"
msgid "Year"
-msgstr "Jahr"
+msgstr "Leto"
msgctxt "field:sale.opportunity_monthly,amount:"
msgid "Amount"
-msgstr "Betrag"
+msgstr "Znesek"
msgctxt "field:sale.opportunity_monthly,company:"
msgid "Company"
-msgstr "Unternehmen"
+msgstr "Podjetje"
msgctxt "field:sale.opportunity_monthly,conversion_amount_rate:"
msgid "Conversion Amount Rate"
-msgstr "Umwandlungsrate Betrag"
+msgstr "Stopnja pretvorjenega zneska"
msgctxt "field:sale.opportunity_monthly,conversion_rate:"
msgid "Conversion Rate"
-msgstr "Umwandlungsrate"
+msgstr "Stopnja pretvorbe"
msgctxt "field:sale.opportunity_monthly,converted:"
msgid "Converted"
-msgstr "Umgewandelt"
+msgstr "Pretvorjeno"
msgctxt "field:sale.opportunity_monthly,converted_amount:"
msgid "Converted Amount"
-msgstr "Umgewandelter Betrag"
+msgstr "Pretvorjen znesek"
msgctxt "field:sale.opportunity_monthly,create_date:"
msgid "Create Date"
-msgstr "Erstellungsdatum"
+msgstr "Ustvarjeno"
msgctxt "field:sale.opportunity_monthly,create_uid:"
msgid "Create User"
-msgstr "Erstellt durch"
+msgstr "Ustvaril"
msgctxt "field:sale.opportunity_monthly,currency:"
msgid "Currency"
-msgstr "Währung"
+msgstr "Valuta"
msgctxt "field:sale.opportunity_monthly,currency_digits:"
msgid "Currency Digits"
-msgstr "Währung (signifikante Stellen)"
+msgstr "Decimalke"
msgctxt "field:sale.opportunity_monthly,id:"
msgid "ID"
@@ -446,282 +452,290 @@ msgstr "ID"
msgctxt "field:sale.opportunity_monthly,lost:"
msgid "Lost"
-msgstr "Verlust"
+msgstr "Zapravljeno"
msgctxt "field:sale.opportunity_monthly,month:"
msgid "Month"
-msgstr "Monat"
+msgstr "Mesec"
msgctxt "field:sale.opportunity_monthly,number:"
msgid "Number"
-msgstr "Nummer"
+msgstr "Številka"
msgctxt "field:sale.opportunity_monthly,rec_name:"
msgid "Name"
-msgstr "Name"
+msgstr "Ime"
msgctxt "field:sale.opportunity_monthly,write_date:"
msgid "Write Date"
-msgstr "Zuletzt geändert"
+msgstr "Zapisano"
msgctxt "field:sale.opportunity_monthly,write_uid:"
msgid "Write User"
-msgstr "Letzte Änderung durch"
+msgstr "Zapisal"
msgctxt "field:sale.opportunity_monthly,year:"
msgid "Year"
-msgstr "Jahr"
+msgstr "Leto"
msgctxt "field:sale.opportunity_monthly,year_month:"
msgid "Year-Month"
-msgstr "Jahr-Monat"
+msgstr "Leto-Mesec"
msgctxt "help:sale.opportunity,amount:"
msgid "Estimated revenue amount"
-msgstr "Geschätzter Ertrag"
+msgstr "Ocenjen znesek prihodkov"
msgctxt "help:sale.opportunity,probability:"
msgid "Percentage between 0 and 100"
-msgstr "Prozentsatz zwischen 0 und 100"
+msgstr "Odstotek med 0 in 100"
msgctxt "help:sale.opportunity_employee,conversion_amount_rate:"
msgid "In %"
-msgstr "In %"
+msgstr "V %"
msgctxt "help:sale.opportunity_employee,conversion_rate:"
msgid "In %"
-msgstr "In %"
+msgstr "V %"
msgctxt "help:sale.opportunity_employee_monthly,conversion_amount_rate:"
msgid "In %"
-msgstr "In %"
+msgstr "V %"
msgctxt "help:sale.opportunity_employee_monthly,conversion_rate:"
msgid "In %"
-msgstr "In %"
+msgstr "V %"
msgctxt "help:sale.opportunity_monthly,conversion_amount_rate:"
msgid "In %"
-msgstr "In %"
+msgstr "V %"
msgctxt "help:sale.opportunity_monthly,conversion_rate:"
msgid "In %"
-msgstr "In %"
+msgstr "V %"
msgctxt "model:ir.action,name:act_opportunity_employee_form"
msgid "Opportunities per Employee"
-msgstr "Verkaufschancen pro Mitarbeiter"
+msgstr "Priložnosti na zaposlenca"
msgctxt "model:ir.action,name:act_opportunity_employee_monthly_form"
msgid "Opportunities per Employee per Month"
-msgstr "Verkaufschancen pro Mitarbeiter pro Monat"
+msgstr "Mesečne prodajne priložnosti"
msgctxt "model:ir.action,name:act_opportunity_employee_open"
msgid "Opportunities per Employee"
-msgstr "Verkaufschancen pro Mitarbeiter"
+msgstr "Priložnosti na zaposlenca"
msgctxt "model:ir.action,name:act_opportunity_form"
msgid "Leads and Opportunities"
-msgstr "Interessenten und Verkaufschancen"
+msgstr "Sledi in priložnosti"
msgctxt "model:ir.action,name:act_opportunity_form2"
msgid "Sales Leads/Opportunities"
-msgstr "Interessenten/Verkaufschancen"
+msgstr "Prodajne sledi/priložnosti"
msgctxt "model:ir.action,name:act_opportunity_monthly_form"
msgid "Opportunities per Month"
-msgstr "Verkaufschancen pro Monat"
+msgstr "Priložnosti na mesec"
msgctxt ""
"model:ir.action.act_window.domain,name:act_opportunity_form_domain_all"
msgid "All"
-msgstr "Alle"
+msgstr "Vse"
msgctxt ""
"model:ir.action.act_window.domain,name:act_opportunity_form_domain_cancelled"
msgid "Cancelled"
-msgstr "Annulliert"
+msgstr "Preklicano"
msgctxt ""
"model:ir.action.act_window.domain,name:act_opportunity_form_domain_converted"
msgid "Converted"
-msgstr "Umgewandelt"
+msgstr "Pretvorjeno"
msgctxt ""
"model:ir.action.act_window.domain,name:act_opportunity_form_domain_leads"
msgid "Leads"
-msgstr "Interessenten"
+msgstr "Sledi"
msgctxt ""
"model:ir.action.act_window.domain,name:act_opportunity_form_domain_lost"
msgid "Lost"
-msgstr "Verlust"
+msgstr "Zapravljeno"
msgctxt ""
"model:ir.action.act_window.domain,name:act_opportunity_form_domain_opportunities"
msgid "Opportunities"
-msgstr "Verkaufschancen"
+msgstr "Priložnosti"
+
+msgctxt "model:ir.sequence,name:sequence_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Prodajna priložnost"
+
+msgctxt "model:ir.sequence.type,name:sequence_type_sale_opportunity"
+msgid "Sale Opportunity"
+msgstr "Prodajna priložnost"
msgctxt "model:ir.ui.menu,name:menu_opportunity_employee_monthly_form"
msgid "Opportunities per Employee per Month"
-msgstr "Verkaufschancen pro Mitarbeiter pro Monat"
+msgstr "Mesečne priložnosti na zaposlenca"
msgctxt "model:ir.ui.menu,name:menu_opportunity_employee_open"
msgid "Opportunities per Employee"
-msgstr "Verkaufschancen pro Mitarbeiter"
+msgstr "Priložnosti na zaposlenca"
msgctxt "model:ir.ui.menu,name:menu_opportunity_form"
msgid "Leads and Opportunities"
-msgstr "Interessenten und Verkaufschancen"
+msgstr "Sledi in priložnosti"
msgctxt "model:ir.ui.menu,name:menu_opportunity_monthly_form"
msgid "Opportunities per Month"
-msgstr "Verkaufschancen pro Monat"
+msgstr "Priložnosti na mesec"
msgctxt "model:ir.ui.menu,name:menu_reporting"
msgid "Reporting"
-msgstr "Auswertungen"
+msgstr "Poročila"
msgctxt "model:res.group,name:group_opportunity"
msgid "Sale Opportunity"
-msgstr "Verkaufschance"
+msgstr "Prodajna priložnost"
msgctxt "model:sale.opportunity,name:"
msgid "Sale Opportunity"
-msgstr "Verkaufschance"
+msgstr "Prodajna priložnost"
msgctxt "model:sale.opportunity.history,name:"
msgid "Sale Opportunity History"
-msgstr "Verkaufschancen Historie"
+msgstr "Zgodovina prodajne priložnosti"
msgctxt "model:sale.opportunity.line,name:"
msgid "Sale Opportunity Line"
-msgstr "Verkaufschance Position"
+msgstr "Postavka prodajne priložnosti"
msgctxt "model:sale.opportunity_employee,name:"
msgid "Sale Opportunity per Employee"
-msgstr "Verkaufschance pro Mitarbeiter"
+msgstr "Prodajna priložnost na zaposlenca"
msgctxt "model:sale.opportunity_employee.open.start,name:"
msgid "Open Sale Opportunity per Employee"
-msgstr " Verkaufschancen pro Mitarbeiter Öffnen"
+msgstr "Odpri prodajno priložnost na zaposlenca"
msgctxt "model:sale.opportunity_employee_monthly,name:"
msgid "Sale Opportunity per Employee per Month"
-msgstr "Verkaufschance pro Mitarbeiter pro Monat"
+msgstr "Mesečna prodajna priložnost na zaposlenca"
msgctxt "model:sale.opportunity_monthly,name:"
msgid "Sale Opportunity per Month"
-msgstr "Verkaufschance pro Monat"
+msgstr "Mesečna prodajna priložnost"
msgctxt "selection:sale.opportunity,state:"
msgid "Cancelled"
-msgstr "Annulliert"
+msgstr "Preklicano"
msgctxt "selection:sale.opportunity,state:"
msgid "Converted"
-msgstr "Umgewandelt"
+msgstr "Pretvorjeno"
msgctxt "selection:sale.opportunity,state:"
msgid "Lead"
-msgstr "Interessent"
+msgstr "Sled"
msgctxt "selection:sale.opportunity,state:"
msgid "Lost"
-msgstr "Verlust"
+msgstr "Zapravljeno"
msgctxt "selection:sale.opportunity,state:"
msgid "Opportunity"
-msgstr "Verkaufschance"
+msgstr "Priložnost"
msgctxt "selection:sale.opportunity.history,state:"
msgid "Cancelled"
-msgstr "Annulliert"
+msgstr "Preklicano"
msgctxt "selection:sale.opportunity.history,state:"
msgid "Converted"
-msgstr "Umgewandelt"
+msgstr "Pretvorjeno"
msgctxt "selection:sale.opportunity.history,state:"
msgid "Lead"
-msgstr "Interessent"
+msgstr "Sled"
msgctxt "selection:sale.opportunity.history,state:"
msgid "Lost"
-msgstr "Verlust"
+msgstr "Zapravljeno"
msgctxt "selection:sale.opportunity.history,state:"
msgid "Opportunity"
-msgstr "Chance"
+msgstr "Priložnost"
msgctxt "view:sale.opportunity.history:"
msgid "History"
-msgstr "Historie"
+msgstr "Zgodovina"
msgctxt "view:sale.opportunity.history:"
msgid "Lead/Opportunity"
-msgstr "Interessent/Chance"
+msgstr "Sled/Priložnost"
msgctxt "view:sale.opportunity.line:"
msgid "Sale Lead/Opportunity Line"
-msgstr "Interessent/Verkaufschance"
+msgstr "Postavka prodajne sledi/priložnosti"
msgctxt "view:sale.opportunity.line:"
msgid "Sales Leads/Opportunities Lines"
-msgstr "Interessenten/Verkaufschancen"
+msgstr "Postavke prodajnih sledi/priložnosti"
msgctxt "view:sale.opportunity:"
msgid "Cancel"
-msgstr "Annullieren"
+msgstr "Preklic"
msgctxt "view:sale.opportunity:"
msgid "Convert to Opportunity"
-msgstr "In Verkaufschance umwandeln"
+msgstr "Pretvorba v priložnost"
msgctxt "view:sale.opportunity:"
msgid "Convert to Sale"
-msgstr "In Verkauf umwandeln"
+msgstr "Pretvorba v prodajni nalog"
msgctxt "view:sale.opportunity:"
msgid "Lead/Opportunity"
-msgstr "Interessent/Chance"
+msgstr "Sled/Priložnost"
msgctxt "view:sale.opportunity:"
msgid "Mark as Lost"
-msgstr "Als Verlust markieren"
+msgstr "Označitev kot zapravljeno"
msgctxt "view:sale.opportunity:"
msgid "Sale Lead/Opportunity"
-msgstr "Interessent/Verkaufschance"
+msgstr "Prodajna sled/priložnost"
msgctxt "view:sale.opportunity:"
msgid "Sales Leads/Opportunities"
-msgstr "Interessenten/Verkaufschancen"
+msgstr "Prodajne sledi/priložnosti"
msgctxt "view:sale.opportunity:"
msgid "Set as Lead"
-msgstr "Auf Interessent setzen"
+msgstr "Preklop na sled"
msgctxt "view:sale.opportunity_employee.open.start:"
msgid "Sale Opportunities per Employee"
-msgstr "Verkaufschancen pro Mitarbeiter"
+msgstr "Prodajne priložnosti na zaposlenca"
msgctxt "view:sale.opportunity_employee:"
msgid "Opportunities per Employee"
-msgstr "Verkaufschancen pro Mitarbeiter"
+msgstr "Priložnosti na zaposlenca"
msgctxt "view:sale.opportunity_employee_monthly:"
msgid "Sale Opportunities per Month"
-msgstr "Verkaufschancen pro Monat"
+msgstr "Prodajne priložnosti na mesec"
msgctxt "view:sale.opportunity_monthly:"
msgid "Sale Opportunities per Month"
-msgstr "Verkaufschancen pro Mitarbeiter"
+msgstr "Prodajne priložnosti na mesec"
msgctxt "wizard_button:sale.opportunity_employee.open,start,end:"
msgid "Cancel"
-msgstr "Abbrechen"
+msgstr "Prekliči"
msgctxt "wizard_button:sale.opportunity_employee.open,start,open_:"
msgid "Open"
-msgstr "Öffnen"
+msgstr "Odpri"
diff --git a/opportunity.py b/opportunity.py
index c26cc16..08760c1 100644
--- a/opportunity.py
+++ b/opportunity.py
@@ -3,9 +3,14 @@
"Sales extension for managing leads and opportunities"
import datetime
import time
+from sql import Column, Literal
+from sql.aggregate import Min, Max, Count, Sum
+from sql.conditionals import Coalesce, Case
+from sql.functions import Extract
+
from trytond.model import ModelView, ModelSQL, Workflow, fields
from trytond.wizard import Wizard, StateView, StateAction, Button
-from trytond.backend import FIELDS, TableHandler
+from trytond import backend
from trytond.pyson import Equal, Eval, Not, In, If, Get, PYSONEncoder
from trytond.transaction import Transaction
from trytond.pool import Pool
@@ -36,9 +41,14 @@ class SaleOpportunity(Workflow, ModelSQL, ModelView):
'Sale Opportunity'
__name__ = "sale.opportunity"
_history = True
- _rec_name = 'description'
- party = fields.Many2One('party.party', 'Party', required=True, select=True,
- on_change=['party'], states=_STATES_STOP, depends=_DEPENDS_STOP)
+ _rec_name = 'reference'
+ reference = fields.Char('Reference', readonly=True, required=True,
+ select=True)
+ party = fields.Many2One('party.party', 'Party', select=True,
+ on_change=['party'], states={
+ 'readonly': Eval('state').in_(['converted', 'lost', 'cancelled']),
+ 'required': ~Eval('state').in_(['lead', 'lost', 'cancelled']),
+ }, depends=['state'])
address = fields.Many2One('party.address', 'Address',
domain=[('party', '=', Eval('party'))],
select=True, depends=['party', 'state'],
@@ -92,6 +102,29 @@ class SaleOpportunity(Workflow, ModelSQL, ModelView):
}, depends=['state'])
@classmethod
+ def __register__(cls, module_name):
+ cursor = Transaction().cursor
+ TableHandler = backend.get('TableHandler')
+ sql_table = cls.__table__()
+
+ reference_exists = True
+ if TableHandler.table_exist(cursor, cls._table):
+ table = TableHandler(cursor, cls, module_name)
+ reference_exists = table.column_exist('reference')
+ super(SaleOpportunity, cls).__register__(module_name)
+ table = TableHandler(cursor, cls, module_name)
+
+ # Migration from 2.8: make party not required and add reference as
+ # required
+ table.not_null_action('party', action='remove')
+ if not reference_exists:
+ cursor.execute(*sql_table.update(
+ columns=[sql_table.reference],
+ values=[sql_table.id],
+ where=sql_table.reference == None))
+ table.not_null_action('reference', action='add')
+
+ @classmethod
def __setup__(cls):
super(SaleOpportunity, cls).__setup__()
cls._order.insert(0, ('start_date', 'DESC'))
@@ -171,6 +204,27 @@ class SaleOpportunity(Workflow, ModelSQL, ModelView):
if len(payment_terms) == 1:
return payment_terms[0].id
+ @classmethod
+ def create(cls, vlist):
+ pool = Pool()
+ Sequence = pool.get('ir.sequence')
+ Config = pool.get('sale.configuration')
+
+ sequence = Config(1).sale_opportunity_sequence
+ vlist = [x.copy() for x in vlist]
+ for vals in vlist:
+ vals['reference'] = Sequence.get_id(sequence.id)
+ return super(SaleOpportunity, cls).create(vlist)
+
+ @classmethod
+ def copy(cls, opportunities, default=None):
+ if default is None:
+ default = {}
+ default = default.copy()
+ default.setdefault('reference', None)
+ default.setdefault('history', None)
+ return super(SaleOpportunity, cls).copy(opportunities, default=default)
+
def get_currency(self, name):
return self.company.currency.id
@@ -316,9 +370,7 @@ class SaleOpportunityLine(ModelSQL, ModelView):
_rec_name = "product"
_history = True
opportunity = fields.Many2One('sale.opportunity', 'Opportunity')
- sequence = fields.Integer('Sequence',
- order_field='(%(table)s.sequence IS NULL) %(order)s, '
- '%(table)s.sequence %(order)s')
+ sequence = fields.Integer('Sequence')
product = fields.Many2One('product.product', 'Product', required=True,
domain=[('salable', '=', True)], on_change=['product', 'unit'])
quantity = fields.Float('Quantity', required=True,
@@ -339,6 +391,7 @@ class SaleOpportunityLine(ModelSQL, ModelView):
@classmethod
def __register__(cls, module_name):
+ TableHandler = backend.get('TableHandler')
cursor = Transaction().cursor
table = TableHandler(cursor, cls, module_name)
@@ -347,6 +400,11 @@ class SaleOpportunityLine(ModelSQL, ModelView):
# Migration from 2.4: drop required on sequence
table.not_null_action('sequence', action='remove')
+ @staticmethod
+ def order_sequence(tables):
+ table, _ = tables[None]
+ return [table.sequence == None, table.sequence]
+
def on_change_with_unit_digits(self, name=None):
if self.unit:
return self.unit.digits
@@ -418,40 +476,34 @@ class SaleOpportunityHistory(ModelSQL, ModelView):
cls._order.insert(0, ('date', 'DESC'))
@classmethod
- def _table_query_fields(cls):
- Opportunity = Pool().get('sale.opportunity')
- table = '%s__history' % Opportunity._table
- return [
- 'MIN("%s".__id) AS id' % table,
- '"%s".id AS opportunity' % table,
- ('MIN(COALESCE("%s".write_date, "%s".create_date)) AS date'
- % (table, table)),
- ('COALESCE("%s".write_uid, "%s".create_uid) AS user'
- % (table, table)),
- ] + ['"%s"."%s"' % (table, name)
- for name, field in cls._fields.iteritems()
- if name not in ('id', 'opportunity', 'date', 'user')
- and not hasattr(field, 'set')]
-
- @classmethod
- def _table_query_group(cls):
- Opportunity = Pool().get('sale.opportunity')
- table = '%s__history' % Opportunity._table
- return [
- '"%s".id' % table,
- 'COALESCE("%s".write_uid, "%s".create_uid)' % (table, table),
- ] + ['"%s"."%s"' % (table, name)
- for name, field in cls._fields.iteritems()
- if (name not in ('id', 'opportunity', 'date', 'user')
- and not hasattr(field, 'set'))]
-
- @classmethod
def table_query(cls):
Opportunity = Pool().get('sale.opportunity')
- return (('SELECT ' + (', '.join(cls._table_query_fields()))
- + ' FROM "%s__history" GROUP BY '
- + (', '.join(cls._table_query_group())))
- % Opportunity._table, [])
+ opportunity_history = Opportunity.__table_history__()
+ columns = [
+ Min(Column(opportunity_history, '__id')).as_('id'),
+ opportunity_history.id.as_('opportunity'),
+ Min(Coalesce(opportunity_history.write_date,
+ opportunity_history.create_date)).as_('date'),
+ Coalesce(opportunity_history.write_uid,
+ opportunity_history.create_uid).as_('user'),
+ ]
+ group_by = [
+ opportunity_history.id,
+ Coalesce(opportunity_history.write_uid,
+ opportunity_history.create_uid),
+ ]
+ for name, field in cls._fields.iteritems():
+ if name in ('id', 'opportunity', 'date', 'user'):
+ continue
+ try:
+ field.sql_type()
+ except NotImplementedError:
+ continue
+ column = Column(opportunity_history, name)
+ columns.append(column.as_(name))
+ group_by.append(column)
+
+ return opportunity_history.select(*columns, group_by=group_by)
def get_lines(self, name):
Line = Pool().get('sale.opportunity.line')
@@ -510,35 +562,33 @@ class SaleOpportunityEmployee(ModelSQL, ModelView):
@classmethod
def table_query(cls):
Opportunity = Pool().get('sale.opportunity')
- clause = ' '
- args = [True]
+ opportunity = Opportunity.__table__()
+ where = Literal(True)
if Transaction().context.get('start_date'):
- clause += 'AND start_date >= %s '
- args.append(Transaction().context['start_date'])
+ where &= (opportunity.start_date >=
+ Transaction().context['start_date'])
if Transaction().context.get('end_date'):
- clause += 'AND start_date <= %s '
- args.append(Transaction().context['end_date'])
- return ('SELECT DISTINCT(employee) AS id, '
- 'MAX(create_uid) AS create_uid, '
- 'MAX(create_date) AS create_date, '
- 'MAX(write_uid) AS write_uid, '
- 'MAX(write_date) AS write_date, '
- 'employee, '
- 'company, '
- 'COUNT(1) AS number, '
- 'SUM(CASE WHEN state IN (' + ','.join("'%s'" % x
- for x in cls._converted_state()) + ') '
- 'THEN 1 ELSE 0 END) AS converted, '
- 'SUM(CASE WHEN state IN (' + ','.join("'%s'" % x
- for x in cls._lost_state()) + ') '
- 'THEN 1 ELSE 0 END) AS lost, '
- 'SUM(amount) AS amount, '
- 'SUM(CASE WHEN state IN (' + ','.join("'%s'" % x
- for x in cls._converted_state()) + ') '
- 'THEN amount ELSE 0 END) AS converted_amount '
- 'FROM "' + Opportunity._table + '" '
- 'WHERE %s ' + clause +
- 'GROUP BY employee, company', args)
+ where &= (opportunity.start_date <=
+ Transaction().context['end_date'])
+ return opportunity.select(
+ opportunity.employee.as_('id'),
+ Max(opportunity.create_uid).as_('create_uid'),
+ Max(opportunity.create_date).as_('create_date'),
+ Max(opportunity.write_uid).as_('write_uid'),
+ Max(opportunity.write_date).as_('write_date'),
+ opportunity.employee,
+ opportunity.company,
+ Count(Literal(1)).as_('number'),
+ Sum(Case((opportunity.state.in_(cls._converted_state()),
+ Literal(1)), else_=Literal(0))).as_('converted'),
+ Sum(Case((opportunity.state.in_(cls._lost_state()),
+ Literal(1)), else_=Literal(0))).as_('lost'),
+ Sum(opportunity.amount).as_('amount'),
+ Sum(Case((opportunity.state.in_(cls._converted_state()),
+ opportunity.amount),
+ else_=Literal(0))).as_('converted_amount'),
+ where=where,
+ group_by=(opportunity.employee, opportunity.company))
def get_conversion_rate(self, name):
if self.number:
@@ -626,36 +676,33 @@ class SaleOpportunityMonthly(ModelSQL, ModelView):
@classmethod
def table_query(cls):
Opportunity = Pool().get('sale.opportunity')
- type_id = FIELDS[cls.id._type].sql_type(cls.id)[0]
- type_year = FIELDS[cls.year._type].sql_type(cls.year)[0]
- return ('SELECT CAST(id AS ' + type_id + ') AS id, create_uid, '
- 'create_date, write_uid, write_date, '
- 'CAST(year AS ' + type_year + ') AS year, month, company, '
- 'number, converted, lost, amount, converted_amount '
- 'FROM ('
- 'SELECT EXTRACT(MONTH FROM start_date) + '
- 'EXTRACT(YEAR FROM start_date) * 100 AS id, '
- 'MAX(create_uid) AS create_uid, '
- 'MAX(create_date) AS create_date, '
- 'MAX(write_uid) AS write_uid, '
- 'MAX(write_date) AS write_date, '
- 'EXTRACT(YEAR FROM start_date) AS year, '
- 'EXTRACT(MONTH FROM start_date) AS month, '
- 'company, '
- 'COUNT(1) AS number, '
- 'SUM(CASE WHEN state IN (' + ','.join("'%s'" % x
- for x in cls._converted_state()) + ') '
- 'THEN 1 ELSE 0 END) AS converted, '
- 'SUM(CASE WHEN state IN (' + ','.join("'%s'" % x
- for x in cls._lost_state()) + ') '
- 'THEN 1 ELSE 0 END) AS lost, '
- 'SUM(amount) AS amount, '
- 'SUM(CASE WHEN state IN (' + ','.join("'%s'" % x
- for x in cls._converted_state()) + ') '
- 'THEN amount ELSE 0 END) AS converted_amount '
- 'FROM "' + Opportunity._table + '" '
- 'GROUP BY year, month, company) AS "' + cls._table + '"',
- [])
+ opportunity = Opportunity.__table__()
+ type_id = cls.id.sql_type().base
+ type_year = cls.year.sql_type().base
+ year_column = Extract('YEAR', opportunity.start_date
+ ).cast(type_year).as_('year')
+ month_column = Extract('MONTH', opportunity.start_date).as_('month')
+ return opportunity.select(
+ Max(Extract('MONTH', opportunity.start_date)
+ + Extract('YEAR', opportunity.start_date) * 100
+ ).cast(type_id).as_('id'),
+ Max(opportunity.create_uid).as_('create_uid'),
+ Max(opportunity.create_date).as_('create_date'),
+ Max(opportunity.write_uid).as_('write_uid'),
+ Max(opportunity.write_date).as_('write_date'),
+ year_column,
+ month_column,
+ opportunity.company,
+ Count(Literal(1)).as_('number'),
+ Sum(Case((opportunity.state.in_(cls._converted_state()),
+ Literal(1)), else_=Literal(0))).as_('converted'),
+ Sum(Case((opportunity.state.in_(cls._lost_state()),
+ Literal(1)), else_=Literal(0))).as_('lost'),
+ Sum(opportunity.amount).as_('amount'),
+ Sum(Case((opportunity.state.in_(cls._converted_state()),
+ opportunity.amount),
+ else_=Literal(0))).as_('converted_amount'),
+ group_by=(year_column, month_column, opportunity.company))
def get_conversion_rate(self, name):
if self.number:
@@ -721,39 +768,36 @@ class SaleOpportunityEmployeeMonthly(ModelSQL, ModelView):
@classmethod
def table_query(cls):
Opportunity = Pool().get('sale.opportunity')
- type_id = FIELDS[cls.id._type].sql_type(cls.id)[0]
- type_year = FIELDS[cls.year._type].sql_type(cls.year)[0]
- return ('SELECT CAST(id AS ' + type_id + ') AS id, create_uid, '
- 'create_date, write_uid, write_date, '
- 'CAST(year AS ' + type_year + ') AS year, month, '
- 'employee, company, number, converted, lost, amount, '
- 'converted_amount '
- 'FROM ('
- 'SELECT EXTRACT(MONTH FROM start_date) + '
- 'EXTRACT(YEAR FROM start_date) * 100 + '
- 'employee * 1000000 AS id, '
- 'MAX(create_uid) AS create_uid, '
- 'MAX(create_date) AS create_date, '
- 'MAX(write_uid) AS write_uid, '
- 'MAX(write_date) AS write_date, '
- 'EXTRACT(YEAR FROM start_date) AS year, '
- 'EXTRACT(MONTH FROM start_date) AS month, '
- 'employee, '
- 'company, '
- 'COUNT(1) AS number, '
- 'SUM(CASE WHEN state IN (' + ','.join("'%s'" % x
- for x in cls._converted_state()) + ') '
- 'THEN 1 ELSE 0 END) AS converted, '
- 'SUM(CASE WHEN state IN (' + ','.join("'%s'" % x
- for x in cls._lost_state()) + ') '
- 'THEN 1 ELSE 0 END) AS lost, '
- 'SUM(amount) AS amount, '
- 'SUM(CASE WHEN state IN (' + ','.join("'%s'" % x
- for x in cls._converted_state()) + ') '
- 'THEN amount ELSE 0 END) AS converted_amount '
- 'FROM "' + Opportunity._table + '" '
- 'GROUP BY year, month, employee, company) '
- 'AS "' + cls._table + '"', [])
+ opportunity = Opportunity.__table__()
+ type_id = cls.id.sql_type().base
+ type_year = cls.year.sql_type().base
+ year_column = Extract('YEAR', opportunity.start_date
+ ).cast(type_year).as_('year')
+ month_column = Extract('MONTH', opportunity.start_date).as_('month')
+ return opportunity.select(
+ Max(Extract('MONTH', opportunity.start_date)
+ + Extract('YEAR', opportunity.start_date) * 100
+ + opportunity.employee * 1000000
+ ).cast(type_id).as_('id'),
+ Max(opportunity.create_uid).as_('create_uid'),
+ Max(opportunity.create_date).as_('create_date'),
+ Max(opportunity.write_uid).as_('write_uid'),
+ Max(opportunity.write_date).as_('write_date'),
+ year_column,
+ month_column,
+ opportunity.employee,
+ opportunity.company,
+ Count(Literal(1)).as_('number'),
+ Sum(Case((opportunity.state.in_(cls._converted_state()),
+ Literal(1)), else_=Literal(0))).as_('converted'),
+ Sum(Case((opportunity.state.in_(cls._lost_state()),
+ Literal(1)), else_=Literal(0))).as_('lost'),
+ Sum(opportunity.amount).as_('amount'),
+ Sum(Case((opportunity.state.in_(cls._converted_state()),
+ opportunity.amount),
+ else_=Literal(0))).as_('converted_amount'),
+ group_by=(year_column, month_column, opportunity.employee,
+ opportunity.company))
def get_conversion_rate(self, name):
if self.number:
diff --git a/opportunity.xml b/opportunity.xml
index 9a73526..4b1dea0 100644
--- a/opportunity.xml
+++ b/opportunity.xml
@@ -26,6 +26,26 @@ this repository contains the full copyright notices and license terms. -->
<field name="name">opportunity_tree</field>
</record>
+ <record model="ir.sequence.type" id="sequence_type_sale_opportunity">
+ <field name="name">Sale Opportunity</field>
+ <field name="code">sale.opportunity</field>
+ </record>
+ <record model="ir.sequence.type-res.group"
+ id="sequence_type_sale_opportunity_group_admin">
+ <field name="sequence_type" ref="sequence_type_sale_opportunity"/>
+ <field name="group" ref="res.group_admin"/>
+ </record>
+ <record model="ir.sequence.type-res.group"
+ id="sequence_type_sale_opportunity_group_sale_admin">
+ <field name="sequence_type" ref="sequence_type_sale_opportunity"/>
+ <field name="group" ref="sale.group_sale_admin"/>
+ </record>
+
+ <record model="ir.sequence" id="sequence_sale_opportunity">
+ <field name="name">Sale Opportunity</field>
+ <field name="code">sale.opportunity</field>
+ </record>
+
<record model="ir.action.act_window" id="act_opportunity_form">
<field name="name">Leads and Opportunities</field>
<field name="res_model">sale.opportunity</field>
diff --git a/setup.py b/setup.py
index 33c89a6..29525cd 100644
--- a/setup.py
+++ b/setup.py
@@ -21,7 +21,7 @@ major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
major_version = int(major_version)
minor_version = int(minor_version)
-requires = []
+requires = ['python-sql']
for dep in info.get('depends', []):
if not re.match(r'(ir|res|webdav)(\W|$)', dep):
requires.append('trytond_%s >= %s.%s, < %s.%s' %
@@ -63,6 +63,7 @@ setup(name='trytond_sale_opportunity',
'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 3edddbc..224624d 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_sale_opportunity import suite
+
+__all__ = ['suite']
diff --git a/tryton.cfg b/tryton.cfg
index 1336cbf..5c41eca 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=2.8.2
+version=3.0.0
depends:
account
company
@@ -11,3 +11,4 @@ depends:
xml:
opportunity.xml
party.xml
+ configuration.xml
diff --git a/trytond_sale_opportunity.egg-info/PKG-INFO b/trytond_sale_opportunity.egg-info/PKG-INFO
index 2933537..2823f84 100644
--- a/trytond_sale_opportunity.egg-info/PKG-INFO
+++ b/trytond_sale_opportunity.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-sale-opportunity
-Version: 2.8.2
+Version: 3.0.0
Summary: Tryton module with leads and opportunities
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_sale_opportunity
========================
@@ -59,6 +59,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_sale_opportunity.egg-info/SOURCES.txt b/trytond_sale_opportunity.egg-info/SOURCES.txt
index 023c877..72a87ab 100644
--- a/trytond_sale_opportunity.egg-info/SOURCES.txt
+++ b/trytond_sale_opportunity.egg-info/SOURCES.txt
@@ -4,11 +4,13 @@ INSTALL
LICENSE
MANIFEST.in
README
+configuration.xml
opportunity.xml
party.xml
setup.py
tryton.cfg
./__init__.py
+./configuration.py
./opportunity.py
./tests/__init__.py
./tests/test_sale_opportunity.py
@@ -22,8 +24,11 @@ locale/es_ES.po
locale/fr_FR.po
locale/nl_NL.po
locale/ru_RU.po
+locale/sl_SI.po
tests/__init__.py
+tests/__init__.pyc
tests/test_sale_opportunity.py
+tests/test_sale_opportunity.pyc
trytond_sale_opportunity.egg-info/PKG-INFO
trytond_sale_opportunity.egg-info/SOURCES.txt
trytond_sale_opportunity.egg-info/dependency_links.txt
@@ -31,6 +36,7 @@ trytond_sale_opportunity.egg-info/entry_points.txt
trytond_sale_opportunity.egg-info/not-zip-safe
trytond_sale_opportunity.egg-info/requires.txt
trytond_sale_opportunity.egg-info/top_level.txt
+view/configuration_form.xml
view/opportunity_employee_graph1.xml
view/opportunity_employee_graph2.xml
view/opportunity_employee_monthly_tree.xml
diff --git a/trytond_sale_opportunity.egg-info/requires.txt b/trytond_sale_opportunity.egg-info/requires.txt
index b2fbc4c..9e21b03 100644
--- a/trytond_sale_opportunity.egg-info/requires.txt
+++ b/trytond_sale_opportunity.egg-info/requires.txt
@@ -1,8 +1,9 @@
-trytond_account >= 2.8, < 2.9
-trytond_company >= 2.8, < 2.9
-trytond_currency >= 2.8, < 2.9
-trytond_party >= 2.8, < 2.9
-trytond_product >= 2.8, < 2.9
-trytond_sale >= 2.8, < 2.9
-trytond_stock >= 2.8, < 2.9
-trytond >= 2.8, < 2.9
\ No newline at end of file
+python-sql
+trytond_account >= 3.0, < 3.1
+trytond_company >= 3.0, < 3.1
+trytond_currency >= 3.0, < 3.1
+trytond_party >= 3.0, < 3.1
+trytond_product >= 3.0, < 3.1
+trytond_sale >= 3.0, < 3.1
+trytond_stock >= 3.0, < 3.1
+trytond >= 3.0, < 3.1
\ No newline at end of file
diff --git a/view/configuration_form.xml b/view/configuration_form.xml
new file mode 100644
index 0000000..20bba29
--- /dev/null
+++ b/view/configuration_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='sale_sequence']" position="after">
+ <label name="sale_opportunity_sequence"/>
+ <field name="sale_opportunity_sequence"/>
+ </xpath>
+</data>
diff --git a/view/opportunity_form.xml b/view/opportunity_form.xml
index f517cb9..4414219 100644
--- a/view/opportunity_form.xml
+++ b/view/opportunity_form.xml
@@ -6,6 +6,10 @@ this repository contains the full copyright notices and license terms. -->
<field name="party"/>
<label name="address"/>
<field name="address"/>
+ <label name="description"/>
+ <field name="description"/>
+ <label name="reference"/>
+ <field name="reference"/>
<label name="amount"/>
<group col="2" id="amount_currency">
<field name="amount"/>
@@ -13,8 +17,6 @@ this repository contains the full copyright notices and license terms. -->
</group>
<label name="probability"/>
<field name="probability"/>
- <label name="description"/>
- <field name="description" colspan="3"/>
<notebook colspan="4">
<page string="Lead/Opportunity" id="opportunity">
<label name="company"/>
diff --git a/view/opportunity_tree.xml b/view/opportunity_tree.xml
index e205677..a9410d3 100644
--- a/view/opportunity_tree.xml
+++ b/view/opportunity_tree.xml
@@ -2,6 +2,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. -->
<tree string="Sales Leads/Opportunities">
+ <field name="reference"/>
<field name="start_date"/>
<field name="end_date"/>
<field name="description"/>
--
tryton-modules-sale-opportunity
More information about the tryton-debian-vcs
mailing list