[FIX]: orm: reverted a change in a previous commit (where a try/except was removed).
bzr revid: vmt@openerp.com-20120810120936-13lewpbjn7euveg0
This commit is contained in:
parent
e70f7eaab5
commit
d1d6203f4f
|
@ -4191,7 +4191,11 @@ class BaseModel(object):
|
|||
|
||||
# Try-except added to filter the creation of those records whose filds are readonly.
|
||||
# Example : any dashboard which has all the fields readonly.(due to Views(database views))
|
||||
cr.execute("SELECT nextval('"+self._sequence+"')")
|
||||
try:
|
||||
cr.execute("SELECT nextval('"+self._sequence+"')")
|
||||
except:
|
||||
raise except_orm(_('UserError'),
|
||||
_('You cannot perform this operation. New Record Creation is not allowed for this object as this object is for reporting purpose.'))
|
||||
|
||||
id_new = cr.fetchone()[0]
|
||||
for table in tocreate:
|
||||
|
|
Loading…
Reference in New Issue