When I do get items from BOM in Material Request, I noticed that the system default BOM select filter is docstatus=1, which means the BOM that submitted in system can be selected.
In our scenario, some of our BOMs are not in active but submitted already in system, we don’t want them to be able to select. which means if the default filter can be set to is_active=1 that can match my need.
So my question is , is there a way to change the default filter and meanwhile won’t break the bench update?
Nice catch! The Is Active filter is applied on the Stock Entry from BOM transactions, but not for the Material Request transactions.
I don’t think it should break the update if you modify the code related to the Material Request and then do git commit to the changes you did.
If you need help on which segment of the code to change, I can’t help you there, but somebody else will, hopefully. That same person can hopefully help you with the exact git commit commands.
You can go ahead and make the change. The only issue is when you run the update next you may have to run bench update --reset and then have to make these changes again.
Most likely in the meanwhile somebody else will point you to the exact git commit command so that you don’t have the update problem and the change stays.
Maybe you should put in a Github issue to fix this as part of the core. But once it does, you may have to run bench update --reset anyways. It’s a little complicated. I guess!
Actually bench update --reset is not required.
One has to resolve conflicts of local and server copy of same file and keep local changes via git command.
I am forgetting exact sequence and command to do that, but one has to go and run the git command inside the /apps/erpnext directory.
But yes everytime an update is run, git conflict has to be resolved via git command to keep local changes.