_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'),
'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')],
'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,