[FIX] product: pricelist: ondelete cascade to avoid errors when deleting pricelists and versions ('null value in column "price_version_id" violates not-null constraint')
bzr revid: olt@tinyerp.com-20100204071240-gvxzu0hu1utz7jgy
This commit is contained in:
parent
3ff98ce1d9
commit
b67c517497
|
@ -261,7 +261,7 @@ class product_pricelist_version(osv.osv):
|
|||
_description = "Pricelist Version"
|
||||
_columns = {
|
||||
'pricelist_id': fields.many2one('product.pricelist', 'Price List',
|
||||
required=True, select=True),
|
||||
required=True, select=True, ondelete='cascade'),
|
||||
'name': fields.char('Name', size=64, required=True, translate=True),
|
||||
'active': fields.boolean('Active',
|
||||
help="When a version is duplicated it is set to non active, so that the " \
|
||||
|
@ -344,7 +344,7 @@ class product_pricelist_item(osv.osv):
|
|||
|
||||
_columns = {
|
||||
'name': fields.char('Rule Name', size=64, help="Explicit rule name for this pricelist line."),
|
||||
'price_version_id': fields.many2one('product.pricelist.version', 'Price List Version', required=True, select=True),
|
||||
'price_version_id': fields.many2one('product.pricelist.version', 'Price List Version', required=True, select=True, ondelete='cascade'),
|
||||
'product_tmpl_id': fields.many2one('product.template', 'Product Template', ondelete='cascade', help="Set a template if this rule only apply to a template of product. Keep empty for all products"),
|
||||
'product_id': fields.many2one('product.product', 'Product', ondelete='cascade', help="Set a product if this rule only apply to one product. Keep empty for all products"),
|
||||
'categ_id': fields.many2one('product.category', 'Product Category', ondelete='cascade', help="Set a category of product if this rule only apply to products of a category and his childs. Keep empty for all products"),
|
||||
|
|
Loading…
Reference in New Issue