Commit 0999dba4 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_advanced_ecommerce&test: script is deprecated

parent 5acfdeff
Pipeline #39888 failed with stage
in 0 seconds
......@@ -48,7 +48,7 @@ if not shopping_cart_id in session.keys():
"Modify portal content",
"View"])
context.WebSection_updateShoppingCartTradeCondition(shopping_cart, None)
user = context.ERP5Site_getAuthenticatedMemberPersonValue()
user = context.portal_membership.getAuthenticatedMember().getUserValue()
if user:
shopping_cart.setDestinationValue(user)
shopping_cart.setPriceCurrency(shopping_cart.getSpecialiseValue().getPriceCurrency())
......
......@@ -112,6 +112,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -154,6 +158,10 @@
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>input_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
......@@ -267,7 +275,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.ERP5Site_getAuthenticatedMemberPersonValue().getDefaultAddressCity() or context.Base_translateString("Missing")</string> </value>
<value> <string>python: here.portal_membership.getAuthenticatedMember().getUserValue().getDefaultAddressCity() or context.Base_translateString("Missing")</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -112,6 +112,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -154,6 +158,10 @@
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>input_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
......@@ -267,7 +275,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.ERP5Site_getAuthenticatedMemberPersonValue().getDefaultAddressRegionTitle() or context.Base_translateString("Missing")</string> </value>
<value> <string>python: here.portal_membership.getAuthenticatedMember().getUserValue().getDefaultAddressRegionTitle() or context.Base_translateString("Missing")</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -112,6 +112,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -154,6 +158,10 @@
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>input_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
......@@ -267,7 +275,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.ERP5Site_getAuthenticatedMemberPersonValue().getDefaultAddressStreetAddress() or context.Base_translateString("Missing")</string> </value>
<value> <string>python: here.portal_membership.getAuthenticatedMember().getUserValue().getDefaultAddressStreetAddress() or context.Base_translateString("Missing")</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -112,6 +112,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -154,6 +158,10 @@
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>input_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
......@@ -267,7 +275,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.ERP5Site_getAuthenticatedMemberPersonValue().getDefaultAddressZipCode() or context.Base_translateString("Missing")</string> </value>
<value> <string>python: here.portal_membership.getAuthenticatedMember().getUserValue().getDefaultAddressZipCode() or context.Base_translateString("Missing")</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -112,6 +112,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -154,6 +158,10 @@
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>input_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
......@@ -267,7 +275,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.ERP5Site_getAuthenticatedMemberPersonValue().getDefaultEmailText() or context.Base_translateString("Missing")</string> </value>
<value> <string>python: here.portal_membership.getAuthenticatedMember().getUserValue().getDefaultEmailText() or context.Base_translateString("Missing")</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -112,6 +112,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -156,6 +160,10 @@
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>input_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
......@@ -269,7 +277,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.ERP5Site_getAuthenticatedMemberPersonValue().getDefaultTelephoneText()</string> </value>
<value> <string>python: here.portal_membership.getAuthenticatedMember().getUserValue().getDefaultTelephoneText()</string> </value>
</item>
</dictionary>
</pickle>
......@@ -282,7 +290,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.ERP5Site_getAuthenticatedMemberPersonValue().getDefaultTelephoneText() is not None</string> </value>
<value> <string>python: here.portal_membership.getAuthenticatedMember().getUserValue().getDefaultTelephoneText() is not None</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -112,6 +112,10 @@
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>autocomplete</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
......@@ -154,6 +158,10 @@
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>input_type</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
......@@ -267,7 +275,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.ERP5Site_getAuthenticatedMemberPersonValue().getTitle() or context.Base_translateString("Missing")</string> </value>
<value> <string>python: here.portal_membership.getAuthenticatedMember().getUserValue().getTitle() or context.Base_translateString("Missing")</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -23,7 +23,7 @@ if sale_order.getSimulationState() == "draft":
for amount in sale_order.getAggregatedAmountList():
if 'base_amount/loyalty_program/using_point' in amount.getBaseApplicationList():
user = context.ERP5Site_getAuthenticatedMemberPersonValue()
user = context.portal_membership.getAuthenticatedMember().getUserValue()
loyalty_transaction = context.loyalty_transaction_module.newContent(
portal_type='Loyalty Transaction',
destination_section_value=user,
......
import random
translateString = context.Base_translateString
person = context.ERP5Site_getAuthenticatedMemberPersonValue()
person = context.portal_membership.getAuthenticatedMember().getUserValue()
if person is None:
......
......@@ -12,7 +12,7 @@ reference='no_loyalty_reward'
if context.REQUEST.get("loyalty_reward", "") == "enable" and context.getSiteLoyaltyExplanationTemplate():
# this is double check.
# a trade condition should properly configured for anonymous
if context.ERP5Site_getAuthenticatedMemberPersonValue():
if context.portal_membership.getAuthenticatedMember().getUserValue():
reference= 'loyalty_reward'
if payment_mode:
......
<tal:block tal:define="enable_reward_discount python: request.get('loyalty_reward', '') == 'enable';">
<div class="promotional_information" tal:condition="python: here.ERP5Site_getAuthenticatedMemberPersonValue() and here.getSiteLoyaltyExplanationTemplate()">
<tal:block tal:condition="python: here.ERP5Site_getAuthenticatedMemberPersonValue().Person_getTotalLoyaltyPoint() >= 0">
<div class="promotional_information" tal:condition="python: here.portal_membership.getAuthenticatedMember().getUserValue() and here.getSiteLoyaltyExplanationTemplate()">
<tal:block tal:condition="python: here.portal_membership.getAuthenticatedMember().getUserValue().Person_getTotalLoyaltyPoint() >= 0">
<span i18n:translate="" i18n:domain="ui">You should overwrite this page template.</span>
<br />
<a tal:condition="python: enable_reward_discount"
......
<tal:block tal:define="isAnon here/portal_membership/isAnonymousUser">
<tal:block tal:condition="not: isAnon"
tal:define="customer here/ERP5Site_getAuthenticatedMemberPersonValue;
tal:define="customer here/portal_membership/getAuthenticatedMember/getUserValue;
login customer/getReference | string: ;
website here/getWebSiteValue">
......
......@@ -314,7 +314,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: not here.getPortalObject().portal_membership.isAnonymousUser() and here.ERP5Site_getAuthenticatedMemberPersonValue().checkConsistency()</string> </value>
<value> <string>python: not here.getPortalObject().portal_membership.isAnonymousUser() and here.portal_membership.getAuthenticatedMember().getUserValue().checkConsistency()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -197,7 +197,7 @@
<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()) == 0 and here.SaleOrder_getSelectedShippingResource() is not None</string> </value>
<value> <string>python: not here.getPortalObject().portal_membership.isAnonymousUser() and not here.SaleOrder_isShoppingCartEmpty() and len(here.portal_membership.getAuthenticatedMember().getUserValue().checkConsistency()) == 0 and here.SaleOrder_getSelectedShippingResource() is not None</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -199,7 +199,7 @@
<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>
<value> <string>python: not here.getPortalObject().portal_membership.isAnonymousUser() and not here.SaleOrder_isShoppingCartEmpty() and len(here.portal_membership.getAuthenticatedMember().getUserValue().checkConsistency())</string> </value>
</item>
</dictionary>
</pickle>
......@@ -212,7 +212,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: "%s:method" % here.ERP5Site_getAuthenticatedMemberPersonValue().getRelativeUrl()</string> </value>
<value> <string>python: "%s:method" % here.portal_membership.getAuthenticatedMember().getUserValue().getRelativeUrl()</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -311,7 +311,7 @@
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
python: "<a href=%s/person_module/%s?login_come_from_url=%s> %s </a>" % (context.getWebSiteValue().absolute_url(),context.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue().getId(), context.getWebSectionValue().absolute_url(), context.Base_translateString("Change your informations"))
python: "<a href=%s/person_module/%s?login_come_from_url=%s> %s </a>" % (context.getWebSiteValue().absolute_url(),context.getPortalObject().portal_membership.getAuthenticatedMember().getUserValue().getId(), context.getWebSectionValue().absolute_url(), context.Base_translateString("Change your informations"))
]]></string> </value>
</item>
......
......@@ -29,7 +29,7 @@
</tal:block>
<tal:block tal:condition="not: isAnon"
tal:define="customer here/ERP5Site_getAuthenticatedMemberPersonValue;
tal:define="customer here/portal_membership/getAuthenticatedMember/getUserValue;
login customer/getReference | string: ;
website here/getWebSiteValue">
......
payment_mode = payment_mode.lower()
person = context.ERP5Site_getAuthenticatedMemberPersonValue()
person = context.portal_membership.getAuthenticatedMember().getUserValue()
sale_order = context.WebSection_persistShoppingCart(shopping_cart, person)
if payment_mode == 'paypal':
......
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