Merge pull request #16365 from hiousi/patch-1

fix: variant can not get its price
This commit is contained in:
Nabin Hait 2019-01-10 10:36:27 +05:30 committed by GitHub
commit afbdaa525e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -370,16 +370,16 @@ def get_price_list_rate(args, item_doc, out):
price_list_rate = get_price_list_rate_for(args, item_doc.name) or 0
# variant
if not price_list_rate and item_doc.variant_of:
price_list_rate = get_price_list_rate_for(args, item_doc.variant_of)
# insert in database
if not price_list_rate:
if args.price_list and args.rate:
insert_item_price(args)
return {}
# variant
if not price_list_rate and item_doc.variant_of:
price_list_rate = get_price_list_rate_for(args, item_doc.variant_of)
out.price_list_rate = flt(price_list_rate) * flt(args.plc_conversion_rate) \
/ flt(args.conversion_rate)