Richmond Fiko
unread,Apr 12, 2018, 7:05:09 PM4/12/18Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to tryton-dev
Hello,
I try to make a localisation for West africa COA but I have this error on taxes.
1576 139907134330624 [2018-04-12 17:57:32,659] INFO trytond.modules syscohada_2018:loading account.xml
1576 139907134330624 [2018-04-12 17:57:56,624] INFO trytond.modules syscohada_2018:loading tax.xml
1576 139907134330624 [2018-04-12 17:57:57,349] ERROR trytond.convert Error while parsing xml file:
In tag record: model account.tax.template with id vat_tax_4.
Traceback (most recent call last):
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/convert.py", line 447, in parse_xmlstream
self.sax_parser.parse(source)
File "/usr/lib/python3.5/xml/sax/expatreader.py", line 110, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.5/xml/sax/xmlreader.py", line 125, in parse
self.feed(buffer)
File "/usr/lib/python3.5/xml/sax/expatreader.py", line 210, in feed
self._parser.Parse(data, isFinal)
File "../Modules/pyexpat.c", line 468, in EndElement
File "/usr/lib/python3.5/xml/sax/expatreader.py", line 325, in end_element
self._cont_handler.endElement(name)
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/convert.py", line 507, in endElement
self.taghandler = self.taghandler.endElement(name)
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/convert.py", line 289, in endElement
self.model.__name__, self.values, self.xml_id)
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/convert.py", line 693, in import_record
self.create_records(model, [values], [fs_id])
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/convert.py", line 699, in create_records
records = Model.create(vlist)
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/model/modelsql.py", line 533, in create
insert_values.append(field.sql_format(value))
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/model/fields/numeric.py", line 32, in sql_format
assert isinstance(value, Decimal)
AssertionError
Traceback (most recent call last):
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/bin/trytond-admin", line 21, in <module>
admin.run(options)
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/admin.py", line 53, in run
pool.init(update=options.update, lang=list(lang))
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/pool.py", line 153, in init
lang=lang)
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/modules/__init__.py", line 453, in load_modules
_load_modules()
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/modules/__init__.py", line 422, in _load_modules
load_module_graph(graph, pool, update, lang)
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/modules/__init__.py", line 259, in load_module_graph
tryton_parser.parse_xmlstream(fp)
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/convert.py", line 447, in parse_xmlstream
self.sax_parser.parse(source)
File "/usr/lib/python3.5/xml/sax/expatreader.py", line 110, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python3.5/xml/sax/xmlreader.py", line 125, in parse
self.feed(buffer)
File "/usr/lib/python3.5/xml/sax/expatreader.py", line 210, in feed
self._parser.Parse(data, isFinal)
File "../Modules/pyexpat.c", line 468, in EndElement
File "/usr/lib/python3.5/xml/sax/expatreader.py", line 325, in end_element
self._cont_handler.endElement(name)
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/convert.py", line 507, in endElement
self.taghandler = self.taghandler.endElement(name)
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/convert.py", line 289, in endElement
self.model.__name__, self.values, self.xml_id)
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/convert.py", line 693, in import_record
self.create_records(model, [values], [fs_id])
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/convert.py", line 699, in create_records
records = Model.create(vlist)
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/model/modelsql.py", line 533, in create
insert_values.append(field.sql_format(value))
File "/home/gnuhealth/gnuhealth/tryton/server/trytond-4.2.10/trytond/model/fields/numeric.py", line 32, in sql_format
assert isinstance(value, Decimal)
AssertionError
The record
<record id="vat_tax_4" model="account.tax.template">
<field name="name">TVA 18% récupérable sur achat</field>
<field name="description">TVA 18% (Achats)</field>
<field name="group" ref="vat_group_1"/>
<field name="rate" eval="Decimal('.18')"/>
<field name="type">percentage</field>
<field name="invoice_account" ref="account_syscohada_2018_676"/>
<field name="credit_note_account" ref="account_syscohada_2018_676"/>
<field name="invoice_base_code" ref="vat_cod_9"/>
<field name="invoice_tax_code" ref="vat_cod_20"/>
<field name="invoice_base_sign">1</field>
<field name="invoice_tax_sign">1</field>
<field name="credit_note_base_code" ref="vat_cod_9"/>
<field name="credit_note_tax_code" ref="vat_cod_20"/>
<field name="credit_note_base_sign">-1</field>
<field name="credit_note_tax_sign">-1</field>
<field name="account" ref="account_syscohada_2018_1"/>
It seems that the problem is on the field rate. But I don't understand tu error and how the numerics field work.
Can someone help me?