[tryton-debian-vcs] tryton-modules-commission branch debian updated. debian/3.8.0-2-5-gb0962a3

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Thu Jun 2 16:11:29 UTC 2016


The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-commission.git;a=commitdiff;h=debian/3.8.0-2-5-gb0962a3

commit b0962a37b3f584ed4eaa8577ef6079637b2ebd2c
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Jun 1 21:47:20 2016 +0200

    Releasing debian version 4.0.1-1.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/debian/changelog b/debian/changelog
index 536281d..1ac6fd6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+tryton-modules-commission (4.0.1-1) unstable; urgency=medium
+
+  * Updating signing-key.asc with the actual upstream maintainer keys.
+  * Merging upstream version 4.0.0.
+  * Merging upstream version 4.0.1.
+  * Updating the copyright file.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Mon, 30 May 2016 19:28:33 +0200
+
 tryton-modules-commission (3.8.0-2) unstable; urgency=medium
 
   * Updating to standards version 3.9.7, no changes needed.
commit 3bf78d8c7246ce73fb3126868d9af0b8b5e97849
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Fri May 27 19:01:03 2016 +0200

    Updating the copyright file.

diff --git a/debian/copyright b/debian/copyright
index b6a17d7..2b39f96 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,12 +1,12 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 
 Files: *
-Copyright: 2014-2015 Cédric Krier
-           2014-2015 B2CK SPRL
+Copyright: 2014-2016 Cédric Krier
+           2014-2016 B2CK SPRL
 License: GPL-3+
 
 Files: debian/*
-Copyright: 2015 Mathias Behrle <mathiasb at m9s.biz>
+Copyright: 2015-2016 Mathias Behrle <mathiasb at m9s.biz>
 License: GPL-3+
 
 License: GPL-3+
commit 2f3531ded162957bd21e688fa89286b598dac54a
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Fri May 27 18:35:17 2016 +0200

    Merging upstream version 4.0.1.

diff --git a/CHANGELOG b/CHANGELOG
index 3e5e186..124e87c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.0.1 - 2016-05-11
+* Bug fixes (see mercurial logs for details)
+
 Version 4.0.0 - 2016-05-02
 * Bug fixes (see mercurial logs for details)
 * Add Python3 support
diff --git a/PKG-INFO b/PKG-INFO
index 70e660f..905296d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_commission
-Version: 4.0.0
+Version: 4.0.1
 Summary: Tryton module for commission
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 48ff00d..5d7b870 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -230,7 +230,6 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Usuari modificació"
 
-#, fuzzy
 msgctxt "field:product.product,principals:"
 msgid "Commission Principals"
 msgstr "Comissió principals"
@@ -353,7 +352,7 @@ msgstr "Agents"
 
 msgctxt "model:ir.ui.menu,name:menu_commission"
 msgid "Commission"
-msgstr "Comissió"
+msgstr "Comissions"
 
 msgctxt "model:ir.ui.menu,name:menu_commission_create_invoice"
 msgid "Create Commission Invoices"
@@ -377,7 +376,7 @@ msgstr "Plantilla de producte - Agent comisionista"
 
 msgctxt "model:res.group,name:group_commission"
 msgid "Commission"
-msgstr "Comissió"
+msgstr "Comissions"
 
 msgctxt "model:res.group,name:group_commission_admin"
 msgid "Commission Administration"
@@ -469,7 +468,7 @@ msgstr "Plans comissió"
 
 msgctxt "view:commission:"
 msgid "Commission"
-msgstr "Comissió"
+msgstr "Comissions"
 
 msgctxt "view:commission:"
 msgid "Commissions"
diff --git a/locale/de_DE.po b/locale/de_DE.po
index f765350..c44c74f 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -230,7 +230,6 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Letzte Änderung durch"
 
-#, fuzzy
 msgctxt "field:product.product,principals:"
 msgid "Commission Principals"
 msgstr "Kommission Auftraggeber"
@@ -385,7 +384,7 @@ msgstr "Kommission Administration"
 
 msgctxt "selection:commission,invoice_state:"
 msgid ""
-msgstr ""
+msgstr " "
 
 msgctxt "selection:commission,invoice_state:"
 msgid "Canceled"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index 55130a7..36fb19d 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -230,7 +230,6 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Usuario modificación"
 
-#, fuzzy
 msgctxt "field:product.product,principals:"
 msgid "Commission Principals"
 msgstr "Principales de comisión"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index 48cfd43..712145c 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -230,7 +230,6 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Modificado por Usuario"
 
-#, fuzzy
 msgctxt "field:product.product,principals:"
 msgid "Commission Principals"
 msgstr "Principales Comisión"
@@ -307,7 +306,6 @@ msgctxt "model:commission.agent,name:"
 msgid "Commission Agent"
 msgstr "Comisionista"
 
-#, fuzzy
 msgctxt "model:commission.create_invoice.ask,name:"
 msgid "Create Commission Invoice"
 msgstr "Crear Facturas de Comisión"
@@ -324,7 +322,6 @@ msgctxt "model:ir.action,name:act_agent_form"
 msgid "Agents"
 msgstr "Agentes"
 
-#, fuzzy
 msgctxt "model:ir.action,name:act_commission_create_invoice"
 msgid "Create Commission Invoices"
 msgstr "Crear Facturas de Comisión"
@@ -349,7 +346,6 @@ msgctxt "model:ir.action,name:act_plan_form"
 msgid "Commission Plans"
 msgstr "Planes de Comision"
 
-#, fuzzy
 msgctxt "model:ir.ui.menu,name:menu_agent_form"
 msgid "Agents"
 msgstr "Agentes"
@@ -388,7 +384,7 @@ msgstr "Administración de Comisiones"
 
 msgctxt "selection:commission,invoice_state:"
 msgid ""
-msgstr ""
+msgstr " "
 
 msgctxt "selection:commission,invoice_state:"
 msgid "Canceled"
@@ -426,10 +422,9 @@ msgctxt "selection:commission.create_invoice.ask,type_:"
 msgid "Incoming"
 msgstr "Ingresos"
 
-#, fuzzy
 msgctxt "selection:commission.create_invoice.ask,type_:"
 msgid "Outgoing"
-msgstr "Saliente"
+msgstr "Venta"
 
 msgctxt "selection:commission.plan,commission_method:"
 msgid "On Payment"
@@ -439,7 +434,6 @@ msgctxt "selection:commission.plan,commission_method:"
 msgid "On Posting"
 msgstr "Al Contabilizar"
 
-#, fuzzy
 msgctxt "view:account.invoice.line:"
 msgid "Commissions"
 msgstr "Comisiones"
@@ -452,7 +446,6 @@ msgctxt "view:commission.agent:"
 msgid "Agents"
 msgstr "Agentes"
 
-#, fuzzy
 msgctxt "view:commission.create_invoice.ask:"
 msgid "Create Commission Invoice"
 msgstr "Crear Facturas de Comisión"
@@ -461,26 +454,22 @@ msgctxt "view:commission.plan.line:"
 msgid "Commission Plan Line"
 msgstr "Línea de Plan de Comisión"
 
-#, fuzzy
 msgctxt "view:commission.plan.line:"
 msgid "Commission Plan Lines"
-msgstr "Línea del Plan de Comisión"
+msgstr "Líneas del Plan de Comisión"
 
 msgctxt "view:commission.plan:"
 msgid "Commission Plan"
 msgstr "Plan de Comisión"
 
-#, fuzzy
 msgctxt "view:commission.plan:"
 msgid "Commission Plans"
 msgstr "Planes de Comisión"
 
-#, fuzzy
 msgctxt "view:commission:"
 msgid "Commission"
 msgstr "Comisión"
 
-#, fuzzy
 msgctxt "view:commission:"
 msgid "Commissions"
 msgstr "Comisiones"
diff --git a/locale/es_EC.po b/locale/es_EC.po
index 3428a4c..66a4f91 100644
--- a/locale/es_EC.po
+++ b/locale/es_EC.po
@@ -230,7 +230,6 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Modificado por usuario"
 
-#, fuzzy
 msgctxt "field:product.product,principals:"
 msgid "Commission Principals"
 msgstr "Principales de comisión"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index bd0796e..644d8a0 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -230,7 +230,6 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Usuario modificación"
 
-#, fuzzy
 msgctxt "field:product.product,principals:"
 msgid "Commission Principals"
 msgstr "Comisión principales"
@@ -353,7 +352,7 @@ msgstr "Agentes"
 
 msgctxt "model:ir.ui.menu,name:menu_commission"
 msgid "Commission"
-msgstr "Comisión"
+msgstr "Comisiones"
 
 msgctxt "model:ir.ui.menu,name:menu_commission_create_invoice"
 msgid "Create Commission Invoices"
@@ -377,7 +376,7 @@ msgstr "Plantilla de producto - Agente de comisión"
 
 msgctxt "model:res.group,name:group_commission"
 msgid "Commission"
-msgstr "Comisión"
+msgstr "Comisiones"
 
 msgctxt "model:res.group,name:group_commission_admin"
 msgid "Commission Administration"
@@ -469,7 +468,7 @@ msgstr "Planes comisión"
 
 msgctxt "view:commission:"
 msgid "Commission"
-msgstr "Comisión"
+msgstr "Comisiones"
 
 msgctxt "view:commission:"
 msgid "Commissions"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 4d8d908..7b8102b 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -230,7 +230,6 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Mis à jour par"
 
-#, fuzzy
 msgctxt "field:product.product,principals:"
 msgid "Commission Principals"
 msgstr "Principaux de commission"
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index 56fc883..1abd3b7 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -230,7 +230,6 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Zapisal"
 
-#, fuzzy
 msgctxt "field:product.product,principals:"
 msgid "Commission Principals"
 msgstr "Komisijski zastopanci"
diff --git a/tryton.cfg b/tryton.cfg
index 16b6a1b..6fb2c03 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.0.0
+version=4.0.1
 depends:
     account
     account_invoice
diff --git a/trytond_commission.egg-info/PKG-INFO b/trytond_commission.egg-info/PKG-INFO
index c389890..52627df 100644
--- a/trytond_commission.egg-info/PKG-INFO
+++ b/trytond_commission.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-commission
-Version: 4.0.0
+Version: 4.0.1
 Summary: Tryton module for commission
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond_commission.egg-info/SOURCES.txt b/trytond_commission.egg-info/SOURCES.txt
index c95c5df..10f547c 100644
--- a/trytond_commission.egg-info/SOURCES.txt
+++ b/trytond_commission.egg-info/SOURCES.txt
@@ -35,11 +35,13 @@ tryton.cfg
 ./locale/hu_HU.po
 ./locale/it_IT.po
 ./locale/ja_JP.po
+./locale/lo_LA.po
 ./locale/lt_LT.po
 ./locale/nl_NL.po
 ./locale/pt_BR.po
 ./locale/ru_RU.po
 ./locale/sl_SI.po
+./locale/zh_CN.po
 ./tests/__init__.py
 ./tests/scenario_commission.rst
 ./tests/test_commission.py
diff --git a/trytond_commission.egg-info/requires.txt b/trytond_commission.egg-info/requires.txt
index 103f48f..91696fd 100644
--- a/trytond_commission.egg-info/requires.txt
+++ b/trytond_commission.egg-info/requires.txt
@@ -5,4 +5,4 @@ trytond_account_invoice >= 4.0, < 4.1
 trytond_account_product >= 4.0, < 4.1
 trytond_party >= 4.0, < 4.1
 trytond_product >= 4.0, < 4.1
-trytond >= 4.0, < 4.1
\ No newline at end of file
+trytond >= 4.0, < 4.1
commit 78cc22884f727c851dba91fed15599136683eee0
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Fri May 27 18:25:59 2016 +0200

    Merging upstream version 4.0.0.

diff --git a/CHANGELOG b/CHANGELOG
index 229dc09..3e5e186 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+Version 4.0.0 - 2016-05-02
+* Bug fixes (see mercurial logs for details)
+* Add Python3 support
+
 Version 3.8.0 - 2015-11-02
 * Bug fixes (see mercurial logs for details)
 * Rename default_principal property into principal
diff --git a/COPYRIGHT b/COPYRIGHT
index a085246..a29b425 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
-Copyright (C) 2014-2015 Cédric Krier.
-Copyright (C) 2014-2015 B2CK SPRL.
+Copyright (C) 2014-2016 Cédric Krier.
+Copyright (C) 2014-2016 B2CK SPRL.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/PKG-INFO b/PKG-INFO
index 081d78d..70e660f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_commission
-Version: 3.8.0
+Version: 4.0.0
 Summary: Tryton module for commission
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.8/
+Download-URL: http://downloads.tryton.org/4.0/
 Description: trytond_commission
         ==================
         
@@ -54,6 +54,7 @@ Classifier: Intended Audience :: Legal Industry
 Classifier: License :: OSI Approved :: GNU General Public License (GPL)
 Classifier: Natural Language :: Bulgarian
 Classifier: Natural Language :: Catalan
+Classifier: Natural Language :: Chinese (Simplified)
 Classifier: Natural Language :: Czech
 Classifier: Natural Language :: Dutch
 Classifier: Natural Language :: English
@@ -67,6 +68,9 @@ Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Office/Business
diff --git a/__init__.py b/__init__.py
index 009383c..6d60a37 100644
--- a/__init__.py
+++ b/__init__.py
@@ -21,6 +21,7 @@ def register():
         SaleLine,
         Template,
         Template_Agent,
+        Product,
         module='commission', type_='model')
     Pool.register(
         CreateInvoice,
diff --git a/commission.py b/commission.py
index e9a8625..0a808a1 100644
--- a/commission.py
+++ b/commission.py
@@ -79,7 +79,7 @@ class Agent(ModelSQL, ModelView):
         pool = Pool()
         Commission = pool.get('commission')
         commission = Commission.__table__()
-        cursor = Transaction().cursor
+        cursor = Transaction().connection.cursor()
 
         ids = [a.id for a in agents]
         amounts = dict.fromkeys(ids, None)
@@ -335,10 +335,7 @@ class Commission(ModelSQL, ModelView):
             'in': 'out',
             'out': 'in',
             }.get(self.type_)
-        document = 'invoice' if self.amount > 0 else 'credit_note'
-        return (('agent', self.agent),
-            ('type', '%s_%s' % (direction, document)),
-            )
+        return (('agent', self.agent), ('type', direction))
 
     @classmethod
     def get_journal(cls):
@@ -357,7 +354,7 @@ class Commission(ModelSQL, ModelView):
         Invoice = pool.get('account.invoice')
 
         agent = key['agent']
-        if key['type'].startswith('out'):
+        if key['type'] == 'out':
             payment_term = agent.party.customer_payment_term
         else:
             payment_term = agent.party.supplier_payment_term
@@ -381,7 +378,7 @@ class Commission(ModelSQL, ModelView):
         InvoiceLine = pool.get('account.invoice.line')
 
         def sign(commission):
-            if invoice.type.startswith(commission.type_):
+            if invoice.type == commission.type_:
                 return -1
             else:
                 return 1
@@ -390,9 +387,6 @@ class Commission(ModelSQL, ModelView):
         amount = invoice.currency.round(
             sum(c.amount * sign(c) for c in commissions))
 
-        if invoice.type.endswith('credit_note'):
-            amount *= -1
-
         invoice_line = InvoiceLine()
         invoice_line.invoice = invoice
         invoice_line.type = 'line'
diff --git a/invoice.py b/invoice.py
index 5b5d2b8..cfad166 100644
--- a/invoice.py
+++ b/invoice.py
@@ -10,10 +10,10 @@ from trytond.transaction import Transaction
 from trytond.tools import grouped_slice
 
 __all__ = ['Invoice', 'InvoiceLine']
-__metaclass__ = PoolMeta
 
 
 class Invoice:
+    __metaclass__ = PoolMeta
     __name__ = 'account.invoice'
     agent = fields.Many2One('commission.agent', 'Commission Agent',
         domain=[
@@ -105,6 +105,7 @@ class Invoice:
 
 
 class InvoiceLine:
+    __metaclass__ = PoolMeta
     __name__ = 'account.invoice.line'
     principal = fields.Many2One('commission.agent', 'Commission Principal',
         domain=[
@@ -114,10 +115,8 @@ class InvoiceLine:
             ],
         states={
             'invisible': If(Bool(Eval('_parent_invoice')),
-                Eval('_parent_invoice', {}).get('type').in_(
-                    ['in_invoice', 'in_credit_note']),
-                Eval('invoice_type').in_(
-                    ['in_invoice', 'in_credit_note'])),
+                Eval('_parent_invoice', {}).get('type') == 'in',
+                Eval('invoice_type') == 'in'),
             }, depends=['invoice_type', 'company'])
     commissions = fields.One2Many('commission', 'origin', 'Commissions',
         readonly=True,
diff --git a/locale/bg_BG.po b/locale/bg_BG.po
index 6632e83..2108fb4 100644
--- a/locale/bg_BG.po
+++ b/locale/bg_BG.po
@@ -273,6 +273,10 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Променено от"
 
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr ""
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr ""
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 4984eaa..48ff00d 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -230,6 +230,11 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Usuari modificació"
 
+#, fuzzy
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr "Comissió principals"
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr "Comissió principals"
diff --git a/locale/cs_CZ.po b/locale/cs_CZ.po
index fc3e5cd..ab572c5 100644
--- a/locale/cs_CZ.po
+++ b/locale/cs_CZ.po
@@ -228,6 +228,10 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr ""
 
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr ""
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr ""
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 3ba9137..f765350 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -230,6 +230,11 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Letzte Änderung durch"
 
+#, fuzzy
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr "Kommission Auftraggeber"
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr "Kommission Auftraggeber"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index 4e4f701..55130a7 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -230,6 +230,11 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Usuario modificación"
 
+#, fuzzy
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr "Principales de comisión"
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr "Principales de comisión"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index cb3329a..48cfd43 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -230,6 +230,11 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Modificado por Usuario"
 
+#, fuzzy
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr "Principales Comisión"
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr "Principales Comisión"
@@ -302,9 +307,10 @@ msgctxt "model:commission.agent,name:"
 msgid "Commission Agent"
 msgstr "Comisionista"
 
+#, fuzzy
 msgctxt "model:commission.create_invoice.ask,name:"
 msgid "Create Commission Invoice"
-msgstr ""
+msgstr "Crear Facturas de Comisión"
 
 msgctxt "model:commission.plan,name:"
 msgid "Commission Plan"
@@ -446,17 +452,19 @@ msgctxt "view:commission.agent:"
 msgid "Agents"
 msgstr "Agentes"
 
+#, fuzzy
 msgctxt "view:commission.create_invoice.ask:"
 msgid "Create Commission Invoice"
-msgstr ""
+msgstr "Crear Facturas de Comisión"
 
 msgctxt "view:commission.plan.line:"
 msgid "Commission Plan Line"
 msgstr "Línea de Plan de Comisión"
 
+#, fuzzy
 msgctxt "view:commission.plan.line:"
 msgid "Commission Plan Lines"
-msgstr ""
+msgstr "Línea del Plan de Comisión"
 
 msgctxt "view:commission.plan:"
 msgid "Commission Plan"
diff --git a/locale/es_EC.po b/locale/es_EC.po
index 3af1ddd..3428a4c 100644
--- a/locale/es_EC.po
+++ b/locale/es_EC.po
@@ -230,6 +230,11 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Modificado por usuario"
 
+#, fuzzy
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr "Principales de comisión"
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr "Principales de comisión"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index 5c86c3f..bd0796e 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -230,6 +230,11 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Usuario modificación"
 
+#, fuzzy
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr "Comisión principales"
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr "Comisión principales"
diff --git a/locale/es_MX.po b/locale/es_MX.po
index 84cf7c3..aefcd0b 100644
--- a/locale/es_MX.po
+++ b/locale/es_MX.po
@@ -230,6 +230,11 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Usuario modificación"
 
+#, fuzzy
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr "Comisión principales"
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr "Comisión principales"
@@ -430,57 +435,70 @@ msgctxt "selection:commission.plan,commission_method:"
 msgid "On Posting"
 msgstr "Al contabilizar"
 
+#, fuzzy
 msgctxt "view:account.invoice.line:"
 msgid "Commissions"
-msgstr ""
+msgstr "Comisiones"
 
+#, fuzzy
 msgctxt "view:commission.agent:"
 msgid "Agent"
-msgstr ""
+msgstr "Agente"
 
+#, fuzzy
 msgctxt "view:commission.agent:"
 msgid "Agents"
-msgstr ""
+msgstr "Agentes"
 
+#, fuzzy
 msgctxt "view:commission.create_invoice.ask:"
 msgid "Create Commission Invoice"
-msgstr ""
+msgstr "Crear factura de comisión"
 
+#, fuzzy
 msgctxt "view:commission.plan.line:"
 msgid "Commission Plan Line"
-msgstr ""
+msgstr "Línea de plan comisión"
 
+#, fuzzy
 msgctxt "view:commission.plan.line:"
 msgid "Commission Plan Lines"
-msgstr ""
+msgstr "Línea de plan comisión"
 
+#, fuzzy
 msgctxt "view:commission.plan:"
 msgid "Commission Plan"
-msgstr ""
+msgstr "Plan comisión"
 
+#, fuzzy
 msgctxt "view:commission.plan:"
 msgid "Commission Plans"
-msgstr ""
+msgstr "Planes comisión"
 
+#, fuzzy
 msgctxt "view:commission:"
 msgid "Commission"
-msgstr ""
+msgstr "Comisión"
 
+#, fuzzy
 msgctxt "view:commission:"
 msgid "Commissions"
-msgstr ""
+msgstr "Comisiones"
 
+#, fuzzy
 msgctxt "view:commission:"
 msgid "Invoice"
-msgstr ""
+msgstr "Facturada"
 
+#, fuzzy
 msgctxt "view:product.template:"
 msgid "Commissions"
-msgstr ""
+msgstr "Comisiones"
 
+#, fuzzy
 msgctxt "view:sale.line:"
 msgid "Commissions"
-msgstr ""
+msgstr "Comisiones"
 
 msgctxt "wizard_button:commission.create_invoice,ask,create_:"
 msgid "OK"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 42cddb6..4d8d908 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -230,6 +230,11 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Mis à jour par"
 
+#, fuzzy
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr "Principaux de commission"
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr "Principaux de commission"
diff --git a/locale/hu_HU.po b/locale/hu_HU.po
index fc3e5cd..ab572c5 100644
--- a/locale/hu_HU.po
+++ b/locale/hu_HU.po
@@ -228,6 +228,10 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr ""
 
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr ""
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr ""
diff --git a/locale/it_IT.po b/locale/it_IT.po
index fc3e5cd..ab572c5 100644
--- a/locale/it_IT.po
+++ b/locale/it_IT.po
@@ -228,6 +228,10 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr ""
 
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr ""
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr ""
diff --git a/locale/ja_JP.po b/locale/ja_JP.po
index fc3e5cd..ab572c5 100644
--- a/locale/ja_JP.po
+++ b/locale/ja_JP.po
@@ -228,6 +228,10 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr ""
 
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr ""
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr ""
diff --git a/locale/it_IT.po b/locale/lo_LA.po
similarity index 99%
copy from locale/it_IT.po
copy to locale/lo_LA.po
index fc3e5cd..ab572c5 100644
--- a/locale/it_IT.po
+++ b/locale/lo_LA.po
@@ -228,6 +228,10 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr ""
 
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr ""
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr ""
diff --git a/locale/lt_LT.po b/locale/lt_LT.po
index fc3e5cd..ab572c5 100644
--- a/locale/lt_LT.po
+++ b/locale/lt_LT.po
@@ -228,6 +228,10 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr ""
 
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr ""
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr ""
diff --git a/locale/nl_NL.po b/locale/nl_NL.po
index b3da5ea..c8a0feb 100644
--- a/locale/nl_NL.po
+++ b/locale/nl_NL.po
@@ -248,6 +248,10 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr ""
 
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr ""
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr ""
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index 8a362ce..c98d385 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -230,6 +230,11 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Editado por"
 
+#, fuzzy
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr "Comissões Principais"
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr "Comissões Principais"
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
index 79247c1..9cf1249 100644
--- a/locale/ru_RU.po
+++ b/locale/ru_RU.po
@@ -272,6 +272,10 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Изменено пользователем"
 
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr ""
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr ""
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index b55dae3..56fc883 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -230,6 +230,11 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr "Zapisal"
 
+#, fuzzy
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr "Komisijski zastopanci"
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr "Komisijski zastopanci"
diff --git a/locale/it_IT.po b/locale/zh_CN.po
similarity index 99%
copy from locale/it_IT.po
copy to locale/zh_CN.po
index fc3e5cd..ab572c5 100644
--- a/locale/it_IT.po
+++ b/locale/zh_CN.po
@@ -228,6 +228,10 @@ msgctxt "field:commission.plan.line,write_uid:"
 msgid "Write User"
 msgstr ""
 
+msgctxt "field:product.product,principals:"
+msgid "Commission Principals"
+msgstr ""
+
 msgctxt "field:product.template,principals:"
 msgid "Commission Principals"
 msgstr ""
diff --git a/product.py b/product.py
index 3c630a0..b5241d8 100644
--- a/product.py
+++ b/product.py
@@ -6,11 +6,11 @@ from trytond.pool import PoolMeta
 from trytond.model import ModelSQL, fields
 
 
-__all__ = ['Template', 'Template_Agent']
-__metaclass__ = PoolMeta
+__all__ = ['Template', 'Template_Agent', 'Product']
 
 
 class Template:
+    __metaclass__ = PoolMeta
     __name__ = 'product.template'
     principals = fields.Many2Many('product.template-commission.agent',
         'template', 'agent', 'Commission Principals',
@@ -34,3 +34,12 @@ class Template_Agent(ModelSQL):
         domain=[
             ('type_', '=', 'principal'),
             ])
+
+
+class Product:
+    __metaclass__ = PoolMeta
+    __name__ = 'product.product'
+
+    @property
+    def principal(self):
+        return self.template.principal
diff --git a/sale.py b/sale.py
index 755b42d..162c464 100644
--- a/sale.py
+++ b/sale.py
@@ -8,10 +8,10 @@ from trytond.pyson import Eval
 
 
 __all__ = ['Sale', 'SaleLine']
-__metaclass__ = PoolMeta
 
 
 class Sale:
+    __metaclass__ = PoolMeta
     __name__ = 'sale.sale'
     agent = fields.Many2One('commission.agent', 'Commission Agent',
         domain=[
@@ -22,8 +22,8 @@ class Sale:
             },
         depends=['state', 'company'])
 
-    def create_invoice(self, invoice_type):
-        invoice = super(Sale, self).create_invoice(invoice_type)
+    def create_invoice(self):
+        invoice = super(Sale, self).create_invoice()
         if invoice:
             invoice.agent = self.agent
             invoice.save()
@@ -31,6 +31,7 @@ class Sale:
 
 
 class SaleLine:
+    __metaclass__ = PoolMeta
     __name__ = 'sale.line'
     principal = fields.Many2One('commission.agent', 'Commission Principal',
         domain=[
@@ -38,8 +39,8 @@ class SaleLine:
             ('company', '=', Eval('_parent_sale', {}).get('company', -1)),
             ])
 
-    def get_invoice_line(self, invoice_type):
-        lines = super(SaleLine, self).get_invoice_line(invoice_type)
+    def get_invoice_line(self):
+        lines = super(SaleLine, self).get_invoice_line()
         if self.principal:
             for line in lines:
                 if line.product == self.product:
diff --git a/setup.py b/setup.py
index cb12244..a07998f 100644
--- a/setup.py
+++ b/setup.py
@@ -5,11 +5,17 @@
 from setuptools import setup
 import re
 import os
-import ConfigParser
+import io
+try:
+    from configparser import ConfigParser
+except ImportError:
+    from ConfigParser import ConfigParser
 
 
 def read(fname):
-    return open(os.path.join(os.path.dirname(__file__), fname)).read()
+    return io.open(
+        os.path.join(os.path.dirname(__file__), fname),
+        'r', encoding='utf-8').read()
 
 
 def get_require_version(name):
@@ -21,7 +27,7 @@ def get_require_version(name):
         major_version, minor_version + 1)
     return require
 
-config = ConfigParser.ConfigParser()
+config = ConfigParser()
 config.readfp(open('tryton.cfg'))
 info = dict(config.items('tryton'))
 for key in ('depends', 'extras_depend', 'xml'):
@@ -43,7 +49,7 @@ if minor_version % 2:
 
 requires = ['simpleeval', 'python-sql']
 for dep in info.get('depends', []):
-    if not re.match(r'(ir|res|webdav)(\W|$)', dep):
+    if not re.match(r'(ir|res)(\W|$)', dep):
         requires.append(get_require_version('trytond_%s' % dep))
 requires.append(get_require_version('trytond'))
 
@@ -81,6 +87,7 @@ setup(name=name,
         'License :: OSI Approved :: GNU General Public License (GPL)',
         'Natural Language :: Bulgarian',
         'Natural Language :: Catalan',
+        'Natural Language :: Chinese (Simplified)',
         'Natural Language :: Czech',
         'Natural Language :: Dutch',
         'Natural Language :: English',
@@ -94,6 +101,9 @@ setup(name=name,
         'Natural Language :: Spanish',
         'Operating System :: OS Independent',
         'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: 3.3',
+        'Programming Language :: Python :: 3.4',
+        'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: Implementation :: CPython',
         'Programming Language :: Python :: Implementation :: PyPy',
         'Topic :: Office/Business',
@@ -110,4 +120,6 @@ setup(name=name,
     test_suite='tests',
     test_loader='trytond.test_loader:Loader',
     tests_require=tests_require,
+    use_2to3=True,
+    convert_2to3_doctests=['tests/scenario_commission.rst'],
     )
diff --git a/tests/__init__.py b/tests/__init__.py
index 2c209eb..f6b8a28 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,5 +1,8 @@
 # This file is part of Tryton.  The COPYRIGHT file at the top level of
 # this repository contains the full copyright notices and license terms.
-from .test_commission import suite
+try:
+    from trytond.modules.commission.tests.test_commission import suite
+except ImportError:
+    from .test_commission import suite
 
 __all__ = ['suite']
diff --git a/tests/scenario_commission.rst b/tests/scenario_commission.rst
index 61cf925..65c7a4e 100644
--- a/tests/scenario_commission.rst
+++ b/tests/scenario_commission.rst
@@ -12,7 +12,7 @@ Imports::
     ...     get_company
     >>> from trytond.modules.account.tests.tools import create_fiscalyear, \
     ...     create_chart, get_accounts, create_tax, set_tax_code
-    >>> from.trytond.modules.account_invoice.tests.tools import \
+    >>> from trytond.modules.account_invoice.tests.tools import \
     ...     set_fiscalyear_invoice_sequences, create_payment_term
     >>> today = datetime.date.today()
 
@@ -175,7 +175,7 @@ Create commission invoices::
     >>> create_invoice.execute('create_')
 
     >>> invoice, = Invoice.find([
-    ...         ('type', '=', 'in_invoice'),
+    ...         ('type', '=', 'in'),
     ...         ])
     >>> invoice.total_amount
     Decimal('10.00')
@@ -186,7 +186,7 @@ Create commission invoices::
     True
 
     >>> invoice, = Invoice.find([
-    ...         ('type', '=', 'out_invoice'),
+    ...         ('type', '=', 'out'),
     ...         ('party', '=', principal.party.id),
     ...         ])
     >>> invoice.total_amount
diff --git a/tests/test_commission.py b/tests/test_commission.py
index b07790d..53bf419 100644
--- a/tests/test_commission.py
+++ b/tests/test_commission.py
@@ -8,6 +8,7 @@ import doctest
 from trytond.tests.test_tryton import ModuleTestCase
 from trytond.tests.test_tryton import suite as test_suite
 from trytond.tests.test_tryton import doctest_setup, doctest_teardown
+from trytond.tests.test_tryton import doctest_checker
 
 
 class CommissionTestCase(ModuleTestCase):
@@ -21,5 +22,6 @@ def suite():
             CommissionTestCase))
     suite.addTests(doctest.DocFileSuite('scenario_commission.rst',
             setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
+            checker=doctest_checker,
             optionflags=doctest.REPORT_ONLY_FIRST_FAILURE))
     return suite
diff --git a/tryton.cfg b/tryton.cfg
index dfcbb50..16b6a1b 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.8.0
+version=4.0.0
 depends:
     account
     account_invoice
diff --git a/trytond_commission.egg-info/PKG-INFO b/trytond_commission.egg-info/PKG-INFO
index afe8817..c389890 100644
--- a/trytond_commission.egg-info/PKG-INFO
+++ b/trytond_commission.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-commission
-Version: 3.8.0
+Version: 4.0.0
 Summary: Tryton module for commission
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.8/
+Download-URL: http://downloads.tryton.org/4.0/
 Description: trytond_commission
         ==================
         
@@ -54,6 +54,7 @@ Classifier: Intended Audience :: Legal Industry
 Classifier: License :: OSI Approved :: GNU General Public License (GPL)
 Classifier: Natural Language :: Bulgarian
 Classifier: Natural Language :: Catalan
+Classifier: Natural Language :: Chinese (Simplified)
 Classifier: Natural Language :: Czech
 Classifier: Natural Language :: Dutch
 Classifier: Natural Language :: English
@@ -67,6 +68,9 @@ Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Office/Business
diff --git a/trytond_commission.egg-info/SOURCES.txt b/trytond_commission.egg-info/SOURCES.txt
index 76b57aa..c95c5df 100644
--- a/trytond_commission.egg-info/SOURCES.txt
+++ b/trytond_commission.egg-info/SOURCES.txt
@@ -72,11 +72,13 @@ locale/fr_FR.po
 locale/hu_HU.po
 locale/it_IT.po
 locale/ja_JP.po
+locale/lo_LA.po
 locale/lt_LT.po
 locale/nl_NL.po
 locale/pt_BR.po
 locale/ru_RU.po
 locale/sl_SI.po
+locale/zh_CN.po
 tests/scenario_commission.rst
 trytond_commission.egg-info/PKG-INFO
 trytond_commission.egg-info/SOURCES.txt
diff --git a/trytond_commission.egg-info/requires.txt b/trytond_commission.egg-info/requires.txt
index 8b537ee..103f48f 100644
--- a/trytond_commission.egg-info/requires.txt
+++ b/trytond_commission.egg-info/requires.txt
@@ -1,8 +1,8 @@
 simpleeval
 python-sql
-trytond_account >= 3.8, < 3.9
-trytond_account_invoice >= 3.8, < 3.9
-trytond_account_product >= 3.8, < 3.9
-trytond_party >= 3.8, < 3.9
-trytond_product >= 3.8, < 3.9
-trytond >= 3.8, < 3.9
\ No newline at end of file
+trytond_account >= 4.0, < 4.1
+trytond_account_invoice >= 4.0, < 4.1
+trytond_account_product >= 4.0, < 4.1
+trytond_party >= 4.0, < 4.1
+trytond_product >= 4.0, < 4.1
+trytond >= 4.0, < 4.1
\ No newline at end of file
-- 
tryton-modules-commission



More information about the tryton-debian-vcs mailing list