Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
erp5
Commits
0a4831ef
Commit
0a4831ef
authored
Sep 21, 2018
by
Arnaud Fontaine
Committed by
Xiaowu Zhang
Feb 05, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_accounting_l10n_fr: Make sure that FEC XML output is always the same given the same data.
parent
2628c214
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransactionModule_aggregateFrenchAccountingTransactionFile.py
...sactionModule_aggregateFrenchAccountingTransactionFile.py
+3
-1
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransactionModule_viewComptabiliteAsFECXML.zpt
.../AccountingTransactionModule_viewComptabiliteAsFECXML.zpt
+1
-1
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransaction_getFECXMLAccountingTransactionLineList.py
...tingTransaction_getFECXMLAccountingTransactionLineList.py
+8
-2
No files found.
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransactionModule_aggregateFrenchAccountingTransactionFile.py
View file @
0a4831ef
...
@@ -5,12 +5,14 @@ from io import BytesIO
...
@@ -5,12 +5,14 @@ from io import BytesIO
import
zipfile
import
zipfile
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Message
import
translateString
from
Products.ERP5Type.Utils
import
ensure_ascii
from
Products.ERP5Type.Utils
import
ensure_ascii
import
zlib
portal
=
context
.
getPortalObject
()
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
=
[
zlib
.
decompress
(
result
.
detail
)
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
,
...
...
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransactionModule_viewComptabiliteAsFECXML.zpt
View file @
0a4831ef
...
@@ -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:
modules['zlib'].decompress(result.detail)
"
/></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
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransaction_getFECXMLAccountingTransactionLineList.py
View file @
0a4831ef
line_list
=
[]
line_list
=
[]
for
line
in
context
.
contentValues
(
if
side
==
'source'
:
portal_type
=
context
.
getPortalAccountingMovementTypeList
()):
sorted_key
=
lambda
x
:
(
x
.
getSource
(),
x
.
getQuantity
())
else
:
assert
side
==
'destination'
sorted_key
=
lambda
x
:
(
x
.
getDestination
(),
x
.
getQuantity
())
for
line
in
sorted
(
context
.
contentValues
(
portal_type
=
context
.
getPortalAccountingMovementTypeList
()),
key
=
sorted_key
):
has_amount
=
True
has_amount
=
True
if
side
==
'source'
:
if
side
==
'source'
:
account
=
line
.
getSourceValue
(
portal_type
=
'Account'
)
account
=
line
.
getSourceValue
(
portal_type
=
'Account'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment