The module type setting in the manifest does work:
'module_type': 'official'
But it is somehow not 100%, every now and then the problem seems to "come back"; which is weird... looking at the source code, it should really just work like this.
Anyway, it was just a choice from Odoo to add this - this seems to be the "settings" to differentiate industry modules, but for some crazy reason, they decided to make it default to fetch module info from the remote site (eg. industry module) instead of the other way around - and used a very strange term for it too... "official" makes it sound like it came from Odoo.
Basically the activate/upgrade button on modules is replaced with the remote install button when the module type is not "official":
https://github.com/odoo/odoo/commit/234590f3db5b9e8518bf476e34591f5ab504328b
https://github.com/odoo/odoo/pull/140245
I got the same error, it's said
Invalid Operation
The module <module_name> cannot be downloaded
Adding adding 'module_type': 'official' to the manifest didn't help in my case. Where did you find that information?
I just realized that the kanban view have 2 different "Activate" button(hence calling different function) for official and 'non-official' module.
The error happen when the button call 'button_immediate_install_app", and it tries to download the module from somewhere. The desired function is "button_immediate_install", so the other way to solve it is by changing the kanban view on app list, to make it call the correct function.
thank you Lizard Touch,
for me, kanban view on app list is giving error. I changed to list view , then activate the module, it works..!