imporve
authorFabien Pinckaers <fp@tinyerp.com>
Tue, 25 Nov 2008 06:45:57 +0000 (07:45 +0100)
committerFabien Pinckaers <fp@tinyerp.com>
Tue, 25 Nov 2008 06:45:57 +0000 (07:45 +0100)
bzr revid: fp@tinyerp.com-20081125064557-iwd1p3bzz3koxfab

addons/base_contact/base_contact.py
addons/stock/stock.py

index 022b689..9fa43c4 100644 (file)
@@ -116,8 +116,8 @@ class res_partner_job(osv.osv):
     _order = 'sequence_contact'
     _columns = {
         'name': fields.related('address_id','partner_id', type='many2one', relation='res.partner', string='Partner'),
-        'address_id':fields.many2one('res.partner.address','Address', required=True),
-        'contact_id':fields.many2one('res.partner.contact','Contact', required=True),
+        'address_id':fields.many2one('res.partner.address','Address'),
+        'contact_id':fields.many2one('res.partner.contact','Contact', required=True, ondelete='cascade'),
         'function_id': fields.many2one('res.partner.function','Job Title'),
         'sequence_contact':fields.integer('Sequence (Contact)',help='order of importance of this address in the list of addresses of the linked contact'),
         'sequence_partner':fields.integer('Sequence (Partner)',help='order of importance of this job title in the list of job title of the linked partner'),
index 63ecd5a..9d71666 100644 (file)
@@ -101,7 +101,7 @@ class stock_location(osv.osv):
         'child_ids': fields.one2many('stock.location', 'location_id', 'Contains'),
 
         'chained_location_id': fields.many2one('stock.location', 'Chained Location If Fixed'),
-        'chained_location_type': fields.selection([('','None'),('customer', 'Customer'),('fixed','Fixed Location')],
+        'chained_location_type': fields.selection([('none','None'),('customer', 'Customer'),('fixed','Fixed Location')],
             'Chained Location Type', required=True),
         'chained_auto_packing': fields.selection(
             [('auto','Automatic Move'), ('manual','Manual Operation'),('transparent','Automatic No Step Added')],
@@ -128,7 +128,7 @@ class stock_location(osv.osv):
         'active': lambda *a: 1,
         'usage': lambda *a: 'internal',
         'allocation_method': lambda *a: 'fifo',
-        'chained_location_type': lambda *a: '',
+        'chained_location_type': lambda *a: 'none',
         'chained_auto_packing': lambda *a: 'manual',
         'posx': lambda *a: 0,
         'posy': lambda *a: 0,