changeset 49b4452f9993 in proteus:default
details: https://hg.tryton.org/proteus?cmd=changeset&node=49b4452f9993
description:
        Use bigdecimal tag for XML-RPC

        issue10734
        review355491002
diffstat:

 CHANGELOG         |  2 ++
 proteus/config.py |  7 +++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diffs (26 lines):

diff -r 9bc0e2be2431 -r 49b4452f9993 CHANGELOG
--- a/CHANGELOG Sun Sep 19 00:04:57 2021 +0200
+++ b/CHANGELOG Thu Sep 23 10:22:01 2021 +0200
@@ -1,3 +1,5 @@
+* Use bigdecimal tag for XML-RPC
+
 Version 6.0.0 - 2021-05-03
 * Bug fixes (see mercurial logs for details)
 * Add support for Python 3.9
diff -r 9bc0e2be2431 -r 49b4452f9993 proteus/config.py
--- a/proteus/config.py Sun Sep 19 00:04:57 2021 +0200
+++ b/proteus/config.py Thu Sep 23 10:22:01 2021 +0200
@@ -15,10 +15,9 @@
 
 
 def dump_decimal(self, value, write):
-    value = {'__class__': 'Decimal',
-        'decimal': str(value),
-        }
-    self.dump_struct(value, write)
+    write('<value><bigdecimal>')
+    write(str(Decimal(value)))
+    write('</bigdecimal></value>')
 
 
 def dump_date(self, value, write):

Reply via email to