I need a case such that whenever i make a sales order, i need to be free of entering “Rate” of the item. I don’t want the Rate to be fetched from Price List (Standard Buying / Standard Selling / etc…)
Even i disabled all the price list, the message will keep showing and it stops further process.
How can I make a SO or PO without price list?
it automatically inserted item prices. thats why it pulls rate even after i diabled price list.
Now i deleted all item price and checked ignore price list…
and also i have changed the file get_item_details.py in stock module
def get_price_list_rate(args, item_doc, out):
meta = frappe.get_meta(args.parenttype or args.doctype)
if meta.get_field("currency"):
validate_price_list(args)
validate_conversion_rate(args, meta)
price_list_rate = get_price_list_rate_for(args.price_list, item_doc.name)
# variant
if not price_list_rate and item_doc.variant_of:
price_list_rate = get_price_list_rate_for(args.price_list, item_doc.variant_of)
# insert in database
if not price_list_rate:
if args.price_list and args.rate:
# insert_item_price(args) # Commented by Amalendu
pass # Added by Amalendu
return {}
out.price_list_rate = flt(price_list_rate) * flt(args.plc_conversion_rate) \
/ flt(args.conversion_rate)
if not out.price_list_rate and args.transaction_type=="buying":
from erpnext.stock.doctype.item.item import get_last_purchase_details
out.update(get_last_purchase_details(item_doc.name,
args.name, args.conversion_rate))