Reputation: 465
Goal:
I am using Odoo 10 as a front end view only system for remote staff.
I want to:
The data-set is about +400K records.
I know
I do not know
I believe I can accomplish this through the bulit-in Scheduled Actions function in Odoo but I am stumped on how to actually use it and write the needed python code. (I know VBA and learning Python now.)
I am also open to suggestions if there i a better way to do.
Upvotes: 0
Views: 1108
Reputation: 2764
It will be better if you directly connect from Odoo to your MSSQL Server in order to query the data to get it inserted into an Odoo model table. To delete all records of an Odoo model table is as simple as use this statement:
self.env['custom.model'].search([]).unlink()
You could put that code among the records import/create statements into a model method that could be executed in an Odoo Cron task to be scheduled and executed. You could find the Odoo Crons Menu in the Settings/Technical/Automation/Scheduled Actions
menu when you activate the Odoo developer mode.
Also there are some modules to allow you to directly connect to external db source like MSSQL Server so you could directly interact with your main DB.
https://github.com/OCA/server-tools/tree/10.0/base_external_dbsource
https://github.com/OCA/server-tools/tree/10.0/base_external_dbsource_mssql
Of course all of this will require a little deep knowledge of Odoo internals to be able to get that running.
Upvotes: 1