Commit c6344595 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_advanced_ecommerce: custom reference

parent dda3d692
......@@ -7,7 +7,8 @@ new_id = context.portal_ids.generateNewLengthId(
random_min = 100000 # 9 digits
random_max = 1000000 # 10 digits
reference = "SO-%s-%s" % (new_id, random.randint(random_min,random_max))
if not reference:
reference = "SO-%s-%s" % (new_id, random.randint(random_min,random_max))
shopping_cart.setReference(reference)
portal_type = shopping_cart.getPortalType()
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>shopping_cart, person</string> </value>
<value> <string>shopping_cart, person, reference=None</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
......
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