[FIX] product: field parent_id of product.category should be set as ondelete='cascade'

bzr revid: rco@openerp.com-20120106092930-0r3eaa1hvcc0h4ce
This commit is contained in:
Raphael Collet 2012-01-06 10:29:30 +01:00
parent bdbc0686fe
commit a84956a5cc
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ class product_category(osv.osv):
_columns = {
'name': fields.char('Name', size=64, required=True, translate=True, select=True),
'complete_name': fields.function(_name_get_fnc, type="char", string='Name'),
'parent_id': fields.many2one('product.category','Parent Category', select=True),
'parent_id': fields.many2one('product.category','Parent Category', select=True, ondelete='cascade'),
'child_id': fields.one2many('product.category', 'parent_id', string='Child Categories'),
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of product categories."),
'type': fields.selection([('view','View'), ('normal','Normal')], 'Category Type'),