[tryton-commits] changeset in sao:default Use outline style mdi icons for back an...
changeset 519b72bb1d60 in sao:default details: https://hg.tryton.org/sao?cmd=changeset;node=519b72bb1d60 description: Use outline style mdi icons for back and forwards issue8400 review271521003 diffstat: images/tryton-back.svg| 4 ++-- images/tryton-forward.svg | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diffs (20 lines): diff -r 2d92fb501ac0 -r 519b72bb1d60 images/tryton-back.svg --- a/images/tryton-back.svgSun Jun 16 19:24:15 2019 +0200 +++ b/images/tryton-back.svgMon Jun 17 22:24:46 2019 +0200 @@ -1,4 +1,4 @@ http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 24"> - - + + diff -r 2d92fb501ac0 -r 519b72bb1d60 images/tryton-forward.svg --- a/images/tryton-forward.svg Sun Jun 16 19:24:15 2019 +0200 +++ b/images/tryton-forward.svg Mon Jun 17 22:24:46 2019 +0200 @@ -1,4 +1,4 @@ http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 24"> - - + +
[tryton-commits] changeset in tryton:default Use outline style mdi icons for back...
changeset 0381da032e0f in tryton:default details: https://hg.tryton.org/tryton?cmd=changeset;node=0381da032e0f description: Use outline style mdi icons for back and forwards issue8400 review271521003 diffstat: tryton/data/pixmaps/tryton/tryton-back.svg| 4 ++-- tryton/data/pixmaps/tryton/tryton-forward.svg | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diffs (20 lines): diff -r e8783e6ee17a -r 0381da032e0f tryton/data/pixmaps/tryton/tryton-back.svg --- a/tryton/data/pixmaps/tryton/tryton-back.svgSun Jun 16 19:24:15 2019 +0200 +++ b/tryton/data/pixmaps/tryton/tryton-back.svgMon Jun 17 22:24:46 2019 +0200 @@ -1,4 +1,4 @@ http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 24"> - - + + diff -r e8783e6ee17a -r 0381da032e0f tryton/data/pixmaps/tryton/tryton-forward.svg --- a/tryton/data/pixmaps/tryton/tryton-forward.svg Sun Jun 16 19:24:15 2019 +0200 +++ b/tryton/data/pixmaps/tryton/tryton-forward.svg Mon Jun 17 22:24:46 2019 +0200 @@ -1,4 +1,4 @@ http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 24"> - - + +
[tryton-commits] changeset in trytond:4.6 Skip tests relying on assertion when py...
changeset ec288b22957b in trytond:4.6 details: https://hg.tryton.org/trytond?cmd=changeset;node=ec288b22957b description: Skip tests relying on assertion when python is optimized issue8381 review271471002 (grafted from 136794626cf54bb41a048d555e58df7cdd4efde1) diffstat: trytond/tests/test_pyson.py | 156 +-- trytond/tests/test_tools.py |3 + 2 files changed, 95 insertions(+), 64 deletions(-) diffs (263 lines): diff -r a127a104ba73 -r ec288b22957b trytond/tests/test_pyson.py --- a/trytond/tests/test_pyson.py Mon Jun 10 18:21:49 2019 +0200 +++ b/trytond/tests/test_pyson.py Wed Jun 12 19:15:00 2019 +0200 @@ -4,6 +4,8 @@ import unittest import datetime +import sys + from trytond import pyson @@ -106,11 +108,12 @@ 's': [True, False], }) -self.assertRaises(AssertionError, pyson.And, 'test', False) -self.assertRaises(AssertionError, pyson.And, True, 'test') -self.assertRaises(AssertionError, pyson.And, True, False, 'test') -self.assertRaises(AssertionError, pyson.And, True) -self.assertRaises(AssertionError, pyson.And) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.And, 'test', False) +self.assertRaises(AssertionError, pyson.And, True, 'test') +self.assertRaises(AssertionError, pyson.And, True, False, 'test') +self.assertRaises(AssertionError, pyson.And, True) +self.assertRaises(AssertionError, pyson.And) self.assertEqual(pyson.And(True, False).types(), set([bool])) @@ -151,11 +154,12 @@ 's': [True, False], }) -self.assertRaises(AssertionError, pyson.Or, 'test', False) -self.assertRaises(AssertionError, pyson.Or, True, 'test') -self.assertRaises(AssertionError, pyson.Or, True, False, 'test') -self.assertRaises(AssertionError, pyson.Or, True) -self.assertRaises(AssertionError, pyson.Or) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Or, 'test', False) +self.assertRaises(AssertionError, pyson.Or, True, 'test') +self.assertRaises(AssertionError, pyson.Or, True, False, 'test') +self.assertRaises(AssertionError, pyson.Or, True) +self.assertRaises(AssertionError, pyson.Or) self.assertEqual(pyson.Or(True, False).types(), set([bool])) @@ -197,7 +201,8 @@ 's2': 'test', }) -self.assertRaises(AssertionError, pyson.Equal, 'test', True) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Equal, 'test', True) self.assertEqual(pyson.Equal('test', 'test').types(), set([bool])) @@ -219,9 +224,10 @@ 'e': False, }) -self.assertRaises(AssertionError, pyson.Greater, 'test', 0) -self.assertRaises(AssertionError, pyson.Greater, 1, 'test') -self.assertRaises(AssertionError, pyson.Greater, 1, 0, 'test') +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Greater, 'test', 0) +self.assertRaises(AssertionError, pyson.Greater, 1, 'test') +self.assertRaises(AssertionError, pyson.Greater, 1, 0, 'test') self.assertEqual(pyson.Greater(1, 0).types(), set([bool])) @@ -260,9 +266,10 @@ 'e': False, }) -self.assertRaises(AssertionError, pyson.Less, 'test', 1) -self.assertRaises(AssertionError, pyson.Less, 0, 'test') -self.assertRaises(AssertionError, pyson.Less, 0, 1, 'test') +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Less, 'test', 1) +self.assertRaises(AssertionError, pyson.Less, 0, 'test') +self.assertRaises(AssertionError, pyson.Less, 0, 1, 'test') self.assertEqual(pyson.Less(0, 1).types(), set([bool])) @@ -301,8 +308,9 @@ 'e': 'bar', }) -self.assertRaises(AssertionError, pyson.If, 'test', 'foo', 'bar') -self.assertRaises(AssertionError, pyson.If, True, 'foo', False) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.If, 'test', 'foo', 'bar') +self.assertRaises(AssertionError, pyson.If, True, 'foo', False) self.assertEqual(pyson.If(True, 'foo', 'bar').types(), set([basestring])) @@ -326,8 +334,10 @@ 'd': 'default', }) -self.assertRaises(AssertionError, pyson.Get, 'test', 'foo', 'default') -self.assertRaises(AssertionError, pyson.Get, {}, 1, 'default') +if not sys.flags.optimize: +self.assertRaises( +AssertionError, pyson.Get, 'test', 'foo', 'default') +self.assertRaises(AssertionError, pyson.Get, {}, 1, 'default') self.assertEqual(pyson.Get({}, 'foo',
[tryton-commits] changeset in tryton:5.0 Add dependency to PyGObject
changeset 8bf1beb540ee in tryton:5.0 details: https://hg.tryton.org/tryton?cmd=changeset;node=8bf1beb540ee description: Add dependency to PyGObject issue8408 review283491002 (grafted from 6e5a01ef11059e17f1bd1919f37a3999526a0a79) diffstat: setup.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diffs (14 lines): diff -r 518c3b3929cc -r 8bf1beb540ee setup.py --- a/setup.py Mon May 27 23:18:37 2019 +0200 +++ b/setup.py Fri Jun 07 09:57:20 2019 +0200 @@ -109,8 +109,9 @@ license='GPL-3', python_requires='>=3.4', install_requires=[ -# "py-gobject3", +'pycairo', "python-dateutil", +'PyGObject', ], extras_require={ 'calendar': ['GooCalendar>=0.4'],
[tryton-commits] changeset in trytond:4.4 Skip tests relying on assertion when py...
changeset 67649c299466 in trytond:4.4 details: https://hg.tryton.org/trytond?cmd=changeset;node=67649c299466 description: Skip tests relying on assertion when python is optimized issue8381 review271471002 (grafted from 136794626cf54bb41a048d555e58df7cdd4efde1) diffstat: trytond/tests/test_pyson.py | 156 +-- trytond/tests/test_tools.py |3 + 2 files changed, 95 insertions(+), 64 deletions(-) diffs (263 lines): diff -r 4a5e40dcb06d -r 67649c299466 trytond/tests/test_pyson.py --- a/trytond/tests/test_pyson.py Mon Jun 10 18:29:25 2019 +0200 +++ b/trytond/tests/test_pyson.py Wed Jun 12 19:15:00 2019 +0200 @@ -4,6 +4,8 @@ import unittest import datetime +import sys + from trytond import pyson @@ -106,11 +108,12 @@ 's': [True, False], }) -self.assertRaises(AssertionError, pyson.And, 'test', False) -self.assertRaises(AssertionError, pyson.And, True, 'test') -self.assertRaises(AssertionError, pyson.And, True, False, 'test') -self.assertRaises(AssertionError, pyson.And, True) -self.assertRaises(AssertionError, pyson.And) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.And, 'test', False) +self.assertRaises(AssertionError, pyson.And, True, 'test') +self.assertRaises(AssertionError, pyson.And, True, False, 'test') +self.assertRaises(AssertionError, pyson.And, True) +self.assertRaises(AssertionError, pyson.And) self.assertEqual(pyson.And(True, False).types(), set([bool])) @@ -151,11 +154,12 @@ 's': [True, False], }) -self.assertRaises(AssertionError, pyson.Or, 'test', False) -self.assertRaises(AssertionError, pyson.Or, True, 'test') -self.assertRaises(AssertionError, pyson.Or, True, False, 'test') -self.assertRaises(AssertionError, pyson.Or, True) -self.assertRaises(AssertionError, pyson.Or) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Or, 'test', False) +self.assertRaises(AssertionError, pyson.Or, True, 'test') +self.assertRaises(AssertionError, pyson.Or, True, False, 'test') +self.assertRaises(AssertionError, pyson.Or, True) +self.assertRaises(AssertionError, pyson.Or) self.assertEqual(pyson.Or(True, False).types(), set([bool])) @@ -197,7 +201,8 @@ 's2': 'test', }) -self.assertRaises(AssertionError, pyson.Equal, 'test', True) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Equal, 'test', True) self.assertEqual(pyson.Equal('test', 'test').types(), set([bool])) @@ -219,9 +224,10 @@ 'e': False, }) -self.assertRaises(AssertionError, pyson.Greater, 'test', 0) -self.assertRaises(AssertionError, pyson.Greater, 1, 'test') -self.assertRaises(AssertionError, pyson.Greater, 1, 0, 'test') +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Greater, 'test', 0) +self.assertRaises(AssertionError, pyson.Greater, 1, 'test') +self.assertRaises(AssertionError, pyson.Greater, 1, 0, 'test') self.assertEqual(pyson.Greater(1, 0).types(), set([bool])) @@ -260,9 +266,10 @@ 'e': False, }) -self.assertRaises(AssertionError, pyson.Less, 'test', 1) -self.assertRaises(AssertionError, pyson.Less, 0, 'test') -self.assertRaises(AssertionError, pyson.Less, 0, 1, 'test') +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Less, 'test', 1) +self.assertRaises(AssertionError, pyson.Less, 0, 'test') +self.assertRaises(AssertionError, pyson.Less, 0, 1, 'test') self.assertEqual(pyson.Less(0, 1).types(), set([bool])) @@ -301,8 +308,9 @@ 'e': 'bar', }) -self.assertRaises(AssertionError, pyson.If, 'test', 'foo', 'bar') -self.assertRaises(AssertionError, pyson.If, True, 'foo', False) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.If, 'test', 'foo', 'bar') +self.assertRaises(AssertionError, pyson.If, True, 'foo', False) self.assertEqual(pyson.If(True, 'foo', 'bar').types(), set([basestring])) @@ -326,8 +334,10 @@ 'd': 'default', }) -self.assertRaises(AssertionError, pyson.Get, 'test', 'foo', 'default') -self.assertRaises(AssertionError, pyson.Get, {}, 1, 'default') +if not sys.flags.optimize: +self.assertRaises( +AssertionError, pyson.Get, 'test', 'foo', 'default') +self.assertRaises(AssertionError, pyson.Get, {}, 1, 'default') self.assertEqual(pyson.Get({}, 'foo',
[tryton-commits] changeset in tryton:4.8 Add dependency to PyGObject
changeset 19e761a19e35 in tryton:4.8 details: https://hg.tryton.org/tryton?cmd=changeset;node=19e761a19e35 description: Add dependency to PyGObject issue8408 review283491002 (grafted from 6e5a01ef11059e17f1bd1919f37a3999526a0a79) diffstat: setup.py | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diffs (14 lines): diff -r c742c29bf042 -r 19e761a19e35 setup.py --- a/setup.py Mon May 27 23:18:37 2019 +0200 +++ b/setup.py Fri Jun 07 09:57:20 2019 +0200 @@ -101,8 +101,9 @@ platforms='any', license='GPL-3', install_requires=[ -# "py-gobject3", +'pycairo', "python-dateutil", +'PyGObject', ], extras_require={ 'cdecimal': ['cdecimal'],
[tryton-commits] changeset in trytond:4.8 Skip tests relying on assertion when py...
changeset 80ee8b5aac90 in trytond:4.8 details: https://hg.tryton.org/trytond?cmd=changeset;node=80ee8b5aac90 description: Skip tests relying on assertion when python is optimized issue8381 review271471002 (grafted from 136794626cf54bb41a048d555e58df7cdd4efde1) diffstat: trytond/tests/test_pyson.py | 156 +-- trytond/tests/test_tools.py |3 + 2 files changed, 95 insertions(+), 64 deletions(-) diffs (263 lines): diff -r c8303672614d -r 80ee8b5aac90 trytond/tests/test_pyson.py --- a/trytond/tests/test_pyson.py Mon Jun 10 18:20:30 2019 +0200 +++ b/trytond/tests/test_pyson.py Wed Jun 12 19:15:00 2019 +0200 @@ -4,6 +4,8 @@ import unittest import datetime +import sys + from decimal import Decimal from trytond import pyson @@ -111,11 +113,12 @@ 's': [True, False], }) -self.assertRaises(AssertionError, pyson.And, 'test', False) -self.assertRaises(AssertionError, pyson.And, True, 'test') -self.assertRaises(AssertionError, pyson.And, True, False, 'test') -self.assertRaises(AssertionError, pyson.And, True) -self.assertRaises(AssertionError, pyson.And) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.And, 'test', False) +self.assertRaises(AssertionError, pyson.And, True, 'test') +self.assertRaises(AssertionError, pyson.And, True, False, 'test') +self.assertRaises(AssertionError, pyson.And, True) +self.assertRaises(AssertionError, pyson.And) self.assertEqual(pyson.And(True, False).types(), set([bool])) @@ -156,11 +159,12 @@ 's': [True, False], }) -self.assertRaises(AssertionError, pyson.Or, 'test', False) -self.assertRaises(AssertionError, pyson.Or, True, 'test') -self.assertRaises(AssertionError, pyson.Or, True, False, 'test') -self.assertRaises(AssertionError, pyson.Or, True) -self.assertRaises(AssertionError, pyson.Or) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Or, 'test', False) +self.assertRaises(AssertionError, pyson.Or, True, 'test') +self.assertRaises(AssertionError, pyson.Or, True, False, 'test') +self.assertRaises(AssertionError, pyson.Or, True) +self.assertRaises(AssertionError, pyson.Or) self.assertEqual(pyson.Or(True, False).types(), set([bool])) @@ -202,7 +206,8 @@ 's2': 'test', }) -self.assertRaises(AssertionError, pyson.Equal, 'test', True) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Equal, 'test', True) self.assertEqual(pyson.Equal('test', 'test').types(), set([bool])) @@ -224,9 +229,10 @@ 'e': False, }) -self.assertRaises(AssertionError, pyson.Greater, 'test', 0) -self.assertRaises(AssertionError, pyson.Greater, 1, 'test') -self.assertRaises(AssertionError, pyson.Greater, 1, 0, 'test') +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Greater, 'test', 0) +self.assertRaises(AssertionError, pyson.Greater, 1, 'test') +self.assertRaises(AssertionError, pyson.Greater, 1, 0, 'test') self.assertEqual(pyson.Greater(1, 0).types(), set([bool])) @@ -265,9 +271,10 @@ 'e': False, }) -self.assertRaises(AssertionError, pyson.Less, 'test', 1) -self.assertRaises(AssertionError, pyson.Less, 0, 'test') -self.assertRaises(AssertionError, pyson.Less, 0, 1, 'test') +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Less, 'test', 1) +self.assertRaises(AssertionError, pyson.Less, 0, 'test') +self.assertRaises(AssertionError, pyson.Less, 0, 1, 'test') self.assertEqual(pyson.Less(0, 1).types(), set([bool])) @@ -306,8 +313,9 @@ 'e': 'bar', }) -self.assertRaises(AssertionError, pyson.If, 'test', 'foo', 'bar') -self.assertRaises(AssertionError, pyson.If, True, 'foo', False) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.If, 'test', 'foo', 'bar') +self.assertRaises(AssertionError, pyson.If, True, 'foo', False) self.assertEqual(pyson.If(True, 'foo', 'bar').types(), set([basestring])) @@ -331,8 +339,10 @@ 'd': 'default', }) -self.assertRaises(AssertionError, pyson.Get, 'test', 'foo', 'default') -self.assertRaises(AssertionError, pyson.Get, {}, 1, 'default') +if not sys.flags.optimize: +self.assertRaises( +AssertionError, pyson.Get, 'test', 'foo', 'default') +self.assertRaises(AssertionError, pyson.Get, {}, 1, 'default')
[tryton-commits] changeset in tryton:5.2 Prevent modification of cache RPC answers
changeset 97651de5ca7a in tryton:5.2 details: https://hg.tryton.org/tryton?cmd=changeset;node=97651de5ca7a description: Prevent modification of cache RPC answers The cached value should never be changed after being stored by the setter or by a getter. So we make a copy of the value before storing it and return another copy when returned. issue8387 review269601002 (grafted from 5ec90db3ed7a237957d23461c03a49b69a34130a) diffstat: tryton/jsonrpc.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diffs (28 lines): diff -r 46a11598ac95 -r 97651de5ca7a tryton/jsonrpc.py --- a/tryton/jsonrpc.py Mon Jun 10 23:14:36 2019 +0200 +++ b/tryton/jsonrpc.py Wed Jun 12 19:04:42 2019 +0200 @@ -1,5 +1,6 @@ # 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 copy import xmlrpc.client import json import ssl @@ -402,7 +403,7 @@ expire = datetime.timedelta(seconds=expire) if isinstance(expire, datetime.timedelta): expire = datetime.datetime.now() + expire -self.store[prefix][key] = (expire, value) +self.store[prefix][key] = (expire, copy.deepcopy(value)) def get(self, prefix, key): now = datetime.datetime.now() @@ -414,7 +415,7 @@ self.store.pop(key) raise KeyError logger.info('(cached) %s %s', prefix, key) -return value +return copy.deepcopy(value) def clear(self, prefix=None): if prefix:
[tryton-commits] changeset in tryton:5.2 Correct formatting in po files
changeset 46a11598ac95 in tryton:5.2 details: https://hg.tryton.org/tryton?cmd=changeset;node=46a11598ac95 description: Correct formatting in po files (grafted from 2dd912fe7c5c95dc38f6f7b1bb00307bbc068d50) diffstat: tryton/data/locale/et/LC_MESSAGES/tryton.po | 2 +- tryton/data/locale/lt/LC_MESSAGES/tryton.po | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diffs (33 lines): diff -r 54a1a017a1c9 -r 46a11598ac95 tryton/data/locale/et/LC_MESSAGES/tryton.po --- a/tryton/data/locale/et/LC_MESSAGES/tryton.po Fri Jun 07 09:57:20 2019 +0200 +++ b/tryton/data/locale/et/LC_MESSAGES/tryton.po Mon Jun 10 23:14:36 2019 +0200 @@ -452,7 +452,7 @@ #, python-format msgid "Attachments (%s)" -msgstr "Manus (%ed)" +msgstr "Manus (%s)" msgid "Profile Editor" msgstr "Profiili muutmine" diff -r 54a1a017a1c9 -r 46a11598ac95 tryton/data/locale/lt/LC_MESSAGES/tryton.po --- a/tryton/data/locale/lt/LC_MESSAGES/tryton.po Fri Jun 07 09:57:20 2019 +0200 +++ b/tryton/data/locale/lt/LC_MESSAGES/tryton.po Mon Jun 10 23:14:36 2019 +0200 @@ -791,7 +791,7 @@ #, python-format msgid "CSV Export: %s" -msgstr "CSV eksportavimas:" +msgstr "CSV eksportavimas: %s" msgid "_Save Export" msgstr "Išsaugoti eksporto šabloną" @@ -822,7 +822,7 @@ #, python-format msgid "%s (record name)" -msgstr "% (įrašo pavadinimas)" +msgstr "%s (įrašo pavadinimas)" msgid "What is the name of this export?" msgstr "Kokiu pavadinimu išsaugoti šį eksportavimo šabloną?"
[tryton-commits] changeset in trytond:5.2 Skip tests relying on assertion when py...
changeset ef0c2998bced in trytond:5.2 details: https://hg.tryton.org/trytond?cmd=changeset;node=ef0c2998bced description: Skip tests relying on assertion when python is optimized issue8381 review271471002 (grafted from 136794626cf54bb41a048d555e58df7cdd4efde1) diffstat: trytond/tests/test_pyson.py | 139 ++- trytond/tests/test_tools.py |3 + 2 files changed, 87 insertions(+), 55 deletions(-) diffs (253 lines): diff -r bc251856cad1 -r ef0c2998bced trytond/tests/test_pyson.py --- a/trytond/tests/test_pyson.py Mon Jun 10 18:17:50 2019 +0200 +++ b/trytond/tests/test_pyson.py Wed Jun 12 19:15:00 2019 +0200 @@ -4,6 +4,8 @@ import unittest import datetime +import sys + from decimal import Decimal from trytond import pyson @@ -109,8 +111,9 @@ 's': [True, False], }) -self.assertRaises(AssertionError, pyson.And, True) -self.assertRaises(AssertionError, pyson.And) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.And, True) +self.assertRaises(AssertionError, pyson.And) self.assertEqual(pyson.And(True, False).types(), set([bool])) @@ -151,8 +154,9 @@ 's': [True, False], }) -self.assertRaises(AssertionError, pyson.Or, True) -self.assertRaises(AssertionError, pyson.Or) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Or, True) +self.assertRaises(AssertionError, pyson.Or) self.assertEqual(pyson.Or(True, False).types(), set([bool])) @@ -194,7 +198,8 @@ 's2': 'test', }) -self.assertRaises(AssertionError, pyson.Equal, 'test', True) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Equal, 'test', True) self.assertEqual(pyson.Equal('test', 'test').types(), set([bool])) @@ -216,8 +221,9 @@ 'e': False, }) -self.assertRaises(AssertionError, pyson.Greater, 'test', 0) -self.assertRaises(AssertionError, pyson.Greater, 1, 'test') +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Greater, 'test', 0) +self.assertRaises(AssertionError, pyson.Greater, 1, 'test') self.assertEqual(pyson.Greater(1, 0).types(), set([bool])) @@ -256,8 +262,9 @@ 'e': False, }) -self.assertRaises(AssertionError, pyson.Less, 'test', 1) -self.assertRaises(AssertionError, pyson.Less, 0, 'test') +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Less, 'test', 1) +self.assertRaises(AssertionError, pyson.Less, 0, 'test') self.assertEqual(pyson.Less(0, 1).types(), set([bool])) @@ -296,7 +303,8 @@ 'e': 'bar', }) -self.assertRaises(AssertionError, pyson.If, True, 'foo', False) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.If, True, 'foo', False) self.assertEqual(pyson.If(True, 'foo', 'bar').types(), set([str])) @@ -320,8 +328,10 @@ 'd': 'default', }) -self.assertRaises(AssertionError, pyson.Get, 'test', 'foo', 'default') -self.assertRaises(AssertionError, pyson.Get, {}, 1, 'default') +if not sys.flags.optimize: +self.assertRaises( +AssertionError, pyson.Get, 'test', 'foo', 'default') +self.assertRaises(AssertionError, pyson.Get, {}, 1, 'default') self.assertEqual(pyson.Get({}, 'foo', 'default').types(), set([str])) @@ -350,8 +360,9 @@ 'v': {'foo': 'bar'}, }) -self.assertRaises(AssertionError, pyson.In, object(), {}) -self.assertRaises(AssertionError, pyson.In, 'test', 'foo') +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.In, object(), {}) +self.assertRaises(AssertionError, pyson.In, 'test', 'foo') self.assertEqual(pyson.In('foo', {}).types(), set([bool])) @@ -400,18 +411,19 @@ 'dd': -7 }) -self.assertRaises(AssertionError, pyson.Date, 'test', 1, 12, -1, 12, --7) -self.assertRaises(AssertionError, pyson.Date, 2010, 'test', 12, -1, 12, --7) -self.assertRaises(AssertionError, pyson.Date, 2010, 1, 'test', -1, 12, --7) -self.assertRaises(AssertionError, pyson.Date, 2010, 1, 12, 'test', 12, --7) -self.assertRaises(AssertionError, pyson.Date, 2010, 1, 12, -1, 'test', --7) -self.assertRaises(AssertionError, pyson.Date, 2010, 1, 12, -1, 12, -'test') +if not sys.flags.optimize: +self.assertRaises( +AssertionError, pyson.Date, 'test', 1, 12,
[tryton-commits] changeset in tryton:5.2 Add widget prefixes as column prefixes
changeset b3f163322e1e in tryton:5.2 details: https://hg.tryton.org/tryton?cmd=changeset;node=b3f163322e1e description: Add widget prefixes as column prefixes issue8406 review261581003 (grafted from e80b6d2f01c5bd4ce657dcb9c7a7517633ed6aa4) diffstat: tryton/gui/window/view_form/view/list.py | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (11 lines): diff -r 97651de5ca7a -r b3f163322e1e tryton/gui/window/view_form/view/list.py --- a/tryton/gui/window/view_form/view/list.py Wed Jun 12 19:04:42 2019 +0200 +++ b/tryton/gui/window/view_form/view/list.py Wed Jun 12 19:10:19 2019 +0200 @@ -307,6 +307,7 @@ else: list_ = suffixes list_.append(Affix(self.view, affix_attrs)) +prefixes.extend(widget.prefixes) for prefix in prefixes: column.pack_start(prefix.renderer, expand=prefix.expand)
[tryton-commits] changeset in sao:5.2 Remove record, field from display_update_se...
changeset 3bc0867dcde1 in sao:5.2 details: https://hg.tryton.org/sao?cmd=changeset;node=3bc0867dcde1 description: Remove record, field from display_update_selection of multiselection The method on selection does not have those parameters anymore. issue8385 review287381003 (grafted from 3a66e4367396e7322498b0e76ee293278ba97833) diffstat: src/view/form.js | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diffs (15 lines): diff -r 8c310317d2ed -r 3bc0867dcde1 src/view/form.js --- a/src/view/form.js Wed Jun 12 19:06:19 2019 +0200 +++ b/src/view/form.js Wed Jun 12 19:08:46 2019 +0200 @@ -3617,8 +3617,10 @@ this, view, attributes); this.select.prop('multiple', true); }, -display_update_selection: function(record, field) { +display_update_selection: function() { var i, len, element; +var record = this.record; +var field = this.field; this.update_selection(record, field, function() { var yexpand = this.attributes.yexpand; if (yexpand === undefined) {
[tryton-commits] changeset in trytond:5.0 Skip tests relying on assertion when py...
changeset 5f7aac6c7637 in trytond:5.0 details: https://hg.tryton.org/trytond?cmd=changeset;node=5f7aac6c7637 description: Skip tests relying on assertion when python is optimized issue8381 review271471002 (grafted from 136794626cf54bb41a048d555e58df7cdd4efde1) diffstat: trytond/tests/test_pyson.py | 139 ++- trytond/tests/test_tools.py |3 + 2 files changed, 87 insertions(+), 55 deletions(-) diffs (253 lines): diff -r d2e2fcab5219 -r 5f7aac6c7637 trytond/tests/test_pyson.py --- a/trytond/tests/test_pyson.py Sun Jun 16 12:37:22 2019 +0200 +++ b/trytond/tests/test_pyson.py Wed Jun 12 19:15:00 2019 +0200 @@ -4,6 +4,8 @@ import unittest import datetime +import sys + from decimal import Decimal from trytond import pyson @@ -109,8 +111,9 @@ 's': [True, False], }) -self.assertRaises(AssertionError, pyson.And, True) -self.assertRaises(AssertionError, pyson.And) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.And, True) +self.assertRaises(AssertionError, pyson.And) self.assertEqual(pyson.And(True, False).types(), set([bool])) @@ -151,8 +154,9 @@ 's': [True, False], }) -self.assertRaises(AssertionError, pyson.Or, True) -self.assertRaises(AssertionError, pyson.Or) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Or, True) +self.assertRaises(AssertionError, pyson.Or) self.assertEqual(pyson.Or(True, False).types(), set([bool])) @@ -194,7 +198,8 @@ 's2': 'test', }) -self.assertRaises(AssertionError, pyson.Equal, 'test', True) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Equal, 'test', True) self.assertEqual(pyson.Equal('test', 'test').types(), set([bool])) @@ -216,8 +221,9 @@ 'e': False, }) -self.assertRaises(AssertionError, pyson.Greater, 'test', 0) -self.assertRaises(AssertionError, pyson.Greater, 1, 'test') +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Greater, 'test', 0) +self.assertRaises(AssertionError, pyson.Greater, 1, 'test') self.assertEqual(pyson.Greater(1, 0).types(), set([bool])) @@ -256,8 +262,9 @@ 'e': False, }) -self.assertRaises(AssertionError, pyson.Less, 'test', 1) -self.assertRaises(AssertionError, pyson.Less, 0, 'test') +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.Less, 'test', 1) +self.assertRaises(AssertionError, pyson.Less, 0, 'test') self.assertEqual(pyson.Less(0, 1).types(), set([bool])) @@ -296,7 +303,8 @@ 'e': 'bar', }) -self.assertRaises(AssertionError, pyson.If, True, 'foo', False) +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.If, True, 'foo', False) self.assertEqual(pyson.If(True, 'foo', 'bar').types(), set([str])) @@ -320,8 +328,10 @@ 'd': 'default', }) -self.assertRaises(AssertionError, pyson.Get, 'test', 'foo', 'default') -self.assertRaises(AssertionError, pyson.Get, {}, 1, 'default') +if not sys.flags.optimize: +self.assertRaises( +AssertionError, pyson.Get, 'test', 'foo', 'default') +self.assertRaises(AssertionError, pyson.Get, {}, 1, 'default') self.assertEqual(pyson.Get({}, 'foo', 'default').types(), set([str])) @@ -350,8 +360,9 @@ 'v': {'foo': 'bar'}, }) -self.assertRaises(AssertionError, pyson.In, object(), {}) -self.assertRaises(AssertionError, pyson.In, 'test', 'foo') +if not sys.flags.optimize: +self.assertRaises(AssertionError, pyson.In, object(), {}) +self.assertRaises(AssertionError, pyson.In, 'test', 'foo') self.assertEqual(pyson.In('foo', {}).types(), set([bool])) @@ -400,18 +411,19 @@ 'dd': -7 }) -self.assertRaises(AssertionError, pyson.Date, 'test', 1, 12, -1, 12, --7) -self.assertRaises(AssertionError, pyson.Date, 2010, 'test', 12, -1, 12, --7) -self.assertRaises(AssertionError, pyson.Date, 2010, 1, 'test', -1, 12, --7) -self.assertRaises(AssertionError, pyson.Date, 2010, 1, 12, 'test', 12, --7) -self.assertRaises(AssertionError, pyson.Date, 2010, 1, 12, -1, 'test', --7) -self.assertRaises(AssertionError, pyson.Date, 2010, 1, 12, -1, 12, -'test') +if not sys.flags.optimize: +self.assertRaises( +AssertionError, pyson.Date, 'test', 1, 12,
[tryton-commits] changeset in tryton:5.2 Add dependency to PyGObject
changeset 54a1a017a1c9 in tryton:5.2 details: https://hg.tryton.org/tryton?cmd=changeset;node=54a1a017a1c9 description: Add dependency to PyGObject issue8408 review283491002 (grafted from 6e5a01ef11059e17f1bd1919f37a3999526a0a79) diffstat: setup.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (14 lines): diff -r cb052e0b51fa -r 54a1a017a1c9 setup.py --- a/setup.py Mon May 27 23:18:37 2019 +0200 +++ b/setup.py Fri Jun 07 09:57:20 2019 +0200 @@ -129,9 +129,9 @@ license='GPL-3', python_requires='>=3.5', install_requires=[ -# "py-gobject3", 'pycairo', "python-dateutil", +'PyGObject', ], extras_require={ 'calendar': ['GooCalendar>=0.5'],
[tryton-commits] changeset in sao:5.2 Test if attribute readonly is undefined bef...
changeset 8c310317d2ed in sao:5.2 details: https://hg.tryton.org/sao?cmd=changeset;node=8c310317d2ed description: Test if attribute readonly is undefined before using states value This is the general behavior for readonly attribute so RowEditable.set_editable must follow it to avoid incoherent behavior. issue8390 review249401002 (grafted from 7c9da8ff4d4fb7de56f005d2f276ad5ad56c8d41) diffstat: src/view/tree.js | 8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diffs (18 lines): diff -r dd0a85d02f9c -r 8c310317d2ed src/view/tree.js --- a/src/view/tree.js Wed Jun 12 19:04:42 2019 +0200 +++ b/src/view/tree.js Wed Jun 12 19:06:19 2019 +0200 @@ -1330,7 +1330,13 @@ continue; } var state_attrs = col.field.get_state_attrs(this.record); -var readonly = col.attributes.readonly || state_attrs.readonly; +var readonly = col.attributes.readonly; +if (readonly === undefined) { +readonly = state_attrs.readonly; +if (readonly === undefined) { +readonly = false; +} +} var EditableBuilder = Sao.View.EditableTree.WIDGETS[ col.attributes.widget];
[tryton-commits] changeset in sao:4.8 Test if attribute readonly is undefined bef...
changeset 56e838a7ef9d in sao:4.8 details: https://hg.tryton.org/sao?cmd=changeset;node=56e838a7ef9d description: Test if attribute readonly is undefined before using states value This is the general behavior for readonly attribute so RowEditable.set_editable must follow it to avoid incoherent behavior. issue8390 review249401002 (grafted from 7c9da8ff4d4fb7de56f005d2f276ad5ad56c8d41) diffstat: src/view/tree.js | 8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diffs (18 lines): diff -r faf28980662f -r 56e838a7ef9d src/view/tree.js --- a/src/view/tree.js Mon Jun 10 18:34:59 2019 +0200 +++ b/src/view/tree.js Wed Jun 12 19:06:19 2019 +0200 @@ -1319,7 +1319,13 @@ continue; } var state_attrs = col.field.get_state_attrs(this.record); -var readonly = col.attributes.readonly || state_attrs.readonly; +var readonly = col.attributes.readonly; +if (readonly === undefined) { +readonly = state_attrs.readonly; +if (readonly === undefined) { +readonly = false; +} +} if (!readonly) { var EditableBuilder = Sao.View.editabletree_widget_get(
[tryton-commits] changeset in sao:5.0 Test if attribute readonly is undefined bef...
changeset 36bee229469e in sao:5.0 details: https://hg.tryton.org/sao?cmd=changeset;node=36bee229469e description: Test if attribute readonly is undefined before using states value This is the general behavior for readonly attribute so RowEditable.set_editable must follow it to avoid incoherent behavior. issue8390 review249401002 (grafted from 7c9da8ff4d4fb7de56f005d2f276ad5ad56c8d41) diffstat: src/view/tree.js | 8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diffs (18 lines): diff -r 725b5a21ea10 -r 36bee229469e src/view/tree.js --- a/src/view/tree.js Tue May 28 09:53:36 2019 +0200 +++ b/src/view/tree.js Wed Jun 12 19:06:19 2019 +0200 @@ -1305,7 +1305,13 @@ continue; } var state_attrs = col.field.get_state_attrs(this.record); -var readonly = col.attributes.readonly || state_attrs.readonly; +var readonly = col.attributes.readonly; +if (readonly === undefined) { +readonly = state_attrs.readonly; +if (readonly === undefined) { +readonly = false; +} +} if (!readonly) { var EditableBuilder = Sao.View.editabletree_widget_get(
[tryton-commits] changeset in modules/stock_supply_production:4.6 Catch error whe...
changeset 0cc833fbe2bf in modules/stock_supply_production:4.6 details: https://hg.tryton.org/modules/stock_supply_production?cmd=changeset;node=0cc833fbe2bf description: Catch error when removing non existant products It should not fail when the product has been removed by get_shortage issue8354 review267421002 (grafted from e0301c4cc7654f961bcf157d39d382d8c4e8f37b) diffstat: production.py | 6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diffs (16 lines): diff -r 973e60e386a3 -r 0cc833fbe2bf production.py --- a/production.py Mon Apr 22 10:51:55 2019 +0200 +++ b/production.py Thu Jun 06 19:22:13 2019 +0200 @@ -197,7 +197,11 @@ while (products_period and products_period[0][0] <= (current_date - date)): _, product = products_period.pop(0) -product_ids.remove(product.id) +try: +product_ids.remove(product.id) +except ValueError: +# product may have been already removed on get_shortages +pass current_date += datetime.timedelta(1) # Update current quantities with next moves
[tryton-commits] changeset in modules/stock_supply_production:5.0 Catch error whe...
changeset be6fcd46487c in modules/stock_supply_production:5.0 details: https://hg.tryton.org/modules/stock_supply_production?cmd=changeset;node=be6fcd46487c description: Catch error when removing non existant products It should not fail when the product has been removed by get_shortage issue8354 review267421002 (grafted from e0301c4cc7654f961bcf157d39d382d8c4e8f37b) diffstat: production.py | 6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diffs (16 lines): diff -r 4e9f0276323e -r be6fcd46487c production.py --- a/production.py Mon Apr 22 10:46:21 2019 +0200 +++ b/production.py Thu Jun 06 19:22:13 2019 +0200 @@ -197,7 +197,11 @@ while (products_period and products_period[0][0] <= (current_date - date)): _, product = products_period.pop(0) -product_ids.remove(product.id) +try: +product_ids.remove(product.id) +except ValueError: +# product may have been already removed on get_shortages +pass current_date += datetime.timedelta(1) # Update current quantities with next moves
[tryton-commits] changeset in sao:5.2 Prevent modification of cache RPC answers
changeset dd0a85d02f9c in sao:5.2 details: https://hg.tryton.org/sao?cmd=changeset;node=dd0a85d02f9c description: Prevent modification of cache RPC answers The cached value should never be changed after being stored by the setter or by a getter. So we make a copy of the value before storing it and return another copy when returned. issue8387 review269601002 (grafted from 3cdde3cf91536af018d764d63f03d2c46641ff87) diffstat: src/session.js | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (21 lines): diff -r 7cc135d9ee8d -r dd0a85d02f9c src/session.js --- a/src/session.jsWed Jun 12 19:02:56 2019 +0200 +++ b/src/session.jsWed Jun 12 19:04:42 2019 +0200 @@ -347,7 +347,7 @@ expire = new Date(new Date().getTime() + expire * 1000); Sao.setdefault(this.store, prefix, {})[key] = { 'expire': expire, -'value': value, +'value': JSON.stringify(Sao.rpc.prepareObject(value)), }; }, get: function(prefix, key) { @@ -360,7 +360,7 @@ delete this.store[prefix][key]; return undefined; } -return data.value; +return Sao.rpc.convertJSONObject(jQuery.parseJSON(data.value)); }, clear: function(prefix) { if (prefix) {
[tryton-commits] changeset in modules/stock_supply_production:5.2 Catch error whe...
changeset 323525c3df4c in modules/stock_supply_production:5.2 details: https://hg.tryton.org/modules/stock_supply_production?cmd=changeset;node=323525c3df4c description: Catch error when removing non existant products It should not fail when the product has been removed by get_shortage issue8354 review267421002 (grafted from e0301c4cc7654f961bcf157d39d382d8c4e8f37b) diffstat: production.py | 6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diffs (16 lines): diff -r 2b5f3f1790d9 -r 323525c3df4c production.py --- a/production.py Mon May 06 15:18:10 2019 +0200 +++ b/production.py Thu Jun 06 19:22:13 2019 +0200 @@ -197,7 +197,11 @@ while (products_period and products_period[0][0] <= (current_date - date)): _, product = products_period.pop(0) -product_ids.remove(product.id) +try: +product_ids.remove(product.id) +except ValueError: +# product may have been already removed on get_shortages +pass current_date += datetime.timedelta(1) # Update current quantities with next moves
[tryton-commits] changeset in modules/stock_supply_production:4.8 Catch error whe...
changeset 643a32f0b136 in modules/stock_supply_production:4.8 details: https://hg.tryton.org/modules/stock_supply_production?cmd=changeset;node=643a32f0b136 description: Catch error when removing non existant products It should not fail when the product has been removed by get_shortage issue8354 review267421002 (grafted from e0301c4cc7654f961bcf157d39d382d8c4e8f37b) diffstat: production.py | 6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diffs (16 lines): diff -r b4291067ab93 -r 643a32f0b136 production.py --- a/production.py Mon Apr 22 10:48:43 2019 +0200 +++ b/production.py Thu Jun 06 19:22:13 2019 +0200 @@ -199,7 +199,11 @@ while (products_period and products_period[0][0] <= (current_date - date)): _, product = products_period.pop(0) -product_ids.remove(product.id) +try: +product_ids.remove(product.id) +except ValueError: +# product may have been already removed on get_shortages +pass current_date += datetime.timedelta(1) # Update current quantities with next moves
[tryton-commits] changeset in sao:5.2 Compare record against the current record o...
changeset 7cc135d9ee8d in sao:5.2 details: https://hg.tryton.org/sao?cmd=changeset;node=7cc135d9ee8d description: Compare record against the current record of the screen Also store the view instead of the screen like in tryton. issue8386 review263551002 (grafted from 2bde5d20a57863fadc1d78599b96dac5285e57af) diffstat: src/view/tree.js | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diffs (50 lines): diff -r 041a50d4da98 -r 7cc135d9ee8d src/view/tree.js --- a/src/view/tree.js Tue May 28 09:53:36 2019 +0200 +++ b/src/view/tree.js Wed Jun 12 19:02:56 2019 +0200 @@ -68,7 +68,7 @@ }, _parse_button: function(node, attributes) { var column = new Sao.View.Tree.ButtonColumn( -this.view.screen, attributes); +this.view, attributes); this.view.columns.push(column); } }); @@ -1955,8 +1955,8 @@ }); Sao.View.Tree.ButtonColumn = Sao.class_(Object, { -init: function(screen, attributes) { -this.screen = screen; +init: function(view, attributes) { +this.view = view; this.type = 'button'; this.attributes = attributes; }, @@ -1966,7 +1966,7 @@ button.el.click( [record, button], this.button_clicked.bind(this)); } -var fields = jQuery.map(this.screen.model.fields, +var fields = jQuery.map(this.view.screen.model.fields, function(field, name) { if ((field.description.loading || 'eager') == 'eager') { @@ -1984,7 +1984,7 @@ button_clicked: function(event) { var record = event.data[0]; var button = event.data[1]; -if (record != this.record) { +if (record != this.view.screen.current_record) { // Need to raise the event to get the record selected return true; } @@ -1993,7 +1993,7 @@ return; } button.el.prop('disabled', true); -this.screen.button(this.attributes).always(function() { +this.view.screen.button(this.attributes).always(function() { button.el.prop('disabled', false); }); }
[tryton-commits] changeset in modules/stock_supply_production:4.4 Catch error whe...
changeset 7e80e571164b in modules/stock_supply_production:4.4 details: https://hg.tryton.org/modules/stock_supply_production?cmd=changeset;node=7e80e571164b description: Catch error when removing non existant products It should not fail when the product has been removed by get_shortage issue8354 review267421002 (grafted from e0301c4cc7654f961bcf157d39d382d8c4e8f37b) diffstat: production.py | 6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diffs (16 lines): diff -r 6f547d96d226 -r 7e80e571164b production.py --- a/production.py Mon Apr 22 10:52:48 2019 +0200 +++ b/production.py Thu Jun 06 19:22:13 2019 +0200 @@ -197,7 +197,11 @@ while (products_period and products_period[0][0] <= (current_date - date)): _, product = products_period.pop(0) -product_ids.remove(product.id) +try: +product_ids.remove(product.id) +except ValueError: +# product may have been already removed on get_shortages +pass current_date += datetime.timedelta(1) # Update current quantities with next moves