[tryton-debian-vcs] tryton-modules-commission-waiting branch upstream updated. upstream/4.0.1-1-g8358ec3
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Tue Dec 6 15:57:29 UTC 2016
The following commit has been merged in the upstream branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-commission-waiting.git;a=commitdiff;h=upstream/4.0.1-1-g8358ec3
commit 8358ec3a962b2245d6d4333ef582098ae3b30f6f
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon Dec 5 09:34:23 2016 +0100
Adding upstream version 4.2.0.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index f8e909e..baf41b3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-Version 4.0.1 - 2016-05-11
+Version 4.2.0 - 2016-11-28
* Bug fixes (see mercurial logs for details)
Version 4.0.0 - 2016-05-02
diff --git a/INSTALL b/INSTALL
index e5be4bb..255b1d6 100644
--- a/INSTALL
+++ b/INSTALL
@@ -25,7 +25,7 @@ site-packages directory on your system.
For advanced options, please refer to the easy_install and/or the distutils
documentation:
- http://peak.telecommunity.com/DevCenter/EasyInstall
+ http://setuptools.readthedocs.io/en/latest/easy_install.html
http://docs.python.org/inst/inst.html
To use without installation, extract the archive into ``trytond/modules`` with
diff --git a/PKG-INFO b/PKG-INFO
index 3a06e16..730df2d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond_commission_waiting
-Version: 4.0.1
+Version: 4.2.0
Summary: Tryton module for commission waiting
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/4.0/
+Download-URL: http://downloads.tryton.org/4.2/
Description: trytond_commission_waiting
==========================
@@ -62,6 +62,7 @@ Classifier: Natural Language :: French
Classifier: Natural Language :: German
Classifier: Natural Language :: Hungarian
Classifier: Natural Language :: Italian
+Classifier: Natural Language :: Polish
Classifier: Natural Language :: Portuguese (Brazilian)
Classifier: Natural Language :: Russian
Classifier: Natural Language :: Slovenian
diff --git a/invoice.py b/invoice.py
index b656a7b..64656d0 100644
--- a/invoice.py
+++ b/invoice.py
@@ -51,8 +51,11 @@ class InvoiceLine:
__metaclass__ = PoolMeta
__name__ = 'account.invoice.line'
- def get_move_line(self):
- lines = super(InvoiceLine, self).get_move_line()
+ def get_move_lines(self):
+ pool = Pool()
+ MoveLine = pool.get('account.move.line')
+
+ lines = super(InvoiceLine, self).get_move_lines()
if self.from_commissions:
amounts = defaultdict(lambda: 0)
for commission in self.from_commissions:
@@ -62,11 +65,11 @@ class InvoiceLine:
amounts[(line.account, line.party)] += (
line.debit - line.credit)
for (account, party), amount in amounts.iteritems():
- lines.append({
- 'debit': -amount if amount < 0 else 0,
- 'credit': amount if amount > 0 else 0,
- 'account': account.id,
- 'party': party.id if party else None,
- 'amount_second_currency': None,
- })
+ line = MoveLine()
+ line.debit = -amount if amount < 0 else 0
+ line.credit = amount if amount > 0 else 0
+ line.account = account
+ line.party = party
+ line.amount_second_currency = None
+ lines.append(line)
return lines
diff --git a/locale/bg_BG.po b/locale/bg.po
similarity index 100%
rename from locale/bg_BG.po
rename to locale/bg.po
diff --git a/locale/ca_ES.po b/locale/ca.po
similarity index 100%
rename from locale/ca_ES.po
rename to locale/ca.po
diff --git a/locale/cs_CZ.po b/locale/cs.po
similarity index 100%
copy from locale/cs_CZ.po
copy to locale/cs.po
diff --git a/locale/de_DE.po b/locale/de.po
similarity index 100%
rename from locale/de_DE.po
rename to locale/de.po
diff --git a/locale/es_ES.po b/locale/es.po
similarity index 100%
rename from locale/es_ES.po
rename to locale/es.po
diff --git a/locale/lt_LT.po b/locale/es_419.po
similarity index 100%
rename from locale/lt_LT.po
rename to locale/es_419.po
diff --git a/locale/es_AR.po b/locale/es_AR.po
deleted file mode 100644
index 0468770..0000000
--- a/locale/es_AR.po
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-msgid ""
-msgstr "Content-Type: text/plain; charset=utf-8\n"
-
-msgctxt "field:commission,waiting_move:"
-msgid "Move"
-msgstr "Asiento"
-
-msgctxt "field:commission.agent,waiting_account:"
-msgid "Waiting Account"
-msgstr "Cuenta de espera"
diff --git a/locale/es_CO.po b/locale/es_CO.po
deleted file mode 100644
index 2e184ff..0000000
--- a/locale/es_CO.po
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-msgid ""
-msgstr "Content-Type: text/plain; charset=utf-8\n"
-
-msgctxt "field:commission,waiting_move:"
-msgid "Move"
-msgstr "Movimiento"
-
-msgctxt "field:commission.agent,waiting_account:"
-msgid "Waiting Account"
-msgstr "Espera Contabilización"
diff --git a/locale/es_EC.po b/locale/es_EC.po
deleted file mode 100644
index 0468770..0000000
--- a/locale/es_EC.po
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-msgid ""
-msgstr "Content-Type: text/plain; charset=utf-8\n"
-
-msgctxt "field:commission,waiting_move:"
-msgid "Move"
-msgstr "Asiento"
-
-msgctxt "field:commission.agent,waiting_account:"
-msgid "Waiting Account"
-msgstr "Cuenta de espera"
diff --git a/locale/es_MX.po b/locale/es_MX.po
deleted file mode 100644
index 19eb441..0000000
--- a/locale/es_MX.po
+++ /dev/null
@@ -1,11 +0,0 @@
-#
-msgid ""
-msgstr "Content-Type: text/plain; charset=utf-8\n"
-
-msgctxt "field:commission,waiting_move:"
-msgid "Move"
-msgstr "Movimiento"
-
-msgctxt "field:commission.agent,waiting_account:"
-msgid "Waiting Account"
-msgstr "Cuenta de espera"
diff --git a/locale/fr_FR.po b/locale/fr.po
similarity index 100%
rename from locale/fr_FR.po
rename to locale/fr.po
diff --git a/locale/hu_HU.po b/locale/hu_HU.po
index de30362..c2cde4a 100644
--- a/locale/hu_HU.po
+++ b/locale/hu_HU.po
@@ -2,9 +2,10 @@
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
+#, fuzzy
msgctxt "field:commission,waiting_move:"
msgid "Move"
-msgstr ""
+msgstr "Lépések"
msgctxt "field:commission.agent,waiting_account:"
msgid "Waiting Account"
diff --git a/locale/it_IT.po b/locale/it_IT.po
index de30362..6ef27ec 100644
--- a/locale/it_IT.po
+++ b/locale/it_IT.po
@@ -4,8 +4,8 @@ msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:commission,waiting_move:"
msgid "Move"
-msgstr ""
+msgstr "Movimento"
msgctxt "field:commission.agent,waiting_account:"
msgid "Waiting Account"
-msgstr ""
+msgstr "conto attesa"
diff --git a/locale/lo_LA.po b/locale/lo.po
similarity index 100%
rename from locale/lo_LA.po
rename to locale/lo.po
diff --git a/locale/cs_CZ.po b/locale/lt.po
similarity index 100%
copy from locale/cs_CZ.po
copy to locale/lt.po
diff --git a/locale/nl_NL.po b/locale/nl.po
similarity index 100%
rename from locale/nl_NL.po
rename to locale/nl.po
diff --git a/locale/cs_CZ.po b/locale/pl.po
similarity index 100%
rename from locale/cs_CZ.po
rename to locale/pl.po
diff --git a/locale/ru_RU.po b/locale/ru.po
similarity index 100%
rename from locale/ru_RU.po
rename to locale/ru.po
diff --git a/locale/sl_SI.po b/locale/sl.po
similarity index 100%
rename from locale/sl_SI.po
rename to locale/sl.po
diff --git a/setup.py b/setup.py
index 6961b46..671e673 100644
--- a/setup.py
+++ b/setup.py
@@ -95,6 +95,7 @@ setup(name=name,
'Natural Language :: German',
'Natural Language :: Hungarian',
'Natural Language :: Italian',
+ 'Natural Language :: Polish',
'Natural Language :: Portuguese (Brazilian)',
'Natural Language :: Russian',
'Natural Language :: Slovenian',
diff --git a/tests/scenario_commission_waiting.rst b/tests/scenario_commission_waiting.rst
index e5c6a1e..3863e7a 100644
--- a/tests/scenario_commission_waiting.rst
+++ b/tests/scenario_commission_waiting.rst
@@ -7,7 +7,8 @@ Imports::
>>> import datetime
>>> from dateutil.relativedelta import relativedelta
>>> from decimal import Decimal
- >>> from proteus import config, Model, Wizard
+ >>> from proteus import Model, Wizard
+ >>> from trytond.tests.tools import activate_modules
>>> from trytond.modules.company.tests.tools import create_company, \
... get_company
>>> from trytond.modules.account.tests.tools import create_fiscalyear, \
@@ -16,30 +17,15 @@ Imports::
... set_fiscalyear_invoice_sequences, create_payment_term
>>> today = datetime.date.today()
-Create database::
+Install commission_waiting::
- >>> config = config.set_trytond()
- >>> config.pool.test = True
-
-Install commission::
-
- >>> Module = Model.get('ir.module')
- >>> module, = Module.find([
- ... ('name', '=', 'commission_waiting'),
- ... ])
- >>> module.click('install')
- >>> Wizard('ir.module.install_upgrade').execute('upgrade')
+ >>> config = activate_modules('commission_waiting')
Create company::
>>> _ = create_company()
>>> company = get_company()
-Reload the context::
-
- >>> User = Model.get('res.user')
- >>> config._context = User.get_preferences(True, config.context)
-
Create fiscal year::
>>> fiscalyear = set_fiscalyear_invoice_sequences(
diff --git a/tests/test_commission_waiting.py b/tests/test_commission_waiting.py
index c3eb328..0bbdbfb 100644
--- a/tests/test_commission_waiting.py
+++ b/tests/test_commission_waiting.py
@@ -7,7 +7,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_teardown
from trytond.tests.test_tryton import doctest_checker
@@ -21,7 +21,7 @@ def suite():
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
CommissionWaitingTestCase))
suite.addTests(doctest.DocFileSuite('scenario_commission_waiting.rst',
- setUp=doctest_setup, tearDown=doctest_teardown, encoding='utf-8',
+ 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 41b3db0..ddd1f38 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=4.0.1
+version=4.2.0
depends:
account
account_invoice
diff --git a/trytond_commission_waiting.egg-info/PKG-INFO b/trytond_commission_waiting.egg-info/PKG-INFO
index af891aa..9de4cbe 100644
--- a/trytond_commission_waiting.egg-info/PKG-INFO
+++ b/trytond_commission_waiting.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
Metadata-Version: 1.1
Name: trytond-commission-waiting
-Version: 4.0.1
+Version: 4.2.0
Summary: Tryton module for commission waiting
Home-page: http://www.tryton.org/
Author: Tryton
Author-email: issue_tracker at tryton.org
License: GPL-3
-Download-URL: http://downloads.tryton.org/4.0/
+Download-URL: http://downloads.tryton.org/4.2/
Description: trytond_commission_waiting
==========================
@@ -62,6 +62,7 @@ Classifier: Natural Language :: French
Classifier: Natural Language :: German
Classifier: Natural Language :: Hungarian
Classifier: Natural Language :: Italian
+Classifier: Natural Language :: Polish
Classifier: Natural Language :: Portuguese (Brazilian)
Classifier: Natural Language :: Russian
Classifier: Natural Language :: Slovenian
diff --git a/trytond_commission_waiting.egg-info/SOURCES.txt b/trytond_commission_waiting.egg-info/SOURCES.txt
index b7e0069..71224f0 100644
--- a/trytond_commission_waiting.egg-info/SOURCES.txt
+++ b/trytond_commission_waiting.egg-info/SOURCES.txt
@@ -13,25 +13,23 @@ tryton.cfg
./commission.xml
./invoice.py
./tryton.cfg
-./locale/bg_BG.po
-./locale/ca_ES.po
-./locale/cs_CZ.po
-./locale/de_DE.po
-./locale/es_AR.po
-./locale/es_CO.po
-./locale/es_EC.po
-./locale/es_ES.po
-./locale/es_MX.po
-./locale/fr_FR.po
+./locale/bg.po
+./locale/ca.po
+./locale/cs.po
+./locale/de.po
+./locale/es.po
+./locale/es_419.po
+./locale/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/lo.po
+./locale/lt.po
+./locale/nl.po
+./locale/pl.po
./locale/pt_BR.po
-./locale/ru_RU.po
-./locale/sl_SI.po
+./locale/ru.po
+./locale/sl.po
./locale/zh_CN.po
./tests/__init__.py
./tests/scenario_commission_waiting.rst
@@ -39,25 +37,23 @@ tryton.cfg
./view/agent_form.xml
./view/commission_form.xml
doc/index.rst
-locale/bg_BG.po
-locale/ca_ES.po
-locale/cs_CZ.po
-locale/de_DE.po
-locale/es_AR.po
-locale/es_CO.po
-locale/es_EC.po
-locale/es_ES.po
-locale/es_MX.po
-locale/fr_FR.po
+locale/bg.po
+locale/ca.po
+locale/cs.po
+locale/de.po
+locale/es.po
+locale/es_419.po
+locale/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/lo.po
+locale/lt.po
+locale/nl.po
+locale/pl.po
locale/pt_BR.po
-locale/ru_RU.po
-locale/sl_SI.po
+locale/ru.po
+locale/sl.po
locale/zh_CN.po
tests/scenario_commission_waiting.rst
trytond_commission_waiting.egg-info/PKG-INFO
diff --git a/trytond_commission_waiting.egg-info/requires.txt b/trytond_commission_waiting.egg-info/requires.txt
index a5e767c..b4890fa 100644
--- a/trytond_commission_waiting.egg-info/requires.txt
+++ b/trytond_commission_waiting.egg-info/requires.txt
@@ -1,4 +1,4 @@
-trytond_account >= 4.0, < 4.1
-trytond_account_invoice >= 4.0, < 4.1
-trytond_commission >= 4.0, < 4.1
-trytond >= 4.0, < 4.1
+trytond_account >= 4.2, < 4.3
+trytond_account_invoice >= 4.2, < 4.3
+trytond_commission >= 4.2, < 4.3
+trytond >= 4.2, < 4.3
--
tryton-modules-commission-waiting
More information about the tryton-debian-vcs
mailing list