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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
8e671c77
Commit
8e671c77
authored
May 08, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
accounting_l10n_fr: don't use str().encode('zlib')
This only works on python2
parent
c62d4356
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
5 deletions
+7
-5
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransactionModule_aggregateFrenchAccountingTransactionFileForOneJournal.py
..._aggregateFrenchAccountingTransactionFileForOneJournal.py
+2
-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/AccountingTransactionModule_viewJournalAsFECXML.zpt
...0n_fr/AccountingTransactionModule_viewJournalAsFECXML.zpt
+1
-1
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransaction_postFECResult.py
...accounting_l10n_fr/AccountingTransaction_postFECResult.py
+3
-2
No files found.
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransactionModule_aggregateFrenchAccountingTransactionFileForOneJournal.py
View file @
8e671c77
import
zlib
from
Products.CMFActivity.ActiveResult
import
ActiveResult
from
Products.CMFActivity.ActiveResult
import
ActiveResult
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
active_process
=
portal
.
restrictedTraverse
(
active_process
)
active_process
=
portal
.
restrictedTraverse
(
active_process
)
...
@@ -12,7 +13,7 @@ if result_list:
...
@@ -12,7 +13,7 @@ if result_list:
journal_lib
=
journal_lib
,
journal_lib
=
journal_lib
,
result_list
=
result_list
)
result_list
=
result_list
)
active_process
.
postResult
(
ActiveResult
(
detail
=
journal_fragment
.
encode
(
'utf8'
).
encode
(
'zlib'
)))
active_process
.
postResult
(
ActiveResult
(
detail
=
zlib
.
compress
(
journal_fragment
.
encode
(
'utf8'
)
)))
# delete no longer needed active process
# delete no longer needed active process
this_journal_active_process
.
getParentValue
().
manage_delObjects
(
ids
=
[
this_journal_active_process
.
getId
()])
this_journal_active_process
.
getParentValue
().
manage_delObjects
(
ids
=
[
this_journal_active_process
.
getId
()])
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransactionModule_viewComptabiliteAsFECXML.zpt
View file @
8e671c77
...
@@ -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:
modules['zlib'].decompress(result.detail
)"
/></tal:block>
</exercice>
</exercice>
</comptabilite>
</comptabilite>
\ No newline at end of file
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransactionModule_viewJournalAsFECXML.zpt
View file @
8e671c77
<journal xmlns:tal="http://xml.zope.org/namespaces/tal">
<journal xmlns:tal="http://xml.zope.org/namespaces/tal">
<JournalCode tal:content="options/journal_code"></JournalCode>
<JournalCode tal:content="options/journal_code"></JournalCode>
<JournalLib tal:content="options/journal_lib"></JournalLib>
<JournalLib tal:content="options/journal_lib"></JournalLib>
<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:
modules['zlib'].decompress(result.detail
)"/></tal:block>
</journal>
</journal>
\ No newline at end of file
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransaction_postFECResult.py
View file @
8e671c77
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
active result.
active result.
We need a proxy role to post the result.
We need a proxy role to post the result.
"""
"""
import
zlib
from
Products.CMFActivity.ActiveResult
import
ActiveResult
from
Products.CMFActivity.ActiveResult
import
ActiveResult
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
...
@@ -12,10 +13,10 @@ if context.getSourceSectionUid() in section_uid_list:
...
@@ -12,10 +13,10 @@ if context.getSourceSectionUid() in section_uid_list:
if
any
([
line
.
getSource
(
portal_type
=
'Account'
)
for
line
in
accounting_line_list
]):
if
any
([
line
.
getSource
(
portal_type
=
'Account'
)
for
line
in
accounting_line_list
]):
source_xml
=
context
.
AccountingTransaction_viewAsSourceFECXML
(
source_xml
=
context
.
AccountingTransaction_viewAsSourceFECXML
(
test_compta_demat_compatibility
=
test_compta_demat_compatibility
)
test_compta_demat_compatibility
=
test_compta_demat_compatibility
)
active_process
.
postResult
(
ActiveResult
(
detail
=
source_xml
.
encode
(
'utf8'
).
encode
(
'zlib'
)))
active_process
.
postResult
(
ActiveResult
(
detail
=
zlib
.
compress
(
source_xml
.
encode
(
'utf8'
)
)))
if
context
.
getDestinationSectionUid
()
in
section_uid_list
:
if
context
.
getDestinationSectionUid
()
in
section_uid_list
:
if
any
([
line
.
getDestination
(
portal_type
=
'Account'
)
for
line
in
accounting_line_list
]):
if
any
([
line
.
getDestination
(
portal_type
=
'Account'
)
for
line
in
accounting_line_list
]):
destination_xml
=
context
.
AccountingTransaction_viewAsDestinationFECXML
(
destination_xml
=
context
.
AccountingTransaction_viewAsDestinationFECXML
(
test_compta_demat_compatibility
=
test_compta_demat_compatibility
)
test_compta_demat_compatibility
=
test_compta_demat_compatibility
)
active_process
.
postResult
(
ActiveResult
(
detail
=
destination_xml
.
encode
(
'utf8'
).
encode
(
'zlib'
)))
active_process
.
postResult
(
ActiveResult
(
detail
=
zlib
.
compress
(
destination_xml
.
encode
(
'utf8'
)
)))
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