Hello,
I have not yet written a patch, but have been able to modify some bits of code to get the results I need.
I would like to be able to write these into a patch so that it is easy to apply the changes to files easily after an update. Is there a simple guide to explain how to do this? I notice the patch file works on a basis of removing ("-") and adding ("+") lines of code within the existing file. However I am not certain on how to specify the area where the code should be removed or inserted.
Any tips would be much appreciated!
Thanks, Lawrence
Do you mean a custom module ?
Hello, Use following on terminal : First reach to the folder using 'cd' command where you have made changes. (where addons,server,web files are there)
bzr diff >~/Desktop/patch
Here, /Desktop/test is path where we want to store our file. And patch is the name of file to give. Thanks.
Hi Xsias, hi Hiral. What I mean is a patch file to amend the code in an existing .py file (in my case I want to add a confirmation button - see http://help.openerp.com/question/8623/warn-user-before-cancelling-a-quotation/). This code is easy to add by manually editing the file with a text editor but is time consuming as I must copy and paste the code in each time I update.
Yes, so you need a custom module.
Eclipse is good for it. Select folder -> right click on it -> Team -> Apply Patch -> Select file(Patch file) -> Finish.