Version upgrade from 6 to 7

how do i upgrade erpnext from 6 to 7? or please give me the link to install erpnext 7 from ISO

v7 is not released yet.

@vjFaLk can you share the develop VM link?

Also update the pages on erpnext_com

is there any chance to go back to v7 to v6

Trying to go back from v7 to v6 will cause issues.

You can download the Dev VM and try it out yourself. You’ll need to run bench start from the frappe-bench folder to actually start it.

If you want to just have a look at what ERPNext 7 looks like you can just head over to https://beta.erpnext.com

Please give me latest version install proccess

as v7 is not released yet I doubt the install instructions have been written yet. I think you can either take the Dev VM or install v6 and switch the git sources to the develop branch I’d say

please give me the latest version install proccess

Can u give me the upgrade proccess v6.14.0 to v6.27.9

@masud all you need to do is go into the frappe-bench folder and run bench update like this :

cd ~/frappe-bench
bench update

@masud
Download iso from here https://erpnext.com/download

as sugggested, update iso image using bench update
after that, restore database and migate youre database using bench migrate
let me know if you find any issue.

~/frappe-bench$ bench update
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.92’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 60, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in
call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in
main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060,
in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in
invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in
invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/cli.py”, line 211, in _update
version_upgrade = is_version_upgrade()
File “/home/frappe/bench-repo/bench/app.py”, line 94, in
is_version_upgrade
upstream_version = get_upstream_version(‘frappe’, bench=bench,
branch=branch)
File “/home/frappe/bench-repo/bench/app.py”, line 137, in
get_upstream_version
return get_version_from_string(contents)
File “/home/frappe/bench-repo/bench/app.py”, line 193, in
get_version_from_string
return match.group(2)
AttributeError: ‘NoneType’ object has no attribute ‘group’

what can i do?

@masud
Go to bench-repo folder
git pull
Go back to frappe-bench folder
Run bench update

Want source install.

wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh

sudo bash setup_frappe.sh --setup-production

I have all ready run those command successfully,now what can I do?

@hereabdulla you can’t go back once you upgrade. You will have to restore from backup to do that.


@masud Upgrade at your own risk. Things could break and you need to be prepared. I would recommend first trying it out on a test setup.

  1. Go to bench-repo folder and run: git pull && git checkout develop
  2. Go to frappe-bench folder and run: bench --site all backup
  3. Then run: bench switch-to-develop --upgrade
  4. Then try running: bench update
1 Like

I am getting this error on doing bench update --patch --no-backup

Executing erpnext.patches.v4_2.repost_reserved_qty #2016-04-15 in rigpl.local (040e7151bb)
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/aditya/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 79, in <module>
    main()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 16, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/commands/site.py", line 166, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/migrate.py", line 27, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 25, in run_all
    if not run_single(patchmodule = patch):
  File "/home/aditya/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 52, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 68, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/aditya/frappe-bench/apps/erpnext/erpnext/patches/v4_2/repost_reserved_qty.py", line 31, in execute
    "reserved_qty": get_reserved_qty(item_code, warehouse)
  File "/home/aditya/frappe-bench/apps/erpnext/erpnext/stock/stock_balance.py", line 155, in update_bin_qty
    bin.save()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 247, in save
    self.run_before_save_methods()
  File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 642, in run_before_save_methods
    self.run_method("validate")
  File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 603, in run_method
    return Document.hook(fn)(self, *args, **kwargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 768, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 751, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/aditya/frappe-bench/apps/frappe/frappe/model/document.py", line 597, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/aditya/frappe-bench/apps/erpnext/erpnext/stock/doctype/bin/bin.py", line 21, in validate
    self.block_transactions_against_group_warehouse()
  File "/home/aditya/frappe-bench/apps/erpnext/erpnext/stock/doctype/bin/bin.py", line 31, in block_transactions_against_group_warehouse
    is_group_warehouse(self.warehouse)
  File "/home/aditya/frappe-bench/apps/erpnext/erpnext/stock/utils.py", line 192, in is_group_warehouse
    if frappe.db.get_value("Warehouse", warehouse, "is_group"):
  File "/home/aditya/frappe-bench/apps/frappe/frappe/database.py", line 409, in get_value
    ret = self.get_values(doctype, filters, fieldname, ignore, as_dict, debug, cache=cache)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/database.py", line 450, in get_values
    out = self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/database.py", line 562, in _get_values_from_table
    conditions, order_by), values, as_dict=as_dict, debug=debug, update=update)
  File "/home/aditya/frappe-bench/apps/frappe/frappe/database.py", line 137, in sql
    self._cursor.execute(query, values)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
    self.errorhandler(self, exc, value)
  File "/home/aditya/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1054, "Unknown column 'is_group' in 'field list'")
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==3.0.0', 'console_scripts', 'bench')()
  File "/home/aditya/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 664, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "/home/aditya/bench-repo/bench/commands/update.py", line 60, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force)
  File "/home/aditya/bench-repo/bench/commands/update.py", line 90, in _update
    patch_sites(bench_path=bench_path)
  File "/home/aditya/bench-repo/bench/utils.py", line 134, in patch_sites
    run_frappe_cmd('--site', 'all', 'migrate', bench_path=bench_path)
  File "/home/aditya/bench-repo/bench/utils.py", line 500, in run_frappe_cmd
    raise CommandFailedError(args)
bench.utils.CommandFailedError: ('--site', 'all', 'migrate')

Seems like the is_group field is missing in my db for tabWarehouse, I just checked its not there in the master branch as well so it seems that this is going to cause a lot of issues to people switching from v6 to v7

@saurabh6790 can you check? Maybe reload_doctype missing?

@adityaduggal

Pushed a fix Changed patch order to fix old patches by nabinhait · Pull Request #5699 · frappe/erpnext · GitHub .

Can you please try to update again?