[FIX] base: delete cascade value mapping on server action deletion

When deleting a server action, its fields_lines were not deleted.
It causes an issue for example in this case:

Create a new custom field on any model
Create a server action with
Action To Do: Write on a Record
Base model: model of the custom field
Add a line in the value mapping,
using the custom field you just created

Delete the server action

Delete the custom field => Throws an error because
required field col1 is not defined
on the ir_server_object_lines object
This commit is contained in:
Thomas Groutars 2015-03-12 18:29:00 +01:00 committed by Denis Ledoux
parent 4491c20bf0
commit 7e0ff24cca
1 changed files with 1 additions and 1 deletions

View File

@ -1035,7 +1035,7 @@ class ir_server_object_lines(osv.osv):
_sequence = 'ir_actions_id_seq'
_columns = {
'server_id': fields.many2one('ir.actions.server', 'Related Server Action'),
'server_id': fields.many2one('ir.actions.server', 'Related Server Action', ondelete='cascade'),
'col1': fields.many2one('ir.model.fields', 'Field', required=True),
'value': fields.text('Value', required=True, help="Expression containing a value specification. \n"
"When Formula type is selected, this field may be a Python expression "