Erpnext: User default company in reports falls back to global default

Created on 12 Dec 2017  路  5Comments  路  Source: frappe/erpnext

In multi company setup some reports are not picking user based permission. For Example the accounts payable report is only showing payable list of global default company and not showing the transaction list of the company which is assigned to that particular user. Furthermore the user is not able to choose the assigned company from the filter due to restricted permissions i guess.

Secondly, stock summary report is showing the list of all the available stock throughout all companies and all warehouses, even though the user is restricted to see the warehouses of company A only. The warehouse filter on stock summary report correctly show only the list of allowed warehouses of company A but the report underneath is displaying full list of stock balances available in all warehouses of 6 companies.

I am on latest version 9.2.21. Exactly same bug was reported in #4339 which is already closed

bug

Most helpful comment

Almost all the reports which has company name filter on the top they only fetch records of global default company and the user is not able to change to his desired company. For example accounts receivable, payable, stock ledger, trail balance, Profit and Loss, Balance Sheet etc.

Other reports which do not have company name filter on top of the report they are bringing correct results. For example stock balance report is correct

All 5 comments

Yes we faced the same issue and trying to fix it by editing that report...if anybody fixed this please update.

Thanks

Almost all the reports which has company name filter on the top they only fetch records of global default company and the user is not able to change to his desired company. For example accounts receivable, payable, stock ledger, trail balance, Profit and Loss, Balance Sheet etc.

Other reports which do not have company name filter on top of the report they are bringing correct results. For example stock balance report is correct

this can be fixed, if we can add default_company field in users table. it'll help to get data quickly and we can avoid many costly queries.

If you want to fix manually, you can use the solution here.

https://github.com/frappe/erpnext/pull/11689

Unfortunately, PR was rejected as solution was too specific. This is a HUGE problem!

Hi

Is there a fix for this issue now? I seem to still be experiencing same on V10.1.51

Kind regards,

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cradford picture cradford  路  4Comments

giuseppelamatrice picture giuseppelamatrice  路  3Comments

deantheiceman picture deantheiceman  路  4Comments

rmehta picture rmehta  路  3Comments

raymondliew1992 picture raymondliew1992  路  4Comments