User can access address, but unable to see in Address List

My Sales users can’t see Addresses that are linked to leads(even the ones they created), but can access them through direct link, or through the lead.

I’m unable to figure out why this is happening. Can somebody please help?

Ive no permission restrictions enabled either through hooks or through permission manager.

Thanks!

@Tanuj
Is this solved?
Share screen-shot roles and permission for address?
https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/role-based-permissions.html

@kolate_sambhaji
Not Solved.

The permissions are not an issue, because I can see that the user is permitted to access the document under the Permitted Documents For User report.

Users were able to access the address before updating Erpnext to 6.27.22. Upgraded from 6.27.14.

I was going through the file changes in Address, but couldn’t figure out the issue. Any help would be greatly appreciated.

Thanks!

@Tanuj
ok, you can update again and run bench migrate

also if there is any issue in permissions, you can reset it using bench reset-perms

Note, it will remove existing permissions and reset it to default.

Thanks @kolate_sambhaji!

Will try it, and get back on this!

@kolate_sambhaji

Tried bench update and bench migrate, but didnt help.

it is definitely not a permission issue, since users who have created the address for Leads cannot see it themselves, whereas they can see all addresses for Customers.

@Tanuj please share Roles Permission Setting screen-shot.

I have checked in demo.erpnext.com/ and its working fine.

@kolate_sambhaji

Ive attached the permissions screenshot below, but I’m sure this isn’t the problem, since the users cannot see the address in the list of addresses, or while selecting in Opportunity/Quotation, but can access the address with the direct link. Moreover, this is specifically for addresses linked to Leads.

Thanks!

@Tanuj
If you want code to filter address, then you can find code here.
https://github.com/frappe/erpnext/blob/develop/erpnext/utilities/address_and_contact.py#L47

Also, I have different roles setting for address

Hi @kolate_sambhaji,

I did a fresh installation of erpnext on a new site, and the issue didnt seem to be there until i restored from my old database.

I did bench reset-perms again, but the problem still persists.

Any idea what could be causing this?

@Tanuj compare standard roles and permission with your roles and permission for address doctype.

Restored Original Permissions, and set everything manually to default settings. Still no change! :confused:

I am able to access the addresses, but not see them in the list. What controls each individually?

Im assuming if the permissions are restricting the user, they wouldnt be able to access the address either.

Weirdly, today the error was fixed by nothing done by me.