ondelete='cascade' constraint not generated in postgres

Bug #604347 reported by Ferdinand
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Triaged
Wishlist
OpenERP's Framework R&D

Bug Description

class dimu_settlement_portal_all(osv.osv):
    _inherit = "dimu.settlement_portal_all"

....
{ 'csv_file_id' : fields.many2one
             ('holophon.csv_files','CSV file', select=True, required=True, readonly=True, ondelete='cascade'),

the constraint is not generated in postgres.

we had some problems, because the filed was NULL initially, but even after fixing it the constraint is not generated during update of the module.

Revision history for this message
Anup(SerpentCS) (anup-serpent) wrote :

Hello Dr Ferdinand, Experts,

   We need to discuss more on this. Would you please share your views?

Thanks.

Changed in openobject-server:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

I guess readonly=True and ondelete='cascade' create a conflict.

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
Revision history for this message
Patrick Amstutz (patrick-amstutz) wrote :

Same problem here :

'sale_order_id': fields.many2one('sale.order', 'Sale Order', on_delete='cascade', readonly=True),

constraints are not generated. This is a serious problem and should not be listed as 'wishlist'.

Revision history for this message
Juan Márquez (jmarquez) wrote :

I have the same problem, and a new one: some primary key are not generated

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.