Downgraded to an older develop version. Receiving error in Sales/Purchase invoice. (Will pay for assistance)

I have to get familiar with v7 before we implement it, but I was on the develop branch before deciding to stay at a certain point. I’ve used git checkout to various commits within the last month, but I am always throwing this error on certain doctypes.

Traceback (most recent call last): File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 55, in application response = frappe.handler.handle() File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 19, in handle execute_cmd(cmd) File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 36, in execute_cmd ret = frappe.call(method, **frappe.form_dict) File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 875, in call return fn(*args, **newargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/document_flow.py", line 40, in get_document_completion_status links = get_linked_docs(frm_doctype, frm_docname, linkinfo, for_doctype=doctype) File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/linked_with.py", line 34, in get_linked_docs links = frappe.get_doc(doctype, name).get_link_filters(for_doctype) AttributeError: 'SalesInvoice' object has no attribute 'get_link_filters'

I’m pretty lost when I search the repository for how “get_link_filters” applies. Is there anything I can do to just make it work in it’s current state?

Specifically picking commits for your branches isn’t a good idea. Because Frappe, ERPNext and the database all need to be on the same page. Apart from that, we run patches to modify databases, and there isn’t any easy way to rollback to an older database.

Any reason you want to stay at an older version?

1 Like

Hey, thanks very much for the response. I know it’s not the greatest idea, and I’m trying to hack it together in a very sloppy way just to get it to function in the meantime, haha. The reason is because when time sheets got rolled out, it made our daily processes flip on its back, and removed some really handy functionality for us. I’ll have to play with a development environment to get it working for us, or just keep it on 7 beta at that point, but in the meantime, I screwed ourselves in a way by updating on the develop.

Though not advisable, is there anything I’d be able to learn from this error, to trace down what part of it is giving the error?

Thanks again for the reply

Basically, ERPNext is trying to access a field called get_link_filters and it doesn’t exist anymore, because it was possibly removed in the later changes. You could run bench migrate with your current code, which might fix the issue, or could cause even bigger problems(!). My recommendation would be to use ERPNext 7 latest, and find a workaround for your workflows instead of risking the system on a technical level, because even we can’t predict what will go wrong because of the several factors involved.

Absolutely. I will be testing v7 in hopes of finding a way to make time sheets to work for project based billing like how time logs worked. Finding a fix for our current system would be very temporary, but allow us to view saved invoices.

Thanks for the recommendations, and as much as it might hurt to read, I may have to comment out the function in linked_with.py or find what fields are required and reinstate those.

I think putting time sheets in place of time logs with the current approach took quite a bit of flexibility away. I made some comments in a different thread but to repeat, it seems that calendar view and notes are removed, and that project filtering is unavailable. Leaving it to employees to ensure multiple projects aren’t entered in one sheet is risky when it comes time to bill by time sheet.

Anyhow, just some thoughts. Thank you for your help