sql_constraints should not be created for AbstractModel
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Confirmed
|
Medium
|
OpenERP's Framework R&D | |||
OpenERP Community Backports (Server) | Status tracked in 7.0 | |||||
7.0 |
Fix Released
|
Undecided
|
Guewen Baconnier @ Camptocamp |
Bug Description
Hi,
The ORM tries to create the SQL contraints on the AbstractModel models.
For an AbstractModel with _sql_contraints:
class magento_
_name = 'magento.binding'
_columns = {
}
'A record with same ID on Magento already exists.'),
]
Error during upgrade of the module:
2013-03-07 08:42:30,796 24916 ERROR openerp_magento7 openerp.sql_db: Programming error: relation "magento_binding" does not exist, in query ALTER TABLE "magento_binding" ADD CONSTRAINT "magento_
Of course, it can't create the constraint because the table does not exist.
Related branches
- Alexandre Fayolle - camptocamp (community): Approve (code review, no test)
- OpenERP Core Team: Pending requested
-
Diff: 13 lines (+2/-1)1 file modifiedopenerp/osv/orm.py (+2/-1)
- OpenERP Core Team: Pending requested
-
Diff: 13 lines (+2/-1)1 file modifiedopenerp/osv/orm.py (+2/-1)
- Raphaël Valyi - http://www.akretion.com: Approve
- Stefan Rijnhart (Opener): Approve
-
Diff: 13 lines (+2/-1)1 file modifiedopenerp/osv/orm.py (+2/-1)
Changed in openobject-server: | |
assignee: | nobody → OpenERP's Framework R&D (openerp-dev-framework) |
importance: | Undecided → Medium |
status: | New → Confirmed |