ERPNext.com Frappe Cloud Support Partners Foundation Frappe School

ERPNEXT v12 to v13 upgrade error - invalid field name (Fixed)

On running bench upgrade get the following error

Executing erpnext.patches.v13_0.add_missing_fg_item_for_stock_entry

frappe.database.database.InvalidColumnName: Invalid field name: make_serial_no_batch_from_work_order

going from 12.23.0 to 13.7.0

will need to investigate a bit further.
I note that patches were implemented for FG item in v 13.7.0

i have the same error today

I faced the same. I guess the issue is because make_serial_no_batch_from_work_order field is only added to DB after migration and the patch is trying to check the field in DB which doesn’t exist at that time. You can overcome it by running it below way.

bench migrate --skip-failing

This will skip the failing patch.

bench migrate
Now the patch will execute because the field is now added to the DB.

2 Likes

I run it as a multi site
I thought I had got it through the first site by doing similar.
However main web page would not load and got stuck on an updating message.
Decided to try a restore to 12.23.0 for time being

went back and had another look.’

ran
bench migrate --skip-failing

for each site individually as have multi site setup. it would not do otherwise for all

ran
bench upgrade

all worked OK, and can log in - so far
had already updated bench to 13.7.0 before staring this.

Thanks @kartik this worked for us!

1 Like

Instead of ignoring the patch, one can run the following code in bench console to make it pass:

frappe.reload_doctype('Manufacturing Settings')
frappe.db.commit()