On my bench folder I can see the 2 sites and just the 2 apps (frappe and erpnext), so I think that the erpnext app is the same for the 2 sites (right ?)
On cp1.mysite.com with the Admin I have created a Custom DocType.
If I have understood correctly, in multi-tenant the configuration between sites is shared, so I expect do access to all my custom DocTypes in all sites, but it’s not working.
All customizations (custom doctypes, custom fields …) belongs to site (stored in database), not to the app.
Multitenancy configuration is irrelevant here.
Ok, so if I want to build custom DocTypes and provide a multi company/tenant environment (the need is to avoid user from company1 to access any data of company2), what is the best architecture?
I think you need to put it on github and then install and update in each site seperately
The objective behind sites is isolation - even at the db level
What is shared is the bench/python/node versions
If you want your custom DocTypes available on multiple sites, the recommended way is to put them in a custom app and install that app on each site. That way, the DocTypes are shared, but the data stays isolated per tenant.