I have an Odoo infrastructure scenario, that am asking for any suggestions or experience from the Community on how this might be solved or best implemented.
I am looking at how to best set up multiple instances of Odoo, all of which will roll up or replicate into a single master global instance of Odoo.
There would be one or more instances, which would be set up as multi-company instances, serving one or more branches or offices in a particular zone. Call them continental or area instances.
So for example, there could be a US instance and a UK instance. Those would each have an Odoo database with multiple companies.
Each of those continental or area instances would need to replicate up to a global instance, where all data would be visible to headquarters. And this instance would also be where master data is maintained such as products, price lists, etc.
The challenge is that I have multiple source databases/instances, and a single target because all of the branches or offices/instances will roll up to the headquarters instance.
The biggest challenge seems to be how to handle the primary keys from multiple odoo databases, replicating into a single database at the target.
It is possible that the postgresql sequence objects for each of the area instances could be updated to set a different starting number range for all primary keys for that instance. Then all primary keys would remain unique in the target database.
But that seems a little frail, and would limit the number of records possible for each instance.
One option would be to just have all branches or offices log on to a single instance (suitably load balanced and set up etc.) but it is possible that some geographical areas will not have suitable connectivity to maintain reliable connections.
Additionally, even if all users could log onto a central instances, would it be better for purposes of maintenance and updates to have multiple instances, so that maintenance could be performed during off hours for the different geographic ones? If all were on a single instance, it would be more difficult to do updates and maintenance, if that instance is in use from time zones all over the world.
So that's why I'm considering to have area instances.
Any suggestions would be appreciated.
Thanks in advance.