Commit 11559e07 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

* state_change.object -> state_change[\'object\']

* state_change.transition -> state_change[\'transition\']


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15194 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent abf7d80a
......@@ -70,7 +70,7 @@
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
object = state_change.object\n
object = state_change[\'object\']\n
\n
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
result_list = object.DeliveryPatch_validateContent()\n
......
6
\ No newline at end of file
7
\ No newline at end of file
......@@ -72,7 +72,7 @@
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n
closing_period = state_change.object\n
closing_period = state_change[\'object\']\n
portal = closing_period.getPortalObject()\n
N_ = portal.Base_translateString\n
valid_states = [\'planned\', \'confirmed\', \'delivered\']\n
......
......@@ -72,7 +72,7 @@
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n
closing_period = state_change.object\n
closing_period = state_change[\'object\']\n
portal = closing_period.getPortalObject()\n
N_ = portal.Base_translateString\n
accounting_module = portal.accounting_module\n
......
......@@ -72,7 +72,7 @@
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n
closing_period = state_change.object\n
closing_period = state_change[\'object\']\n
portal = closing_period.getPortalObject()\n
N_ = portal.Base_translateString\n
accounting_module = portal.accounting_module\n
......
......@@ -69,7 +69,7 @@
<item>
<key> <string>_body</string> </key>
<value> <string># Purchase Invoice Transaction or Sale Invoice Transaction.\n
transaction = state_change.object\n
transaction = state_change[\'object\']\n
\n
# Get sections.\n
source_section = transaction.getSourceSection()\n
......
......@@ -73,7 +73,7 @@
error_message = \'\'\n
\n
# Balance Transaction.\n
transaction = state_change.object\n
transaction = state_change[\'object\']\n
module = transaction.getParentValue()\n
\n
# Get sections and a currency.\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n
<value> <string>packing_list = state_change[\'object\']\n
\n
# Create Delivery Applied Rule (if required)\n
packing_list.updateAppliedRule(\'default_invoice_rule\')\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n
<value> <string>packing_list = state_change[\'object\']\n
\n
# Create Delivery Applied Rule (if required)\n
packing_list.updateAppliedRule(\'default_invoice_rule\')\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>context = state_change.object\n
<value> <string>context = state_change[\'object\']\n
context.activate().updateCausalityState()\n
</string> </value>
</item>
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n
<value> <string>packing_list = state_change[\'object\']\n
\n
stop_date = state_change.kwargs[\'stop_date\']\n
start_date = state_change.kwargs[\'start_date\']\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n
<value> <string>packing_list = state_change[\'object\']\n
\n
stop_date = state_change.kwargs[\'stop_date\']\n
start_date = state_change.kwargs[\'start_date\']\n
......
......@@ -77,7 +77,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'start_date\',state_change.object.getStartDate())</string> </value>
<value> <string>python:state_change.kwargs.get(\'start_date\',state_change[\'object\'].getStartDate())</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -77,7 +77,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'stop_date\',state_change.object.getStopDate())</string> </value>
<value> <string>python:state_change.kwargs.get(\'stop_date\',state_change[\'object\'].getStopDate())</string> </value>
</item>
</dictionary>
</pickle>
......
354
\ No newline at end of file
355
\ No newline at end of file
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: state_change.object.getPortalType()</string> </value>
<value> <string>python: state_change[\'object\'].getPortalType()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: state_change.object.getPortalType()</string> </value>
<value> <string>python: state_change[\'object\'].getPortalType()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: state_change.object.getPortalType()</string> </value>
<value> <string>python: state_change[\'object\'].getPortalType()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -71,7 +71,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python: state_change.object.getPortalType()</string> </value>
<value> <string>python: state_change[\'object\'].getPortalType()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -65,7 +65,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>transaction = state_change.object\n
<value> <string>transaction = state_change[\'object\']\n
\n
# Check getBaobabSource and getBaobabDestination\n
transaction.Base_checkBaobabSourceAndDestination()\n
......
291
\ No newline at end of file
292
\ No newline at end of file
......@@ -78,7 +78,7 @@
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n
# Get the assignment object and its parent\n
assignment_object = state_change.object\n
assignment_object = state_change[\'object\']\n
person_object = assignment_object.getParentValue()\n
\n
# Add the current assignment site\n
......
......@@ -73,7 +73,7 @@ if state_change.getPortal().acl_users.meta_type == \'Pluggable Auth Service\':\n
return\n
\n
# Get the assignment object and its parent\n
assignment_object = state_change.object\n
assignment_object = state_change[\'object\']\n
person_object = assignment_object.getParentValue()\n
\n
# Call the script if available\n
......
......@@ -73,7 +73,7 @@
from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n
# Get the career object and its parent\n
career_object = state_change.object\n
career_object = state_change[\'object\']\n
person_object = career_object.getParentValue()\n
\n
active_careers = []\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>context = state_change.object\n
<value> <string>context = state_change[\'object\']\n
\n
base_id = \'path\'\n
kwd = {\'base_id\': base_id}\n
......
129
\ No newline at end of file
130
\ No newline at end of file
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>line = state_change.object\n
<value> <string>line = state_change[\'object\']\n
\n
base_id = \'cell\'\n
line.updateCellRange(base_id=base_id)\n
......
......@@ -70,7 +70,7 @@
<key> <string>_body</string> </key>
<value> <string>from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n
object = state_change.object\n
object = state_change[\'object\']\n
error_msg = \'Please correct the following errors:\'\n
\n
consistency = object.checkConsistency()\n
......
......@@ -70,7 +70,7 @@
<key> <string>_body</string> </key>
<value> <string>from Products.DCWorkflow.DCWorkflow import ValidationFailed\n
\n
object = state_change.object\n
object = state_change[\'object\']\n
error_msg = \'Please correct the following errors:\'\n
\n
consistency = object.checkConsistency()\n
......
9
\ No newline at end of file
10
\ No newline at end of file
......@@ -70,7 +70,7 @@
<key> <string>_body</string> </key>
<value> <string># this script allow to create a new object from this current one\n
\n
object = state_change.object\n
object = state_change[\'object\']\n
object.Event_createSaleOpportunity()\n
</string> </value>
</item>
......
......@@ -70,7 +70,7 @@
<key> <string>_body</string> </key>
<value> <string># this script allow to create a new object from this current one\n
\n
object = state_change.object\n
object = state_change[\'object\']\n
object.Event_createSupportRequest()\n
</string> </value>
</item>
......
......@@ -73,10 +73,10 @@ for letter in state_change.kwargs[\'reply_subject\']:\n
string_subject += letter\n
message = state_change.kwargs[\'reply_body\']\n
\n
state_change.object.MailHost.send(message, mto=state_change.object.getSender(), mfrom="info@nexedi.com",\n
state_change[\'object\'].MailHost.send(message, mto=state_change[\'object\'].getSender(), mfrom="info@nexedi.com",\n
subject=string_subject)\n
\n
#state_change.object.MailHost.send(message, mto="seb@nexedi.com", mfrom="info@nexedi.com",\n
#state_change[\'object\'].MailHost.send(message, mto="seb@nexedi.com", mfrom="info@nexedi.com",\n
# subject=string_subject)\n
</string> </value>
</item>
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>transition = state_change.transition.id[len(\'user_\'):]\n
<value> <string>transition = state_change[\'transition\'].id[len(\'user_\'):]\n
\n
def TestTitle(object):\n
"""\n
......@@ -78,7 +78,7 @@ def TestTitle(object):\n
return 1\n
return 0\n
\n
object = state_change.object\n
object = state_change[\'object\']\n
\n
if TestTitle(object):\n
method = getattr(context, transition)\n
......
......@@ -70,7 +70,7 @@
<key> <string>_body</string> </key>
<value> <string>#This Works, but only as manager\n
\n
transition = state_change.transition.id[len(\'user_\'):]\n
transition = state_change[\'transition\'].id[len(\'user_\'):]\n
\n
method = getattr(context, transition)\n
method()\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>transition = state_change.transition.id[len(\'user_\'):]\n
<value> <string>transition = state_change[\'transition\'].id[len(\'user_\'):]\n
\n
def TestTitle(object):\n
"""\n
......@@ -80,7 +80,7 @@ def TestTitle(object):\n
return 1\n
return 0\n
\n
object = state_change.object\n
object = state_change[\'object\']\n
\n
if TestTitle(object):\n
method = getattr(context, transition)\n
......
......@@ -68,14 +68,14 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>string_subject = \'Re: %s\' % state_change.object.getTitle()\n
<value> <string>string_subject = \'Re: %s\' % state_change[\'object\'].getTitle()\n
message = state_change.kwargs[\'comment\']\n
\n
PersonModule_viewPersonList = context.getClientValueList(portal_type="Person") # should become getDestinationSectionList()\n
email_list = map(lambda x:x.getDefaultEmailText(), PersonModule_viewPersonList)\n
\n
# XXX FIXME mfrom value is not good at all\n
state_change.object.MailHost.send(message, mto=email_list, mfrom="info@nexedi.com",\n
state_change[\'object\'].MailHost.send(message, mto=email_list, mfrom="info@nexedi.com",\n
subject=string_subject)\n
</string> </value>
</item>
......
48
\ No newline at end of file
49
\ No newline at end of file
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>transaction = state_change.object\n
<value> <string>transaction = state_change[\'object\']\n
context.log(\'acceptDecision script on\', transaction)\n
transaction.portal_simulation.solveDelivery(transaction, "Distribute",\n
"ProfitAndLoss")\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>transaction = state_change.object\n
<value> <string>transaction = state_change[\'object\']\n
\n
# Set relative simulation movements profit_quantity to 0\n
movement_list = transaction.getMovementList()\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n
<value> <string>packing_list = state_change[\'object\']\n
\n
# Create Delivery Applied Rule (if required)\n
packing_list.updateAppliedRule()\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n
<value> <string>packing_list = state_change[\'object\']\n
\n
# Create Delivery Applied Rule (if required)\n
packing_list.updateAppliedRule()\n
......
37
\ No newline at end of file
38
\ No newline at end of file
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>delivery_line = state_change.object\n
<value> <string>delivery_line = state_change[\'object\']\n
\n
base_id = \'movement\'\n
delivery_line.updateCellRange(base_id)\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>order = state_change.object\n
<value> <string>order = state_change[\'object\']\n
\n
expand_tag = order.getPath() + \'_expand\'\n
activate_kw = {\'tag\':expand_tag,\'priority\':3}\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>order = state_change.object\n
<value> <string>order = state_change[\'object\']\n
\n
previous_tag = order.getPath() + \'_firstUpdateAppliedRule\'\n
expand_tag = order.getPath() + \'_expand\'\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>order = state_change.object\n
<value> <string>order = state_change[\'object\']\n
\n
tag = order.getPath() + \'_firstUpdateAppliedRule\'\n
order.activate(tag=tag).updateAppliedRule(tag=tag,rule_id = \'default_production_order_rule\',priority=3)\n
......
......@@ -77,7 +77,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'start_date\',state_change.object.getStartDate())</string> </value>
<value> <string>python:state_change.kwargs.get(\'start_date\',state_change[\'object\'].getStartDate())</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -77,7 +77,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'stop_date\',state_change.object.getStopDate())</string> </value>
<value> <string>python:state_change.kwargs.get(\'stop_date\',state_change[\'object\'].getStopDate())</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n
<value> <string>packing_list = state_change[\'object\']\n
\n
# Create Delivery Applied Rule (if required)\n
packing_list.updateAppliedRule()\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n
<value> <string>packing_list = state_change[\'object\']\n
\n
# Create Delivery Applied Rule (if required)\n
packing_list.updateAppliedRule()\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n
<value> <string>packing_list = state_change[\'object\']\n
\n
stop_date = state_change.kwargs[\'stop_date\']\n
start_date = state_change.kwargs[\'start_date\']\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n
<value> <string>packing_list = state_change[\'object\']\n
\n
stop_date = state_change.kwargs[\'stop_date\']\n
start_date = state_change.kwargs[\'start_date\']\n
......
......@@ -77,7 +77,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'start_date\',state_change.object.getStartDate())</string> </value>
<value> <string>python:state_change.kwargs.get(\'start_date\',state_change[\'object\'].getStartDate())</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -77,7 +77,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'stop_date\',state_change.object.getStopDate())</string> </value>
<value> <string>python:state_change.kwargs.get(\'stop_date\',state_change[\'object\'].getStopDate())</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list_content = state_change.object\n
<value> <string>packing_list_content = state_change[\'object\']\n
\n
packing_list_content.getExplanationValue().activate().edit()\n
</string> </value>
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list_content = state_change.object\n
<value> <string>packing_list_content = state_change[\'object\']\n
\n
#packing_list_content.immediateReindexObject()\n
#packing_list_content.getExplanationValue().edit()\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list_content = state_change.object\n
<value> <string>packing_list_content = state_change[\'object\']\n
\n
# Clean simulation\n
simulation_movement_list = packing_list_content.getDeliveryRelatedValueList(\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list_content = state_change.object\n
<value> <string>packing_list_content = state_change[\'object\']\n
\n
packing_list_content.getExplanationValue().activate().edit()\n
</string> </value>
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n
<value> <string>packing_list = state_change[\'object\']\n
\n
# XXX Unable to create simulation now...\n
# packing_list.updateAppliedRule("default_production_packing_list_rule")\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>packing_list = state_change.object\n
<value> <string>packing_list = state_change[\'object\']\n
\n
packing_list.updateAppliedRule("default_production_packing_list_rule")\n
</string> </value>
......
......@@ -77,7 +77,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'start_date\',state_change.object.getStartDate())</string> </value>
<value> <string>python:state_change.kwargs.get(\'start_date\',state_change[\'object\'].getStartDate())</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -77,7 +77,7 @@
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>python:state_change.kwargs.get(\'stop_date\',state_change.object.getStopDate())</string> </value>
<value> <string>python:state_change.kwargs.get(\'stop_date\',state_change[\'object\'].getStopDate())</string> </value>
</item>
</dictionary>
</pickle>
......
28
\ No newline at end of file
29
\ No newline at end of file
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>decision = state_change.object\n
<value> <string>decision = state_change[\'object\']\n
\n
# Get parent object\n
parent_decision = decision.getParentValue()\n
......
......@@ -68,7 +68,7 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>decision = state_change.object\n
<value> <string>decision = state_change[\'object\']\n
\n
# Create a new sub decision\n
new_decision = decision.newContent(portal_type=\'Publication Decision\')\n
......
1
\ No newline at end of file
2
\ No newline at end of file
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