Hello all,
A colleague deleted a Child company which has warehouses attached to them on our erpnext production site. I created a new Child company along with its subsequent warehouses. However, I noticed that the old warehouses still exist in the application along with their stocks. I have searched for ways to deleted these warehouses but can’t find them anywhere in the application to do that.
Please can anyone advise me on how to delete these old warehouses so that it doesn’t cause any confusion for the cashiers using the application.
Secondly, when I restrict the cashiers to only generate sales invoice for a child company, they are unable to view the reports for that company even if they try to filter it, they still can’t view the reports. Is there a recommendation to tackling this issue as well?
Thanks snv,
Please I need to clarify some few things. This is a live production site, and I want to know which folder or file in the bench console I will execute this code.
Also about my second question, when I restrict the cashiers to only generate sales invoice for a child company, they are unable to view the reports for that company even if they try to filter it, they still can’t view the reports. Is there a recommendation to tackling this issue as well?
Hello snv,
This is the response I got after executing the code;
AttributeError Traceback (most recent call last)
~/frappe-bench/apps/frappe/frappe/commands/utils.py in
----> 1 for doc in frappe.get.all(‘Warehouse’, {‘company’: ‘AGS,Mararaba’}):
2 frappe.delete_doc(‘Warehouse’, doc.name, force=1)
3 frappe.db.commit()
4
AttributeError: module ‘frappe’ has no attribute ‘get’
I checked the report issue. I am getting it too. There’s a workaround that worked for me: entering the Company’s name manually. But I think a GitHub issue can be created regarding this.