Proposed changes for NB_OWI_Odoo and NB_OWI_Odoo_Tables
NB_OWI_Odoo_Tables
- Remove the group 1 tables from group 2 so no table is processed twice.
- Fix the field lists: add the missing comma in account.move.line, add id to res.partner.bank and account.payment.term.line, and remove the duplicated state field in mrp.production.
- Update field names to the client's Odoo version and add res_model to mail.activity.
- Remove the image fields from the field lists.
- Set a load mode per table: full for small tables, incremental for large ones.
- Loop over the table list directly and pass each table's fields to the load function.
- Process 3 tables in parallel.
- Fail the notebook at the end if any table failed.
NB_OWI_Odoo
- Add a timeout and retries to the Odoo connection, and check that the login worked.
- Replace the many field lookups per table with a single one.
- Download each table in one pass instead of two.
- Collect pages in a list and write them in chunks.
- Keep numeric zeros as 0 instead of blank.
- Save date-times as TIMESTAMP and decimals as DOUBLE.
- Load the field types that are currently dropped (json, html, properties, reference).
- Write to a staging table first, then replace the final table in one step.
- Load only records changed since the last run for large tables and merge them by id.
- Detect and remove deleted records, with a safety limit.
- Save the last load date per table, and allow a full reload weekly or on demand.
- Handle tables with no records without crashing.
- Write a per-table run log with rows, duration, status and error.
- Remove unused functions and imports.