[tryton-debian-vcs] tryton-modules-sale-opportunity branch upstream updated. upstream/3.0.0-1-g08cbc3b

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Tue Apr 22 13:10:06 UTC 2014


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

commit 08cbc3b4d5df391b594f178e44e49593e7d9d02c
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Tue Apr 22 14:23:21 2014 +0200

    Adding upstream version 3.2.0.

diff --git a/CHANGELOG b/CHANGELOG
index 6db1f6b..674ad02 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.2.0 - 2014-04-21
+* Bug fixes (see mercurial logs for details)
+
 Version 3.0.0 - 2013-10-21
 * Bug fixes (see mercurial logs for details)
 * Make party optional in leads
diff --git a/COPYRIGHT b/COPYRIGHT
index b2b3c67..d304d80 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
 Copyright (C) 2010-2011 Open Labs Business Solutions.
-Copyright (C) 2010-2013 Cédric Krier.
-Copyright (C) 2010-2013 B2CK SPRL.
+Copyright (C) 2010-2014 Cédric Krier.
+Copyright (C) 2010-2014 B2CK SPRL.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/INSTALL b/INSTALL
index 5db00b9..bcefda9 100644
--- a/INSTALL
+++ b/INSTALL
@@ -4,7 +4,7 @@ Installing trytond_sale_opportunity
 Prerequisites
 -------------
 
- * Python 2.6 or later (http://www.python.org/)
+ * Python 2.7 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/)
diff --git a/MANIFEST.in b/MANIFEST.in
index 52351b5..7d01628 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,13 +1,11 @@
 include INSTALL
 include README
-include TODO
 include COPYRIGHT
 include CHANGELOG
 include LICENSE
 include tryton.cfg
 include *.xml
 include view/*.xml
-include *.odt
 include locale/*.po
 include tests/*
 include doc/*
diff --git a/PKG-INFO b/PKG-INFO
index 74896c8..f0d9e8c 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_sale_opportunity
-Version: 3.0.0
+Version: 3.2.0
 Summary: Tryton module with leads and opportunities
 Home-page: http://www.tryton.org/
 Author: Tryton
-Author-email: UNKNOWN
+Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.0/
+Download-URL: http://downloads.tryton.org/3.2/
 Description: trytond_sale_opportunity
         ========================
         
@@ -43,6 +43,7 @@ Description: trytond_sale_opportunity
         
           http://www.tryton.org/
         
+Keywords: tryton sale opportunity
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Environment :: Plugins
@@ -62,6 +63,5 @@ Classifier: Natural Language :: Russian
 Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Topic :: Office/Business
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 371c82f..3f23234 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -4,7 +4,7 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
 
 msgctxt "error:sale.opportunity:"
 msgid "Probability must be between 0 and 100."
-msgstr "La provabilitat ha de ser entre 0 i 100."
+msgstr "La probabilitat ha de ser entre 0 i 100."
 
 msgctxt "error:sale.opportunity:"
 msgid "Sale Opportunity \"%s\" must be cancelled before deletion."
@@ -630,11 +630,11 @@ msgstr "Oportunitats per mes"
 
 msgctxt "selection:sale.opportunity,state:"
 msgid "Cancelled"
-msgstr "Cancel·lat"
+msgstr "Cancel·lada"
 
 msgctxt "selection:sale.opportunity,state:"
 msgid "Converted"
-msgstr "Convertit"
+msgstr "Convertida"
 
 msgctxt "selection:sale.opportunity,state:"
 msgid "Lead"
@@ -642,7 +642,7 @@ msgstr "Oportunitat"
 
 msgctxt "selection:sale.opportunity,state:"
 msgid "Lost"
-msgstr "Perdut"
+msgstr "Perduda"
 
 msgctxt "selection:sale.opportunity,state:"
 msgid "Opportunity"
@@ -650,19 +650,19 @@ msgstr "Oportunitat"
 
 msgctxt "selection:sale.opportunity.history,state:"
 msgid "Cancelled"
-msgstr "Cancel·lat"
+msgstr "Cancel·lada"
 
 msgctxt "selection:sale.opportunity.history,state:"
 msgid "Converted"
-msgstr "Convertit"
+msgstr "Convertida"
 
 msgctxt "selection:sale.opportunity.history,state:"
 msgid "Lead"
-msgstr "Oportunitat"
+msgstr "Iniciativa"
 
 msgctxt "selection:sale.opportunity.history,state:"
 msgid "Lost"
-msgstr "Perdut"
+msgstr "Perduda"
 
 msgctxt "selection:sale.opportunity.history,state:"
 msgid "Opportunity"
@@ -678,11 +678,11 @@ msgstr "Iniciativa/Oportunitat"
 
 msgctxt "view:sale.opportunity.line:"
 msgid "Sale Lead/Opportunity Line"
-msgstr "Línias Iniciatives/Oportunitats"
+msgstr "Línies Iniciatives/Oportunitats"
 
 msgctxt "view:sale.opportunity.line:"
 msgid "Sales Leads/Opportunities Lines"
-msgstr "Línias Iniciatives/Oportunitats"
+msgstr "Línies Iniciatives/Oportunitats"
 
 msgctxt "view:sale.opportunity:"
 msgid "Cancel"
diff --git a/locale/de_DE.po b/locale/de_DE.po
index e7274f1..f14f68e 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -46,11 +46,11 @@ msgstr "Währung"
 
 msgctxt "field:sale.opportunity,currency_digits:"
 msgid "Currency Digits"
-msgstr "Währung (signifikante Stellen)"
+msgstr "Nachkommastellen Währung"
 
 msgctxt "field:sale.opportunity,description:"
 msgid "Description"
-msgstr "Bezeichnung"
+msgstr "Beschreibung"
 
 msgctxt "field:sale.opportunity,employee:"
 msgid "Employee"
@@ -142,7 +142,7 @@ msgstr "Änderungsdatum"
 
 msgctxt "field:sale.opportunity.history,description:"
 msgid "Description"
-msgstr "Bezeichnung"
+msgstr "Beschreibung"
 
 msgctxt "field:sale.opportunity.history,employee:"
 msgid "Employee"
@@ -230,7 +230,7 @@ msgstr "Name"
 
 msgctxt "field:sale.opportunity.line,sale_line:"
 msgid "Sale Line"
-msgstr "Position Verkauf"
+msgstr "Verkaufsposition"
 
 msgctxt "field:sale.opportunity.line,sequence:"
 msgid "Sequence"
@@ -242,7 +242,7 @@ msgstr "Einheit"
 
 msgctxt "field:sale.opportunity.line,unit_digits:"
 msgid "Unit Digits"
-msgstr "Einheit Anzahl Stellen"
+msgstr "Nachkommastellen"
 
 msgctxt "field:sale.opportunity.line,write_date:"
 msgid "Write Date"
@@ -290,7 +290,7 @@ msgstr "Währung"
 
 msgctxt "field:sale.opportunity_employee,currency_digits:"
 msgid "Currency Digits"
-msgstr "Währung (signifikante Stellen)"
+msgstr "Nachkommastellen Währung"
 
 msgctxt "field:sale.opportunity_employee,employee:"
 msgid "Employee"
@@ -370,7 +370,7 @@ msgstr "Währung"
 
 msgctxt "field:sale.opportunity_employee_monthly,currency_digits:"
 msgid "Currency Digits"
-msgstr "Währung (signifikante Stellen)"
+msgstr "Nachkommastellen Währung"
 
 msgctxt "field:sale.opportunity_employee_monthly,employee:"
 msgid "Employee"
@@ -446,7 +446,7 @@ msgstr "Währung"
 
 msgctxt "field:sale.opportunity_monthly,currency_digits:"
 msgid "Currency Digits"
-msgstr "Währung (signifikante Stellen)"
+msgstr "Nachkommastellen Währung"
 
 msgctxt "field:sale.opportunity_monthly,id:"
 msgid "ID"
@@ -612,7 +612,7 @@ msgstr "Verkaufschancen Historie"
 
 msgctxt "model:sale.opportunity.line,name:"
 msgid "Sale Opportunity Line"
-msgstr "Verkaufschance Position"
+msgstr "Verkaufschancenposition"
 
 msgctxt "model:sale.opportunity_employee,name:"
 msgid "Sale Opportunity per Employee"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index 9007cc9..434a6f3 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -20,7 +20,7 @@ msgstr "Dirección"
 
 msgctxt "field:sale.opportunity,amount:"
 msgid "Amount"
-msgstr "Cantidad"
+msgstr "Valor"
 
 msgctxt "field:sale.opportunity,comment:"
 msgid "Comment"
@@ -44,7 +44,7 @@ msgstr "Moneda"
 
 msgctxt "field:sale.opportunity,currency_digits:"
 msgid "Currency Digits"
-msgstr "Decimales de la Moneda"
+msgstr "Decimales de Moneda"
 
 msgctxt "field:sale.opportunity,description:"
 msgid "Description"
@@ -72,11 +72,11 @@ msgstr "Líneas"
 
 msgctxt "field:sale.opportunity,lost_reason:"
 msgid "Reason for loss"
-msgstr "Motivo de la pérdida"
+msgstr "Motivo de pérdida"
 
 msgctxt "field:sale.opportunity,party:"
 msgid "Party"
-msgstr "Terceros"
+msgstr "Tercero"
 
 msgctxt "field:sale.opportunity,payment_term:"
 msgid "Payment Term"
@@ -84,7 +84,7 @@ msgstr "Forma de Pago"
 
 msgctxt "field:sale.opportunity,probability:"
 msgid "Conversion Probability"
-msgstr "Probabilidad de Conversión"
+msgstr "Probabilidad de Ganarse"
 
 msgctxt "field:sale.opportunity,rec_name:"
 msgid "Name"
@@ -168,11 +168,11 @@ msgstr "Oportunidad de Venta"
 
 msgctxt "field:sale.opportunity.history,party:"
 msgid "Party"
-msgstr "Terceros"
+msgstr "Tercero"
 
 msgctxt "field:sale.opportunity.history,probability:"
 msgid "Conversion Probability"
-msgstr "Probabilidad de Conversión"
+msgstr "Probabilidad de Ganarse"
 
 msgctxt "field:sale.opportunity.history,rec_name:"
 msgid "Name"
@@ -240,7 +240,7 @@ msgstr "Unidad"
 
 msgctxt "field:sale.opportunity.line,unit_digits:"
 msgid "Unit Digits"
-msgstr "Decimales de la Unidad"
+msgstr "Decimales de Unidad"
 
 msgctxt "field:sale.opportunity.line,write_date:"
 msgid "Write Date"
@@ -252,7 +252,7 @@ msgstr "Modificado por Usuario"
 
 msgctxt "field:sale.opportunity_employee,amount:"
 msgid "Amount"
-msgstr "Cantidad"
+msgstr "Valor"
 
 msgctxt "field:sale.opportunity_employee,company:"
 msgid "Company"
@@ -260,19 +260,19 @@ msgstr "Compañia"
 
 msgctxt "field:sale.opportunity_employee,conversion_amount_rate:"
 msgid "Conversion Amount Rate"
-msgstr "Tasa de Cantidad de Conversiones"
+msgstr "Porcentaje de Valor Ganado"
 
 msgctxt "field:sale.opportunity_employee,conversion_rate:"
 msgid "Conversion Rate"
-msgstr "Tasa de Conversión"
+msgstr "Tasa de Ganacia"
 
 msgctxt "field:sale.opportunity_employee,converted:"
 msgid "Converted"
-msgstr "Convertido"
+msgstr "Ganado"
 
 msgctxt "field:sale.opportunity_employee,converted_amount:"
 msgid "Converted Amount"
-msgstr "Cantidad Convertida"
+msgstr "Valor Ganado"
 
 msgctxt "field:sale.opportunity_employee,create_date:"
 msgid "Create Date"
@@ -288,7 +288,7 @@ msgstr "Moneda"
 
 msgctxt "field:sale.opportunity_employee,currency_digits:"
 msgid "Currency Digits"
-msgstr "Decimales de la Moneda"
+msgstr "Decimales de Moneda"
 
 msgctxt "field:sale.opportunity_employee,employee:"
 msgid "Employee"
@@ -332,7 +332,7 @@ msgstr "Fecha Inicio"
 
 msgctxt "field:sale.opportunity_employee_monthly,amount:"
 msgid "Amount"
-msgstr "Cantidad"
+msgstr "Valor"
 
 msgctxt "field:sale.opportunity_employee_monthly,company:"
 msgid "Company"
@@ -340,19 +340,19 @@ msgstr "Compañia"
 
 msgctxt "field:sale.opportunity_employee_monthly,conversion_amount_rate:"
 msgid "Conversion Amount Rate"
-msgstr "Tasa de Cantidad de Conversiones"
+msgstr "Porcentaje de Valor Ganado"
 
 msgctxt "field:sale.opportunity_employee_monthly,conversion_rate:"
 msgid "Conversion Rate"
-msgstr "Tasa de Conversión"
+msgstr "Tasa de Ganacia"
 
 msgctxt "field:sale.opportunity_employee_monthly,converted:"
 msgid "Converted"
-msgstr "Convertido"
+msgstr "Ganado"
 
 msgctxt "field:sale.opportunity_employee_monthly,converted_amount:"
 msgid "Converted Amount"
-msgstr "Cantidad Convertida"
+msgstr "Valor Ganado"
 
 msgctxt "field:sale.opportunity_employee_monthly,create_date:"
 msgid "Create Date"
@@ -368,7 +368,7 @@ msgstr "Moneda"
 
 msgctxt "field:sale.opportunity_employee_monthly,currency_digits:"
 msgid "Currency Digits"
-msgstr "Decimales de la Moneda"
+msgstr "Decimales de Moneda"
 
 msgctxt "field:sale.opportunity_employee_monthly,employee:"
 msgid "Employee"
@@ -408,7 +408,7 @@ msgstr "Año"
 
 msgctxt "field:sale.opportunity_monthly,amount:"
 msgid "Amount"
-msgstr "Cantidad"
+msgstr "Valor"
 
 msgctxt "field:sale.opportunity_monthly,company:"
 msgid "Company"
@@ -416,19 +416,19 @@ msgstr "Compañia"
 
 msgctxt "field:sale.opportunity_monthly,conversion_amount_rate:"
 msgid "Conversion Amount Rate"
-msgstr "Tasa de Cantidad de Conversiones"
+msgstr "Porcentaje de Valor Ganado"
 
 msgctxt "field:sale.opportunity_monthly,conversion_rate:"
 msgid "Conversion Rate"
-msgstr "Tasa de Conversión"
+msgstr "Tasa de Ganacia"
 
 msgctxt "field:sale.opportunity_monthly,converted:"
 msgid "Converted"
-msgstr "Convertidas"
+msgstr "Ganado"
 
 msgctxt "field:sale.opportunity_monthly,converted_amount:"
 msgid "Converted Amount"
-msgstr "Cantidad Convertida"
+msgstr "Valor Ganado"
 
 msgctxt "field:sale.opportunity_monthly,create_date:"
 msgid "Create Date"
@@ -444,7 +444,7 @@ msgstr "Moneda"
 
 msgctxt "field:sale.opportunity_monthly,currency_digits:"
 msgid "Currency Digits"
-msgstr "Decimales de la Moneda"
+msgstr "Decimales de Moneda"
 
 msgctxt "field:sale.opportunity_monthly,id:"
 msgid "ID"
@@ -546,12 +546,12 @@ msgstr "Todo"
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_opportunity_form_domain_cancelled"
 msgid "Cancelled"
-msgstr "Cancelado"
+msgstr "Anulado"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_opportunity_form_domain_converted"
 msgid "Converted"
-msgstr "Convertido"
+msgstr "Ganado"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_opportunity_form_domain_leads"
@@ -630,11 +630,11 @@ msgstr "Oportunidad de Venta por Mes"
 
 msgctxt "selection:sale.opportunity,state:"
 msgid "Cancelled"
-msgstr "Cancelado"
+msgstr "Anulada"
 
 msgctxt "selection:sale.opportunity,state:"
 msgid "Converted"
-msgstr "Convertido"
+msgstr "Ganado"
 
 msgctxt "selection:sale.opportunity,state:"
 msgid "Lead"
@@ -650,11 +650,11 @@ msgstr "Oportunidad"
 
 msgctxt "selection:sale.opportunity.history,state:"
 msgid "Cancelled"
-msgstr "Cancelado"
+msgstr "Anulada"
 
 msgctxt "selection:sale.opportunity.history,state:"
 msgid "Converted"
-msgstr "Convertido"
+msgstr "Ganado"
 
 msgctxt "selection:sale.opportunity.history,state:"
 msgid "Lead"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index f0cd616..abb48fc 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -8,7 +8,7 @@ msgstr "La probabilité doit être entre 0 et 100."
 
 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."
+msgstr "L'opportunité de vente \"%s\" doit être annulée avant suppression."
 
 msgctxt "field:sale.configuration,sale_opportunity_sequence:"
 msgid "Opportunity Reference Sequence"
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index 784f937..f270f9f 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -28,7 +28,7 @@ msgstr "Opomba"
 
 msgctxt "field:sale.opportunity,company:"
 msgid "Company"
-msgstr "Podjetje"
+msgstr "Družba"
 
 msgctxt "field:sale.opportunity,create_date:"
 msgid "Create Date"
@@ -76,7 +76,7 @@ msgstr "Razlog za zapravljeno priložnost"
 
 msgctxt "field:sale.opportunity,party:"
 msgid "Party"
-msgstr "Stranka"
+msgstr "Partner"
 
 msgctxt "field:sale.opportunity,payment_term:"
 msgid "Payment Term"
@@ -124,7 +124,7 @@ msgstr "Opomba"
 
 msgctxt "field:sale.opportunity.history,company:"
 msgid "Company"
-msgstr "Podjetje"
+msgstr "Družba"
 
 msgctxt "field:sale.opportunity.history,create_date:"
 msgid "Create Date"
@@ -168,7 +168,7 @@ msgstr "Prodajna priložnost"
 
 msgctxt "field:sale.opportunity.history,party:"
 msgid "Party"
-msgstr "Stranka"
+msgstr "Partner"
 
 msgctxt "field:sale.opportunity.history,probability:"
 msgid "Conversion Probability"
@@ -256,7 +256,7 @@ msgstr "Znesek"
 
 msgctxt "field:sale.opportunity_employee,company:"
 msgid "Company"
-msgstr "Podjetje"
+msgstr "Družba"
 
 msgctxt "field:sale.opportunity_employee,conversion_amount_rate:"
 msgid "Conversion Amount Rate"
@@ -336,7 +336,7 @@ msgstr "Znesek"
 
 msgctxt "field:sale.opportunity_employee_monthly,company:"
 msgid "Company"
-msgstr "Podjetje"
+msgstr "Družba"
 
 msgctxt "field:sale.opportunity_employee_monthly,conversion_amount_rate:"
 msgid "Conversion Amount Rate"
@@ -412,7 +412,7 @@ msgstr "Znesek"
 
 msgctxt "field:sale.opportunity_monthly,company:"
 msgid "Company"
-msgstr "Podjetje"
+msgstr "Družba"
 
 msgctxt "field:sale.opportunity_monthly,conversion_amount_rate:"
 msgid "Conversion Amount Rate"
diff --git a/opportunity.py b/opportunity.py
index 08760c1..134845c 100644
--- a/opportunity.py
+++ b/opportunity.py
@@ -45,7 +45,7 @@ class SaleOpportunity(Workflow, ModelSQL, ModelView):
     reference = fields.Char('Reference', readonly=True, required=True,
         select=True)
     party = fields.Many2One('party.party', 'Party', select=True,
-        on_change=['party'], states={
+        states={
             'readonly': Eval('state').in_(['converted', 'lost', 'cancelled']),
             'required': ~Eval('state').in_(['lead', 'lost', 'cancelled']),
             }, depends=['state'])
@@ -57,7 +57,7 @@ class SaleOpportunity(Workflow, ModelSQL, ModelView):
         select=True, states=_STATES_STOP, domain=[
             ('id', If(In('company', Eval('context', {})), '=', '!='),
                 Get(Eval('context', {}), 'company', 0)),
-            ], on_change=['company'], depends=_DEPENDS_STOP)
+            ], depends=_DEPENDS_STOP)
     currency = fields.Function(fields.Many2One('currency.currency',
         'Currency'), 'get_currency')
     currency_digits = fields.Function(fields.Integer('Currency Digits'),
@@ -231,6 +231,7 @@ class SaleOpportunity(Workflow, ModelSQL, ModelView):
     def get_currency_digits(self, name):
         return self.company.currency.digits
 
+    @fields.depends('company')
     def on_change_company(self):
         res = {}
         if self.company:
@@ -239,6 +240,7 @@ class SaleOpportunity(Workflow, ModelSQL, ModelView):
             res['currency_digits'] = self.company.currency.digits
         return res
 
+    @fields.depends('party')
     def on_change_party(self):
         PaymentTerm = Pool().get('account.invoice.payment_term')
 
@@ -372,12 +374,12 @@ class SaleOpportunityLine(ModelSQL, ModelView):
     opportunity = fields.Many2One('sale.opportunity', 'Opportunity')
     sequence = fields.Integer('Sequence')
     product = fields.Many2One('product.product', 'Product', required=True,
-            domain=[('salable', '=', True)], on_change=['product', 'unit'])
+        domain=[('salable', '=', True)])
     quantity = fields.Float('Quantity', required=True,
             digits=(16, Eval('unit_digits', 2)), depends=['unit_digits'])
     unit = fields.Many2One('product.uom', 'Unit', required=True)
-    unit_digits = fields.Function(fields.Integer('Unit Digits',
-        on_change_with=['unit']), 'on_change_with_unit_digits')
+    unit_digits = fields.Function(fields.Integer('Unit Digits'),
+        'on_change_with_unit_digits')
     sale_line = fields.Many2One('sale.line', 'Sale Line', readonly=True,
         states={
             'invisible': (Eval('_parent_opportunity', {}).get('state')
@@ -405,11 +407,13 @@ class SaleOpportunityLine(ModelSQL, ModelView):
         table, _ = tables[None]
         return [table.sequence == None, table.sequence]
 
+    @fields.depends('unit')
     def on_change_with_unit_digits(self, name=None):
         if self.unit:
             return self.unit.digits
         return 2
 
+    @fields.depends('product', 'unit')
     def on_change_product(self):
         if not self.product:
             return {}
diff --git a/party.xml b/party.xml
index 1489849..7a5a2af 100644
--- a/party.xml
+++ b/party.xml
@@ -6,7 +6,7 @@ this repository contains the full copyright notices and license terms. -->
         <record model="ir.action.act_window" id="act_opportunity_form2">
             <field name="name">Sales Leads/Opportunities</field>
             <field name="res_model">sale.opportunity</field>
-            <field name="domain">[("party", "=", Eval('active_id'))]</field>
+            <field name="domain">[('party', '=', Eval('active_ids'))]</field>
         </record>
         <record model="ir.action.keyword"
                 id="act_open_sale_keyword1">
diff --git a/setup.py b/setup.py
index 29525cd..8f5f9b9 100644
--- a/setup.py
+++ b/setup.py
@@ -11,33 +11,51 @@ import ConfigParser
 def read(fname):
     return open(os.path.join(os.path.dirname(__file__), fname)).read()
 
+
+def get_require_version(name):
+    if minor_version % 2:
+        require = '%s >= %s.%s.dev0, < %s.%s'
+    else:
+        require = '%s >= %s.%s, < %s.%s'
+    require %= (name, major_version, minor_version,
+        major_version, minor_version + 1)
+    return require
+
 config = ConfigParser.ConfigParser()
 config.readfp(open('tryton.cfg'))
 info = dict(config.items('tryton'))
 for key in ('depends', 'extras_depend', 'xml'):
     if key in info:
         info[key] = info[key].strip().splitlines()
-major_version, minor_version, _ = info.get('version', '0.0.1').split('.', 2)
+version = info.get('version', '0.0.1')
+major_version, minor_version, _ = version.split('.', 2)
 major_version = int(major_version)
 minor_version = int(minor_version)
+name = 'trytond_sale_opportunity'
+
+download_url = 'http://downloads.tryton.org/%s.%s/' % (
+    major_version, minor_version)
+if minor_version % 2:
+    version = '%s.%s.dev0' % (major_version, minor_version)
+    download_url = (
+        'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
+            name[8:], name, version))
 
 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' %
-            (dep, major_version, minor_version, major_version,
-                minor_version + 1))
-requires.append('trytond >= %s.%s, < %s.%s' %
-    (major_version, minor_version, major_version, minor_version + 1))
+        requires.append(get_require_version('trytond_%s' % dep))
+requires.append(get_require_version('trytond'))
 
-setup(name='trytond_sale_opportunity',
-    version=info.get('version', '0.0.1'),
+setup(name=name,
+    version=version,
     description='Tryton module with leads and opportunities',
     long_description=read('README'),
     author='Tryton',
+    author_email='issue_tracker at tryton.org',
     url='http://www.tryton.org/',
-    download_url=("http://downloads.tryton.org/" +
-        info.get('version', '0.0.1').rsplit('.', 1)[0] + '/'),
+    download_url=download_url,
+    keywords='tryton sale opportunity',
     package_dir={'trytond.modules.sale_opportunity': '.'},
     packages=[
         'trytond.modules.sale_opportunity',
@@ -66,7 +84,6 @@ setup(name='trytond_sale_opportunity',
         'Natural Language :: Slovenian',
         'Natural Language :: Spanish',
         'Operating System :: OS Independent',
-        'Programming Language :: Python :: 2.6',
         'Programming Language :: Python :: 2.7',
         'Topic :: Office/Business',
         ],
diff --git a/tests/test_sale_opportunity.py b/tests/test_sale_opportunity.py
index 3141d51..7d2ec47 100644
--- a/tests/test_sale_opportunity.py
+++ b/tests/test_sale_opportunity.py
@@ -1,37 +1,22 @@
-#!/usr/bin/env python
 #This file is part of Tryton.  The COPYRIGHT file at the top level of
 #this repository contains the full copyright notices and license terms.
-
-import sys
-import os
-DIR = os.path.abspath(os.path.normpath(os.path.join(__file__,
-    '..', '..', '..', '..', '..', 'trytond')))
-if os.path.isdir(DIR):
-    sys.path.insert(0, os.path.dirname(DIR))
-
 import unittest
 import trytond.tests.test_tryton
 from trytond.tests.test_tryton import test_view, test_depends
 
 
 class SaleOpportunityTestCase(unittest.TestCase):
-    '''
-    Test SaleOpportunity module.
-    '''
+    'Test SaleOpportunity module'
 
     def setUp(self):
         trytond.tests.test_tryton.install_module('sale_opportunity')
 
     def test0005views(self):
-        '''
-        Test views.
-        '''
+        'Test views'
         test_view('sale_opportunity')
 
     def test0006depends(self):
-        '''
-        Test depends.
-        '''
+        'Test depends'
         test_depends()
 
 
@@ -40,6 +25,3 @@ def suite():
     suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
         SaleOpportunityTestCase))
     return suite
-
-if __name__ == '__main__':
-    unittest.TextTestRunner(verbosity=2).run(suite())
diff --git a/tryton.cfg b/tryton.cfg
index 5c41eca..0a0031b 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.0.0
+version=3.2.0
 depends:
     account
     company
diff --git a/trytond_sale_opportunity.egg-info/PKG-INFO b/trytond_sale_opportunity.egg-info/PKG-INFO
index 2823f84..db10c54 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: 3.0.0
+Version: 3.2.0
 Summary: Tryton module with leads and opportunities
 Home-page: http://www.tryton.org/
 Author: Tryton
-Author-email: UNKNOWN
+Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.0/
+Download-URL: http://downloads.tryton.org/3.2/
 Description: trytond_sale_opportunity
         ========================
         
@@ -43,6 +43,7 @@ Description: trytond_sale_opportunity
         
           http://www.tryton.org/
         
+Keywords: tryton sale opportunity
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Environment :: Plugins
@@ -62,6 +63,5 @@ Classifier: Natural Language :: Russian
 Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Topic :: Office/Business
diff --git a/trytond_sale_opportunity.egg-info/requires.txt b/trytond_sale_opportunity.egg-info/requires.txt
index 9e21b03..33f3d65 100644
--- a/trytond_sale_opportunity.egg-info/requires.txt
+++ b/trytond_sale_opportunity.egg-info/requires.txt
@@ -1,9 +1,9 @@
 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
+trytond_account >= 3.2, < 3.3
+trytond_company >= 3.2, < 3.3
+trytond_currency >= 3.2, < 3.3
+trytond_party >= 3.2, < 3.3
+trytond_product >= 3.2, < 3.3
+trytond_sale >= 3.2, < 3.3
+trytond_stock >= 3.2, < 3.3
+trytond >= 3.2, < 3.3
\ No newline at end of file
-- 
tryton-modules-sale-opportunity



More information about the tryton-debian-vcs mailing list