From 542d6331425bbc6a72c447485db7437e45a7bbe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 24 Apr 2012 12:25:20 +0200 Subject: [PATCH 01/16] Increase version number --- proteus/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proteus/__init__.py b/proteus/__init__.py index 4c944aa730..0599a0fb6c 100644 --- a/proteus/__init__.py +++ b/proteus/__init__.py @@ -3,7 +3,7 @@ ''' A library to access Tryton's models like a client. ''' -__version__ = "2.4.0" +__version__ = "2.4.1" __all__ = ['Model', 'Wizard'] import sys try: From d559c076c51d56da730e951daaf04a84e0fac10b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 18 May 2012 16:43:52 +0200 Subject: [PATCH 02/16] Fix doctest to follow new names in install module process (transplanted from 04dbba05d439350eb7c3d97ecd451fd1cdab9123) --- README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 7e0a9576d7..390ee65d84 100644 --- a/README +++ b/README @@ -31,8 +31,8 @@ Find the module, call the install button and run the install wizard. >>> Module = Model.get('ir.module.module') >>> (party,) = Module.find([('name', '=', 'party')]) - >>> Module.button_install([party.id], config.context) - >>> Wizard('ir.module.module.install_upgrade').execute('start') + >>> Module.install([party.id], config.context) + >>> Wizard('ir.module.module.install_upgrade').execute('upgrade') Creating a party ~~~~~~~~~~~~~~~~ From cadec71dd7442e21f664445f009cb0a7ff62eb44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 19 Jul 2012 09:52:59 +0200 Subject: [PATCH 03/16] Sent all values when creating record issue2715 review429001 (transplanted from 4b20e670e5829da3ec5ebcd9f8663fc7b4424b09) --- proteus/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/proteus/__init__.py b/proteus/__init__.py index 0599a0fb6c..a20320ce5a 100644 --- a/proteus/__init__.py +++ b/proteus/__init__.py @@ -189,7 +189,8 @@ class Many2OneDescriptor(FieldDescriptor): value = relation(value) elif not value: value = None - instance._values[self.name] = value + if self.name in instance._values: + instance._values[self.name] = value return value def __set__(self, instance, value): @@ -600,7 +601,7 @@ class Model(object): 'Save the record' context = self._config.context if self.id < 0: - values = self._get_values(fields=self._changed) + values = self._get_values() self.__id = self._proxy.create(values, context) else: if not self._changed: From e82c2a7e8994b2c87e15402066e135c216d3e674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 26 Jul 2012 11:30:40 +0200 Subject: [PATCH 04/16] Import pyson locally to not break installation issue2705 review450001 (transplanted from 433368c5f09898fced213c19da8c82741d9caab0) --- proteus/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proteus/__init__.py b/proteus/__init__.py index a20320ce5a..cdaf8c60b0 100644 --- a/proteus/__init__.py +++ b/proteus/__init__.py @@ -20,7 +20,6 @@ from decimal import Decimal from types import NoneType import proteus.config -from proteus.pyson import PYSONDecoder _MODELS = threading.local() @@ -760,6 +759,8 @@ class Model(object): def _on_change(self, name): 'Call on_change for field' + # Import locally to not break installation + from proteus.pyson import PYSONDecoder definition = self._fields[name] if definition.get('on_change'): if isinstance(definition['on_change'], basestring): From 8f4ec2a34df39e13edcfecabd4c9157f960f96c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 10 Sep 2012 18:26:50 +0200 Subject: [PATCH 05/16] Prepare release 2.4.1 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index c628e1f019..db02c9c3a2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 2.4.1 - 2012-09-10 +* Bug fixes (see mercurial logs for details) + Version 2.4.0 - 2012-04-23 * Bug fixes (see mercurial logs for details) * Use loading attribute From ca33819c55eb12f84b4ebf27baa66df30c27495f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 10 Sep 2012 18:26:51 +0200 Subject: [PATCH 06/16] Added tag 2.4.1 for changeset c2ef0c51769b --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 1c69edfd84..dc14632771 100644 --- a/.hgtags +++ b/.hgtags @@ -2,3 +2,4 @@ c8fdae3b2338b744fce709572958884a95de87b3 2.0.0 120d0435125cf3a3c28280321962571924ad422f 2.2.0 ef9846cb18afe62182de446d8e4fa7b8393f7168 2.4.0 +c2ef0c51769b3d40e86058297605e048c1404276 2.4.1 From 954f9f007e982678c1027bb1b8d27d25b0aade31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 10 Sep 2012 18:27:00 +0200 Subject: [PATCH 07/16] Increase version number --- proteus/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proteus/__init__.py b/proteus/__init__.py index cdaf8c60b0..5ade04de69 100644 --- a/proteus/__init__.py +++ b/proteus/__init__.py @@ -3,7 +3,7 @@ ''' A library to access Tryton's models like a client. ''' -__version__ = "2.4.1" +__version__ = "2.4.2" __all__ = ['Model', 'Wizard'] import sys try: From 8c56b7a17856a38fdc1ae71098301f83f5cb891e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 10 Oct 2012 15:05:13 +0200 Subject: [PATCH 08/16] Convert False value from Char into None Because XML-RPC doesn't handle None, we receive False. But trytond is more strict about the value allowed on Char fields. review556003 (transplanted from 77447d9598e70b194b646dd821c31aa636e3eb13) --- proteus/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/proteus/__init__.py b/proteus/__init__.py index 5ade04de69..acf9b1914e 100644 --- a/proteus/__init__.py +++ b/proteus/__init__.py @@ -100,6 +100,12 @@ class CharDescriptor(FieldDescriptor): assert isinstance(value, basestring) or value in (None, False) super(CharDescriptor, self).__set__(instance, value or '') + def __get__(self, instance, owner): + value = super(CharDescriptor, self).__get__(instance, owner) + if value is False: + value = None + return value + class BinaryDescriptor(FieldDescriptor): default = None From c303e780c6324ab2d5fb8263bfc79b00137c8573 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 5 Nov 2012 17:51:01 +0100 Subject: [PATCH 09/16] Prepare release 2.4.2 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index db02c9c3a2..4e62c12819 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 2.4.2 - 2012-11-05 +* Bug fixes (see mercurial logs for details) + Version 2.4.1 - 2012-09-10 * Bug fixes (see mercurial logs for details) From d6cc3390d1fea29795a16d33990714c8735978d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 5 Nov 2012 17:51:02 +0100 Subject: [PATCH 10/16] Added tag 2.4.2 for changeset f37ddb0a54b0 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index dc14632771..e07b92070e 100644 --- a/.hgtags +++ b/.hgtags @@ -3,3 +3,4 @@ c8fdae3b2338b744fce709572958884a95de87b3 2.0.0 120d0435125cf3a3c28280321962571924ad422f 2.2.0 ef9846cb18afe62182de446d8e4fa7b8393f7168 2.4.0 c2ef0c51769b3d40e86058297605e048c1404276 2.4.1 +f37ddb0a54b01b18f5f9531086389753b29b5efb 2.4.2 From af001bb0a8450670f5db4a77d1739019858c2733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 5 Nov 2012 17:51:11 +0100 Subject: [PATCH 11/16] Increase version number --- proteus/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proteus/__init__.py b/proteus/__init__.py index acf9b1914e..d38fc1f4cc 100644 --- a/proteus/__init__.py +++ b/proteus/__init__.py @@ -3,7 +3,7 @@ ''' A library to access Tryton's models like a client. ''' -__version__ = "2.4.2" +__version__ = "2.4.3" __all__ = ['Model', 'Wizard'] import sys try: From 369b90360348b56a6245f63c2eb75a86e6951d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 27 Feb 2013 22:52:29 +0100 Subject: [PATCH 12/16] Remove hard-coded end state of Wizard (transplanted from 71a089de7c84cd68013a33749e9505cf3a391a33) --- proteus/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proteus/__init__.py b/proteus/__init__.py index d38fc1f4cc..08802c8d05 100644 --- a/proteus/__init__.py +++ b/proteus/__init__.py @@ -840,7 +840,7 @@ class Wizard(object): assert state in self.states self.state = state - while self.state != 'end': + while self.state != self.end_state: ctx = self._context.copy() ctx.update(self._config.context) if self.models: From fdb863668a3fb99d14340916f6631e6d39795d37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 22 Mar 2013 17:40:15 +0100 Subject: [PATCH 13/16] class name must be string and not unicode The class name in reference could be unicode but type accept only string as name. review724002 (transplanted from c9ee01676c6b858cc2572e532f141de11e315e6c) --- proteus/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/proteus/__init__.py b/proteus/__init__.py index 08802c8d05..ce188254f4 100644 --- a/proteus/__init__.py +++ b/proteus/__init__.py @@ -547,6 +547,9 @@ class Model(object): @classmethod def get(cls, name, config=None): 'Get a class for the named Model' + if isinstance(name, unicode): + name = name.encode('utf-8') + class Spam(Model): __metaclass__ = MetaModelFactory(name, config=config)() return Spam From 64d4a59f6836d29427b2e9de285c2df6df0d6403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 2 May 2013 09:44:02 +0200 Subject: [PATCH 14/16] Prepare release 2.4.3 --- CHANGELOG | 3 +++ COPYRIGHT | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 4e62c12819..8a3bfc30db 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +Version 2.4.3 - 2013-05-02 +* Bug fixes (see mercurial logs for details) + Version 2.4.2 - 2012-11-05 * Bug fixes (see mercurial logs for details) diff --git a/COPYRIGHT b/COPYRIGHT index e792a2ca59..7e8c156c3f 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,5 +1,5 @@ -Copyright (C) 2010-2012 Cédric Krier. -Copyright (C) 2010-2012 B2CK SPRL. +Copyright (C) 2010-2013 Cédric Krier. +Copyright (C) 2010-2013 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 From 428a821b1f76cd8267ad7c28fb03ff56ec127370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 2 May 2013 09:44:03 +0200 Subject: [PATCH 15/16] Added tag 2.4.3 for changeset 725df44140cc --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index e07b92070e..860b68a5cd 100644 --- a/.hgtags +++ b/.hgtags @@ -4,3 +4,4 @@ c8fdae3b2338b744fce709572958884a95de87b3 2.0.0 ef9846cb18afe62182de446d8e4fa7b8393f7168 2.4.0 c2ef0c51769b3d40e86058297605e048c1404276 2.4.1 f37ddb0a54b01b18f5f9531086389753b29b5efb 2.4.2 +725df44140cc17fbffa03ee8af79abb1ec175df7 2.4.3 From 9c26c4c88f984b8f83b063cc0ddf0cb5d72f9e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 2 May 2013 09:44:12 +0200 Subject: [PATCH 16/16] Increase version number --- proteus/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proteus/__init__.py b/proteus/__init__.py index ce188254f4..c1a114dfe3 100644 --- a/proteus/__init__.py +++ b/proteus/__init__.py @@ -3,7 +3,7 @@ ''' A library to access Tryton's models like a client. ''' -__version__ = "2.4.3" +__version__ = "2.4.4" __all__ = ['Model', 'Wizard'] import sys try: