diff --git a/CHANGELOG b/CHANGELOG
index 746239b64d..c58b26e1ce 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,4 @@
+* Use bigdecimal tag for XML-RPC
* Use tuple in Dict value instead of list
* Do not set record name on title of report get_email
* Add node to id of status
diff --git a/trytond/protocols/xmlrpc.py b/trytond/protocols/xmlrpc.py
index e4cbcafa16..f7426b8e09 100644
--- a/trytond/protocols/xmlrpc.py
+++ b/trytond/protocols/xmlrpc.py
@@ -23,10 +23,9 @@ logger = logging.getLogger(__name__)
def dump_decimal(self, value, write):
- value = {'__class__': 'Decimal',
- 'decimal': str(value),
- }
- self.dump_struct(value, write)
+ write('')
+ write(str(Decimal(value)))
+ write('')
def dump_date(self, value, write):
diff --git a/trytond/tests/test_protocols.py b/trytond/tests/test_protocols.py
index e253b3c3a1..55cddce5e5 100644
--- a/trytond/tests/test_protocols.py
+++ b/trytond/tests/test_protocols.py
@@ -101,6 +101,24 @@ class XMLTestCase(DumpsLoadsMixin, unittest.TestCase):
result, = result
self.assertEqual(value, result)
+ def test_decimal_class_load(self):
+ "Test load Decimal as __class__"
+ s = """
+
+
+ __class__
+ Decimal
+
+
+ decimal
+ 3.141592653589793
+
+
+ """
+ result, _ = client.loads(s)
+ result, = result
+ self.assertEqual(result, Decimal('3.141592653589793'))
+
def suite():
suite_ = unittest.TestSuite()