Hi everybody,
I am not sure, whether one can ask code level doubts here.
But I am stuck in a section.
in cart.py
I found the function for setting price list, but i didn’t understand the code
item.price_list_rate = item.discount_percentage = item.rate = item.amount = None
and
quotation.run_method("set_price_list_and_item_details")
in the below function
def set_price_list_and_rate(quotation, cart_settings):
"""set price list based on billing territory"""
_set_price_list(quotation, cart_settings)
# reset values
quotation.price_list_currency = quotation.currency = \
quotation.plc_conversion_rate = quotation.conversion_rate = None
for item in quotation.get("items"):
item.price_list_rate = item.discount_percentage = item.rate = item.amount = None
# refetch values
quotation.run_method("set_price_list_and_item_details")
if hasattr(frappe.local, "cookie_manager"):
# set it in cookies for using in product page
frappe.local.cookie_manager.set_cookie("selling_price_list", quotation.selling_price_list)
Please let me know the how the price_list_rate is assigned here?