Update Error: Changes made?

Hi all,

my VM says:

  From https://github.com/frappe/frappe
 * branch            HEAD       -> FETCH_HEAD
Updating 1b93c8e..506e885
error: Your local changes to the following files would be overwritten by merge:
	frappe/templates/styles/standard.css
Please, commit your changes or stash them before you can merge.
Aborting
Error: None
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/erpnext/bench-repo/bench/cli.py", line 29, in cli
    return bench()
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/bench-repo/bench/cli.py", line 113, in update
    pull_all_apps()
  File "/home/erpnext/bench-repo/bench/app.py", line 57, in pull_all_apps
    exec_cmd("git pull {rebase} upstream HEAD".format(rebase=rebase), cwd=app_dir)
  File "/home/erpnext/bench-repo/bench/utils.py", line 59, in exec_cmd
    subprocess.check_call(cmd, cwd=cwd, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'git pull  upstream HEAD' returned non-zero exit status 1

What to do?
Indeed I have changed the standard.css…I have saved it locally on my Mac…but how to force it to update?

Best,
Dan

Hi daniel,

You have made changes to frappe/templates/styles/standard.css file. Please revert changes and try to update apps again.

Is there a default standard.css xD need to download it again

try this

cd apps/frappe/
git stash
cd ../..
bench update
cd apps/frappe/
git stash apply
git stash drop
From https://github.com/frappe/shopping-cart
 * branch            HEAD       -> FETCH_HEAD
Already up-to-date.
From https://github.com/frappe/frappe
 * branch            HEAD       -> FETCH_HEAD
Updating 1b93c8e..506e885
Fast-forward
 .travis.yml                                                        |    5 +-
 frappe/__version__.py                                              |    2 +-
 frappe/core/doctype/communication/communication.py                 |    4 +-
 frappe/core/doctype/customize_form/test_customize_form.py          |    2 +-
 frappe/core/doctype/event/event.py                                 |    9 +-
 frappe/core/doctype/print_format/print_format.json                 |  302 +++----
 frappe/core/doctype/todo/todo.py                                   |    3 +-
 frappe/core/doctype/user/user.json                                 |   54 +-
 frappe/data/languages.txt                                          |    1 +
 frappe/hooks.py                                                    |    2 +-
 frappe/model/base_document.py                                      |    2 +-
 frappe/model/db_query.py                                           |    2 +-
 frappe/public/css/font/noto_sans/NotoSans-Bold-webfont.eot         |  Bin 0 -> 21553 bytes
 frappe/public/css/font/noto_sans/NotoSans-Bold-webfont.svg         | 1825 ++++++++++++++++++++++++++++++++++++++++++
 frappe/public/css/font/noto_sans/NotoSans-Bold-webfont.ttf         |  Bin 0 -> 45440 bytes
 frappe/public/css/font/noto_sans/NotoSans-Bold-webfont.woff        |  Bin 0 -> 25216 bytes
 frappe/public/css/font/noto_sans/NotoSans-BoldItalic-webfont.eot   |  Bin 0 -> 22342 bytes
 frappe/public/css/font/noto_sans/NotoSans-BoldItalic-webfont.svg   | 1810 +++++++++++++++++++++++++++++++++++++++++
 frappe/public/css/font/noto_sans/NotoSans-BoldItalic-webfont.ttf   |  Bin 0 -> 48072 bytes
 frappe/public/css/font/noto_sans/NotoSans-BoldItalic-webfont.woff  |  Bin 0 -> 26108 bytes
 frappe/public/css/font/noto_sans/NotoSans-Italic-webfont.eot       |  Bin 0 -> 22452 bytes
 frappe/public/css/font/noto_sans/NotoSans-Italic-webfont.svg       |  914 +++++++++++++++++++++
 frappe/public/css/font/noto_sans/NotoSans-Italic-webfont.ttf       |  Bin 0 -> 48688 bytes
 frappe/public/css/font/noto_sans/NotoSans-Italic-webfont.woff      |  Bin 0 -> 26248 bytes
 frappe/public/css/font/noto_sans/NotoSans-Regular-webfont.eot      |  Bin 0 -> 20798 bytes
 frappe/public/css/font/noto_sans/NotoSans-Regular-webfont.svg      | 1825 ++++++++++++++++++++++++++++++++++++++++++
 frappe/public/css/font/noto_sans/NotoSans-Regular-webfont.ttf      |  Bin 0 -> 44124 bytes
 frappe/public/css/font/noto_sans/NotoSans-Regular-webfont.woff     |  Bin 0 -> 24372 bytes
 frappe/public/css/font/noto_sans/noto_sans.css                     |   51 ++
 frappe/public/js/frappe/form/control.js                            |    7 +-
 frappe/public/js/frappe/views/calendar.js                          |    2 +-
 frappe/public/js/lib/slickgrid/images/arrow_redo.png               |  Bin 625 -> 572 bytes
 frappe/public/js/lib/slickgrid/images/arrow_right_peppermint.png   |  Bin 240 -> 128 bytes
 frappe/public/js/lib/slickgrid/images/arrow_right_spearmint.png    |  Bin 240 -> 128 bytes
 frappe/public/js/lib/slickgrid/images/arrow_undo.png               |  Bin 631 -> 578 bytes
 frappe/public/js/lib/slickgrid/images/bullet_blue.png              |  Bin 289 -> 241 bytes
 frappe/public/js/lib/slickgrid/images/bullet_star.png              |  Bin 347 -> 279 bytes
 frappe/public/js/lib/slickgrid/images/bullet_toggle_minus.png      |  Bin 207 -> 154 bytes
 frappe/public/js/lib/slickgrid/images/bullet_toggle_plus.png       |  Bin 209 -> 156 bytes
 frappe/public/js/lib/slickgrid/images/drag-handle.png              |  Bin 1223 -> 1130 bytes
 frappe/public/js/lib/slickgrid/images/help.png                     |  Bin 510 -> 345 bytes
 frappe/public/js/lib/slickgrid/images/sort-asc.png                 |  Bin 163 -> 105 bytes
 frappe/public/js/lib/slickgrid/images/sort-desc.png                |  Bin 161 -> 107 bytes
 frappe/public/js/lib/slickgrid/images/stripes.png                  |  Bin 1238 -> 1125 bytes
 frappe/public/js/lib/slickgrid/images/tag_red.png                  |  Bin 592 -> 537 bytes
 frappe/public/js/lib/slickgrid/images/tick.png                     |  Bin 537 -> 484 bytes
 frappe/public/js/lib/slickgrid/plugins/slick.autotooltips.js       |   63 +-
 frappe/public/js/lib/slickgrid/plugins/slick.cellrangedecorator.js |    4 +-
 frappe/public/js/lib/slickgrid/plugins/slick.cellrangeselector.js  |    2 +
 frappe/public/js/lib/slickgrid/plugins/slick.cellselectionmodel.js |   15 +-
 frappe/public/js/lib/slickgrid/plugins/slick.headerbuttons.css     |    3 +-
 frappe/public/js/lib/slickgrid/plugins/slick.headermenu.css        |    1 +
 frappe/public/js/lib/slickgrid/plugins/slick.headermenu.js         |   13 +-
 frappe/public/js/lib/slickgrid/plugins/slick.rowselectionmodel.js  |   46 +-
 frappe/public/js/lib/slickgrid/slick-default-theme.css             |  228 +-----
 frappe/public/js/lib/slickgrid/slick.core.js                       |   11 +-
 frappe/public/js/lib/slickgrid/slick.dataview.js                   |  171 ++--
 frappe/public/js/lib/slickgrid/slick.editors.js                    |    6 +-
 frappe/public/js/lib/slickgrid/slick.formatters.js                 |   59 ++
 frappe/public/js/lib/slickgrid/slick.grid.css                      |    2 +
 frappe/public/js/lib/slickgrid/slick.grid.js                       |  265 ++++--
 frappe/public/js/lib/slickgrid/slick.groupitemmetadataprovider.js  |   20 +-
 frappe/public/js/lib/slickgrid/slick.remotemodel.js                |  173 ++++
 frappe/templates/styles/standard.css                               |   13 +-
 frappe/test_runner.py                                              |    4 +-
 frappe/translations/de.csv                                         |  446 +++++------
 frappe/translations/el.csv                                         |   24 +-
 frappe/translations/es.csv                                         |   80 +-
 frappe/translations/fr.csv                                         |   73 +-
 frappe/translations/hr.csv                                         |  208 ++---
 frappe/translations/id.csv                                         |   47 +-
 frappe/translations/is.csv                                         | 1698 +++++++++++++++++++++++++++++++++++++++
 frappe/translations/it.csv                                         |   60 +-
 frappe/translations/ja.csv                                         |   42 +-
 frappe/translations/nl.csv                                         |   68 +-
 frappe/translations/pl.csv                                         |   94 +--
 frappe/translations/pt.csv                                         |   26 +-
 frappe/translations/ru.csv                                         |  114 +--
 frappe/translations/tr.csv                                         |    4 +-
 frappe/website/website_generator.py                                |    2 +-
 frappe/widgets/calendar.py                                         |    2 +-
 frappe/widgets/query_report.py                                     |    2 +-
 frappe/widgets/reportview.py                                       |    4 +-
 frappe/widgets/search.py                                           |    1 +
 setup.py                                                           |    2 +-
 85 files changed, 9657 insertions(+), 1261 deletions(-)
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-Bold-webfont.eot
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-Bold-webfont.svg
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-Bold-webfont.ttf
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-Bold-webfont.woff
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-BoldItalic-webfont.eot
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-BoldItalic-webfont.svg
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-BoldItalic-webfont.ttf
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-BoldItalic-webfont.woff
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-Italic-webfont.eot
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-Italic-webfont.svg
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-Italic-webfont.ttf
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-Italic-webfont.woff
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-Regular-webfont.eot
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-Regular-webfont.svg
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-Regular-webfont.ttf
 create mode 100755 frappe/public/css/font/noto_sans/NotoSans-Regular-webfont.woff
 create mode 100644 frappe/public/css/font/noto_sans/noto_sans.css
 create mode 100644 frappe/public/js/lib/slickgrid/slick.formatters.js
 create mode 100644 frappe/public/js/lib/slickgrid/slick.remotemodel.js
 create mode 100644 frappe/translations/is.csv
remote: Counting objects: 369, done.
remote: Compressing objects: 100% (222/222), done.
Receiving objects: 100% (369/369), 1.19 MiB | 662 KiB/s, done.
remote: Total 369 (delta 190), reused 218 (delta 139)
Resolving deltas: 100% (190/190), done.
From https://github.com/frappe/erpnext
 * branch            HEAD       -> FETCH_HEAD
Updating 9e95e78..282695f
error: Your local changes to the following files would be overwritten by merge:
	erpnext/selling/doctype/quotation/quotation.json
	erpnext/selling/doctype/sales_order/sales_order.json
Please, commit your changes or stash them before you can merge.
Aborting
Error: None
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/erpnext/bench-repo/bench/cli.py", line 29, in cli
    return bench()
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/bench-repo/bench/cli.py", line 113, in update
    pull_all_apps()
  File "/home/erpnext/bench-repo/bench/app.py", line 57, in pull_all_apps
    exec_cmd("git pull {rebase} upstream HEAD".format(rebase=rebase), cwd=app_dir)
  File "/home/erpnext/bench-repo/bench/utils.py", line 59, in exec_cmd
    subprocess.check_call(cmd, cwd=cwd, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'git pull  upstream HEAD' returned non-zero exit status 1
root@erpnext-vm:/home/erpnext/frappe-bench# 

This is the newest error xD

Seems like you have also changed erpnext code. You should stash all changes update and stash apply

cd apps/frappe/
git stash
cd ../..
cd apps/erpnext/
git stash
cd ../..
bench update
cd apps/frappe/
git stash apply
git stash drop
cd ../..
cd apps/erpnext/
git stash apply
git stash drop
3 Likes

Hi,

it worked…but somehow I had to reapply all my changes to the doctype :wink: is there a chance to get the doytyp preferences into the mariadb? may be a feature request…I guess a lot of us customise erpnext?

I highly recommend you to fork out erpnext, do all changes in your repo and commit them.

It will be really easy to update your erpnext be doing a merge or rebase from original repo. also you will be able to send a pull request.

so you mean I should do all doctypes and send them to git?

I have done the following:

DocType Sales Invoice → Taxes and Shipping Table → Print Hide

How would I do that?

Dan

Did you make any changes that you’d not be able to do via property setter? If you can achieve it using property setter then you won’t have to fork / maintain it.

Hi BhupeshGupta,

I have tried your trick, which seems to work for me up to today. But now I am getting this error. Any idea how I can still update erpnext?

Thanks for your help.

xxx@June2015:~/frappe-bench/apps$ cd  erpnext/
xxx@June2015:~/frappe-bench/apps/erpnext$ git stash
erpnext/accounts/doctype/fiscal_year/fiscal_year.json: needs merge
erpnext/accounts/doctype/sales_invoice/sales_invoice.json: needs merge
erpnext/selling/doctype/customer/customer.json: needs merge
erpnext/setup/doctype/brand/brand.json: needs merge
erpnext/setup/doctype/company/company.json: needs merge
erpnext/setup/doctype/customer_group/customer_group.json: needs merge
erpnext/setup/doctype/item_group/item_group.json: needs merge
erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json: needs merge
erpnext/setup/doctype/territory/territory.json: needs merge
erpnext/setup/doctype/uom/uom.json: needs merge
erpnext/stock/doctype/delivery_note/delivery_note.json: needs merge
erpnext/stock/doctype/item/item.json: needs merge
erpnext/stock/doctype/stock_entry/stock_entry.json: needs merge
erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json: needs merge
erpnext/stock/doctype/warehouse/warehouse.json: needs merge
erpnext/utilities/doctype/contact/contact.json: needs merge
erpnext/accounts/doctype/fiscal_year/fiscal_year.json: needs merge
erpnext/accounts/doctype/sales_invoice/sales_invoice.json: needs merge
erpnext/selling/doctype/customer/customer.json: needs merge
erpnext/setup/doctype/brand/brand.json: needs merge
erpnext/setup/doctype/company/company.json: needs merge
erpnext/setup/doctype/customer_group/customer_group.json: needs merge
erpnext/setup/doctype/item_group/item_group.json: needs merge
erpnext/setup/doctype/terms_and_conditions/terms_and_conditions.json: needs merge
erpnext/setup/doctype/territory/territory.json: needs merge
erpnext/setup/doctype/uom/uom.json: needs merge
erpnext/stock/doctype/delivery_note/delivery_note.json: needs merge
erpnext/stock/doctype/item/item.json: needs merge
erpnext/stock/doctype/stock_entry/stock_entry.json: needs merge
erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.json: needs merge
erpnext/stock/doctype/warehouse/warehouse.json: needs merge
erpnext/utilities/doctype/contact/contact.json: needs merge
erpnext/accounts/doctype/fiscal_year/fiscal_year.json: unmerged (0057d6d5a21350e135a9ffbc1d1a5177ce401107)
erpnext/accounts/doctype/fiscal_year/fiscal_year.json: unmerged (8f887c894f963b9ed99d0ce7040203398145fb9f)
erpnext/accounts/doctype/fiscal_year/fiscal_year.json: unmerged (3d0cdc734cc6ee9bb5934a1f9637792009e9ad5c)
erpnext/accounts/doctype/sales_invoice/sales_invoice.json: unmerged (045678dc545adb3a7e39449106187a4e84c0fbe8)
erpnext/accounts/doctype/sales_invoice/sales_invoice.json: unmerged (25dd3988f14ff836a77cbec9feaa35f4c63135fb)
erpnext/accounts/doctype/sales_invoice/sales_invoice.json: unmerged (b6dbf37c57413c766a5e8ed1f3d1175410474013)
erpnext/selling/doctype/customer/customer.json: unmerged (f2811759241871687c81fc509029269d3adb9c47)
erpnext/selling/doctype/customer/customer.json: unmerged (cced319cf5de4f861252d604ee8dfb6e8dc8d240)
erpnext/selling/doctype/customer/customer.json: unmerged (6a48a8a9b7f8b222fe3f8c6df7ca1a219be2bceb)
erpnext/setup/doctype/brand/brand.json: unmerged (2b20b1011bce0befd0edc923e7743971f460c0e5)
...
fatal: git-write-tree: error building trees
Cannot save the current index state
xxx@June2015:~/frappe-bench/apps/erpnext$

Hi all,

sorry for my long absence. Have been working out some other stuff and had no time to complete this topic here.
Now I’m sitting in front of a clone of my productive V4.

What my task is:

  1. Update
  2. Make ERPNext the same for my users again.

I have changed a few bits in the code but I am not really aware of how to save them and then reapply them. Are there possibilities to say: Save al from ERPNext - Update - Reapply.

Like -r would do in some Unix based apps?

Edit - this is my error on above recommendation:

 erpnext@erpnext-vm:~/frappe-bench$ cd apps/frappe/
erpnext@erpnext-vm:~/frappe-bench/apps/frappe$ git stash
No local changes to save
erpnext@erpnext-vm:~/frappe-bench/apps/frappe$ cd ../..
erpnext@erpnext-vm:~/frappe-bench$ cd apps/erpnext/
erpnext@erpnext-vm:~/frappe-bench/apps/erpnext$ git stash
No local changes to save
erpnext@erpnext-vm:~/frappe-bench/apps/erpnext$ cd ../..
erpnext@erpnext-vm:~/frappe-bench$ bench update
remote: Counting objects: 35, done.
remote: Total 35 (delta 23), reused 23 (delta 23), pack-reused 12
error: insufficient permission for adding an object to repository database .git/objects

fatal: failed to write object
fatal: unpack-objects failed
Error: None
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/erpnext/bench-repo/bench/cli.py", line 29, in cli
    return bench()
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/bench-repo/bench/cli.py", line 113, in update
    pull_all_apps()
  File "/home/erpnext/bench-repo/bench/app.py", line 57, in pull_all_apps
    exec_cmd("git pull {rebase} upstream HEAD".format(rebase=rebase), cwd=app_dir)
  File "/home/erpnext/bench-repo/bench/utils.py", line 59, in exec_cmd
    subprocess.check_call(cmd, cwd=cwd, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'git pull  upstream HEAD' returned non-zero exit status 1
erpnext@erpnext-vm:~/frappe-bench$

Edit number 2:
I tried the same now with root - here is the output

root@erpnext-vm:/home/erpnext/frappe-bench# cd apps/frappe/
root@erpnext-vm:/home/erpnext/frappe-bench/apps/frappe# sudo git stash
No local changes to save
root@erpnext-vm:/home/erpnext/frappe-bench/apps/frappe# cd ../..
root@erpnext-vm:/home/erpnext/frappe-bench# cd apps/erpnext/
root@erpnext-vm:/home/erpnext/frappe-bench/apps/erpnext# sudo git stash
No local changes to save
root@erpnext-vm:/home/erpnext/frappe-bench/apps/erpnext# cd ../..
root@erpnext-vm:/home/erpnext/frappe-bench# sudo bench update
From https://github.com/frappe/shopping-cart
 * branch            HEAD       -> FETCH_HEAD
Already up-to-date.
From https://github.com/frappe/frappe
 * branch            HEAD       -> FETCH_HEAD
Already up-to-date.
From https://github.com/frappe/erpnext
 * branch            HEAD       -> FETCH_HEAD
Updating 282695f..2dbe2b6
error: The following untracked working tree files would be overwritten by merge:
	erpnext/accounts/doctype/gl_entry/test_gl_entry.py
Please move or remove them before you can merge.
Aborting
Error: None
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/erpnext/bench-repo/bench/cli.py", line 29, in cli
    return bench()
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click-3.3-py2.7.egg/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/bench-repo/bench/cli.py", line 113, in update
    pull_all_apps()
  File "/home/erpnext/bench-repo/bench/app.py", line 57, in pull_all_apps
    exec_cmd("git pull {rebase} upstream HEAD".format(rebase=rebase), cwd=app_dir)
  File "/home/erpnext/bench-repo/bench/utils.py", line 59, in exec_cmd
    subprocess.check_call(cmd, cwd=cwd, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'git pull  upstream HEAD' returned non-zero exit status 1

Best,
Daniel

Hi,

Say you have the following setup:

  • ERPNext V7
  • custom app (no changes to ERPNext)

Now we want to invoice certain things and need the information from the custom app to be usable in the custom print format of the Sales Invoice from ERPNext. To get this done, we created several extra rows to the Sales Invoice doctype.
These rows (dates, amounts, data, …) are being populated with data from the custom app when we push a button in the custom app.

When I update I also get the warning of “error: Your local changes to the following files would be overwritten by merge:”
Following the above procedure, I do get to update ERPNext, BUT I loose all the rows that I added to the Sales Invoice doctype.

Is this adding of extra rows what you guys call “changing the erpnext code” ?

I would think that those would just be additions and should remain when updating.
I btw just use the build in functionality to build erpnext.
I’m not doing any coding in js or css of any files or such.

What would be the best way to maintain this way of working, while still being able to update the master ERPNext.

Extra info: the custom app is being developed on a development server and thus, we need to update our production environment custom app also with the “bench update” command. so in orde to be able to update our custom app, we need to be able to update ERPNext.

Works great on ERPNext 7 on Ubuntu 16. Thanks!