Hi Everyone,
I want to use Price List in BOM Item Table.
But the problem is, I am getting error when I tried to use it.
I tried it using the below codes:
cur_frm.add_fetch('item_code','price_list_name','buying_price_list')
AND I tried:
cur_frm.add_fetch('item_code','price_list','buying_price_list')
But everytime, when I select an item in the BOM Item, it gives me an error shown below:
raceback (innermost last):
File “/home/sam/frappe-bench/apps/frappe/frappe/app.py”, line 57, in application
response = frappe.handler.handle()
File “/home/sam/frappe-bench/apps/frappe/frappe/handler.py”, line 19, in handle
execute_cmd(cmd)
File “/home/sam/frappe-bench/apps/frappe/frappe/handler.py”, line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/sam/frappe-bench/apps/frappe/frappe/init.py”, line 806, in call
return fn(*args, **newargs)
File “/home/sam/frappe-bench/apps/frappe/frappe/desk/form/utils.py”, line 44, in validate_link
% (fetch, frappe.db.escape(options), ‘%s’), (value,))[0]]
File “/home/sam/frappe-bench/apps/frappe/frappe/database.py”, line 136, in sql
self._cursor.execute(query, values)
File “/home/sam/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/home/sam/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
OperationalError: (1054, “Unknown column ‘price_list_name’ in ‘field list’”)
I appreciate if someone can help me.
Actually, my requirement is while using Valuation Rate for BOM, I want to show the price list rate in the detail too, so that if in any case there is no rate found in the item’s transaction then user can see that rate in Price List instead of opening the item and then see the price list.
Regards
Ruchin Sharma