fixes #595
In the case where a property for the company exists but has no related record (e.g. in case of type m2o with no defined value), not setting a value to this field for a new record would create a new property (as browse_null is not an instance of browse_record)
default_val = self._get_default(obj, cr, uid, prop_name, context)
property_create = False
- if isinstance(default_val, openerp.osv.orm.browse_record):
+ if isinstance(default_val, (openerp.osv.orm.browse_record,
+ openerp.osv.orm.browse_null)):
if default_val.id != id_val:
property_create = True
elif default_val != id_val: