Commit 48691d96 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Xiaowu Zhang

erp5_commerce: Allow define dates when decide for the price

Dates are necessary for calculate Price using predicate.
parent af99cb9b
......@@ -83,6 +83,13 @@ if len(context.getVariationRangeCategoryList()):\n
variation_category = request.get(variation_base_category, default_variation)\n
variation_dict[variation_base_category] = variation_category\n
\n
if date is None:\n
variation_dict["start_date"] = DateTime()\n
variation_dict["stop_date"] = DateTime()+0.00001\n
else:\n
variation_dict["start_date"] = date\n
variation_dict["stop_date"] = date+0.00001\n
\n
if web_site_value is not None:\n
price_currency_value = web_site_value.WebSite_getShoppingCartDefaultCurrency()\n
else:\n
......@@ -95,7 +102,7 @@ return movement\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
<value> <string>date=None, **kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
......
324
\ No newline at end of file
325
\ 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