[IMP] Improved warning messages for base* modules

bzr revid: pso@tinyerp.com-20120725115511-zqdo0jgknla6n6f8
This commit is contained in:
Saurang Suthar(OpenERP) 2012-07-25 17:25:11 +05:30 committed by pso (OpenERP)
parent c59e7ab9d0
commit 3e34fcc23e
20 changed files with 41 additions and 41 deletions

View File

@ -327,7 +327,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
reply_to = emailfrom reply_to = emailfrom
if not emailfrom: if not emailfrom:
raise osv.except_osv(_('Error!'), raise osv.except_osv(_('Error!'),
_("No Email ID Found for your Company address!")) _("No Email ID is found for your Company address!"))
return mail_message.schedule_with_attach(cr, uid, emailfrom, emails, name, body, model='base.action.rule', reply_to=reply_to, res_id=obj.id) return mail_message.schedule_with_attach(cr, uid, emailfrom, emails, name, body, model='base.action.rule', reply_to=reply_to, res_id=obj.id)
@ -490,7 +490,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
return True return True
_constraints = [ _constraints = [
(_check_mail, 'Error: The mail is not well formated.', ['act_mail_body']), (_check_mail, 'Error ! The mail is not well formated.', ['act_mail_body']),
] ]
base_action_rule() base_action_rule()

View File

@ -286,7 +286,7 @@ msgstr ""
#. module: base_action_rule #. module: base_action_rule
#: code:addons/base_action_rule/base_action_rule.py:329 #: code:addons/base_action_rule/base_action_rule.py:329
#, python-format #, python-format
msgid "No Email ID Found for your Company address!" msgid "No Email ID is found for your Company address!"
msgstr "" msgstr ""
#. module: base_action_rule #. module: base_action_rule
@ -332,7 +332,7 @@ msgstr ""
#. module: base_action_rule #. module: base_action_rule
#: constraint:base.action.rule:0 #: constraint:base.action.rule:0
msgid "Error: The mail is not well formated." msgid "Error ! The mail is not well formated."
msgstr "" msgstr ""
#. module: base_action_rule #. module: base_action_rule

View File

@ -1408,7 +1408,7 @@ rule or repeating pattern of time to exclude from the recurring rule."),
context = {} context = {}
if 'date' in groupby: if 'date' in groupby:
raise osv.except_osv(_('Warning !'), _('Group by date not supported, use the calendar view instead.')) raise osv.except_osv(_('Warning !'), _('Group by date is not supported, use the calendar view instead.'))
virtual_id = context.get('virtual_id', True) virtual_id = context.get('virtual_id', True)
context.update({'virtual_id': False}) context.update({'virtual_id': False})
res = super(calendar_event, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby) res = super(calendar_event, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby)

View File

@ -407,7 +407,7 @@ msgstr ""
#. module: base_calendar #. module: base_calendar
#: code:addons/base_calendar/base_calendar.py:1411 #: code:addons/base_calendar/base_calendar.py:1411
#, python-format #, python-format
msgid "Group by date not supported, use the calendar view instead." msgid "Group by date is not supported, use the calendar view instead."
msgstr "" msgstr ""
#. module: base_calendar #. module: base_calendar

View File

@ -94,7 +94,7 @@ send an Email to Invited Person')
if type == 'internal': if type == 'internal':
if not datas.get('user_ids'): if not datas.get('user_ids'):
raise osv.except_osv(_('Error!'), ("Please select any User.")) raise osv.except_osv(_('Error!'), ("Please select any user."))
for user_id in datas.get('user_ids'): for user_id in datas.get('user_ids'):
user = user_obj.browse(cr, uid, user_id) user = user_obj.browse(cr, uid, user_id)
res = { res = {

View File

@ -139,7 +139,7 @@ class users(osv.osv):
def set_pw(self, cr, uid, id, name, value, args, context): def set_pw(self, cr, uid, id, name, value, args, context):
if not value: if not value:
raise osv.except_osv(_('Error'), _("Please specify the password !")) raise osv.except_osv(_('Error!'), _("Please specify the password !"))
obj = pooler.get_pool(cr.dbname).get('res.users') obj = pooler.get_pool(cr.dbname).get('res.users')
if not hasattr(obj, "_salt_cache"): if not hasattr(obj, "_salt_cache"):
@ -182,7 +182,7 @@ class users(osv.osv):
return self._login(cr, db, login, password) return self._login(cr, db, login, password)
except Exception: except Exception:
_logger.exception('Cannot authenticate!') _logger.exception('Cannot authenticate!')
return Exception('Access Denied') return Exception('Access is denied!')
finally: finally:
if cr is not None: if cr is not None:
cr.close() cr.close()

View File

@ -39,6 +39,6 @@ msgstr ""
#. module: base_crypt #. module: base_crypt
#: code:addons/base_crypt/crypt.py:140 #: code:addons/base_crypt/crypt.py:140
#, python-format #, python-format
msgid "Error" msgid "Error!"
msgstr "" msgstr ""

View File

@ -341,7 +341,7 @@ if __name__ == "__main__":
parser.add_option("-o", "--output", dest="output", default='.', help="directory of image output") parser.add_option("-o", "--output", dest="output", default='.', help="directory of image output")
(opt, args) = parser.parse_args() (opt, args) = parser.parse_args()
if len(args) != 1: if len(args) != 1:
parser.error("incorrect number of arguments") parser.error("Incorrect number of arguments!")
import sys import sys

View File

@ -145,7 +145,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
self.aSearchResult =self.sock.execute( database, uid, self.password, self.dModel[modelSelectedItem], 'name_search', self.win.getEditText("txtSearchName")) self.aSearchResult =self.sock.execute( database, uid, self.password, self.dModel[modelSelectedItem], 'name_search', self.win.getEditText("txtSearchName"))
self.win.removeListBoxItems("lstResource", 0, self.win.getListBoxItemCount("lstResource")) self.win.removeListBoxItems("lstResource", 0, self.win.getListBoxItemCount("lstResource"))
if self.aSearchResult == []: if self.aSearchResult == []:
ErrorDialog("No search result found !!!", "", "Search ERROR" ) ErrorDialog("No search result is found !", "", "Search ERROR" )
return return
for result in self.aSearchResult: for result in self.aSearchResult:
@ -172,7 +172,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
docinfo = oDoc2.getDocumentInfo() docinfo = oDoc2.getDocumentInfo()
if oDoc2.getURL() == "": if oDoc2.getURL() == "":
ErrorDialog("Please save your file", "", "Saving ERROR" ) ErrorDialog("Please save your file.", "", "Saving ERROR!" )
return None return None
url = oDoc2.getURL() url = oDoc2.getURL()
@ -180,7 +180,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
url = self.doc2pdf(url[7:]) url = self.doc2pdf(url[7:])
if url == None: if url == None:
ErrorDialog( "Ploblem in creating PDF", "", "PDF Error" ) ErrorDialog( "Problem in creating PDF!", "", "PDF Error!" )
return None return None
url = url[7:] url = url[7:]
@ -193,7 +193,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
docinfo = oDoc2.getDocumentInfo() docinfo = oDoc2.getDocumentInfo()
if self.win.getListBoxSelectedItem("lstResourceType") == "": if self.win.getListBoxSelectedItem("lstResourceType") == "":
ErrorDialog("Please select resource type", "", "Selection ERROR" ) ErrorDialog("Please select resource type.", "", "Selection ERROR!" )
return return
res = self.send_attachment( docinfo.getUserFieldValue(3), docinfo.getUserFieldValue(2) ) res = self.send_attachment( docinfo.getUserFieldValue(3), docinfo.getUserFieldValue(2) )
@ -201,11 +201,11 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
def btnOkWithInformation_clicked(self,oActionEvent): def btnOkWithInformation_clicked(self,oActionEvent):
if self.win.getListBoxSelectedItem("lstResourceType") == "": if self.win.getListBoxSelectedItem("lstResourceType") == "":
ErrorDialog( "Please select resource type", "", "Selection ERROR" ) ErrorDialog( "Please select resource type.", "", "Selection ERROR!" )
return return
if self.win.getListBoxSelectedItem("lstResource") == "" or self.win.getListBoxSelectedItem("lstmodel") == "": if self.win.getListBoxSelectedItem("lstResource") == "" or self.win.getListBoxSelectedItem("lstmodel") == "":
ErrorDialog("Please select Model and Resource","","Selection ERROR") ErrorDialog("Please select Model and Resource.","","Selection ERROR!")
return return
resourceid = None resourceid = None
@ -215,7 +215,7 @@ class AddAttachment(unohelper.Base, XJobExecutor ):
break break
if resourceid == None: if resourceid == None:
ErrorDialog("No resource selected !!!", "", "Resource ERROR" ) ErrorDialog("No resource is selected !", "", "Resource ERROR!" )
return return
res = self.send_attachment( self.dModel[self.win.getListBoxSelectedItem('lstmodel')], resourceid ) res = self.send_attachment( self.dModel[self.win.getListBoxSelectedItem('lstmodel')], resourceid )

View File

@ -125,7 +125,7 @@ class Change( unohelper.Base, XJobExecutor ):
import traceback,sys import traceback,sys
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)) info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
self.logobj.log_write('ServerParameter', LOG_ERROR, info) self.logobj.log_write('ServerParameter', LOG_ERROR, info)
ErrorDialog("Connection to server fail. please check your Server Parameter", "", "Error") ErrorDialog("Connection to server is fail. Please check your Server Parameter.", "", "Error!")
self.win.endExecute() self.win.endExecute()
def btnCancel_clicked(self,oActionEvent): def btnCancel_clicked(self,oActionEvent):

View File

@ -106,7 +106,7 @@ class ExportToRML( unohelper.Base, XJobExecutor ):
import traceback,sys import traceback,sys
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)) info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
self.logobj.log_write('ExportToRML',LOG_ERROR, info) self.logobj.log_write('ExportToRML',LOG_ERROR, info)
ErrorDialog("Can't save the file to the hard drive.", "Exception: %s" % e, "Error" ) ErrorDialog("Cannot save the file to the hard drive.", "Exception: %s !" % e, "Error" )
def GetAFileName(self): def GetAFileName(self):
sFilePickerArgs = Array(10) sFilePickerArgs = Array(10)

View File

@ -103,7 +103,7 @@ class Expression(unohelper.Base, XJobExecutor ):
tableText.insertTextContent(cursor,oInputList,False) tableText.insertTextContent(cursor,oInputList,False)
self.win.endExecute() self.win.endExecute()
else: else:
ErrorDialog("Please Fill appropriate data in Name field or \nExpression field") ErrorDialog("Please fill appropriate data in Name field or in Expression field.")
def btnCancel_clicked( self, oActionEvent ): def btnCancel_clicked( self, oActionEvent ):
self.win.endExecute() self.win.endExecute()

View File

@ -279,7 +279,7 @@ class Fields(unohelper.Base, XJobExecutor ):
widget.insertTextContent(cursor,oInputList,False) widget.insertTextContent(cursor,oInputList,False)
self.win.endExecute() self.win.endExecute()
else: else:
ErrorDialog("Please Fill appropriate data in Name field \nor select perticular value from the list of fields") ErrorDialog("Please fill appropriate data in Name field \nor select particular value from the list of fields.")
def btnCancel_clicked( self, oActionEvent ): def btnCancel_clicked( self, oActionEvent ):
self.win.endExecute() self.win.endExecute()

View File

@ -93,7 +93,7 @@ class ModifyExistingReport(unohelper.Base, XJobExecutor):
ids = self.sock.execute(database, uid, self.password, 'ir.module.module', 'search', [('name','=','base_report_designer'),('state', '=', 'installed')]) ids = self.sock.execute(database, uid, self.password, 'ir.module.module', 'search', [('name','=','base_report_designer'),('state', '=', 'installed')])
if not len(ids): if not len(ids):
ErrorDialog("Please Install base_report_designer module", "", "Module Uninstalled Error") ErrorDialog("Please install base_report_designer module.", "", "Module Uninstalled Error !")
exit(1) exit(1)
ids = self.sock.execute(database, uid, self.password, 'ir.actions.report.xml', 'search', [('report_xsl', '=', False),('report_xml', '=', False)]) ids = self.sock.execute(database, uid, self.password, 'ir.actions.report.xml', 'search', [('report_xsl', '=', False),('report_xml', '=', False)])
@ -167,11 +167,11 @@ class ModifyExistingReport(unohelper.Base, XJobExecutor):
if oDoc2.hasLocation() and not oDoc2.isReadonly(): if oDoc2.hasLocation() and not oDoc2.isReadonly():
oDoc2.store() oDoc2.store()
ErrorDialog("Download is Completed","Your file has been placed here :\n"+ fp_name,"Download Message") ErrorDialog("Download is Completed.","Your file has been placed here :\n ."+ fp_name,"Download Message !")
obj=Logger() obj=Logger()
obj.log_write('Modify Existing Report',LOG_INFO, ':successful download report %s using database %s' % (self.report_with_id[selectedItemPos][2], database)) obj.log_write('Modify Existing Report',LOG_INFO, ':successful download report %s using database %s' % (self.report_with_id[selectedItemPos][2], database))
except Exception, e: except Exception, e:
ErrorDialog("Report has not been downloaded", "Report: %s\nDetails: %s" % ( fp_name, str(e) ),"Download Message") ErrorDialog("Report has not been downloaded.", "Report: %s\nDetails: %s" % ( fp_name, str(e) ),"Download Message !")
import traceback,sys import traceback,sys
info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)) info = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
self.logobj.log_write('ModifyExistingReport', LOG_ERROR, info) self.logobj.log_write('ModifyExistingReport', LOG_ERROR, info)
@ -197,11 +197,11 @@ class ModifyExistingReport(unohelper.Base, XJobExecutor):
else : else :
pass pass
if temp: if temp:
ErrorDialog("Report","Report has been Delete:\n "+name,"Message") ErrorDialog("Report","Report has been Delete:\n ."+name,"Message !")
self.logobj.log_write('Delete Report',LOG_INFO, ':successful delete report %s using database %s' % (name, database)) self.logobj.log_write('Delete Report',LOG_INFO, ':successful delete report %s using database %s' % (name, database))
else: else:
ErrorDialog("Report","Report has not Delete:\n"+name," Message") ErrorDialog("Report","Report has not Delete:\n ."+name," Message !")
self.win.endExecute() self.win.endExecute()

View File

@ -288,7 +288,7 @@ class RepeatIn( unohelper.Base, XJobExecutor ):
widget.insertTextContent(cursor,oInputList,False) widget.insertTextContent(cursor,oInputList,False)
self.win.endExecute() self.win.endExecute()
else: else:
ErrorDialog("Please Fill appropriate data in Object Field or Name field \nor select perticular value from the list of fields") ErrorDialog("Please fill appropriate data in Object Field or Name field \nor select particular value from the list of fields.")
def btnCancel_clicked( self, oActionEvent ): def btnCancel_clicked( self, oActionEvent ):
self.win.endExecute() self.win.endExecute()

View File

@ -93,7 +93,7 @@ class SendtoServer(unohelper.Base, XJobExecutor):
self.ids = self.sock.execute(database, uid, self.password, 'ir.module.module', 'search', [('name','=','base_report_designer'),('state', '=', 'installed')]) self.ids = self.sock.execute(database, uid, self.password, 'ir.module.module', 'search', [('name','=','base_report_designer'),('state', '=', 'installed')])
if not len(self.ids): if not len(self.ids):
ErrorDialog("Please Install base_report_designer module", "", "Module Uninstalled Error") ErrorDialog("Please install base_report_designer module.", "", "Module Uninstalled Error !")
exit(1) exit(1)
report_name = "" report_name = ""
@ -172,7 +172,7 @@ class SendtoServer(unohelper.Base, XJobExecutor):
} }
res = self.sock.execute(database, uid, self.password, 'ir.values' , 'create',rec ) res = self.sock.execute(database, uid, self.password, 'ir.values' , 'create',rec )
else : else :
ErrorDialog(" Report Name is all ready given !!!\n\n\n Please specify other Name","","Report Name") ErrorDialog(" Report Name is already given !\n\n\n Please specify other name.","","Report Name !")
self.logobj.log_write('SendToServer',LOG_WARNING, ':Report name all ready given DB %s' % (database)) self.logobj.log_write('SendToServer',LOG_WARNING, ':Report name all ready given DB %s' % (database))
self.win.endExecute() self.win.endExecute()
except Exception,e: except Exception,e:
@ -205,7 +205,7 @@ class SendtoServer(unohelper.Base, XJobExecutor):
self.logobj.log_write('SendToServer',LOG_INFO, ':Report %s successfully send using %s'%(params['name'],database)) self.logobj.log_write('SendToServer',LOG_INFO, ':Report %s successfully send using %s'%(params['name'],database))
self.win.endExecute() self.win.endExecute()
else: else:
ErrorDialog("Either Report Name or Technical Name is blank !!!\nPlease specify appropriate Name","","Blank Field ERROR") ErrorDialog("Either Report Name or Technical Name is blank !\nPlease specify appropriate Name.","","Blank Field ERROR !")
self.logobj.log_write('SendToServer',LOG_WARNING, ':Either Report Name or Technical Name is blank') self.logobj.log_write('SendToServer',LOG_WARNING, ':Either Report Name or Technical Name is blank')
self.win.endExecute() self.win.endExecute()

View File

@ -100,8 +100,8 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
# sValue="Could not connect to the server!" # sValue="Could not connect to the server!"
# self.lstDatabase.addItem("Could not connect to the server!",0) # self.lstDatabase.addItem("Could not connect to the server!",0)
elif res == 0: elif res == 0:
sValue="No Database found !!!" sValue="No Database is found !"
self.lstDatabase.addItem("No Database found !!!",0) self.lstDatabase.addItem("No Database is found !",0)
else: else:
self.win.addComboListBox("lstDatabase", -2,28,123,15, True) self.win.addComboListBox("lstDatabase", -2,28,123,15, True)
self.lstDatabase = self.win.getControl( "lstDatabase" ) self.lstDatabase = self.win.getControl( "lstDatabase" )
@ -129,12 +129,12 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
self.sock=RPCSession(url) self.sock=RPCSession(url)
UID = self.sock.login(sDatabase,sLogin,sPassword) UID = self.sock.login(sDatabase,sLogin,sPassword)
if not UID or UID==-1 : if not UID or UID==-1 :
ErrorDialog("Connection Refuse...","Please enter valid Login/Password") ErrorDialog("Connection Refuse...","Please enter valid Login/Password.")
# self.win.endExecute() # self.win.endExecute()
ids_module =self.sock.execute(sDatabase, UID, sPassword, 'ir.module.module', 'search', [('name','=','base_report_designer'),('state', '=', 'installed')]) ids_module =self.sock.execute(sDatabase, UID, sPassword, 'ir.module.module', 'search', [('name','=','base_report_designer'),('state', '=', 'installed')])
if not len(ids_module): if not len(ids_module):
ErrorDialog("Please Install base_report_designer module", "", "Module Uninstalled Error") ErrorDialog("Please install base_report_designer module.", "", "Module Uninstalled Error !")
self.logobj.log_write('Module Not Found',LOG_WARNING, ':base_report_designer not install in database %s' % (sDatabase)) self.logobj.log_write('Module is not found.',LOG_WARNING, ':base_report_designer not install in database %s.' % (sDatabase))
#self.win.endExecute() #self.win.endExecute()
else: else:
desktop=getDesktop() desktop=getDesktop()
@ -153,7 +153,7 @@ class ServerParameter( unohelper.Base, XJobExecutor ):
#docinfo.setUserFieldValue(2,self.win.getListBoxSelectedItem("lstDatabase")) #docinfo.setUserFieldValue(2,self.win.getListBoxSelectedItem("lstDatabase"))
#docinfo.setUserFieldValue(3,"") #docinfo.setUserFieldValue(3,"")
ErrorDialog(" You can start creating your report in \n \t the current document.","After Creating sending to the server.","Message") ErrorDialog(" You can start creating your report in \n \t the current document.","After Creating sending to the server.","Message !")
self.logobj.log_write('successful login',LOG_INFO, ':successful login from %s using database %s' % (sLogin, sDatabase)) self.logobj.log_write('successful login',LOG_INFO, ':successful login from %s using database %s' % (sLogin, sDatabase))
self.win.endExecute() self.win.endExecute()

View File

@ -175,7 +175,7 @@ class AddLang(unohelper.Base, XJobExecutor ):
res = self.sock.execute(database, uid, self.password, sObject , 'read',[ids[0]]) res = self.sock.execute(database, uid, self.password, sObject , 'read',[ids[0]])
self.win.setEditText("txtUName",res[0][sMain[sMain.rfind("/")+1:]]) self.win.setEditText("txtUName",res[0][sMain[sMain.rfind("/")+1:]])
else: else:
ErrorDialog("Please select the Language Field") ErrorDialog("Please select the Language field.")
except: except:
import traceback;traceback.print_exc() import traceback;traceback.print_exc()
@ -261,7 +261,7 @@ class AddLang(unohelper.Base, XJobExecutor ):
self.win.endExecute() self.win.endExecute()
else: else:
ErrorDialog("Please Fill appropriate data in Name field \nor select perticular value from the list of fields") ErrorDialog("Please fill appropriate data in Name field \nor select particular value from the list of fields.")
def btnCancel_clicked( self, oActionEvent ): def btnCancel_clicked( self, oActionEvent ):
self.win.endExecute() self.win.endExecute()

View File

@ -101,7 +101,7 @@ class modify(unohelper.Base, XJobExecutor ):
else: else:
ErrorDialog( ErrorDialog(
"Please place your cursor at begaining of field \n" "Please place your cursor at begaining of field \n"
"which you want to modify","" "which you want to modify.",""
) )
else: else:

View File

@ -202,7 +202,7 @@ class base_stage(object):
if case.section_id.parent_id.user_id: if case.section_id.parent_id.user_id:
data['user_id'] = case.section_id.parent_id.user_id.id data['user_id'] = case.section_id.parent_id.user_id.id
else: else:
raise osv.except_osv(_('Error !'), _("You are already at the top level of your sales-team category.\n That's why you cannot escalate.")) raise osv.except_osv(_('Error !'), _("You are already at the top level of your sales-team category.\n That is why you cannot escalate."))
self.write(cr, uid, [case.id], data, context=context) self.write(cr, uid, [case.id], data, context=context)
case.case_escalate_send_note(case.section_id.parent_id, context=context) case.case_escalate_send_note(case.section_id.parent_id, context=context)
cases = self.browse(cr, uid, ids, context=context) cases = self.browse(cr, uid, ids, context=context)