| 123456789101112 |
- from odoo import api, SUPERUSER_ID
- def migrate(cr, version):
- env = api.Environment(cr, SUPERUSER_ID, {})
- # Use SQL to bypass "Properties of base fields cannot be altered" ORM check
- cr.execute("""
- UPDATE ir_model_fields
- SET website_form_blacklisted = false
- WHERE model = 'helpdesk.ticket' AND name = 'attachment_ids'
- """)
- # Also for good measure, check if we need to do it for 'helpdesk.ticket' specifically?
- # The WHERE clause handles it.
|