Commit 9f1f76f1 authored by Antoine Catton's avatar Antoine Catton

Merge branch 'master' into rename_instance

Conflicts:
	master/bt5/vifib_base/bt/revision
	master/bt5/vifib_erp5/bt/revision
	master/bt5/vifib_slap/bt/revision
parents 92ad87f0 e7c1aa25
......@@ -51,9 +51,11 @@
<item>
<key> <string>_body</string> </key>
<value> <string>portal_type = context.getDeliveryPortalType()\n
# make sure that the result of the simulation state is update to date, so check getSimulationState manually\n
return [x.getObject() for x in context.portal_catalog(portal_type=portal_type,simulation_state=\'planned\') \n
if x.getObject().getSimulationState()==\'planned\']\n
simulation_state = \'planned\'\n
# use catalog to prefetch, but check later in ZODB\n
return [x.getObject() for x in context.getPortalObject().portal_catalog(\n
portal_type=portal_type,\n
simulation_state=simulation_state) if x.getSimulationState() == simulation_state]\n
</string> </value>
</item>
<item>
......
......@@ -54,7 +54,7 @@
the new Invoice.\n
"""\n
from Products.ERP5Type.Message import translateString\n
\n
from DateTime import DateTime\n
if related_simulation_movement_path_list is None:\n
raise RuntimeError, \'related_simulation_movement_path_list is missing. Update ERP5 Product.\'\n
\n
......@@ -65,6 +65,9 @@ if not invoice.Invoice_isAdvanced():\n
if not invoice.getResource():\n
invoice.setResource(invoice.getPriceCurrency())\n
\n
if invoice.getStartDate() is None:\n
invoice.setStartDate(DateTime())\n
\n
# initialize accounting_workflow to planned state\n
plan_tag = \'%s_plan\' % invoice.getPath()\n
if invoice.getSimulationState() == \'draft\':\n
......
......@@ -51,6 +51,7 @@
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.ERP5Type.Message import translateString\n
from DateTime import DateTime\n
\n
payment_transaction = context\n
\n
......@@ -58,12 +59,29 @@ payment_transaction = context\n
if payment_transaction.getSimulationState() == "draft":\n
payment_transaction.plan(comment=translateString("Initialised by Delivery Builder."))\n
\n
if payment_transaction.getStartDate() is None:\n
payment_transaction.setStartDate(DateTime())\n
\n
# First set the payment transaction in the building state on the causality workflow\n
payment_transaction.startBuilding()\n
\n
# Then an activity should put the causality state in diverged or solved\n
payment_transaction.activate(after_path_and_method_id=(related_simulation_movement_path_list,\n
(\'immediateReindexObject\',\'recursiveImmediateReindexObject\'))).updateCausalityState()\n
\n
# update casuality from movements\n
causality_list = payment_transaction.getCausalityList()\n
causality_list.sort()\n
modified = 0\n
for movement in payment_transaction.getMovementList():\n
movement_causality = movement.getCausality()\n
if movement_causality not in causality_list:\n
modified = 1\n
causality_list.append(movement_causality)\n
\n
if modified:\n
causality_list.sort()\n
payment_transaction.setCausalityList(causality_list)\n
</string> </value>
</item>
<item>
......
348
\ No newline at end of file
351
\ No newline at end of file
......@@ -127,9 +127,7 @@
</item>
<item>
<key> <string>preferred_payzen_integration_site</string> </key>
<value>
<none/>
</value>
<value> <string>portal_integrations/vifib_payzen_integration</string> </value>
</item>
<item>
<key> <string>preferred_software_setup_resource</string> </key>
......
89
\ No newline at end of file
90
\ No newline at end of file
......@@ -114,9 +114,7 @@
<key> <string>completed_state</string> </key>
<value>
<tuple>
<string>confirmed</string>
<string>delivered</string>
<string>started</string>
<string>stopped</string>
</tuple>
</value>
......
......@@ -115,9 +115,7 @@
<item>
<key> <string>completed_state</string> </key>
<value>
<tuple>
<string>confirmed</string>
</tuple>
<tuple/>
</value>
</item>
<item>
......@@ -149,6 +147,14 @@
<none/>
</value>
</item>
<item>
<key> <string>frozen_state</string> </key>
<value>
<tuple>
<string>delivered</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>pay</string> </value>
......
......@@ -37,13 +37,10 @@
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>source_payment</string>
<string>destination_payment</string>
<string>source_section</string>
<string>destination_section</string>
<string>payment_mode</string>
<string>resource</string>
<string>specialise</string>
</tuple>
</value>
</item>
......
......@@ -27,7 +27,7 @@
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>2</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -41,6 +41,9 @@
<string>destination</string>
<string>source_project</string>
<string>destination_project</string>
<string>source_payment</string>
<string>destination_payment*</string>
<string>specialise</string>
</tuple>
</value>
</item>
......@@ -48,6 +51,10 @@
<key> <string>title</string> </key>
<value> <string>category_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -10,7 +10,7 @@
<key> <string>categories</string> </key>
<value>
<tuple>
<string>collect_order_group/delivery</string>
<string>collect_order_group/line</string>
</tuple>
</value>
</item>
......@@ -22,7 +22,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>delivery_causality_assignement_movement_group_on_delivery</string> </value>
<value> <string>delivery_causality_assignement_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
......@@ -34,7 +34,7 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Delivery Causality Assignement Movement Group On Delivery</string> </value>
<value> <string>delivery_causality_assignement_movement_group_on_line</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -11,7 +11,7 @@
<value>
<tuple>
<string>divergence_scope/property</string>
<string>collect_order_group/delivery</string>
<string>collect_order_group/line</string>
</tuple>
</value>
</item>
......@@ -23,7 +23,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
<value> <string>property_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>int_index</string> </key>
......@@ -44,7 +44,11 @@
</item>
<item>
<key> <string>title</string> </key>
<value> <string>property_movement_group_on_delivery</string> </value>
<value> <string>property_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
......
......@@ -126,7 +126,7 @@
</item>
<item>
<key> <string>delivery_select_method_id</string> </key>
<value> <string>VifibInvoiceBuilder_selectPlannedSaleInvoiceList</string> </value>
<value> <string>VifibDeliveryBuilder_selectPlannedDeliveryList</string> </value>
</item>
<item>
<key> <string>description</string> </key>
......
......@@ -27,7 +27,7 @@
</item>
<item>
<key> <string>int_index</string> </key>
<value> <int>2</int> </value>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
......@@ -37,8 +37,6 @@
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>delivery_mode</string>
<string>incoterm</string>
<string>source</string>
<string>destination</string>
<string>source_section</string>
......@@ -51,6 +49,10 @@
<key> <string>title</string> </key>
<value> <string>category_movement_group_on_delivery</string> </value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -55,6 +55,8 @@
<string>destination_project</string>
<string>source_payment</string>
<string>destination_payment</string>
<string>delivery_mode</string>
<string>incoterm</string>
</tuple>
</value>
</item>
......@@ -62,6 +64,10 @@
<key> <string>title</string> </key>
<value> <string>category_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
......
......@@ -37,6 +37,7 @@
<key> <string>tested_property</string> </key>
<value>
<tuple>
<string>specialise</string>
<string>resource</string>
<string>source</string>
<string>destination</string>
......@@ -52,6 +53,10 @@
<key> <string>title</string> </key>
<value> <string>category_movement_group_on_line</string> </value>
</item>
<item>
<key> <string>update_always</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</pickle>
</record>
......
72
\ No newline at end of file
82
\ No newline at end of file
<local_roles_item>
<local_roles>
<role id='R-MEMBER'>
<item>Auditor</item>
<item>Author</item>
</role>
<role id='superluke'>
<item>Owner</item>
</role>
</local_roles>
</local_roles_item>
\ No newline at end of file
vifib_data_simulation
\ No newline at end of file
vifib_data_simulation
vifib_data_payzen
\ No newline at end of file
328
\ No newline at end of file
329
\ No newline at end of file
......@@ -47,6 +47,7 @@ person_module/test_vifib_user_developer
portal_contributions
portal_gadgets
portal_integrations
portal_integrations/vifib_payzen_integration
product_module
purchase_order_module
purchase_packing_list_module
......
......@@ -12,8 +12,8 @@ account_module/refundable_vat
account_module/sales
accounting_module
business_process_module
business_process_module/vifib_sale_business_process
business_process_module/vifib_purchase_business_process
business_process_module/vifib_sale_business_process
campaign_module
component_module
computer_module
......@@ -47,6 +47,7 @@ person_module/test_vifib_user_developer
portal_contributions
portal_gadgets
portal_integrations
portal_integrations/vifib_payzen_integration
product_module
purchase_order_module
purchase_packing_list_module
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Alarm" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_registerPlannedPaymentTransactionPayzen</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>register_planned_payment_transaction_payzen</string> </value>
</item>
<item>
<key> <string>periodicity_hour</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_minute</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_minute_frequency</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>periodicity_month</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_month_day</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_start_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1288051200.0</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>periodicity_week</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Alarm</string> </value>
</item>
<item>
<key> <string>sense_method_id</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Register planned Payment Transaction in payzen</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -50,21 +50,24 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>portal_catalog = context.getPortalObject().portal_catalog\n
simulation_state = \'planned\'\n
# use catalog to prefetch, but check later in ZODB\n
return [q.getObject() for q in portal_catalog(\n
portal_type=\'Sale Invoice Transaction\',\n
simulation_state=simulation_state) if q.getSimulationState() == simulation_state]\n
<value> <string>portal = context.getPortalObject()\n
for payment_transaction in portal.portal_catalog(\n
portal_type="Payment Transaction", \n
simulation_state="planned",\n
limit=10\n
):\n
# do not trust catalog\n
if payment_transaction.getSimulationState() == \'planned\':\n
payment_transaction.PaymentTransaction_registerPayzen()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>VifibInvoiceBuilder_selectPlannedSaleInvoiceList</string> </value>
<value> <string>Alarm_registerPlannedPaymentTransactionPayzen</string> </value>
</item>
</dictionary>
</pickle>
......
48
\ No newline at end of file
49
\ No newline at end of file
portal_alarms/payzen_update_confirmed_payment_transaction
\ No newline at end of file
portal_alarms/payzen_update_confirmed_payment_transaction
portal_alarms/register_planned_payment_transaction_payzen
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Alarm" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>active_sense_method_id</string> </key>
<value> <string>Alarm_stopPlannedSaleInvoiceTransaction</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>stop_planned_sale_invoice_transaction</string> </value>
</item>
<item>
<key> <string>periodicity_hour</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_minute</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_minute_frequency</string> </key>
<value> <int>5</int> </value>
</item>
<item>
<key> <string>periodicity_month</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_month_day</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_start_date</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>3660.0</float>
<string>GMT</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>periodicity_week</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Alarm</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Stop planned Sale Invoices before current month</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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 encoding="cdata"><![CDATA[
from DateTime import DateTime\n
from Products.ERP5Type.DateUtils import getClosestDate\n
\n
portal = context.getPortalObject()\n
this_month = getClosestDate(target_date=DateTime())\n
for sale_invoice_transaction in portal.portal_catalog(\n
portal_type=\'Sale Invoice Transaction\',\n
simulation_state=\'planned\',\n
limit=10,\n
**{"delivery.start_date": \'< %s\' % this_month}\n
):\n
if sale_invoice_transaction.getSimulationState() == \'planned\' and sale_invoice_transaction.getStartDate() < this_month:\n
# do not trust catalog\n
sale_invoice_transaction.confirm()\n
sale_invoice_transaction.start()\n
sale_invoice_transaction.stop()\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Alarm_stopPlannedSaleInvoiceTransaction</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
501
\ No newline at end of file
502
\ No newline at end of file
portal_alarms/confirm_ordered_sale_order
portal_alarms/confirm_ordered_sale_order/**
portal_alarms/stop_planned_sale_invoice_transaction
portal_alarms/stop_planned_sale_invoice_transaction/**
portal_alarms/vifib_trigger_build
portal_alarms/vifib_trigger_build/**
\ 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