Skip to Content

Contributors

Re: Odoo base_external_dbsource usage examples

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


by Sergio Corato - 03:51 - 14 Mar 2025

Reference

  • Odoo base_external_dbsource usage examples

    Hello community,

    I installed the base_external_dbsource Odoo module and am able to connect to an external postgresql database. However, I am not able to find any examples of how the base_external_dbsource module should be used. I would like to create a model and access data from the external database in similar ways as the native Odoo database.

    Any examples of how to use this module would be appreciated. It might also be wise to add some to the readme of this module.

    Thanks,

    Marcus Myer


    by Marcus Myer - 02:31 - 12 Mar 2025