[Mega Thread] Version 12 Release Bugs

Hi all,

Ran into an issue while updating from v11 to v12

while doing ‘bench update --patch’

at the step Executing erpnext.patches.v12_0.move_item_tax_to_item_tax_template in site1.local

got an error ‘DocType Item Manufacturer not found’

Any ideas?

Error Traceback log

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, 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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 97, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/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/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 25, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 233, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 48, in migrate
    frappe.modules.patch_handler.run_all()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 29, in run_all
    if not run_single(patchmodule = patch):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 63, in run_single
    return execute_patch(patchmodule, method, methodargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 83, in execute_patch
    frappe.get_attr(patchmodule.split()[0] + ".execute")()
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/patches/v12_0/move_item_tax_to_item_tax_template.py", line 44, in execute
    item.save()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 271, in save
    return self._save(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 305, in _save
    self.validate_higher_perm_levels()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 572, in validate_higher_perm_levels
    high_permlevel_fields = frappe.get_meta(df.options).meta.get_high_permlevel_fields()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 759, in get_meta
    return frappe.model.meta.get_meta(doctype, cached=cached)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 37, in get_meta
    meta = Meta(doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 84, in __init__
    super(Meta, self).__init__("DocType", doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 104, in __init__
    self.load_from_db()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/meta.py", line 89, in load_from_db
    super(Meta, self).load_from_db()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 147, in load_from_db
    frappe.throw(_("{0} {1} not found").format(_(self.doctype), self.name), frappe.DoesNotExistError)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 360, in throw
    msgprint(msg, raise_exception=exc, title=title, indicator='red')
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 346, in msgprint
    _raise_exception()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 315, in _raise_exception
    raise raise_exception(msg)
frappe.exceptions.DoesNotExistError: DocType Item Manufacturer not found
1 Like

I’ve got exactly the same problem while trying to upgrade v11 to v12.

Only difference I see is that i’m on python 3.5 and it seems you are still on 2.7

Is there a way to manually add the DocType (as the web interface isn’t working anymore).

Run the following before update. It seems patches are in the wrong order.

bench run-patch erpnext.patches.v12_0.make_item_manufacturer

1 Like

I have this bug in v12’s Dashboard Widget. I set a Role for this particular widget and when I hit “Save”, the role was cleared.

Another bug I found:

When I click on Chart of Accounts from this page:

I received this:

Your interface seems to be different. This is what i have on mine and everything is fine:

check to see if you’re on Version-12 as shown in this screenshot:

image

1 Like

Try this WrongOptionsDoctypeLinkError: Item: Options must be a valid DocType for field Manufacturers in row 130 - #3 by Deepika

Pull the changes from the version-12 branch and check again. This is working correctly for me:

Thank you, Worked like a charm.

bench run-patch erpnext.patches.v12_0.make_item_manufacturer

That fixed that error and then ran bench update --patch

I did run into a problem with the website couldn’t login, I think there was an issue with css js files

I rebooted and ran bench update again and everything seems fine now, will report any bugs or issues I come across

It worked fine but I had to install in develop first, then I setup the production.

sudo python install.py --develop --user frappe
sudo bench setup production --user frappe

Still testing the v12 features

Hi… I’m trying to install version 12 correctly…

Some issues:

  1. I can’t manage users permissions
  2. My Quality Management module seams to be broke:

Maye I had broked it, when I tried to fix the null issue on v12 (probably did a wrong git command…).

Somebody knows how to reinstall that module?

Pull the v12 branch again and then run migrate.

Hi, after version 12 upgrade, modules are hidden from the desk. What could be the problem? What did I do wrong?

Both frappe and erpnext needs to be on version 12. Can you please double check by running command bench version from frappe-bench folder.

Thanks & Regards,
Kalpit

This is not the standard feature (you may be running another dashboard in your custom app)

okay, it seems, it upgraded frappe, but not erpnext fully

Output

bench version
erpnext 11.1.48
frappe 12.0.0
fatal: not a git repository (or any of the parent directories): .gitPreformatted text

Thank you for your help… We have mixed it up with the previous dashboard app that we were exploring.

Run bench update again. Your ERPNext app should be on v12 for the modules to work.

Thank you kennethsequeira and @flexy2ky , both of you are correct. We had our ERPNext at v11.1.46. Problem is solved now

After bench update, it shows me that im already up to date

 sudo bench update
[sudo] password for vaditajs:
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up to date.
 master branch is renamed to version-11 and develop to version-12. Please switch to new branches to get future updates.

To switch to version 11, run the following commands: bench switch-to-branch version-11

How can I switch branch for erpnext to version-12?

sudo bench switch-to-branch version-12 erpnext
Branch version-12 does not exist in Upstream for erpnext
Switched to version-12
Please run `bench update --patch` to be safe from any differences in database schema
vaditajs@v65-6426-40:/home/erpnext/frappe-bench$ sudo bench update --patch
 master branch is renamed to version-11 and develop to version-12. Please switch to new branches to get future updates.

To switch to version 11, run the following commands: bench switch-to-branch version-11