Commit da08eb9b authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Xiaowu Zhang

erp5_commerce_related

parent bd1740f0
<workflow_chain>
<chain>
<type>Business Process</type>
<workflow>-validation_workflow, commerce_validation_workflow</workflow>
</chain>
<chain>
<type>Currency</type>
<workflow>-validation_workflow, commerce_validation_workflow</workflow>
......
......@@ -54,18 +54,17 @@
Return list of shopping cart items as list representing order lines.\n
\n
TODO:\n
- rename shopping_cart_order_lines to shopping_cart_order_line_list\n
- make this method compatible with cells and trees in orders. Orders\n
are not always flat. Consider large projects or matrices in B2B sales\n
of apparel. SaleOrder_getShoppingCartItemTree would be a better\n
name probably.\n
- make sure this script is not called more than once per page\n
"""\n
shopping_cart_order_lines = context.SaleOrder_getShoppingCart().contentValues(portal_type="Sale Order Line")\n
shopping_cart_order_line_list = context.SaleOrder_getShoppingCart().contentValues(portal_type="Sale Order Line")\n
if include_shipping:\n
return shopping_cart_order_lines\n
return shopping_cart_order_line_list\n
else:\n
return filter(lambda x: x.getId()!=\'shipping_method\', shopping_cart_order_lines)\n
return filter(lambda x: x.getId()!=\'shipping_method\', shopping_cart_order_line_list)\n
</string> </value>
</item>
<item>
......
......@@ -264,7 +264,7 @@ context.Base_redirect(\'SaleOrder_viewThankYouMessage\')\n
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SaleOrder_finalizeShopping</string> </value>
<value> <string>WebSection_finalizeShopping</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -75,7 +75,7 @@
<input type="hidden" name="business" value="vincen_1247039207_biz@nexedi.com">\n
\n
<input type="hidden" name="rm" value="POST">\n
<input type="hidden" name="notify_url" tal:attributes="value python: \'%s/SaleOrder_finalizeShopping\' % (base_url)">\n
<input type="hidden" name="notify_url" tal:attributes="value python: \'%s/WebSection_finalizeShopping\' % (base_url)">\n
<input type="hidden" name="return" tal:attributes="value python: \'%s/SaleOrder_viewThankYouMessage\' % (base_url)">\n
<input type="hidden" name="cancel_return" tal:attributes="value python: \'%s?portal_status_message=Payment canceled.\' % (base_url)">\n
\n
......
......@@ -86,7 +86,7 @@ if response_dict[\'ACK\'] != \'Success\':\n
#Payment is ok. Set shopping cart is payed\n
context.SaleOrder_setShoppingCartBuyer()\n
\n
return context.SaleOrder_finalizeShopping()\n
return context.WebSection_finalizeShopping()\n
</string> </value>
</item>
<item>
......
......@@ -154,7 +154,7 @@
</item>
<item>
<key> <string>name</string> </key>
<value> <string>SaleOrder_finalizeShopping:method</string> </value>
<value> <string>WebSection_finalizeShopping:method</string> </value>
</item>
<item>
<key> <string>title</string> </key>
......
......@@ -78,6 +78,8 @@
<list>
<string>your_update_shipping_method_button</string>
<string>submit_payment</string>
<string>your_update_person_information_button</string>
<string>your_login_button</string>
</list>
</value>
</item>
......@@ -94,6 +96,7 @@
<value>
<list>
<string>customer</string>
<string>customer_inconsistency</string>
</list>
</value>
</item>
......
......@@ -197,7 +197,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not here.SaleOrder_isShoppingCartEmpty() and here.SaleOrder_getSelectedShippingResource() is not None</string> </value>
<value> <string>python: not here.getPortalObject().portal_membership.isAnonymousUser() and not here.SaleOrder_isShoppingCartEmpty() and here.SaleOrder_getSelectedShippingResource() is not None</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="InputButtonField" module="Products.ERP5Form.InputButtonField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_login_button</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string>hiddenLabel shopping_cart_renderer_update_submit</string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string>Login before continue</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>image</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>login_form:method</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Login before continue</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.Base_translateString(\'Login before Continue\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.getPortalObject().portal_membership.isAnonymousUser() and not here.SaleOrder_isShoppingCartEmpty()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="InputButtonField" module="Products.ERP5Form.InputButtonField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_update_person_information_button</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>image</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string>hiddenLabel shopping_cart_renderer_update_submit</string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string>Update your Profile</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>image</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Update your Profile</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.Base_translateString(\'Update your Profile\')</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not here.getPortalObject().portal_membership.isAnonymousUser() and not here.SaleOrder_isShoppingCartEmpty() and len(here.ERP5Site_getAuthenticatedMemberPersonValue().checkConsistency())</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: "%s:method" % here.ERP5Site_getAuthenticatedMemberPersonValue().getRelativeUrl()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -54,6 +54,7 @@
# The goal of this script is to get all the products from all the visible Web Sections\n
# and it must select randomly which product must be displayed for a given context.\n
from Products.ERP5Type.Cache import CachingMethod\n
\n
if not kw.has_key(\'portal_type\'):\n
kw[\'portal_type\'] = \'Product\'\n
......
......@@ -46,10 +46,7 @@
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="PersistentMapping" module="Persistence.mapping"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
......@@ -84,9 +81,6 @@
<key> <string>Modify portal content</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Associate</string>
<string>Manager</string>
</tuple>
</value>
......
307
\ No newline at end of file
314
Business Process | -validation_workflow
Business Process | commerce_validation_workflow
Currency | -validation_workflow
Currency | commerce_validation_workflow
Product | -validation_workflow
......
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