[FIX] base: use default value for properties
bzr revid: chs@openerp.com-20100610195053-pv9415n49t1vzjto
This commit is contained in:
parent
c646a365ca
commit
5158948630
|
@ -89,10 +89,11 @@ class ir_property(osv.osv):
|
|||
prop = None
|
||||
type_ = values.get('type')
|
||||
if not type_:
|
||||
if not ids:
|
||||
raise ValueError()
|
||||
prop = self.browse(cr, uid, ids[0])
|
||||
type_ = prop.type
|
||||
if ids:
|
||||
prop = self.browse(cr, uid, ids[0])
|
||||
type_ = prop.type
|
||||
else:
|
||||
type_ = self._defaults['type']
|
||||
|
||||
type2field = {
|
||||
'char': 'value_text',
|
||||
|
|
Loading…
Reference in New Issue