Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Re: Odoo base_external_dbsource usage examples

by
Sergio Corato
- 14/03/2025 15:51:16
Hi Marcus,
I made a module a long time ago, so it's not so much compliant with current OCA guidelines, but if it can be of inspiration to you it's here: https://github.com/efatto/e-efatto/blob/14.0/connector_whs/models/hyddemo_mssql_log.py
Bye
Sergio Corato


Il giorno ven 14 mar 2025 alle ore 15:17 Ronald Portier <notifications@odoo-community.org> ha scritto:

Hi,


I never used the module, so I do not have an example, but I think you should override the normal read, search, browse, write, create, unlink methods, and perhaps a few others, to read or modify the remote database through the external db source, instead of the local postgres database. Obviously you would also need to set _auto (and likely _log_access) on the model to False.


Kind regards, Ronald


On 14-03-2025 13:27, Marcus Myer wrote:
I was hoping that there would be an example of how to create a model in 
Odoo that pulls data from an external datasource and a view could be 
created directly on the model. . . But maybe that's asking too much. If 
someone has an example like this, please let me know.

Thanks,

Marcus Myer

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe

Reference