Commit b3aaa698 authored by Arnaud Fontaine's avatar Arnaud Fontaine Committed by Cédric Le Ninivin

erp5_accounting_l10n_fr: Make sure that FEC XML output is always the same given the same data.

parent 54a2b323
...@@ -8,7 +8,8 @@ portal = context.getPortalObject() ...@@ -8,7 +8,8 @@ portal = context.getPortalObject()
active_process = portal.restrictedTraverse(active_process) active_process = portal.restrictedTraverse(active_process)
# XXX we need proxy role for this # XXX we need proxy role for this
result_list = active_process.getResultList() result_list = [ result.detail.decode('zlib') for result in active_process.getResultList() ]
result_list.sort()
fec_file = context.AccountingTransactionModule_viewComptabiliteAsFECXML( fec_file = context.AccountingTransactionModule_viewComptabiliteAsFECXML(
at_date=at_date, at_date=at_date,
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
<comptabilite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="formatA47A-I-VII-1.xsd" xmlns:tal="http://xml.zope.org/namespaces/tal"> <comptabilite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="formatA47A-I-VII-1.xsd" xmlns:tal="http://xml.zope.org/namespaces/tal">
<exercice> <exercice>
<DateCloture tal:content="python: options['at_date'].strftime('%Y-%m-%d')">20141231</DateCloture> <DateCloture tal:content="python: options['at_date'].strftime('%Y-%m-%d')">20141231</DateCloture>
<tal:block tal:repeat="result options/result_list"><tal:block tal:replace="structure python: result.detail.decode('zlib')"/></tal:block> <tal:block tal:repeat="result options/result_list"><tal:block tal:replace="structure python: result"/></tal:block>
</exercice> </exercice>
</comptabilite> </comptabilite>
\ No newline at end of file
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<tal:block tal:replace="nothing"><EcritureLet></EcritureLet> <tal:block tal:replace="nothing"><EcritureLet></EcritureLet>
<DateLet></DateLet></tal:block> <DateLet></DateLet></tal:block>
<ValidDate tal:content="python: context.AccountingTransaction_getDeliverDate().strftime('%Y-%m-%d')">Modification Date</ValidDate> <ValidDate tal:content="python: context.AccountingTransaction_getDeliverDate().strftime('%Y-%m-%d')">Modification Date</ValidDate>
<tal:block tal:repeat="line python:context.contentValues(portal_type=context.getPortalAccountingMovementTypeList())"><ligne <tal:block tal:repeat="line python:sorted(context.contentValues(portal_type=context.getPortalAccountingMovementTypeList()), key=lambda x: (x.getDestination(), x.getQuantity()))"><ligne
tal:define="account python:line.getDestinationValue(portal_type='Account')" tal:define="account python:line.getDestinationValue(portal_type='Account')"
tal:condition="python: account is not None and ((line.getDestinationTotalAssetPrice() if line.hasDestinationTotalAssetPrice() else line.getQuantity()) or not options['test_compta_demat_compatibility'])"> tal:condition="python: account is not None and ((line.getDestinationTotalAssetPrice() if line.hasDestinationTotalAssetPrice() else line.getQuantity()) or not options['test_compta_demat_compatibility'])">
<CompteNum tal:content="account/Account_getGapId">Reference Compte (Account_getGapId)</CompteNum> <CompteNum tal:content="account/Account_getGapId">Reference Compte (Account_getGapId)</CompteNum>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<tal:block tal:replace="nothing"><EcritureLet></EcritureLet> <tal:block tal:replace="nothing"><EcritureLet></EcritureLet>
<DateLet></DateLet></tal:block> <DateLet></DateLet></tal:block>
<ValidDate tal:content="python: context.AccountingTransaction_getDeliverDate().strftime('%Y-%m-%d')">Modification Date</ValidDate> <ValidDate tal:content="python: context.AccountingTransaction_getDeliverDate().strftime('%Y-%m-%d')">Modification Date</ValidDate>
<tal:block tal:repeat="line python:context.contentValues(portal_type=context.getPortalAccountingMovementTypeList())"><ligne <tal:block tal:repeat="line python:sorted(context.contentValues(portal_type=context.getPortalAccountingMovementTypeList()), key=lambda x: (x.getSource(), x.getQuantity()))"><ligne
tal:define="account python:line.getSourceValue(portal_type='Account')" tal:define="account python:line.getSourceValue(portal_type='Account')"
tal:condition="python: account is not None and ((line.getSourceTotalAssetPrice() if line.hasSourceTotalAssetPrice() else line.getQuantity()) or not options['test_compta_demat_compatibility'])"> tal:condition="python: account is not None and ((line.getSourceTotalAssetPrice() if line.hasSourceTotalAssetPrice() else line.getQuantity()) or not options['test_compta_demat_compatibility'])">
<CompteNum tal:content="account/Account_getGapId">Reference Compte (Account_getGapId)</CompteNum> <CompteNum tal:content="account/Account_getGapId">Reference Compte (Account_getGapId)</CompteNum>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment