Commit 7cc85f5d authored by Łukasz Nowak's avatar Łukasz Nowak

Remove not needed methods.

parent f4b80931
...@@ -148,7 +148,7 @@ ...@@ -148,7 +148,7 @@
</item> </item>
<item> <item>
<key> <string>simulation_select_method_id</string> </key> <key> <string>simulation_select_method_id</string> </key>
<value> <string>VifibSaleInvoiceTransaction_selectPackingListMovement</string> </value> <value> <string>SaleInvoiceTransaction_selectPackingListMovement</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
</item> </item>
<item> <item>
<key> <string>simulation_select_method_id</string> </key> <key> <string>simulation_select_method_id</string> </key>
<value> <string>VifibSaleInvoiceTransaction_selectInvoiceMovement</string> </value> <value> <string>SaleInvoiceTransaction_selectInvoiceMovement</string> </value>
</item> </item>
<item> <item>
<key> <string>title</string> </key> <key> <string>title</string> </key>
......
<?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>"""Returns Simulation Movements for invoice\n
\n
Simulation Movements can come from normal Invoice Transaction Rule\n
and same rule which is children of Trade Model Rule """\n
\n
# search for normal movements\n
kw[\'parent_specialise_reference\'] = [\'default_invoice_transaction_rule\']\n
kw[\'grand_grand_parent_specialise_reference\'] = [\n
\'default_invoicing_rule\', \'default_invoice_rule\', \'default_tax_rule\']\n
kw[\'explanation_portal_type\'] = [\'Hosting Subscription\']\n
kw[\'portal_type\'] = \'Simulation Movement\'\n
kw[\'grand_parent_simulation_state\'] = [\'confirmed\']\n
\n
search_kw = kw.copy()\n
search_kw.update(context.portal_catalog.buildSQLQuery(**search_kw))\n
\n
normal_movement_list = [movement for movement in context.InvoiceTransaction_zSelectMovement(**search_kw)]\n
\n
# update query to search for movements which are children of Trade Model Rule\n
kw.pop(\'grand_parent_simulation_state\')\n
kw[\'grand_grand_parent_specialise_reference\'] = \'default_trade_model_rule\'\n
kw[\'grand_grand_grand_parent_simulation_state\'] = [\'confirmed\']\n
\n
search_kw = kw.copy()\n
\n
search_kw.update(context.portal_catalog.buildSQLQuery(**kw))\n
\n
trade_model_movement_list = [movement for movement in context.VifibInvoiceTransaction_zSelectMovement(**search_kw)]\n
\n
movement_list = [] \n
for movement in normal_movement_list + trade_model_movement_list:\n
movement = movement.getObject()\n
if movement.getDeliveryValue() is None and movement not in movement_list :\n
movement_list.append(movement)\n
else :\n
from Products.ERP5Type.Log import log\n
log(script.getId(), "simulation movement %s should not have been selected !" % movement.getPath())\n
\n
return movement_list\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>trade_type, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>VifibInvoiceTransaction_selectInvoiceMovement</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>kw[\'parent_specialise_reference\'] = \'default_payment_rule\'\n
kw[\'portal_type\'] = \'Simulation Movement\'\n
kw[\'grand_parent_simulation_state\'] = [\'confirmed\']\n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n
movement_list = [x.getObject() for x in context.VifibPaymentTransaction_zSelectMovement(**kw)]\n
return movement_list\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>src__=0, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>VifibPaymentTransaction_selectMovement</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Use_Database_Methods_Permission</string> </key>
<value>
<list>
<string>Member</string>
</list>
</value>
</item>
<item>
<key> <string>allow_simple_one_argument_traversal</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>from_table_list:list\r\n
where_expression\r\n
order_by_expression</string> </value>
</item>
<item>
<key> <string>cache_time_</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>class_file_</string> </key>
<value> <string>ZSQLCatalog.zsqlbrain</string> </value>
</item>
<item>
<key> <string>class_name_</string> </key>
<value> <string>ZSQLBrain</string> </value>
</item>
<item>
<key> <string>connection_hook</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>VifibPaymentTransaction_zSelectMovement</string> </value>
</item>
<item>
<key> <string>max_cache_</string> </key>
<value> <int>100</int> </value>
</item>
<item>
<key> <string>max_rows_</string> </key>
<value> <int>1000</int> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
SELECT\n
catalog.uid,\n
catalog.path,\n
catalog.relative_url,\n
catalog.id\n
\n
FROM\n
movement\n
, catalog as parent\n
, catalog as grandparent\n
<dtml-in prefix="table" expr="from_table_list"> \n
<dtml-if expr="table_key not in (\'catalog\', \'movement\')">\n
, <dtml-var table_item> AS <dtml-var table_key>\n
</dtml-if>\n
</dtml-in>\n
, catalog\n
LEFT JOIN category \n
ON (catalog.uid = category.uid\n
AND category.base_category_uid = <dtml-sqlvar "portal_categories.delivery.getUid()" type="int">)\n
WHERE\n
1=1\n
<dtml-if where_expression>\n
AND <dtml-var where_expression> \n
</dtml-if>\n
\n
AND parent.uid = catalog.parent_uid\n
AND grandparent.uid = parent.parent_uid\n
\n
AND ((\n
grandparent.simulation_state NOT IN (\'cancelled\', \'deleted\')\n
) OR (\n
grandparent.simulation_state in (\'confirmed\', \'stopped\', \'delivered\')\n
))\n
\n
AND movement.uid = catalog.uid\n
AND movement.resource_uid is not NULL\n
AND category.category_uid is NULL\n
\n
<dtml-if order_by_expression>\n
ORDER BY <dtml-var order_by_expression>\n
</dtml-if>
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></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>return context.VifibInvoiceTransaction_selectInvoiceMovement(trade_type=\'Sale\', **kw)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>VifibSaleInvoiceTransaction_selectInvoiceMovement</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></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>kw[\'parent_specialise_portal_type\'] = [\'Invoicing Rule\', \'Invoice Simulation Rule\']\n
kw[\'explanation_portal_type\'] = [\'Hosting Subscription\']\n
kw[\'portal_type\'] = \'Simulation Movement\'\n
kw[\'grand_parent_simulation_state\'] = [\'started\', \'stopped\', \'delivered\', \'confirmed\']\n
\n
kw.update(context.portal_catalog.buildSQLQuery(**kw))\n
\n
movement_list = [] \n
for movement in context.VifibInvoiceTransaction_zSelectMovement(**kw) :\n
movement = movement.getObject()\n
if movement.getDeliveryValue() is None :\n
movement_list.append(movement)\n
else :\n
from Products.ERP5Type.Log import log\n
log("SaleInvoice_selectPackingListMovement", \\\n
"simulation movement %s should not have been selected !" % movement.getPath())\n
\n
return movement_list\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>VifibSaleInvoiceTransaction_selectPackingListMovement</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
51 52
\ No newline at end of file \ 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