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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Aaron Chen
erp5
Commits
b5906da1
Commit
b5906da1
authored
Jun 21, 2011
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trigger trade model builder by using BusinessProcess.build instead of hardcoded builder id.
parent
0b6e2876
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
117 deletions
+6
-117
bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/buildTradeModelLineList.xml
...w/accounting_workflow/scripts/buildTradeModelLineList.xml
+0
-115
bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/transitions/confirm.xml
...rtal_workflow/accounting_workflow/transitions/confirm.xml
+5
-1
bt5/erp5_accounting/bt/revision
bt5/erp5_accounting/bt/revision
+1
-1
No files found.
bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/scripts/buildTradeModelLineList.xml
deleted
100644 → 0
View file @
0b6e2876
<?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>
delivery = sci[\'object\']\n
delivery_portal_type = delivery.getPortalType()\n
portal_deliveries = sci.getPortal().portal_deliveries\n
\n
builder_by_portal_type = {\n
\'Sale Invoice Transaction\':\n
\'sale_invoice_transaction_trade_model_builder\',\n
\'Purchase Invoice Transaction\':\n
\'purchase_invoice_transaction_trade_model_builder\',\n
}\n
\n
if delivery_portal_type not in builder_by_portal_type:\n
return \n
\n
builder = getattr(portal_deliveries,\n
builder_by_portal_type[delivery_portal_type],\n
None)\n
\n
path = delivery.getPath()\n
tag = \'%s_updateAppliedRule\' % path\n
expand_tag = \'%s_expand\' % path\n
build_tag = \'invoice_transaction_build_trade_model_%s\' % delivery.getRelativeUrl()\n
build_accounting_tag = \'invoice_transaction_build_accounting_%s\' % delivery.getRelativeUrl()\n
\n
delivery.activate(tag=tag, after_tag=expand_tag).Delivery_updateAppliedRule(activate_kw=dict(tag=expand_tag))\n
\n
if builder is not None:\n
explanation_uid_list = [delivery.getUid(), ]\n
packing_list = delivery.getCausalityValue(\n
portal_type=(\'Sale Packing List\',\n
\'Purchase Packing List\'))\n
if packing_list is not None:\n
explanation_uid_list.append(packing_list.getUid())\n
order = packing_list.getCausalityValue(\n
portal_type=(\'Sale Order\',\n
\'Purchase Order\'))\n
if order is not None:\n
explanation_uid_list.append(order.getUid())\n
\n
builder.activate(\n
activity=\'SQLQueue\',\n
after_tag=(tag, expand_tag),\n
tag=build_tag,\n
activate_kw=dict(tag=build_tag)).build(activate_kw=dict(tag=build_tag),\n
explanation_uid=explanation_uid_list)\n
\n
# set the object in building state.\n
delivery.startBuilding()\n
delivery.activate(after_tag=(build_tag, build_accounting_tag)).updateCausalityState()\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
sci
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
buildTradeModelLineList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_accounting/WorkflowTemplateItem/portal_workflow/accounting_workflow/transitions/confirm.xml
View file @
b5906da1
...
...
@@ -10,6 +10,10 @@
<key>
<string>
actbox_category
</string>
</key>
<value>
<string>
workflow
</string>
</value>
</item>
<item>
<key>
<string>
actbox_icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
actbox_name
</string>
</key>
<value>
<string></string>
</value>
...
...
@@ -20,7 +24,7 @@
</item>
<item>
<key>
<string>
after_script_name
</string>
</key>
<value>
<string>
buildTradeModelLineList
</string>
</value>
<value>
<string>
Delivery_Build
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
bt5/erp5_accounting/bt/revision
View file @
b5906da1
1464
\ No newline at end of file
1465
\ 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