Commit 69b578f1 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

make invoice builder global.

parent 552855e0
......@@ -6,12 +6,33 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_local_properties</string> </key>
<value>
<tuple>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>business_template_skin_layer_priority</string> </value>
</item>
<item>
<key> <string>type</string> </key>
<value> <string>float</string> </value>
</item>
</dictionary>
</tuple>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>business_template_skin_layer_priority</string> </key>
<value> <float>20.0</float> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>erp5_advanced_invoicing</string> </value>
......
<?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># This script is a sample of alarm script that invokes builders.\n
# You may need to modify builder ID\'s according to your application.\n
\n
portal = context.getPortalObject()\n
delivery_tool = portal.portal_deliveries\n
\n
builder_id_list = (\n
\'advanced_purchase_invoice_builder\',\n
\'advanced_purchase_invoice_transaction_builder\',\n
\'advanced_sale_invoice_builder\',\n
\'advanced_sale_invoice_transaction_builder\',\n
)\n
\n
for builder_id in builder_id_list:\n
builder = getattr(delivery_tool, builder_id, None)\n
if builder is None:\n
continue\n
delivery_portal_type = builder.getDeliveryPortalType()\n
serialization_tag = \'build:%s\' % delivery_portal_type\n
index_tag = \'index:%s\' % delivery_portal_type\n
after_tag = index_tag\n
after_method_id = (\'recursiveImmediateReindexObject\',\n
\'immediateReindexObject\',\n
\'Delivery_updateAppliedRule\')\n
activate_kw = dict(tag=index_tag)\n
builder.activate(\n
serialization_tag=serialization_tag,\n
after_tag=after_tag,\n
after_method_id=after_method_id).build(activate_kw=activate_kw)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_buildInvoice</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
102
\ No newline at end of file
103
\ No newline at end of file
......@@ -80,6 +80,8 @@ class TestAdvancedInvoice(TestSaleInvoiceMixin, ERP5TypeTestCase):
"""
stepStartPackingList
stepTic
stepInvoiceBuilderAlarm
stepTic
stepStartRelatedInvoice
stepTic
"""
......@@ -292,6 +294,8 @@ class TestAdvancedInvoice(TestSaleInvoiceMixin, ERP5TypeTestCase):
stepStartPackingList
stepStopPackingList
stepTic
stepInvoiceBuilderAlarm
stepTic
stepChangeQuantityDoubledOnInvoice
stepTic
stepCheckDivergedQuantityOnInvoice
......@@ -318,6 +322,8 @@ class TestAdvancedInvoice(TestSaleInvoiceMixin, ERP5TypeTestCase):
stepStartPackingList
stepStopPackingList
stepTic
stepInvoiceBuilderAlarm
stepTic
stepChangeQuantityDoubledOnInvoice
stepTic
stepCheckDivergedQuantityOnInvoice
......@@ -502,6 +508,8 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
stepStartPackingList
stepStartNewPackingList
stepTic
stepInvoiceBuilderAlarm
stepTic
stepCheckTwoInvoices
stepRemoveDateMovementGroupForAdvancedTransactionBuilder
stepStartTwoInvoices
......@@ -530,6 +538,8 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
stepStartPackingList
stepCheckInvoicingRule
stepTic
stepInvoiceBuilderAlarm
stepTic
stepCheckInvoiceBuilding
stepRebuildAndCheckNothingIsCreated
stepCheckInvoicesConsistency
......@@ -553,6 +563,8 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
stepCheckInvoicingRule
stepCheckInvoiceTransactionRule
stepTic
stepInvoiceBuilderAlarm
stepTic
stepCheckInvoiceBuilding
stepDecreaseInvoiceLineQuantity
......@@ -594,6 +606,8 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
stepCheckInvoicingRule
stepCheckInvoiceTransactionRule
stepTic
stepInvoiceBuilderAlarm
stepTic
stepCheckInvoiceBuilding
stepChangeInvoiceStartDate
......@@ -639,6 +653,8 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
stepCheckInvoicingRule
stepCheckInvoiceTransactionRule
stepTic
stepInvoiceBuilderAlarm
stepTic
stepCheckInvoiceBuilding
stepStopPackingList
......@@ -709,6 +725,8 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
stepCheckInvoicingRule
stepCheckInvoiceTransactionRule
stepTic
stepInvoiceBuilderAlarm
stepTic
stepCheckInvoiceBuilding
stepStopPackingList
......@@ -786,6 +804,8 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
stepCheckInvoicingRule
stepCheckInvoiceTransactionRule
stepTic
stepInvoiceBuilderAlarm
stepTic
stepCheckInvoiceBuilding
stepStopPackingList
stepTic
......@@ -854,6 +874,8 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
stepCheckInvoicingRule
stepCheckInvoiceTransactionRule
stepTic
stepInvoiceBuilderAlarm
stepTic
stepCheckInvoiceBuilding
stepStopPackingList
stepTic
......@@ -945,6 +967,8 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
stepStartPackingList
stepCheckInvoicingRule
stepTic
stepInvoiceBuilderAlarm
stepTic
stepCheckInvoiceBuilding
stepRebuildAndCheckNothingIsCreated
stepCheckInvoicesConsistency
......@@ -977,6 +1001,8 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
stepStartPackingList
stepCheckInvoicingRule
stepTic
stepInvoiceBuilderAlarm
stepTic
stepCheckInvoiceBuilding
stepRebuildAndCheckNothingIsCreated
stepCheckInvoicesConsistency
......@@ -1006,6 +1032,8 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
stepStartPackingList
stepCheckInvoicingRule
stepTic
stepInvoiceBuilderAlarm
stepTic
stepCheckInvoiceBuilding
stepCheckInvoicesConsistency
stepCheckPackingListInvoice
......@@ -1027,6 +1055,8 @@ class TestAdvancedSaleInvoice(TestAdvancedInvoice):
stepTic
stepStartPackingList
stepTic
stepInvoiceBuilderAlarm
stepTic
stepChangeQuantityDoubledOnInvoice
stepTic
stepCheckDivergedQuantityOnInvoice
......@@ -1093,6 +1123,8 @@ class TestAdvancedPurchaseInvoice(TestAdvancedInvoice):
"""
stepReceivePackingList
stepTic
stepInvoiceBuilderAlarm
stepTic
stepStartRelatedInvoice
stepTic
"""
......
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