I have 2 custom apps : CustomA & CustomB on same bench.
Both are overriding doctype class, Sales Invoice, via hooks override_doctype_class
CustomA app installed in SiteA.
CustomB app installed in SiteB.
When logged-in to SiteB and create sales invoice, it display correct msgprint “CustomB Before Insert”.
Then on different browser’s tab, I logged-in into SiteA and create Sales Invoice. But it still showing msg “CustomB Before Insert”.
Am I doing it correctly ?
CustomA apps:
Class SalesInvoiceCustomA(SalesInvoice):
def before_insert(self):
frappe.msgprint("CustomA Before Insert")
CustomB apps:
Class SalesInvoiceCustomB(SalesInvoice):
def before_insert(self):
frappe.msgprint("CustomB Before Insert")
Pretty sure each custom apps only installed in respective site.
After bench restart, if I create Sales Invoice on SiteA first, SiteB will use CustomA app logic.
Same if I create in SiteB first (after restart), SiteA will use CustomA app logic
So do you think it’s not possible to have multi apps & multi Sites on same bench ?
It’s just not the overriding class via hooks. Monkey patching also same result
CMIIW, apps.txt is the list of all apps in frappe-bench.
Site specific apps are defined in tabDefaultValue(‘installed_apps’).
The get_hooks get the list of apps from site specific apps
Just out of curiosity, since in v14, some modules are segregated into custom apps, e.g. HRMS.
Does this issue still exists ?
For example I have 2 sites on same bench.
Site01 : erpnext only
Site02 : with erpnext + hrms