Some advise required please : issue with V13.34.2


I was wondering if someone can offer some advise because I have effectively hit a
brick wall with me using my ERPNext. This weekend I discovered an issue after updating
and I have made a post in this regard …

@brian_pond drew my attention to the cause, but I need to find a solution for this.

I have also created an issue for this …

But I feel reluctant to make any posts on my system before this is addressed and with the
amount of work our DEVS has, this is not going to be addressed as soon as I am hoping.

The only way I see at this stage , is to go back to V13.27.1, which was the version I had
before updating this past weekend. And as far as I know, I cannot “roll-back” a
bench update ?
So my only option would be to destroy the server and rebuild from scratch. I did make
database backups and data-exports before updating. I have 3 sites on one server.
(multi-tenant, sub-domains)

The other option is to submit a PR , but I do not trust myself to do something like that
at this stage.

Some advise would really be appreciated.

1 Like

No need to destroy and reinstall. It’s just tricky to move backwards. Because it’s not a supported workflow.

You have a few options:

Option 1: Rollback to a prior moment in time

Conceptually, what needs to happen is this:

  1. You need to identify what specific git commit hash you want to use. In your case, something prior to '6acd0325be034ddb28153b0fbd3f1163a10ce8f6' (which is where the Finance Book was modified)

  2. Once you know the desired hash, in your local installation, you can checkout that particular commit.

  3. Finally, you need to resolve any database schema issues. Normally that is accomplished with bench migrate. However, that command only succeeds if you’re moving forward in versions. You’ll have to run a few Python commands manually, to go backwards.

I don’t use most Bench commands, so I’m not familiar with its current capabilities. Before going to a lot of extra work, you may want to contact someone like Gavin, who does a lot of the Bench development. There could be some un-documented commands for doing what I just described.

If that doesn’t work out, let me know, and I can provide more-specific instructions on how to go backwards to an earlier commit.

Option 2: Make your own modifications.

You cannot use the “Customize” button to undo the read-only attribute on the DocField. That’s a forbidden operation.

However, you -could- start ERPNext in developer mode. Open the DocType for Journal Entry. And make your own modifications, like undoing the Read Only.

By doing so, you’re effectively “forking” the App. Going in your own direction, instead of using the official code.

With luck, the ERPNext maintainers agree with you. And change how Finance Book is handled in a future update. In a few weeks+, you could undo just what you’ve done. And update to the newest version, that has the changes you want.

Otherwise, you’re looking at a long-term situation of maintaining code that’s different from the official repositories. (in which case, welcome to the club. :wink: )

anyway, it is possible to change the read only attribute via property setter.

Thank you @brian_pond and @szufisher for taking the time to assist me.

At first glance, the option to modify the doctype seems to be the quickest, but I have a
snapshot of a V13.27.1 server which I can spin up and play around with before I actually
do anything on my production server.

Fortunately I have a week or two to look at this calmly because the RFQs and purchase orders
went out before I updated. So let me take this time and look at these options.

Who knows, maybe I decide to "join the club " :wink: !!!

thank you again gentlemen.

1 Like


I did indeed “play” around on my test-system with the changing of the RO limitation
on the Finance Book field and also the auto loading of the Finance Book setting from the
Company master … before and after update. ( The nice part about this is, that , the fact
that I spin up the server from a snapshot -13.27.1, if I destroy the server again, I effectively reverse the update !!! )

End result …
I can once again do my Journal Entries while using the FInance Book field.

BTW … I did also search for and find the “Property Setter”. It did however put a warning on
screen not to use it ??? I found that strange because why have it then ??? Anyway, the
warning also had a suggestion to use the “Customise Form” option rather.

P.S … While I was at it, I also setup the auto-loading of "Cost Center: in a few forms …
e.g. Purchase Invoice that does not auto-load from the Company master. Once again, I only
have one Cost Center at this stage, but if it should change in the future, then all entries
has a Cost Center. … But now I digress …

Thanks again @brian_pond and @szufisher for taking the time to assist me !

1 Like