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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
5c200f20
Commit
5c200f20
authored
Jun 26, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FEC: move the costly searchAndActivate in an activity
parent
497e30b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
115 additions
and
41 deletions
+115
-41
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransactionModule_viewFrenchAccountingTransactionFile.xml
...TransactionModule_viewFrenchAccountingTransactionFile.xml
+4
-40
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransactionModule_viewFrenchAccountingTransactionFileActive.xml
...ctionModule_viewFrenchAccountingTransactionFileActive.xml
+110
-0
bt5/erp5_accounting_l10n_fr/bt/revision
bt5/erp5_accounting_l10n_fr/bt/revision
+1
-1
No files found.
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransactionModule_viewFrenchAccountingTransactionFile.xml
View file @
5c200f20
...
@@ -51,9 +51,7 @@
...
@@ -51,9 +51,7 @@
<item>
<item>
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
from Products.ERP5Type.Message import translateString\n
<value>
<string>
from Products.ERP5Type.Message import translateString\n
import random\n
portal = context.getPortalObject()\n
portal = context.getPortalObject()\n
at_date = at_date.latestTime()\n
\n
\n
person_value = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
person_value = portal.ERP5Site_getAuthenticatedMemberPersonValue()\n
if person_value is None:\n
if person_value is None:\n
...
@@ -61,37 +59,11 @@ if person_value is None:\n
...
@@ -61,37 +59,11 @@ if person_value is None:\n
return context.Base_redirect(\'view\', keep_items=dict(\n
return context.Base_redirect(\'view\', keep_items=dict(\n
portal_status_message=translateString("No person found for your user")))\n
portal_status_message=translateString("No person found for your user")))\n
\n
\n
section_uid_list = portal.Base_getSectionUidListForSectionCategory(\n
context.activate().AccountingTransactionModule_viewFrenchAccountingTransactionFileActive(\n
section_category, section_category_strict)\n
section_category,\n
\n
section_category_strict,\n
from_date = portal.Base_getAccountingPeriodStartDateForSectionCategory(\n
section_category, at_date)\n
\n
# XXX we need proxy role for that\n
active_process = portal.portal_activities.newActiveProcess()\n
\n
tag = "%s-%s" % (script.getId(), random.randint(0, 1000))\n
aggregate_tag = "%s:aggregate" % tag\n
priority = 4\n
\n
for portal_type in portal.getPortalAccountingTransactionTypeList():\n
# XXX we need proxy role for that\n
this_portal_type_active_process = portal.portal_activities.newActiveProcess()\n
context.AccountingTransactionModule_viewFrenchAccountingTransactionFileForPortalType(\n
portal_type,\n
section_uid_list,\n
from_date,\n
at_date,\n
simulation_state,\n
active_process.getRelativeUrl(),\n
this_portal_type_active_process.getRelativeUrl(),\n
tag,\n
aggregate_tag,\n
priority)\n
\n
context.activate(after_tag=(tag, aggregate_tag)).AccountingTransactionModule_aggregateFrenchAccountingTransactionFile(\n
at_date,\n
at_date,\n
active_process.getRelativeUrl()
,\n
simulation_state
,\n
user_name=person_value.getReference())\n
user_name=person_value.getReference())\n
\n
\n
return context.Base_redirect(form_id, keep_items=dict(\n
return context.Base_redirect(form_id, keep_items=dict(\n
...
@@ -102,14 +74,6 @@ return context.Base_redirect(form_id, keep_items=dict(\n
...
@@ -102,14 +74,6 @@ return context.Base_redirect(form_id, keep_items=dict(\n
<key>
<string>
_params
</string>
</key>
<key>
<string>
_params
</string>
</key>
<value>
<string>
section_category, section_category_strict, at_date, simulation_state, form_id=None, **kw
</string>
</value>
<value>
<string>
section_category, section_category_strict, at_date, simulation_state, form_id=None, **kw
</string>
</value>
</item>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<item>
<key>
<string>
id
</string>
</key>
<key>
<string>
id
</string>
</key>
<value>
<string>
AccountingTransactionModule_viewFrenchAccountingTransactionFile
</string>
</value>
<value>
<string>
AccountingTransactionModule_viewFrenchAccountingTransactionFile
</string>
</value>
...
...
bt5/erp5_accounting_l10n_fr/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr/AccountingTransactionModule_viewFrenchAccountingTransactionFileActive.xml
0 → 100644
View file @
5c200f20
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
import random\n
portal = context.getPortalObject()\n
at_date = at_date.latestTime()\n
\n
section_uid_list = portal.Base_getSectionUidListForSectionCategory(\n
section_category, section_category_strict)\n
\n
from_date = portal.Base_getAccountingPeriodStartDateForSectionCategory(\n
section_category, at_date)\n
\n
# XXX we need proxy role for that\n
active_process = portal.portal_activities.newActiveProcess()\n
\n
tag = "%s-%s" % (script.getId(), random.randint(0, 1000))\n
aggregate_tag = "%s:aggregate" % tag\n
priority = 4\n
\n
for portal_type in portal.getPortalAccountingTransactionTypeList():\n
# XXX we need proxy role for that\n
this_portal_type_active_process = portal.portal_activities.newActiveProcess()\n
context.AccountingTransactionModule_viewFrenchAccountingTransactionFileForPortalType(\n
portal_type,\n
section_uid_list,\n
from_date,\n
at_date,\n
simulation_state,\n
active_process.getRelativeUrl(),\n
this_portal_type_active_process.getRelativeUrl(),\n
tag,\n
aggregate_tag,\n
priority)\n
\n
context.activate(after_tag=(tag, aggregate_tag)).AccountingTransactionModule_aggregateFrenchAccountingTransactionFile(\n
at_date,\n
active_process.getRelativeUrl(),\n
user_name=user_name)\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
section_category, section_category_strict, at_date, simulation_state, user_name, **kw
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
AccountingTransactionModule_viewFrenchAccountingTransactionFileActive
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_accounting_l10n_fr/bt/revision
View file @
5c200f20
29
30
\ No newline at end of file
\ No newline at end of file
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