Hi all,
I just updated my erpnext bench from version-12 to version-13 ( contain 1 custom app) with no error
the bench start run also fine but when I try to do new Purchase Order I keep getting Invalid “depends_on” expression and also can not save the new doc.
Where and what should I check this errors came from ?
It is because my custom apps ? cause when I try to install clean version-13 without custom app, it run smoothly without this kind of error .
I have try to disable my hooks and custom client script but still no good result.
I read from the forum that this error can be resolv by updating through bench but in my case did not resolve the problem. Should I check my custom fields? what should I watch for ?
in the inspect console I got this line, 11 times = the number of invalid “depends on” error
Uncaught (in promise) Error: Invalid “depends_on” expression
Error evaluating the following expression:
desk.min.js?ver=1680974110.0:8865 let out = {frappe.user.has_role(“System Manager”)}
; return out
check the depends_on value on fields of Purchase Order DocType, or reset all customization on this Doctype (and the child DocType like Purchase Order Detail ( lines))
Perhaps you could try another way ? When I changed from 12 to 13, I did a fresh install on a
server and then, when everything seemed fine, I migrated the database from the 12 system to
the 13 system. Not sure what your setup is if you have the flexibility for something like this ?
I can’t however add anything in terms of solving the error-message your are getting.
I have tried ‘Reset to default’ on Purchase Order and all child tables:
Purchase Order Item Supplied
Payment Schedule
Purchase Order Item
Pricing Rule Detail
Purchase Taxes and Charges
The errors remain the same ( also the number of times they occured ).
Btw when doing reset to default on the tables, seems it did not actualy delete the customi fields.
So I delete them manualy.
also i do:
restart mariadb
bench build
bench start
I will try to install a clean version-13 and try it from there / install my custom app & restore my version-12 data.
Hi all,
I have found the error source.
It Is indeed the depends on value evaluation for one of my custom field which still remain after doing
restore default. the value is : eval: {frappe.user.has_role(“System Manager”)} … works on v12 but in v13 give me the error.
I then changed it to : frappe.user.has_role(“System Manager”); removing curly bracket, the ‘eval:’ string and put semicolon at the end… the errors gone.
Its a journey on upgrading from 12 to 13 system.
I think I should go for 14 if everything is ok.