Commit d7dbe101 authored by Łukasz Nowak's avatar Łukasz Nowak

Follow merge changes.

updateSimulation replaces Delivery_updateAppliedRule
parent 63e43dbd
......@@ -53,7 +53,7 @@
<value> <string>delivery = context.getParentValue()\n
if context.getPortalObject().portal_activities.countMessage(path=delivery.getPath()) == 0:\n
delivery.serialize()\n
delivery.Delivery_updateAppliedRule(activate_kw=activate_kw, **kw)\n
delivery.updateSimulation()\n
</string> </value>
</item>
<item>
......
<?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>from Products.ERP5Type.Errors import SimulationError\n
\n
delivery = context\n
delivery_type = context.getPortalType()\n
\n
# XXX The following dict is only for backward compatibility.\n
applied_rule_dict = {\n
\'Pay Sheet Transaction\': \'default_invoice_rule\',\n
\'Payment Transaction\': \'default_invoice_rule\',\n
\n
\'Purchase Packing List\': \'default_delivery_rule\',\n
\'Purchase Invoice Transaction\': \'default_invoice_rule\',\n
\n
\'Sale Order\': \'default_order_rule\',\n
\'Sale Packing List\': \'default_delivery_rule\',\n
# XXX-Romain: no need for root applied rule for sale invoice\n
# \'Sale Invoice Transaction\': \'default_invoice_rule\',\n
\'Sale Invoice Transaction\': None,\n
\n
\'Internal Packing List\': None,\n
\'Returned Sale Packing List\': None,\n
\n
\'Accounting Rule Cell\': None,\n
\'Accounting Transaction\': None,\n
\'Production Packing List\': None,\n
\'Production Report\': None,\n
\'Pay Sheet Model\': None,\n
\n
\'Amortisation Transaction\' : None,\n
\'Task Report\': \'default_delivery_rule\',\n
}\n
\n
try:\n
applied_rule = delivery.getRuleReference()\n
except SimulationError:\n
marker = []\n
applied_rule = applied_rule_dict.get(delivery_type, marker)\n
if applied_rule is marker:\n
raise\n
\n
if applied_rule is None:\n
# No need to add a rule, but still we need to expand the delivery\n
# if at least one of its movements is simulated.\n
for m in delivery.getMovementList():\n
if m.isSimulated():\n
delivery.activate(activate_kw=activate_kw).expand(**kw)\n
return\n
elif applied_rule:\n
delivery.updateAppliedRule(rule_reference=applied_rule, activate_kw=activate_kw, **kw)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>activate_kw=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Delivery_updateAppliedRule</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -68,7 +68,7 @@ line = packing_list.contentValues(portal_type=\'Sale Packing List Line\')[0]\n
portal = packing_list.getPortalObject()\n
\n
if line.getResource() == portal.portal_preferences.getPreferredInstanceSetupResource():\n
packing_list.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
packing_list.activate(after_path_and_method_id=(packing_list.getPath(),\n
(\'immediateReindexObject\', \'recursiveImmediateReindexObject\'))).SalePackingList_deliverInstanceSetup()\n
\n
# First set the packing_list in the building state\n
......
......@@ -42,4 +42,4 @@ erp5_trade
erp5_web
erp5_web_download_theme
erp5_xhtml_jquery_style
vifib_slapos_core
vifib_slapos_core
\ No newline at end of file
498
\ No newline at end of file
499
\ 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