In an earlier post I explained an issue I was having in ERPNext Cloud.
To sum up the relevant parts for this post, suppose I have created Company0 and Company1. Whenever a new Sales Order was created (or any other document that had the Company field), the chosen company was not the same as that of the Global Defaults. The company listed as the default was Company1.
@rmehta pointed out in my earlier post that “it must be a configuration issue” and so I kept looking around for a solution.
I then noticed that for my user, which was the one created using the setup wizard, there was a user permission which had Company for Allow and Company0 in For Value. I deleted this permission and after that the problem pointed out above was resolved.
I thought there was something odd, however, because when my user had that user permission, I was still able to created records for Company1, and it is my understanding that my user should have only been allowed to view/create records for Company0 and not Company1.
I attempted to recreate this problem to try to identify what was going on and so I again set a user permission for my user to allow Company0. Things went back to how they were before and I was still able to view/create records for both companies.
I then deleted this user permission and set a new user permission to allow my user for Company1 only. With this permission, I was only able to view/create records for Company1 and not for Company0. I then deleted this user permission (so at this point my user has nothing listed under user permissions) and then I noticed that I was not able to access anything regarding Company0 nor Company1.
I tried to solve this by creating a new user permission where I hoped to set the value for one of the companies but (not surprisingly) no company shows up when I tried to assign it to my user.
I’m not sure if this is relevant but Company0 is the one that I created using the setup wizard and Company1 was created by creating a new company by a system user.