Amit Dodiya (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-580434-ado into 
lp:openobject-addons/6.1.

Requested reviews:
  Xavier ALT (OpenERP) (xal-openerp)
  Naresh(OpenERP) (nch-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-580434-ado/+merge/130740

Hello,

[IMP] Add warning message in function of constain for displaying human readable 
message

Added the warning message into function to understand the actual warning and 
user can easily get the idea of configuration.

Regards,
Amit
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-580434-ado/+merge/130740
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-580434-ado.
=== modified file 'hr_timesheet_sheet/hr_timesheet_sheet.py'
--- hr_timesheet_sheet/hr_timesheet_sheet.py	2012-08-31 10:45:03 +0000
+++ hr_timesheet_sheet/hr_timesheet_sheet.py	2012-10-22 07:17:22 +0000
@@ -532,7 +532,8 @@
             context = {}
         for timesheet_line in self.browse(cr, uid, ids, context=context):
             if timesheet_line.sheet_id and timesheet_line.sheet_id.state not in ('draft', 'new'):
-                return False
+                raise osv.except_osv(_('Error !'), _('Timehseet for this entry is in Approved/Done state !' + '\n' +   
+                                                        'You can not modify an entry in a Approved/Done Timesheet !'))
         return True
 
     _constraints = [

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to