Update of ERPNext version 11 to Version 12

Hi,

Currently am running this version:

ERPNext: v11.1.44 (master)

Frappe Framework: v11.1.39 (master)

When i run this command (“bench switch-to-branch v12 erpnext”) to update my erpnext instance form v11 to v12, it finishes and gives me this output:

Branch v12 does not exist in Upstream for erpnext
Switched to v12
Please run bench update --patch to be safe from any differences in database schema

After running the “bench update --patch” i get this output:

Backing up sites…
Patching sites…
Migrating site1.local
Updating DocTypes for frappe : [========================================]
Updating DocTypes for erpnext : [========================================]
INFO:bench.utils:sudo supervisorctl restart frappe-bench-workers: frappe-bench-web:
frappe-bench-workers:frappe-bench-frappe-schedule: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-0: stopped
frappe-bench-web:frappe-bench-node-socketio: stopped
frappe-bench-web:frappe-bench-frappe-web: stopped
frappe-bench-workers:frappe-bench-frappe-schedule: started
frappe-bench-workers:frappe-bench-frappe-default-worker-0: started
frappe-bench-workers:frappe-bench-frappe-long-worker-0: started
frappe-bench-workers:frappe-bench-frappe-short-worker-0: started
frappe-bench-web:frappe-bench-frappe-web: started
frappe-bench-web:frappe-bench-node-socketio: started
________________________________________________________________________________
Bench: Deployment tool for Frappe and ERPNext (https://erpnext.org).
Open source depends on your contributions, so please contribute bug reports, patches, fixes or cash and be a part of the community

I am not sure if the update from v11 to v12 is sucessfull as there are no errors.Also if i log in to the site on my browser i can see the version is still as follows and not v12:

ERPNext: v11.1.44 (master)

Frappe Framework: v11.1.39 (master)

Am i missing a step or something? Kindly assist.Am running ERP NEXT on production.

In the message below lies the secret. Your current system has no knowledge of version 12.

Read the various experiences here, especially around the git update of your local system to sync with the git repository.

Since the v11/v12 changes, ERPNext upgrades quite weirdly - gives a bunch of messages which loop on themselves

   #To fix... (thanks to @lasalesi who posted about this on the ERPNext forum)
      #The default .git "config" file has a section...
      [remote "upstream"]
              fetch = +refs/heads/master:refs/remotes/upstream/master
      #"master" needs to become "*" #all occurrences, NB!: without the quotes
      [remote "upstream"]
              fetch = +refs/heads/*:refs/remotes/upstream/*
#Edit the file: apps > erpnext> .git > config :
   `nano ~/frappe-bench/apps/erpnext/.git/config`
      [remote "upstream"]
          url = https://github.com/frappe/erpnext
          fetch = +refs/heads/*:refs/remotes/upstream/*
#   OR   #
sed -i.bak 's/\/master/\/*/g' ~/frappe-bench/apps/erpnext/.git/config   #replace /master with /* (copy the original file to *.bak)
#IF you want v12, then run....
bench switch-to-branch version-12 frappe erpnext --upgrade    #make sure you switch BOTH! (frappe erpnext)
bench update --patch #not generally a requirement, but I prefer to run it anyway
1 Like

Let me try edit the git config file and i rerun the upgrade i see

@trentmu This worked great am now on version 12.Thanks alot.Is that how the updates will be rolled out on the other higher versions to come?

ERPNext: v12.1.6 (version-12)

Frappe Framework: v12.0.16 (version-12)

I am not sure about the future options, but this method should work

I tried this but doesn’t work…

Installed Apps

ERPNext: v11.1.49 (master)

Frappe Framework: v12.0.16 (version-12)

If you ran either this…
bench switch-to-branch version-12 frappe --upgrade without the “erpnext” included,
or
if you have quotes in the .git/config file
"fetch = +refs/heads/*:refs/remotes/upstream/*"
then it is likely to cause the mismatch

Hello… I tried

bench switch-to-branch version-12 frappe --upgrade without the “erpnext” included

But still no luck…

This is the response on the above command:

fatal: Invalid refspec '+refs/heads/:refs/remotes/upstream/'
Switching for frappe
INFO:bench.utils:git config --unset-all remote.upstream.fetch
INFO:bench.utils:git config --add remote.upstream.fetch '+refs/heads/*:refs/remo                             tes/upstream/*'
INFO:bench.utils:git fetch upstream
remote: Enumerating objects: 58, done.
remote: Counting objects: 100% (58/58), done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 60 (delta 36), reused 41 (delta 26), pack-reused 2
Unpacking objects: 100% (60/60), done.
From https://github.com/frappe/frappe
   5bed56b15..c7a04add3  develop    -> upstream/develop
INFO:bench.utils:git checkout version-12
Switched to branch 'version-12'
Your branch is up to date with 'upstream/version-12'.
INFO:bench.utils:git merge upstream/version-12
Already up to date.
Successfully switched branches for:
frappe
Switched to version-12
Please run `bench update --patch` to be safe from any differences in database sc                             hema

Below is my config file:

[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
	[remote "upstream"]
	          url = https://github.com/frappe/erpnext
	          fetch = +refs/heads/*:refs/remotes/upstream/*
[branch "master"]
	remote = upstream
	merge = refs/heads/master

The installed apps still showing:

Installed Apps

ERPNext: v11.1.67 (version-11)

Frappe Framework: v12.0.16 (version-12)

When i tried bench update

resulting the below:

INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up to date.
INFO:bench.utils:./env/bin/pip install Pillow
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages (6.1.0)


Cannot proceed with update: You have local changes in app "erpnext" that are not committed.

Here are your choices:

1. Merge the erpnext app manually with "git pull" / "git pull --rebase" and fix conflicts.
1. Temporarily remove your changes with "git stash" or discard them completely
        with "bench update --reset" or for individual repositries "git reset --hard"
2. If your changes are helpful for others, send in a pull request via GitHub and
        wait for them to be merged in the core.
root@spg-erp-v1:/home/frappe/frappe-bench#

Is this related with my pyhthon version which is Python 2.7.15+?

This one… I could not understand how to do it…

@cyberdee Hi the steps are easy.Do the following:

Step 1. Locate your .git/config file then edit this line from

[remote “upstream”]
fetch = +refs/heads/master:refs/remotes/upstream/master

             to become:

 
  [remote "upstream"]
          fetch = +refs/heads/*:refs/remotes/upstream/*

Step 2. Also locate this config file : /frappe-bench/apps/erpnext/.git/config then edit the following line to be as follows

  [remote "upstream"]
      url = https://github.com/frappe/erpnext
      fetch = +refs/heads/*:refs/remotes/upstream/*

Step 3: then run this command as non root user, preferably frappe user on this directory (…/frappe-bench):

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

Step 4: run this command (But not necessary):

bench update --patch

5 Likes

Hi after doing this got the following error. Pls clarify.
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote “upstream”]
url = GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
fetch = +refs/heads/:refs/remotes/upstream/
[branch “version-12”]
remote = upstream
merge = refs/heads/version-12

frappe@ubuntu1604:~/frappe-bench$ bench update --patch
Backing up sites...
Patching sites...
Migrating site1.local
Executing execute:frappe.reload_doc("HR", "doctype", "HR Settings") #2020-01-16 in site1.local (1bd3e0294da19198)
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, 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/lib/python3.5/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/lib/python3.5/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 227, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 47, 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 81, in execute_patch
    exec(patchmodule.split("execute:")[1],globals())
  File "<string>", line 1, in <module>
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 799, in reload_doc
    return frappe.modules.reload_doc(module, dt, dn, force=force, reset_permissions=reset_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py", line 160, in reload_doc
    return import_files(module, dt, dn, force=force, reset_permissions=reset_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 26, in import_files
    reset_permissions=reset_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 31, in import_file
    ret = import_file_by_path(path, force, pre_process=pre_process, reset_permissions=reset_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 65, in import_file_by_path
    ignore_version=ignore_version, reset_permissions=reset_permissions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 100, in import_doc
    doc = frappe.get_doc(docdict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 734, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 69, in get_doc
    return controller(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 113, in __init__
    super(Document, self).__init__(kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py", line 54, in __init__
    self.update(d)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py", line 77, in update
    self.set(key, value)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py", line 124, in set
    self.extend(key, value)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py", line 161, in extend
    self.append(key, v)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py", line 155, in append
    self.name, str(type(value))[1:-1], value)
ValueError: Document for field "field_order" attached to child table of "HR Settings" must be a dict or BaseDocument, not class 'str' (employee_settings)
frappe@ubuntu1604:~/frappe-bench$

Check your remote upstream to be exactly like this:

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote “upstream”]
url = GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
fetch = +refs/heads/:refs/remotes/upstream/*
[branch “version-12”]
remote = upstream
merge = refs/heads/version-12

Hi ben, still facing the same issue after the changes. Please correct me if still doing wrong something.

Kindly paste the error displayed so that i may have a thorough look at the issue

Please find below the entire update process with error message at bottom:

root@ubuntu1604:/home/ecorex# su frappe
frappe@ubuntu1604:/home/ecorex$ cd
frappe@ubuntu1604:~$ cd frappe-bench/
frappe@ubuntu1604:~/frappe-bench$ bench update --patch
Backing up sites…
Patching sites…
Migrating site1.local
Executing execute:frappe.reload_doc(“HR”, “doctype”, “HR Settings”) #2020-01-16 in site1.local (1bd3e0294da19198)
Traceback (most recent call last):
File “/usr/lib/python3.5/runpy.py”, line 184, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.5/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
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/lib/python3.5/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.5/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 227, in migrate
migrate(context.verbose, rebuild_website=rebuild_website)
File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 47, 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 81, in execute_patch
exec(patchmodule.split(“execute:”)[1],globals())
File “”, line 1, in
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 799, in reload_doc
return frappe.modules.reload_doc(module, dt, dn, force=force, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 160, in reload_doc
return import_files(module, dt, dn, force=force, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 26, in import_files
reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 31, in import_file
ret = import_file_by_path(path, force, pre_process=pre_process, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 65, in import_file_by_path
ignore_version=ignore_version, reset_permissions=reset_permissions)
File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 100, in import_doc
doc = frappe.get_doc(docdict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 734, in get_doc
doc = frappe.model.document.get_doc(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 69, in get_doc
return controller(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 113, in init
super(Document, self).init(kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 54, in init
self.update(d)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 77, in update
self.set(key, value)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 124, in set
self.extend(key, value)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 161, in extend
self.append(key, v)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 155, in append
self.name, str(type(value))[1:-1], value)
ValueError: Document for field “field_order” attached to child table of “HR Settings” must be a dict or BaseDocument, not class ‘str’ (employee_settings)
frappe@ubuntu1604:~/frappe-bench$

@Amit_Kumar1, kindly run this command first:

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

Then let me know if there is any error.

Please find below entire update process:

root@ubuntu1604:/home/ecorex# su frappe
frappe@ubuntu1604:/home/ecorex$ cd
frappe@ubuntu1604:~$ cd frappe-bench/
frappe@ubuntu1604:~/frappe-bench$ bench switch-to-branch version-12 frappe erpnext --upgrade
Branch version-12 does not exist in Upstream for frappe
fatal: Invalid refspec ‘+refs/heads/:refs/remotes/upstream/
Switching for erpnext
INFO:bench.utils:git config --unset-all remote.upstream.fetch
INFO:bench.utils:git config --add remote.upstream.fetch '+refs/heads/
:refs/remotes/upstream/*’
INFO:bench.utils:git fetch upstream
remote: Enumerating objects: 4834, done.
remote: Counting objects: 100% (4834/4834), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 8364 (delta 4822), reused 4830 (delta 4821), pack-reused 3530
Receiving objects: 100% (8364/8364), 27.05 MiB | 2.02 MiB/s, done.
Resolving deltas: 100% (6641/6641), completed with 1161 local objects.
From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
d5676a8…84a5e34 version-12 → upstream/version-12

  • [new branch] add-links-to-readme → upstream/add-links-to-readme
  • [new branch] default-price-list-fix → upstream/default-price-list-fix
  • [new branch] default-price-list-fix-version-12-hotfix → upstream/default-price-list-fix-version-12-hotfix
    4441561…0865625 develop → upstream/develop
  • [new branch] fix_patch_set_task_status → upstream/fix_patch_set_task_status
  • [new branch] michellealva-patch-1-1 → upstream/michellealva-patch-1-1
  • [new branch] nabinhait-patch-1 → upstream/nabinhait-patch-1
  • [new branch] nabinhait-patch-2 → upstream/nabinhait-patch-2
  • [new branch] nabinhait-patch-3 → upstream/nabinhait-patch-3
  • [new branch] new-translations → upstream/new-translations
  • [new branch] sahil28297-patch-1 → upstream/sahil28297-patch-1
  • [new branch] skr04_groups → upstream/skr04_groups
    47a7e34…884dc28 v11-pre-release → upstream/v11-pre-release
    0ef799d…84a5e34 v12-pre-release → upstream/v12-pre-release
  • [new branch] version → upstream/version
    47a7e34…884dc28 version-11 → upstream/version-11
    8a5f31d…3e2fe12 version-11-hotfix → upstream/version-11-hotfix
    1596352…703e20d version-12-hotfix → upstream/version-12-hotfix
  • [new tag] v11.1.74 → v11.1.74
  • [new tag] v12.6.0 → v12.6.0
  • [new tag] v11.1.73 → v11.1.73
  • [new tag] v12.4.1 → v12.4.1
  • [new tag] v12.4.2 → v12.4.2
  • [new tag] v12.4.3 → v12.4.3
  • [new tag] v12.5.0 → v12.5.0
  • [new tag] v12.5.1 → v12.5.1
  • [new tag] v12.5.2 → v12.5.2
    INFO:bench.utils:git checkout version-12
    Already on ‘version-12’
    Your branch is behind ‘upstream/version-12’ by 286 commits, and can be fast-forwarded.
    (use “git pull” to update your local branch)
    INFO:bench.utils:git merge upstream/version-12
    Updating d5676a8…84a5e34
    Fast-forward
    .travis.yml | 2 +
    cypress.json | 3 -
    cypress/fixtures/example.json | 5 -
    cypress/integration/opportunity/lost_reason_detail.js | 31 -
    cypress/plugins/index.js | 17 -
    cypress/support/commands.js | 25 -
    cypress/support/index.js | 22 -
    erpnext/init.py | 2 ±
    …/dashboard_chart_source/account_balance_timeline/account_balance_timeline.py | 11 ±
    erpnext/accounts/doctype/account/account.json | 6 ±
    erpnext/accounts/doctype/account/account.py | 17 ±
    …/account/chart_of_accounts/verified/de_kontenplan_SKR04_with_account_number.json | 142 ±-
    erpnext/accounts/doctype/accounting_dimension/accounting_dimension.py | 14 ±
    erpnext/accounts/doctype/accounts_settings/regional/united_states.js | 8 +
    erpnext/accounts/doctype/bank_account/bank_account.json | 6 ±
    erpnext/accounts/doctype/bank_guarantee/bank_guarantee.py | 4 +
    erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js | 6 ±
    erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.json | 18 ±
    erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py | 39 ±
    erpnext/accounts/doctype/bank_transaction_payments/bank_transaction_payments.json | 13 ±
    erpnext/accounts/doctype/budget/budget.py | 23 ±
    erpnext/accounts/doctype/c_form/c_form.js | 12 ±
    erpnext/accounts/doctype/chart_of_accounts_importer/chart_of_accounts_importer.py | 6 ±
    erpnext/accounts/doctype/cost_center/cost_center.json | 7 ±
    erpnext/accounts/doctype/discounted_invoice/discounted_invoice.json | 5 ±
    erpnext/accounts/doctype/discounted_invoice/discounted_invoice.py | 2 ±
    erpnext/accounts/doctype/gl_entry/gl_entry.json | 805 +±------------
    erpnext/accounts/doctype/gl_entry/gl_entry.py | 10 ±
    erpnext/accounts/doctype/journal_entry/journal_entry.json | 2295 +++++++++±-------------------------------
    erpnext/accounts/doctype/journal_entry/journal_entry.py | 10 ±
    erpnext/accounts/doctype/mode_of_payment/mode_of_payment.py | 13 +
    erpnext/accounts/doctype/payment_entry/payment_entry.py | 4 ±
    erpnext/accounts/doctype/payment_entry/test_payment_entry.py | 45 ±
    erpnext/accounts/doctype/payment_reconciliation/payment_reconciliation.py | 18 ±
    erpnext/accounts/doctype/payment_request/payment_request.py | 9 ±
    erpnext/accounts/doctype/pos_profile/pos_profile.json | 10 ±
    erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 2 ±
    erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py | 108 ++
    erpnext/accounts/doctype/pricing_rule/utils.py | 17 ±
    erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js | 15 ±
    erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 13 ±
    erpnext/accounts/doctype/purchase_invoice_item/purchase_invoice_item.json | 3 ±
    erpnext/accounts/doctype/sales_invoice/pos.py | 19 ±
    erpnext/accounts/doctype/sales_invoice/sales_invoice.json | 7 ±
    erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 82 ±
    erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py | 10 ±
    erpnext/accounts/doctype/subscription/subscription.json | 6 ±
    erpnext/accounts/doctype/subscription/subscription.py | 2 ±
    erpnext/accounts/doctype/tax_category/tax_category.json | 2 ±
    erpnext/accounts/general_ledger.py | 8 ±
    erpnext/accounts/page/pos/pos.js | 1 +
    erpnext/accounts/report/accounts_payable/accounts_payable.js | 15 +
    erpnext/accounts/report/accounts_receivable/accounts_receivable.js | 16 ±
    erpnext/accounts/report/accounts_receivable/accounts_receivable.py | 89 ±
    erpnext/accounts/report/balance_sheet/balance_sheet.js | 3 ±
    erpnext/accounts/report/cash_flow/cash_flow.js | 3 ±
    erpnext/accounts/report/cash_flow/cash_flow.py | 14 ±
    …/report/consolidated_financial_statement/consolidated_financial_statement.js | 3 ±
    …/report/consolidated_financial_statement/consolidated_financial_statement.py | 9 ±
    erpnext/accounts/report/financial_statements.py | 80 ±
    erpnext/accounts/report/general_ledger/general_ledger.html | 2 ±
    erpnext/accounts/report/general_ledger/general_ledger.js | 3 ±
    erpnext/accounts/report/general_ledger/general_ledger.py | 15 ±
    erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.js | 16 ±
    erpnext/accounts/report/item_wise_purchase_register/item_wise_purchase_register.py | 283 ++++±
    erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.js | 30 ±
    erpnext/accounts/report/item_wise_sales_register/item_wise_sales_register.py | 462 +++++++±
    erpnext/accounts/report/profit_and_loss_statement/profit_and_loss_statement.js | 3 ±
    erpnext/accounts/report/sales_register/sales_register.py | 16 ±
    erpnext/accounts/report/trial_balance/trial_balance.js | 3 ±
    erpnext/accounts/report/trial_balance/trial_balance.py | 17 ±
    erpnext/accounts/utils.py | 3 ±
    erpnext/assets/doctype/asset/asset.py | 2 ±
    erpnext/assets/doctype/asset/depreciation.py | 2 ±
    erpnext/assets/doctype/location/location.json | 567 ±---------
    erpnext/assets/report/fixed_asset_register/fixed_asset_register.js | 23 ±
    erpnext/assets/report/fixed_asset_register/fixed_asset_register.py | 95 ±
    erpnext/buying/doctype/request_for_quotation/request_for_quotation.js | 2 ±
    erpnext/buying/report/procurement_tracker/procurement_tracker.py | 8 ±
    erpnext/change_log/v12/v12_5_0.md | 53 +
    erpnext/change_log/v12/v12_6_0.md | 53 +
    erpnext/config/accounts.py | 10 ±
    erpnext/config/buying.py | 54 ±
    erpnext/controllers/accounts_controller.py | 3 +
    erpnext/controllers/buying_controller.py | 14 +
    erpnext/controllers/status_updater.py | 24 ±
    erpnext/controllers/stock_controller.py | 19 ±
    erpnext/crm/doctype/lead/lead.py | 4 ±
    erpnext/crm/doctype/opportunity/opportunity.py | 2 ±
    erpnext/crm/report/lead_details/lead_details.json | 39 ±
    erpnext/demo/user/fixed_asset.py | 39 ±
    erpnext/education/doctype/assessment_group/assessment_group.json | 335 +±—
    erpnext/education/doctype/fee_schedule/fee_schedule.py | 4 ±
    erpnext/erpnext_integrations/connectors/woocommerce_connection.py | 23 ±
    erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_methods.py | 6 +
    erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_settings.py | 5 ±
    erpnext/erpnext_integrations/doctype/amazon_mws_settings/xml_utils.py | 5 ±
    erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.json | 7 ±
    erpnext/erpnext_integrations/doctype/plaid_settings/plaid_settings.py | 30 ±
    erpnext/healthcare/doctype/healthcare_service_unit/healthcare_service_unit.json | 406 ±------
    erpnext/healthcare/doctype/healthcare_settings/healthcare_settings.json | 1238 +±--------------------
    erpnext/healthcare/doctype/lab_test_template/lab_test_template.js | 103 ±
    erpnext/healthcare/doctype/lab_test_template/lab_test_template.json | 1234 ++++±-----------------
    erpnext/healthcare/doctype/lab_test_template/lab_test_template.py | 118 +±
    erpnext/healthcare/doctype/lab_test_template/lab_test_template_list.js | 10 ±
    erpnext/healthcare/doctype/patient_appointment/patient_appointment.py | 4 ±
    erpnext/hr/doctype/additional_salary/additional_salary.js | 3 ±
    erpnext/hr/doctype/additional_salary/additional_salary.py | 6 ±
    erpnext/hr/doctype/attendance/attendance.json | 7 ±
    erpnext/hr/doctype/attendance/attendance.py | 2 ±
    erpnext/hr/doctype/department/department.json | 472 ±-------
    erpnext/hr/doctype/department/department.py | 13 ±
    erpnext/hr/doctype/employee/employee.json | 4 ±
    erpnext/hr/doctype/employee_benefit_application/employee_benefit_application.py | 1 +
    erpnext/hr/doctype/employee_checkin/employee_checkin.js | 8 ±
    erpnext/hr/doctype/employee_checkin/employee_checkin.json | 60 ±
    erpnext/hr/doctype/expense_taxes_and_charges/expense_taxes_and_charges.json | 4 ±
    erpnext/hr/doctype/leave_application/leave_application.js | 11 ±
    erpnext/hr/doctype/leave_application/leave_application.json | 666 +++++±-----
    erpnext/hr/doctype/leave_application/leave_application.py | 28 ±
    erpnext/hr/doctype/leave_application/test_leave_application.py | 12 ±
    erpnext/hr/doctype/leave_encashment/leave_encashment.py | 5 ±
    erpnext/hr/doctype/leave_ledger_entry/leave_ledger_entry.json | 11 ±
    erpnext/hr/doctype/salary_slip/salary_slip.py | 48 ±
    erpnext/hr/doctype/salary_structure/salary_structure.js | 4 ±
    erpnext/hr/doctype/salary_structure/salary_structure.py | 19 ±
    erpnext/hr/doctype/salary_structure/test_salary_structure.py | 24 ±
    erpnext/hr/doctype/vehicle_log/test_vehicle_log.py | 63 ±
    erpnext/hr/doctype/vehicle_log/vehicle_log.js | 18 ±
    erpnext/hr/doctype/vehicle_log/vehicle_log.json | 883 +++±-----------
    erpnext/hr/doctype/vehicle_log/vehicle_log.py | 57 ±
    erpnext/hr/doctype/vehicle_service/vehicle_service.json | 194 ±–
    erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py | 6 ±
    erpnext/hr/utils.py | 4 ±
    erpnext/maintenance/doctype/maintenance_schedule/maintenance_schedule.py | 2 ±
    erpnext/manufacturing/doctype/bom/bom.py | 36 ±
    erpnext/manufacturing/doctype/bom_update_tool/bom_update_tool.py | 27 ±
    erpnext/manufacturing/doctype/production_plan/production_plan.py | 3 ±
    erpnext/manufacturing/doctype/work_order/test_work_order.py | 34 ±
    erpnext/manufacturing/doctype/work_order/work_order.py | 6 ±
    erpnext/manufacturing/page/bom_comparison_tool/bom_comparison_tool.js | 18 ±
    erpnext/manufacturing/report/bom_stock_calculated/bom_stock_calculated.py | 37 ±
    erpnext/patches.txt | 2 +
    erpnext/patches/v12_0/create_irs_1099_field_united_states.py | 10 +
    erpnext/patches/v12_0/rename_bank_reconciliation_fields.py | 14 +
    erpnext/portal/product_configurator/utils.py | 21 +
    erpnext/projects/doctype/project_user/project_user.json | 7 ±
    erpnext/projects/doctype/task/task.json | 6 ±
    erpnext/projects/doctype/task/task.py | 10 ±
    erpnext/public/js/conf.js | 2 ±
    erpnext/public/js/controllers/transaction.js | 14 ±
    erpnext/public/js/utils.js | 3 ±
    erpnext/public/js/utils/dimension_tree_filter.js | 6 ±
    erpnext/public/js/utils/serial_no_batch_selector.js | 9 ±
    erpnext/quality_management/doctype/quality_procedure/quality_procedure.json | 6 ±
    erpnext/quality_management/doctype/quality_procedure/quality_procedure_tree.js | 2 ±
    erpnext/quality_management/doctype/quality_review/quality_review.json | 14 ±
    erpnext/quality_management/report/review/review.json | 38 ±
    erpnext/regional/india/setup.py | 9 ±
    erpnext/regional/india/utils.py | 2 ±
    erpnext/regional/report/datev/datev.py | 2 ±
    …/regional/report/gst_itemised_purchase_register/gst_itemised_purchase_register.py | 6 ±
    erpnext/regional/report/gst_itemised_sales_register/gst_itemised_sales_register.py | 2 ±
    erpnext/regional/turkey/setup.py | 4 +
    erpnext/selling/doctype/customer/customer.js | 10 ±
    erpnext/selling/doctype/customer/customer.json | 11 ±
    erpnext/selling/doctype/customer/customer.py | 7 +
    erpnext/selling/doctype/product_bundle_item/product_bundle_item.json | 247 +±–
    erpnext/selling/doctype/quotation/quotation.py | 8 ±
    erpnext/selling/doctype/quotation_item/quotation_item.json | 8 ±
    erpnext/selling/doctype/sales_order/sales_order.py | 1 -
    erpnext/selling/doctype/sales_order_item/sales_order_item.json | 4 ±
    erpnext/setup/doctype/company/company.json | 6 ±
    erpnext/setup/doctype/company/company.py | 9 ±
    erpnext/setup/doctype/company/delete_company_transactions.py | 4 ±
    erpnext/setup/doctype/company/test_company.py | 2 ±
    erpnext/setup/doctype/customer_group/customer_group.json | 10 ±
    erpnext/setup/doctype/item_group/item_group.json | 1051 ++++±-------------
    erpnext/setup/doctype/item_group/item_group.py | 14 ±
    erpnext/setup/doctype/sales_person/sales_person.js | 5 +
    erpnext/setup/doctype/sales_person/sales_person.json | 472 ±-------
    erpnext/setup/doctype/supplier_group/supplier_group.json | 384 ±-----
    erpnext/setup/doctype/territory/territory.json | 616 ++±--------
    erpnext/setup/utils.py | 4 ±
    erpnext/shopping_cart/product_info.py | 4 ±
    erpnext/stock/doctype/bin/bin.py | 14 ±
    erpnext/stock/doctype/delivery_note/delivery_note.py | 1 -
    erpnext/stock/doctype/delivery_note_item/delivery_note_item.json | 24 ±
    erpnext/stock/doctype/delivery_trip/delivery_trip.json | 4 ±
    erpnext/stock/doctype/delivery_trip/delivery_trip.py | 2 ±
    erpnext/stock/doctype/item/item.py | 11 ±
    erpnext/stock/doctype/item_alternative/item_alternative.py | 15 +
    erpnext/stock/doctype/item_price/item_price.json | 11 ±
    erpnext/stock/doctype/item_price/item_price.py | 4 ±
    erpnext/stock/doctype/item_price/test_item_price.py | 8 ±
    erpnext/stock/doctype/item_price/test_records.json | 13 ±
    erpnext/stock/doctype/landed_cost_voucher/landed_cost_voucher.py | 3 ±
    erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py | 70 ++
    erpnext/stock/doctype/material_request/material_request.js | 15 ±
    erpnext/stock/doctype/material_request/material_request.py | 12 +
    erpnext/stock/doctype/material_request_item/material_request_item.json | 8 ±
    erpnext/stock/doctype/pick_list/pick_list.py | 4 ±
    erpnext/stock/doctype/purchase_receipt/purchase_receipt.py | 18 ±
    erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py | 89 ±
    erpnext/stock/doctype/purchase_receipt_item/purchase_receipt_item.json | 4 ±
    erpnext/stock/doctype/serial_no/serial_no.json | 6 ±
    erpnext/stock/doctype/serial_no/serial_no.py | 148 ±-
    erpnext/stock/doctype/stock_entry/stock_entry.js | 16 ±
    erpnext/stock/doctype/stock_entry/stock_entry.py | 10 ±
    erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json | 3 ±
    erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py | 3 +
    erpnext/stock/doctype/stock_settings/stock_settings.js | 9 +
    erpnext/stock/doctype/stock_settings/stock_settings.py | 8 +
    erpnext/stock/doctype/warehouse/warehouse.json | 9 ±
    erpnext/stock/get_item_details.py | 17 ±
    erpnext/stock/reorder_item.py | 3 +
    erpnext/stock/report/stock_projected_qty/stock_projected_qty.py | 4 ±
    erpnext/stock/utils.py | 2 ±
    erpnext/support/doctype/issue/issue.json | 9 ±
    erpnext/templates/includes/projects/project_row.html | 2 ±
    erpnext/utilities/product.py | 9 +
    package.json | 13 ±
    requirements.txt | 18 ±
    yarn.lock | 1302 ------------------------
    224 files changed, 5139 insertions(+), 12230 deletions(-)
    delete mode 100644 cypress.json
    delete mode 100644 cypress/fixtures/example.json
    delete mode 100644 cypress/integration/opportunity/lost_reason_detail.js
    delete mode 100644 cypress/plugins/index.js
    delete mode 100644 cypress/support/commands.js
    delete mode 100644 cypress/support/index.js
    create mode 100644 erpnext/accounts/doctype/accounts_settings/regional/united_states.js
    create mode 100644 erpnext/change_log/v12/v12_5_0.md
    create mode 100644 erpnext/change_log/v12/v12_6_0.md
    create mode 100644 erpnext/patches/v12_0/create_irs_1099_field_united_states.py
    create mode 100644 erpnext/patches/v12_0/rename_bank_reconciliation_fields.py
    create mode 100644 erpnext/regional/turkey/setup.py
    Successfully switched branches for:
    erpnext
    Switched to version-12
    Please run bench update --patch to be safe from any differences in database schema
    frappe@ubuntu1604:~/frappe-bench$ bench update --patch
    Backing up sites…
    Patching sites…
    Migrating site1.local
    Executing execute:frappe.reload_doc(“HR”, “doctype”, “HR Settings”) #2020-01-16 in site1.local (1bd3e0294da19198)
    Traceback (most recent call last):
    File “/usr/lib/python3.5/runpy.py”, line 184, in _run_module_as_main
    main”, mod_spec)
    File “/usr/lib/python3.5/runpy.py”, line 85, in _run_code
    exec(code, run_globals)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 97, in
    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/lib/python3.5/site-packages/click/core.py”, line 764, in call
    return self.main(*args, **kwargs)
    File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 717, in main
    rv = self.invoke(ctx)
    File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py”, line 555, in invoke
    return callback(*args, **kwargs)
    File “/home/frappe/frappe-bench/env/lib/python3.5/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 227, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py”, line 47, 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 81, in execute_patch
    exec(patchmodule.split(“execute:”)[1],globals())
    File “”, line 1, in
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 799, in reload_doc
    return frappe.modules.reload_doc(module, dt, dn, force=force, reset_permissions=reset_permissions)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/utils.py”, line 160, in reload_doc
    return import_files(module, dt, dn, force=force, reset_permissions=reset_permissions)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 26, in import_files
    reset_permissions=reset_permissions)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 31, in import_file
    ret = import_file_by_path(path, force, pre_process=pre_process, reset_permissions=reset_permissions)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 65, in import_file_by_path
    ignore_version=ignore_version, reset_permissions=reset_permissions)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 100, in import_doc
    doc = frappe.get_doc(docdict)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 734, in get_doc
    doc = frappe.model.document.get_doc(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 69, in get_doc
    return controller(*args, **kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 113, in init
    super(Document, self).init(kwargs)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 54, in init
    self.update(d)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 77, in update
    self.set(key, value)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 124, in set
    self.extend(key, value)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 161, in extend
    self.append(key, v)
    File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 155, in append
    self.name, str(type(value))[1:-1], value)
    ValueError: Document for field “field_order” attached to child table of “HR Settings” must be a dict or BaseDocument, not class ‘str’ (employee_settings)
    frappe@ubuntu1604:~/frappe-bench$