diff --git a/openerp/osv/orm.py b/openerp/osv/orm.py index 2f850e23607..563c514726c 100644 --- a/openerp/osv/orm.py +++ b/openerp/osv/orm.py @@ -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: