How To Pull-Request From Local To ERPNext Repo?


I’ve just made “Make Receipt” and “IsCash” option within Purchase Invoice, so Purchase Invoice will do purchase receipt if this option is checked, also do payment if IsCash is checked. It’s something similar with isPos and Update Stock within Sales Invoice.

The reason I made this is…In my case, current purchasing flow requires “long” steps which is too complicated for small businesses. If we maintain stock then we must do it from purchase receipt then purchase invoice then make payment (if it’s cash purchase)… This is sometimes kinda frustrating (min. 3 steps) for end-users to do entries and keep tracking on receipt status, payment status etc…

With these options, just do one entry in purchase invoice then the system will book payable, also receives stock items and make payment if it’s cash purchase…which is very helpful for our end-users. So the system becomes more ‘simple’ to manage. I’ve tested it, so far it works fine…

I just copied with little modifications from Purchase Receipt, Sales Invoice logics to implement this within Purchase Invoice…

As I’m not the expert in programming…I’d like to send pull-request may be core team can review it before it gets officially merged. I do hope it will get merged into the product as I believe it will be helpful for others especially small businesses.

Can anybody give steps to send pull request from my local commits to official repository? maybe to develop branch?? Never doing this before…



I assume that you have forked the frappe/erpnext branch and pushed the code to your remote git branch.

  • Now go to<your_user_name>/erpnext/

  • Click on New Pull Request and on next screen select the branch where you have committed the code.

Note: You must merge your code to match with latest code commits on the branch before making pull request to avoid any conflict to open a pull request.


1 Like

I forked erpnext then tried to push my local commits to my develop branch…got this error:

~/frappe-bench/apps/erpnext$ git push develop
Username for ‘’: xxx
Password for ‘’:
error: src refspec develop does not match any.
error: failed to push some refs to ‘

Actually I want to make PR to official ERPNext develop. What’re the steps??


I made local changes to my local erpnext upstream and committed it.
I tried to git push develop
but got above error…got no ideas

Anyhelp would be appreciated…thanks

Sorry, for the delay in the reply.

I suppose the problem is, you have not created a link to the remote repository to push.

First try doing

git remote -v and you should similar output,

You need to run following to create remote

git remote add origin<your_user_name>/erpnext

After this command, once again try git remote -v. You should see similar output,

and then you can try to push using the following command,

git push origin HEAD

Hope this helps you in making your first push :smile:

@shreyasp thanks for this.

I always cannot push to my develop branch … but able to push to master

 ! [rejected]        develop -> develop (non-fast-forward)
error: failed to push some refs to ''
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

If I do git pull origin develop

 * branch            develop    -> FETCH_HEAD
Already up-to-date.

How to push to develop?

Thank you