[Release Note] ERPNext Version 12

I attempted to upgrade v10 to v12 and after facing several issues which i resolved, i landed in v11.1.4. All attempts to move to v12 since then have failed following the same steps outlined in all posts made about migration to v12 so far.

3 Likes

same with me as well…

1 Like

restoring backup of V10 to a fresh install of V12 fails. tried all the steps here. any suggestions on a fix?

skserpnext@skserpnext2:~/frappe-bench$ bench update --patch
Backing up sites...
Patching sites...
Migrating site1.local
Executing erpnext.patches.v12_0.set_priority_for_support in site1.local (_1bd3e0294da19198)
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/skserpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
    main()
  File "/home/skserpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/skserpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/skserpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/skserpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/skserpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/skserpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/skserpnext/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/skserpnext/frappe-bench/env/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/skserpnext/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/skserpnext/frappe-bench/apps/frappe/frappe/commands/site.py", line 234, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website, skip_failing=skip_failing)
  File "/home/skserpnext/frappe-bench/apps/frappe/frappe/migrate.py", line 48, in migrate
    frappe.modules.patch_handler.run_all(skip_failing)
  File "/home/skserpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 41, in run_all
    run_patch(patch)
  File "/home/skserpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 30, in run_patch
    if not run_single(patchmodule = patch):
  File "/home/skserpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 71, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/skserpnext/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 91, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/skserpnext/frappe-bench/apps/erpnext/erpnext/patches/v12_0/set_priority_for_support.py", line 7, in execute
    set_issue_priority()
  File "/home/skserpnext/frappe-bench/apps/erpnext/erpnext/patches/v12_0/set_priority_for_support.py", line 14, in set_issue_priority
    for priority in frappe.get_meta("Issue").get_field("priority").options.split("\n"):
AttributeError: 'NoneType' object has no attribute 'options'
1 Like

I have the same problem. It is the patch erpnext.patches.v12_0.set_priority_for_support
A quick workaround is to disable this patch if you don’t ever use support doctype.
Proper solution is not known to me.

1 Like

@scmmishra, Please forward details on how to do database restore from v10 to v12 .

1 Like

This works also from v10 to v12

1 Like

This fails in case you have custom apps. Would suggest changing the instructions to:

Switching to Version 12

$ bench update
$ bench switch-to-branch version-12 frappe erpnext --upgrade

Switching to Version 11

$ bench update
$ bench switch-to-branch version-11 frappe erpnext --upgrade
3 Likes

Hi
Running in VM Box
Updated to V12 and running smoothly
a bench update throws me the error
bench update --reset also didnt solve the issue


any help on this
Thanks and Regards
Hemanth

1 Like

I have updated bench (master) and this isn’t working

1 Like

got it thru from 10 to 11… but not from 11 to 12 though !!

1 Like

backup ur current site/domain
drop ur db
restore from your backup
migrate
update
switch

1 Like

Finally installed v12, restored v11 backup (with custom apps), and then updated to v12 successfully. Below are the steps i followed:

// installed erpnext v12 (using install.py)

//restored from v11 backup

switched to 11
dropped site
created new-site
turned on developer mode
installed erpnext on the site
switched to 11
dropped db
restored db
fetched the custom apps
migrated
restarted bench
reloaded nginx
update bench
change admin pwd

//updated to v12

switched to 12
ran bench run-patch erpnext.patches.v12_0.make_item_manufacturer
switched to 12
restarted bench
reloaded nginx
updated bench

1 Like

@Vinob_chander_Ramasw,

How do we fetch custom apps?

1 Like

Please share the command syntax as we are little new to ERPnext

Thank you in advance .

1 Like

@Vinob_chander_Ramasw , Thats a feat, restoring to v12 from previous database backups. Please share a detailed document, with clear steps for the mutual benefit of the community.

1 Like

Sorry…no bugs to be reported. Happy implementing. CONGRATS!!!

2 Likes

I’ve restored several v11 backups to a fresh v12 instance following the standard procedures without much issues. The trouble is restoring v10 backup to v12. As of right now, it’s near impossible as far as I can tell as there are too many patches required which don’t come standard with the restore process.

1 Like

one option would be to restore ur v10 backup on a v10 instance created from a snapshot (if you already have a server with v10), update to v11 and then to v12

1 Like

install erpnext v12

switch to 11, restore, migrate

bench switch-to-branch version-11 frappe erpnext --upgrade
drop site
bench drop-site <site-name>
create new-site
bench new-site <site-name>
turn on developer mode
bench set-config developer_mode 1
drop db
mysql -u root -p
show databases;
drop database <db-name>
exit
restore
wget <backup>
gunzip <backup>
bench --site <site-name> --force restore <backed-up-db.sql>
bench enable-scheduler
get ur custom apps
bench get-app <git-repo.-name>
install erpnext on the site
bench --site <site-name> install-app erpnext
switch to 11
bench switch-to-branch version-11 frappe erpnext --upgrade
migrate
bench --site <site-name> migrate
restart bench
bench restart
reload nginx
service nginx reload
update bench
bench update
change admin pwd
bench --site <site-name> set-admin-password

switch to 12

bench switch-to-branch version-12 frappe erpnext --upgrade
bench run-patch erpnext.patches.v12_0.make_item_manufacturer
bench switch-to-branch version-12 frappe erpnext --upgrade
restart bench
bench restart
reload nginx
service nginx restart
update bench
bench update

5 Likes

trying to migrate a system I got this: frappe.exceptions.CharacterLengthExceededError: DocField, Row 11: ‘Depends On’ (eval:([“Data”, “Select”, “Table”, “Text”, “Text Editor”, “Link”, “Small Text”, “Long Text”, “Read Only”, “Heading”, “Dynamic Link”].indexOf(doc.fieldtype) !== -1)) will get truncated, as max characters allowed is 140
I could not find much about. Any ideas, please!

1 Like