TIP: You can type at any time to perform a new search.
Base Concurrency
base_concurrency · OCA/server-tools
Security findings
Migration considerations
- Imports from the old `openerp.exceptions` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- Imports from the old `openerp.osv` namespace: renamed to `odoo` since Odoo 10.0. migration-openerp-import · source
- For a target of Odoo 10.0+: use the `__manifest__.py` manifest name instead of `__openerp__.py`. The filename alone does not establish module age or compatibility. migration-openerp-manifest · source
ResUsers— Class 'ResUsers' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourceResUsers— Class 'ResUsers' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · sourceResUsersLogin— Class 'ResUsersLogin' still inherits from the old-style `orm.Model` API: rewrite it against `models.Model`/`models.TransientModel`/`models.AbstractModel` - the old `osv`/`orm` API was removed entirely in modern Odoo. migration-old-api-base · sourceResUsersLogin— Class 'ResUsersLogin' declares `_columns` as a plain dict: old-style field/default declarations, replace with `fields.X(...)` class attributes and `default=`. migration-old-style-fields · source- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE res_users SET login_date = (SELECT login_dt FROM res_users_login WHERE res_users_login.user_id = res_users.id)` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `SELECT login_dt FROM res_users_login WHERE user_id=%s FOR UPDATE NOWAIT` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE res_users_login SET login_dt = now() AT TIME ZONE 'UTC' WHERE user_id=%s` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `INSERT INTO res_users_login (user_id, login_dt) VALUES (%s, now())` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. No target version is selected: apply version-specific advice only when migrating to that version or later.
- Repository
- OCA/server-tools · module folder · Try on Runboat
- Module version
- 1.1.0
- Category
- Specific Module
- Folder size
- 0.15 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- http://camptocamp.com
- Last tracking update
- 2026-08-07 07:03:09
- Authors
- Camptocamp, Odoo Community Association (OCA)
- Maintainers
- Camptocamp, Odoo Community Association (OCA)
- Committers
- Stéphane Bidoul, Holger Brunn, Pedro M. Baeza, GitHub, Stéphane Bidoul (ACSONE), Weblate, OCA Transbot, Charbel Jacquin, OCA-git-bot, oca-travis
- Odoo dependencies
-
odoo/odoo:- base
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
Module to regroup all workarounds/fixes to avoid concurrency issues in SQL. * res.users login_date: the login date is now separated from res.users; on long transactions, "re-logging" by opening a new tab changes the current res.user row, which creates concurrency issues with PostgreSQL in the first transaction. This creates a new table and a function field to avoid this. In order to avoid breaking modules which access via SQL the login_date column, a cron (inactive by default) can be used to sync data.
Code Analysis
Views touched (0)
No views found for this module.
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (2)
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (1)-
cron_sync_login_date(self, cr, uid, context=None)
Loading…