[IMP] all the warning messages now start with 'Warning\!' (not 'Warning' or 'Warning \!')

bzr revid: abo@openerp.com-20120807113414-7mryqyt3jnq8shsa
This commit is contained in:
Antonin Bourguignon 2012-08-07 13:34:14 +02:00
parent 8a64e7580a
commit 59aa37f0e4
39 changed files with 100 additions and 100 deletions

View File

@ -626,7 +626,7 @@ class account_account(osv.osv):
value = 'account.account,' + str(ids[0])
partner_prop_acc = self.pool.get('ir.property').search(cr, uid, [('value_reference','=',value)], context=context)
if partner_prop_acc:
raise osv.except_osv(_('Warning !'), _('You cannot remove/deactivate an account which is set on a customer or supplier.'))
raise osv.except_osv(_('Warning!'), _('You cannot remove/deactivate an account which is set on a customer or supplier.'))
return True
def _check_allow_type_change(self, cr, uid, ids, new_type, context=None):
@ -639,10 +639,10 @@ class account_account(osv.osv):
if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]):
#Check for 'Closed' type
if old_type == 'closed' and new_type !='closed':
raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from 'Closed' to any other type which contains journal items!"))
raise osv.except_osv(_('Warning!'), _("You cannot change the type of account from 'Closed' to any other type which contains journal items!"))
#Check for change From group1 to group2 and vice versa
if (old_type in group1 and new_type in group2) or (old_type in group2 and new_type in group1):
raise osv.except_osv(_('Warning !'), _("You cannot change the type of account from '%s' to '%s' type as it contains journal items!") % (old_type,new_type,))
raise osv.except_osv(_('Warning!'), _("You cannot change the type of account from '%s' to '%s' type as it contains journal items!") % (old_type,new_type,))
return True
def write(self, cr, uid, ids, vals, context=None):
@ -661,7 +661,7 @@ class account_account(osv.osv):
# Allow the write if the value is the same
for i in [i['company_id'][0] for i in self.read(cr,uid,ids,['company_id'])]:
if vals['company_id']!=i:
raise osv.except_osv(_('Warning !'), _('You cannot change the owner company of an account that already contains journal items.'))
raise osv.except_osv(_('Warning!'), _('You cannot change the owner company of an account that already contains journal items.'))
if 'active' in vals and not vals['active']:
self._check_moves(cr, uid, ids, "write", context=context)
if 'type' in vals.keys():
@ -790,7 +790,7 @@ class account_journal(osv.osv):
if 'company_id' in vals and journal.company_id.id != vals['company_id']:
move_lines = self.pool.get('account.move.line').search(cr, uid, [('journal_id', 'in', ids)])
if move_lines:
raise osv.except_osv(_('Warning !'), _('This journal already contains items, therefore you cannot modify its company field.'))
raise osv.except_osv(_('Warning!'), _('This journal already contains items, therefore you cannot modify its company field.'))
return super(account_journal, self).write(cr, uid, ids, vals, context=context)
def create_sequence(self, cr, uid, vals, context=None):
@ -1080,7 +1080,7 @@ class account_period(osv.osv):
if 'company_id' in vals:
move_lines = self.pool.get('account.move.line').search(cr, uid, [('period_id', 'in', ids)])
if move_lines:
raise osv.except_osv(_('Warning !'), _('This journal already contains items for this period, therefore you cannot modify its company field.'))
raise osv.except_osv(_('Warning!'), _('This journal already contains items for this period, therefore you cannot modify its company field.'))
return super(account_period, self).write(cr, uid, ids, vals, context=context)
def build_ctx_periods(self, cr, uid, period_from_id, period_to_id):

View File

@ -759,13 +759,13 @@ class account_invoice(osv.osv):
key = (tax.tax_code_id.id, tax.base_code_id.id, tax.account_id.id, tax.account_analytic_id.id)
tax_key.append(key)
if not key in compute_taxes:
raise osv.except_osv(_('Warning !'), _('Global taxes defined, but they are not in invoice lines !'))
raise osv.except_osv(_('Warning!'), _('Global taxes defined, but they are not in invoice lines !'))
base = compute_taxes[key]['base']
if abs(base - tax.base) > inv.company_id.currency_id.rounding:
raise osv.except_osv(_('Warning !'), _('Tax base different!\nClick on compute to update the tax base.'))
raise osv.except_osv(_('Warning!'), _('Tax base different!\nClick on compute to update the tax base.'))
for key in compute_taxes:
if not key in tax_key:
raise osv.except_osv(_('Warning !'), _('Taxes are missing!\nClick on compute button.'))
raise osv.except_osv(_('Warning!'), _('Taxes are missing!\nClick on compute button.'))
def compute_invoice_totals(self, cr, uid, inv, company_currency, ref, invoice_move_lines):
total = 0

View File

@ -95,7 +95,7 @@ class account_move_line(osv.osv):
if initial_bal and not context.get('periods', False) and not where_move_lines_by_date:
#we didn't pass any filter in the context, and the initial balance can't be computed using only the fiscalyear otherwise entries will be summed twice
#so we have to invalidate this query
raise osv.except_osv(_('Warning !'),_("You have not supplied enough arguments to compute the initial balance, please select a period and a journal in the context."))
raise osv.except_osv(_('Warning!'),_("You have not supplied enough arguments to compute the initial balance, please select a period and a journal in the context."))
if context.get('journal_ids', False):
@ -743,7 +743,7 @@ class account_move_line(osv.osv):
context = {}
for line in self.browse(cr, uid, ids, context=context):
if company_list and not line.company_id.id in company_list:
raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries.'))
raise osv.except_osv(_('Warning!'), _('To reconcile the entries company should be the same for all entries.'))
company_list.append(line.company_id.id)
for line in self.browse(cr, uid, ids, context=context):
@ -752,7 +752,7 @@ class account_move_line(osv.osv):
else:
currency_id = line.company_id.currency_id
if line.reconcile_id:
raise osv.except_osv(_('Warning !'), _('Already reconciled.'))
raise osv.except_osv(_('Warning!'), _('Already reconciled.'))
if line.reconcile_partial_id:
for line2 in line.reconcile_partial_id.line_partial_ids:
if not line2.reconcile_id:
@ -796,7 +796,7 @@ class account_move_line(osv.osv):
company_list = []
for line in self.browse(cr, uid, ids, context=context):
if company_list and not line.company_id.id in company_list:
raise osv.except_osv(_('Warning !'), _('To reconcile the entries company should be the same for all entries.'))
raise osv.except_osv(_('Warning!'), _('To reconcile the entries company should be the same for all entries.'))
company_list.append(line.company_id.id)
for line in unrec_lines:
if line.state <> 'valid':
@ -831,7 +831,7 @@ class account_move_line(osv.osv):
if (not currency_obj.is_zero(cr, uid, account.company_id.currency_id, writeoff)) or \
(account.currency_id and (not currency_obj.is_zero(cr, uid, account.currency_id, currency))):
if not writeoff_acc_id:
raise osv.except_osv(_('Warning !'), _('You have to provide an account for the write off/exchange difference entry.'))
raise osv.except_osv(_('Warning!'), _('You have to provide an account for the write off/exchange difference entry.'))
if writeoff > 0:
debit = writeoff
credit = 0.0

View File

@ -59,7 +59,7 @@ class account_fiscalyear_close(osv.osv_memory):
#check that the reconcilation concern journal entries from only one company
cr.execute('select distinct(company_id) from account_move_line where id in %s',(tuple(ids),))
if len(cr.fetchall()) > 1:
raise osv.except_osv(_('Warning !'), _('The entries to reconcile should belong to the same company.'))
raise osv.except_osv(_('Warning!'), _('The entries to reconcile should belong to the same company.'))
r_id = self.pool.get('account.move.reconcile').create(cr, uid, {'type': 'auto'})
cr.execute('update account_move_line set reconcile_id = %s where id in %s',(r_id, tuple(ids),))
return r_id

View File

@ -58,7 +58,7 @@ class validate_account_move_lines(osv.osv_memory):
move_ids.append(line.move_id.id)
move_ids = list(set(move_ids))
if not move_ids:
raise osv.except_osv(_('Warning'), _('Selected Entry Lines does not have any account move enties in draft state.'))
raise osv.except_osv(_('Warning!'), _('Selected Entry Lines does not have any account move enties in draft state.'))
obj_move.button_validate(cr, uid, move_ids, context)
return {'type': 'ir.actions.act_window_close'}
validate_account_move_lines()

View File

@ -141,7 +141,7 @@ class account_coda_import(osv.osv_memory):
err_code = 'W0001'
if batch:
return (err_code, err_string)
raise osv.except_osv(_('Warning !'), err_string)
raise osv.except_osv(_('Warning!'), err_string)
elif line[0] == '1':
if coda_version == '1':

View File

@ -413,7 +413,7 @@ property or property parameter."),
cal = vobject.iCalendar()
event = cal.add('vevent')
if not event_obj.date_deadline or not event_obj.date:
raise osv.except_osv(_('Warning !'),_("First you have to specify the date of the invitation."))
raise osv.except_osv(_('Warning!'),_("First you have to specify the date of the invitation."))
event.add('created').value = ics_datetime(time.strftime('%Y-%m-%d %H:%M:%S'))
event.add('dtstart').value = ics_datetime(event_obj.date)
event.add('dtend').value = ics_datetime(event_obj.date_deadline)
@ -1411,7 +1411,7 @@ rule or repeating pattern of time to exclude from the recurring rule."),
context = {}
if 'date' in groupby:
raise osv.except_osv(_('Warning !'), _('Group by date is 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)
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)

View File

@ -786,7 +786,7 @@ class basic_calendar_line(osv.osv):
res = cr.fetchone()
if res:
if res[0] > 0:
raise osv.except_osv(_('Warning !'), _('Cannot create line "%s" more than once.') % (vals.get('name')))
raise osv.except_osv(_('Warning!'), _('Cannot create line "%s" more than once.') % (vals.get('name')))
return super(basic_calendar_line, self).create(cr, uid, vals, context=context)
basic_calendar_line()
@ -876,7 +876,7 @@ class basic_calendar_fields(osv.osv):
line = line_obj.browse(cr, uid, l_id, context=context)[0]
line_rel = line.object_id.model
if (relation != 'NULL') and (not relation == line_rel):
raise osv.except_osv(_('Warning !'), _('Please provide proper configuration of "%s" in Calendar Lines.') % (name))
raise osv.except_osv(_('Warning!'), _('Please provide proper configuration of "%s" in Calendar Lines.') % (name))
return True
def create(self, cr, uid, vals, context=None):

View File

@ -60,7 +60,7 @@ class calendar_event_import(osv.osv_memory):
try:
vals = model_obj.import_cal(cr, uid, base64.decodestring(data['file_path']), context['active_id'], context)
except:
raise osv.except_osv(_('Warning !'),_('Invalid format of the ics, file cannot be imported.'))
raise osv.except_osv(_('Warning!'),_('Invalid format of the ics, file cannot be imported.'))
global cnt
if vals:
cnt = len(vals)

View File

@ -530,7 +530,7 @@ class crm_lead(base_stage, osv.osv):
lead_ids = context and context.get('lead_ids', []) or []
if len(ids) <= 1:
raise osv.except_osv(_('Warning !'),_('Please select more than one opportunity from the list view.'))
raise osv.except_osv(_('Warning!'),_('Please select more than one opportunity from the list view.'))
ctx_opportunities = self.browse(cr, uid, lead_ids, context=context)
opportunities = self.browse(cr, uid, ids, context=context)

View File

@ -44,7 +44,7 @@ class crm_lead2partner(osv.osv_memory):
rec_ids = context and context.get('active_ids', [])
for this in model.browse(cr, uid, rec_ids, context=context):
if this.partner_id:
raise osv.except_osv(_('Warning !'),
raise osv.except_osv(_('Warning!'),
_('A partner is already defined.'))
def _select_partner(self, cr, uid, context=None):

View File

@ -86,7 +86,7 @@ class stock_picking(osv.osv):
grid_id = carrier_obj.grid_get(cr, uid, [picking.carrier_id.id],
picking.partner_id.id, context=context)
if not grid_id:
raise osv.except_osv(_('Warning'),
raise osv.except_osv(_('Warning!'),
_('The carrier %s (id: %d) has no delivery grid!') \
% (picking.carrier_id.name,
picking.carrier_id.id))

View File

@ -137,7 +137,7 @@ class hr_employee(osv.osv):
warning_sign = "Sign Out"
for emp in self.read(cr, uid, ids, ['id'], context=context):
if not self._action_check(cr, uid, emp['id'], dt, context):
raise osv.except_osv(_('Warning !'), _('You tried to %s with a date anterior to another event !\nTry to contact the administrator to correct attendances.')%(warning_sign,))
raise osv.except_osv(_('Warning!'), _('You tried to %s with a date anterior to another event !\nTry to contact the administrator to correct attendances.')%(warning_sign,))
res = {'action': type, 'employee_id': emp['id']}
if dt:

View File

@ -240,7 +240,7 @@ class hr_evaluation(osv.osv):
self.write(cr, uid, ids, {'state':'progress'}, context=context)
for id in self.browse(cr, uid, ids, context=context):
if len(id.survey_request_ids) != len(request_obj.search(cr, uid, [('evaluation_id', '=', id.id),('state', 'in', ['done','cancel'])], context=context)):
raise osv.except_osv(_('Warning !'),_("You cannot change state, because some appraisal(s) are in waiting answer or draft state."))
raise osv.except_osv(_('Warning!'),_("You cannot change state, because some appraisal(s) are in waiting answer or draft state."))
return True
def button_done(self,cr, uid, ids, context=None):
@ -311,7 +311,7 @@ class hr_evaluation_interview(osv.osv):
flag = False
wating_id = 0
if not id.evaluation_id.id:
raise osv.except_osv(_('Warning !'),_("You cannot start evaluation without Appraisal."))
raise osv.except_osv(_('Warning!'),_("You cannot start evaluation without Appraisal."))
records = hr_eval_obj.browse(cr, uid, [id.evaluation_id.id], context=context)[0].survey_request_ids
for child in records:
if child.state == "draft":

View File

@ -443,7 +443,7 @@ class hr_employee(osv.osv):
# Find for holidays status
status_ids = type_obj.search(cr, uid, [('limit', '=', False)], context=context)
if len(status_ids) != 1 :
raise osv.except_osv(_('Warning !'),_("The feature behind the field 'Remaining Legal Leaves' can only be used when there is only one leave type with the option 'Allow to Override Limit' unchecked. (%s Found). Otherwise, the update is ambiguous as we cannot decide on which leave type the update has to be done. \nYou may prefer to use the classic menus 'Leave Requests' and 'Allocation Requests' located in 'Human Resources \ Leaves' to manage the leave days of the employees if the configuration does not allow to use this field.") % (len(status_ids)))
raise osv.except_osv(_('Warning!'),_("The feature behind the field 'Remaining Legal Leaves' can only be used when there is only one leave type with the option 'Allow to Override Limit' unchecked. (%s Found). Otherwise, the update is ambiguous as we cannot decide on which leave type the update has to be done. \nYou may prefer to use the classic menus 'Leave Requests' and 'Allocation Requests' located in 'Human Resources \ Leaves' to manage the leave days of the employees if the configuration does not allow to use this field.") % (len(status_ids)))
status_id = status_ids and status_ids[0] or False
if not status_id:
return False

View File

@ -172,9 +172,9 @@ class hr_analytic_timesheet(osv.osv):
if emp_id:
ename = emp_obj.browse(cr, uid, emp_id[0], context=context).name
if not vals.get('journal_id',False):
raise osv.except_osv(_('Warning !'), _('No \'Analytic Journal\' is defined for employee %s \nDefine an employee for the selected user and assign an \'Analytic Journal\'!')%(ename,))
raise osv.except_osv(_('Warning!'), _('No \'Analytic Journal\' is defined for employee %s \nDefine an employee for the selected user and assign an \'Analytic Journal\'!')%(ename,))
if not vals.get('account_id',False):
raise osv.except_osv(_('Warning !'), _('No analytic account is defined on the project.\nPlease set one or we cannot automatically fill the timesheet.'))
raise osv.except_osv(_('Warning!'), _('No analytic account is defined on the project.\nPlease set one or we cannot automatically fill the timesheet.'))
return super(hr_analytic_timesheet, self).create(cr, uid, vals, context=context)
def on_change_user_id(self, cr, uid, ids, user_id):

View File

@ -196,7 +196,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
data = context and context.get('active_ids', [])
for analytic in analytic_obj.browse(cr, uid, data, context=context):
if analytic.invoice_id:
raise osv.except_osv(_('Warning !'), _("Invoice is already linked to some of the analytic line(s)!"))
raise osv.except_osv(_('Warning!'), _("Invoice is already linked to some of the analytic line(s)!"))
def do_create(self, cr, uid, ids, context=None):
data = self.read(cr, uid, ids, [], context=context)[0]

View File

@ -73,7 +73,7 @@ class synchronize_google(osv.osv_memory):
user_obj = self.pool.get('res.users').browse(cr, uid, uid,context=context)
google=self.pool.get('google.login')
if not user_obj.gmail_user or not user_obj.gmail_password:
raise osv.except_osv(_('Warning !'), _("No Google Username or password is defined for user.\nPlease define on user's form."))
raise osv.except_osv(_('Warning!'), _("No Google Username or password is defined for user.\nPlease define on user's form."))
gd_client = google.google_login(user_obj.gmail_user,user_obj.gmail_password,type='group')
if not gd_client:
return [('failed', 'Connection to google fail')]

View File

@ -1094,7 +1094,7 @@ class import_sugarcrm(osv.osv):
def import_from_scheduler_all(self, cr, uid, ids, context=None):
keys, module_list = self.get_key(cr, uid, ids, context)
if not keys:
raise osv.except_osv(_('Warning !'), _('Select Module to Import.'))
raise osv.except_osv(_('Warning!'), _('Select Module to Import.'))
key_list = module_list.keys()
for module in key_list :
module = module_list[module]
@ -1120,7 +1120,7 @@ class import_sugarcrm(osv.osv):
# """Import all sugarcrm data into openerp module"""
keys, module_list = self.get_key(cr, uid, ids, context)
if not keys:
raise osv.except_osv(_('Warning !'), _('Select Module to Import.'))
raise osv.except_osv(_('Warning!'), _('Select Module to Import.'))
key_list = module_list.keys()
for module in key_list :
module = module_list[module]

View File

@ -333,7 +333,7 @@ class mrp_repair(osv.osv):
raise osv.except_osv(_('Error!'),_('You cannot confirm a repair order which has no line.'))
for line in o.operations:
if line.product_id.track_production and not line.prodlot_id:
raise osv.except_osv(_('Warning'), _("Serial number is required for operation line with product '%s'") % (line.product_id.name))
raise osv.except_osv(_('Warning!'), _("Serial number is required for operation line with product '%s'") % (line.product_id.name))
mrp_line_obj.write(cr, uid, [l.id for l in o.operations], {'state': 'confirmed'})
return True
@ -430,7 +430,7 @@ class mrp_repair(osv.osv):
else:
name = fee.name
if not fee.product_id:
raise osv.except_osv(_('Warning !'), _('No product defined on Fees!'))
raise osv.except_osv(_('Warning!'), _('No product defined on Fees!'))
if fee.product_id.property_account_income:
account_id = fee.product_id.property_account_income.id

View File

@ -174,7 +174,7 @@ class product_pricelist(osv.osv):
('date_end', '>=', date),
])
if len(pricelist_ids) != len(pricelist_version_ids):
raise osv.except_osv(_('Warning !'), _("At least one pricelist has no active version !\nPlease create or activate one."))
raise osv.except_osv(_('Warning!'), _("At least one pricelist has no active version !\nPlease create or activate one."))
# product.product:
product_ids = [i[0] for i in products_by_qty_by_partner]

View File

@ -172,7 +172,7 @@ class product_uom(osv.osv):
if 'category_id' in vals:
for uom in self.browse(cr, uid, ids, context=context):
if uom.category_id.id != vals['category_id']:
raise osv.except_osv(_('Warning'),_("Cannot change the category of existing Unit of Measure '%s'.") % (uom.name,))
raise osv.except_osv(_('Warning!'),_("Cannot change the category of existing Unit of Measure '%s'.") % (uom.name,))
return super(product_uom, self).write(cr, uid, ids, vals, context=context)
product_uom()

View File

@ -386,7 +386,7 @@ class project(osv.osv):
for project in projects:
if (not project.members) and force_members:
raise osv.except_osv(_('Warning !'),_("You must assign members on the project '%s' !") % (project.name,))
raise osv.except_osv(_('Warning!'),_("You must assign members on the project '%s' !") % (project.name,))
resource_pool = self.pool.get('resource.resource')
@ -1087,7 +1087,7 @@ class task(base_stage, osv.osv):
#TO FIX:Kanban view doesn't raise warning
#stages = [stage.id for stage in t.project_id.type_ids]
#if new_stage not in stages:
#raise osv.except_osv(_('Warning !'), _('Stage is not defined in the project.'))
#raise osv.except_osv(_('Warning!'), _('Stage is not defined in the project.'))
write_vals = vals_reset_kstate if t.stage_id != new_stage else vals
super(task,self).write(cr, uid, [t.id], write_vals, context=context)
self.stage_set_send_note(cr, uid, [t.id], new_stage, context=context)
@ -1276,7 +1276,7 @@ class account_analytic_account(osv.osv):
project_obj = self.pool.get('project.project')
analytic_ids = project_obj.search(cr, uid, [('analytic_account_id','in',ids)])
if analytic_ids:
raise osv.except_osv(_('Warning !'), _('Please delete the project linked with this account first.'))
raise osv.except_osv(_('Warning!'), _('Please delete the project linked with this account first.'))
return super(account_analytic_account, self).unlink(cr, uid, ids, *args, **kwargs)

View File

@ -437,7 +437,7 @@ class project_issue(base_stage, osv.osv):
if case.task_id:
self.pool.get('project.task').write(cr, uid, [case.task_id.id], {'project_id': data['project_id'], 'user_id': False})
else:
raise osv.except_osv(_('Warning !'), _('You cannot escalate this issue.\nThe relevant Project has not configured the Escalation Project!'))
raise osv.except_osv(_('Warning!'), _('You cannot escalate this issue.\nThe relevant Project has not configured the Escalation Project!'))
self.case_set(cr, uid, ids, 'draft', data, context=context)
self.case_escalate_send_note(cr, uid, [case.id], context=context)
return True

View File

@ -908,7 +908,7 @@ class purchase_order_line(osv.osv):
uom_id = product_uom_po_id
if product.uom_id.category_id.id != product_uom.browse(cr, uid, uom_id, context=context).category_id.id:
res['warning'] = {'title': _('Warning'), 'message': _('Selected Unit of Measure does not belong to the same category as the product Unit of Measure.')}
res['warning'] = {'title': _('Warning!'), 'message': _('Selected Unit of Measure does not belong to the same category as the product Unit of Measure.')}
uom_id = product_uom_po_id
res['value'].update({'product_uom': uom_id})
@ -923,10 +923,10 @@ class purchase_order_line(osv.osv):
if supplier.name.id == partner_id:
supplierinfo = supplier
if supplierinfo.product_uom.id != uom_id:
res['warning'] = {'title': _('Warning'), 'message': _('The selected supplier only sells this product by %s') % supplierinfo.product_uom.name }
res['warning'] = {'title': _('Warning!'), 'message': _('The selected supplier only sells this product by %s') % supplierinfo.product_uom.name }
min_qty = product_uom._compute_qty(cr, uid, supplierinfo.product_uom.id, supplierinfo.min_qty, to_uom_id=uom_id)
if qty < min_qty: # If the supplier quantity is greater than entered from user, set minimal.
res['warning'] = {'title': _('Warning'), 'message': _('The selected supplier has a minimal quantity set to %s %s, you should not purchase less.') % (supplierinfo.min_qty, supplierinfo.product_uom.name)}
res['warning'] = {'title': _('Warning!'), 'message': _('The selected supplier has a minimal quantity set to %s %s, you should not purchase less.') % (supplierinfo.min_qty, supplierinfo.product_uom.name)}
qty = min_qty
dt = self._get_date_planned(cr, uid, supplierinfo, date_order, context=context).strftime(DEFAULT_SERVER_DATETIME_FORMAT)

View File

@ -44,7 +44,7 @@ class purchase_order_group(osv.osv_memory):
context={}
res = super(purchase_order_group, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
if context.get('active_model','') == 'purchase.order' and len(context['active_ids']) < 2:
raise osv.except_osv(_('Warning'),
raise osv.except_osv(_('Warning!'),
_('Please select multiple order to merge in the list view.'))
return res
def merge_orders(self, cr, uid, ids, context=None):

View File

@ -150,7 +150,7 @@ class purchase_requisition(osv.osv):
res = {}
for requisition in self.browse(cr, uid, ids, context=context):
if supplier.id in filter(lambda x: x, [rfq.state <> 'cancel' and rfq.partner_id.id or None for rfq in requisition.purchase_ids]):
raise osv.except_osv(_('Warning'), _('You have already one %s purchase order for this partner, you must cancel this purchase order to create a new quotation.') % rfq.state)
raise osv.except_osv(_('Warning!'), _('You have already one %s purchase order for this partner, you must cancel this purchase order to create a new quotation.') % rfq.state)
location_id = requisition.warehouse_id.lot_input_id.id
purchase_id = purchase_order.create(cr, uid, {
'origin': requisition.name,

View File

@ -108,7 +108,7 @@ class sale_order_line_make_invoice(osv.osv_memory):
sales_order_obj.write(cr, uid, [line.order_id.id], {'state': 'progress'})
if not invoices:
raise osv.except_osv(_('Warning'), _('Invoice cannot be created for this Sales Order Line due to one of the following reasons:\n1.The state of this sales order line is either "draft" or "cancel"!\n2.The Sales Order Line is Invoiced!'))
raise osv.except_osv(_('Warning!'), _('Invoice cannot be created for this Sales Order Line due to one of the following reasons:\n1.The state of this sales order line is either "draft" or "cancel"!\n2.The Sales Order Line is Invoiced!'))
return {'type': 'ir.actions.act_window_close'}

View File

@ -39,7 +39,7 @@ class sale_make_invoice(osv.osv_memory):
record_id = context and context.get('active_id', False)
order = self.pool.get('sale.order').browse(cr, uid, record_id, context=context)
if order.state == 'draft':
raise osv.except_osv(_('Warning !'),'You cannot create invoice when sales order is not confirmed.')
raise osv.except_osv(_('Warning!'),'You cannot create invoice when sales order is not confirmed.')
return False
def make_invoices(self, cr, uid, ids, context=None):

View File

@ -740,7 +740,7 @@ class stock_picking(osv.osv):
wf_service.trg_validate(uid, 'stock.picking', pick.id, 'button_confirm', cr)
move_ids = [x.id for x in pick.move_lines if x.state == 'confirmed']
if not move_ids:
raise osv.except_osv(_('Warning !'),_('Not enough stock, unable to reserve the products.'))
raise osv.except_osv(_('Warning!'),_('Not enough stock, unable to reserve the products.'))
self.pool.get('stock.move').action_assign(cr, uid, move_ids)
return True

View File

@ -113,7 +113,7 @@ class stock_fill_inventory(osv.osv_memory):
res[location] = datas
if not flag:
raise osv.except_osv(_('Warning !'), _('No product in this location.'))
raise osv.except_osv(_('Warning!'), _('No product in this location.'))
for stock_move in res.values():
for stock_move_details in stock_move.values():

View File

@ -103,7 +103,7 @@ class stock_return_picking(osv.osv_memory):
if m.product_qty * m.product_uom.factor > return_history[m.id]:
valid_lines += 1
if not valid_lines:
raise osv.except_osv(_('Warning !'), _("No products to return (only lines in Done state and not fully returned yet can be returned)!"))
raise osv.except_osv(_('Warning!'), _("No products to return (only lines in Done state and not fully returned yet can be returned)!"))
return res
def get_return_history(self, cr, uid, pick_id, context=None):
@ -195,7 +195,7 @@ class stock_return_picking(osv.osv_memory):
})
move_obj.write(cr, uid, [move.id], {'move_history_ids2':[(4,new_move)]}, context=context)
if not returned_lines:
raise osv.except_osv(_('Warning !'), _("Please specify at least one non-zero quantity."))
raise osv.except_osv(_('Warning!'), _("Please specify at least one non-zero quantity."))
if set_invoice_state_to_none:
pick_obj.write(cr, uid, [pick.id], {'invoice_state':'none'}, context=context)

View File

@ -379,7 +379,7 @@ class survey_question(osv.osv):
if que_type in ['matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans',\
'matrix_of_drop_down_menus', 'rating_scale']:
if not col_len:
raise osv.except_osv(_('Warning !'),_("You must enter one or more column headings."))
raise osv.except_osv(_('Warning!'),_("You must enter one or more column headings."))
ans_len = len(question['answer_choice_ids'])
if vals.has_key('answer_choice_ids'):
@ -391,7 +391,7 @@ class survey_question(osv.osv):
if que_type not in ['descriptive_text', 'single_textbox', 'comment','table']:
if not ans_len:
raise osv.except_osv(_('Warning !'),_("You must enter one or more Answers."))
raise osv.except_osv(_('Warning!'),_("You must enter one or more Answers."))
req_type = ""
if vals.has_key('required_type'):
@ -405,12 +405,12 @@ class survey_question(osv.osv):
if req_type in ['at least', 'at most', 'exactly']:
if vals.has_key('req_ans'):
if not vals['req_ans'] or vals['req_ans'] > ans_len:
raise osv.except_osv(_('Warning !'),_("#Required Answer you entered \
raise osv.except_osv(_('Warning!'),_("#Required Answer you entered \
is greater than the number of answer. \
Please use a number that is smaller than %d.") % (ans_len + 1))
else:
if not question['req_ans'] or question['req_ans'] > ans_len:
raise osv.except_osv(_('Warning !'),_("#Required Answer you entered is \
raise osv.except_osv(_('Warning!'),_("#Required Answer you entered is \
greater than the number of answer.\
Please use a number that is smaller than %d.") % (ans_len + 1))
@ -420,39 +420,39 @@ class survey_question(osv.osv):
if vals.has_key('minimum_req_ans'):
minimum_ans = vals['minimum_req_ans']
if not vals['minimum_req_ans'] or vals['minimum_req_ans'] > ans_len:
raise osv.except_osv(_('Warning !'),_("Minimum Required Answer\
raise osv.except_osv(_('Warning!'),_("Minimum Required Answer\
you entered is greater than the number of answer.\
Please use a number that is smaller than %d.") % (ans_len + 1))
else:
minimum_ans = question['minimum_req_ans']
if not question['minimum_req_ans'] or question['minimum_req_ans'] > ans_len:
raise osv.except_osv(_('Warning !'),_("Minimum Required Answer you\
raise osv.except_osv(_('Warning!'),_("Minimum Required Answer you\
entered is greater than the number of answer. \
Please use a number that is smaller than %d.") % (ans_len + 1))
if vals.has_key('maximum_req_ans'):
maximum_ans = vals['maximum_req_ans']
if not vals['maximum_req_ans'] or vals['maximum_req_ans'] > ans_len:
raise osv.except_osv(_('Warning !'),_("Maximum Required Answer you \
raise osv.except_osv(_('Warning!'),_("Maximum Required Answer you \
entered for your maximum is greater than the number of answer.\
Please use a number that is smaller than %d.") % (ans_len + 1))
else:
maximum_ans = question['maximum_req_ans']
if not question['maximum_req_ans'] or question['maximum_req_ans'] > ans_len:
raise osv.except_osv(_('Warning !'),_("Maximum Required Answer you\
raise osv.except_osv(_('Warning!'),_("Maximum Required Answer you\
entered for your maximum is greater than the number of answer.\
Please use a number that is smaller than %d.") % (ans_len + 1))
if maximum_ans <= minimum_ans:
raise osv.except_osv(_('Warning !'),_("Maximum Required Answer is greater \
raise osv.except_osv(_('Warning!'),_("Maximum Required Answer is greater \
than Minimum Required Answer"))
if question['type'] == 'matrix_of_drop_down_menus' and vals.has_key('column_heading_ids'):
for col in vals['column_heading_ids']:
if not col[2] or not col[2].has_key('menu_choice') or not col[2]['menu_choice']:
raise osv.except_osv(_('Warning !'),_("You must enter one or more menu choices\
raise osv.except_osv(_('Warning!'),_("You must enter one or more menu choices\
in column heading."))
elif not col[2] or not col[2].has_key('menu_choice') or\
col[2]['menu_choice'].strip() == '':
raise osv.except_osv(_('Warning !'),_("You must enter one or more menu \
raise osv.except_osv(_('Warning!'),_("You must enter one or more menu \
choices in column heading (white spaces not allowed)."))
return super(survey_question, self).write(cr, uid, ids, vals, context=context)
@ -462,33 +462,33 @@ class survey_question(osv.osv):
maximum_ans = 0
if vals.has_key('answer_choice_ids') and not len(vals['answer_choice_ids']):
if vals.has_key('type') and vals['type'] not in ['descriptive_text', 'single_textbox', 'comment','table']:
raise osv.except_osv(_('Warning !'),_("You must enter one or more answers."))
raise osv.except_osv(_('Warning!'),_("You must enter one or more answers."))
if vals.has_key('column_heading_ids') and not len(vals['column_heading_ids']):
if vals.has_key('type') and vals['type'] in ['matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'matrix_of_drop_down_menus', 'rating_scale']:
raise osv.except_osv(_('Warning !'),_("You must enter one or more column heading."))
raise osv.except_osv(_('Warning!'),_("You must enter one or more column heading."))
if vals['type'] in ['multiple_choice_multiple_ans','matrix_of_choices_only_one_ans', 'matrix_of_choices_only_multi_ans', 'matrix_of_drop_down_menus', 'rating_scale','multiple_textboxes','numerical_textboxes','date','date_and_time']:
if vals.has_key('is_require_answer') and vals.has_key('required_type') and vals['required_type'] in ['at least', 'at most', 'exactly']:
if vals.has_key('answer_choice_ids') and vals['req_ans'] > len(vals['answer_choice_ids']) or not vals['req_ans']:
raise osv.except_osv(_('Warning !'),_("#Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1))
raise osv.except_osv(_('Warning!'),_("#Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1))
if vals.has_key('is_require_answer') and vals.has_key('required_type') and vals['required_type'] == 'a range':
minimum_ans = vals['minimum_req_ans']
maximum_ans = vals['maximum_req_ans']
if vals.has_key('answer_choice_ids') or vals['minimum_req_ans'] > len(vals['answer_choice_ids']) or not vals['minimum_req_ans']:
raise osv.except_osv(_('Warning !'),_("Minimum Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1))
raise osv.except_osv(_('Warning!'),_("Minimum Required Answer you entered is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1))
if vals.has_key('answer_choice_ids') or vals['maximum_req_ans'] > len(vals['answer_choice_ids']) or not vals['maximum_req_ans']:
raise osv.except_osv(_('Warning !'),_("Maximum Required Answer you entered for your maximum is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1))
raise osv.except_osv(_('Warning!'),_("Maximum Required Answer you entered for your maximum is greater than the number of answer. Please use a number that is smaller than %d.") % (len(vals['answer_choice_ids'])+1))
if maximum_ans <= minimum_ans:
raise osv.except_osv(_('Warning !'),_("Maximum Required Answer is greater than Minimum Required Answer."))
raise osv.except_osv(_('Warning!'),_("Maximum Required Answer is greater than Minimum Required Answer."))
if vals['type'] == 'matrix_of_drop_down_menus':
for col in vals['column_heading_ids']:
if not col[2] or not col[2].has_key('menu_choice') or not col[2]['menu_choice']:
raise osv.except_osv(_('Warning !'),_("You must enter one or more menu choices in column heading."))
raise osv.except_osv(_('Warning!'),_("You must enter one or more menu choices in column heading."))
elif not col[2] or not col[2].has_key('menu_choice') or col[2]['menu_choice'].strip() == '':
raise osv.except_osv(_('Warning !'),_("You must enter one or more menu choices in column heading (white spaces not allowed)."))
raise osv.except_osv(_('Warning!'),_("You must enter one or more menu choices in column heading (white spaces not allowed)."))
res = super(survey_question, self).create(cr, uid, vals, context)
return res
@ -639,7 +639,7 @@ class survey_response(osv.osv):
return res
def copy(self, cr, uid, id, default=None, context=None):
raise osv.except_osv(_('Warning !'),_('You cannot duplicate the resource!'))
raise osv.except_osv(_('Warning!'),_('You cannot duplicate the resource!'))
survey_response()

View File

@ -116,14 +116,14 @@ class survey_question_wiz(osv.osv_memory):
if ((context.has_key('active') and not context.get('active', False)) \
or not context.has_key('active')) and not sur_name_rec.page_no + 1:
if sur_rec.state != "open" :
raise osv.except_osv(_('Warning !'),_("You cannot answer because the survey is not open."))
raise osv.except_osv(_('Warning!'),_("You cannot answer because the survey is not open."))
cr.execute('select count(id) from survey_history where user_id=%s\
and survey_id=%s', (uid,survey_id))
res = cr.fetchone()[0]
user_limit = survey_obj.browse(cr, uid, survey_id)
user_limit = user_limit.response_user
if user_limit and res >= user_limit:
raise osv.except_osv(_('Warning !'),_("You cannot answer this survey more than %s times.") % (user_limit))
raise osv.except_osv(_('Warning!'),_("You cannot answer this survey more than %s times.") % (user_limit))
if sur_rec.max_response_limit and sur_rec.max_response_limit <= sur_rec.tot_start_survey and not sur_name_rec.page_no + 1:
survey_obj.write(cr, uid, survey_id, {'state':'close', 'date_close':strftime("%Y-%m-%d %H:%M:%S")})
@ -684,7 +684,7 @@ class survey_question_wiz(osv.osv_memory):
if error:
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['comment_valid_err_msg']))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['comment_valid_err_msg']))
resp_obj.write(cr, uid, resp_id, {'comment':val1})
sur_name_read['store_ans'][resp_id].update({key1:val1})
@ -723,7 +723,7 @@ class survey_question_wiz(osv.osv_memory):
if error:
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['validation_valid_err_msg']))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['validation_valid_err_msg']))
if key1.split('_')[1] == "single" :
resp_obj.write(cr, uid, resp_id, {'single_text':val1})
@ -743,7 +743,7 @@ class survey_question_wiz(osv.osv_memory):
except:
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' \n" + _("Please enter an integer value."))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' \n" + _("Please enter an integer value."))
elif val1 and que_id == key1.split('_')[0] and len(key1.split('_')) == 3:
if type(val1) == type('') or type(val1) == type(u''):
@ -772,12 +772,12 @@ class survey_question_wiz(osv.osv_memory):
if comment_field and comment_value:
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['make_comment_field_err_msg']))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['make_comment_field_err_msg']))
if que_rec['type'] == "rating_scale" and que_rec['rating_allow_one_column_require'] and len(selected_value) > len(list(set(selected_value))):
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "'\n" + _("You cannot select the same answer more than one time."))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "'\n" + _("You cannot select the same answer more than one time."))
if not select_count:
resp_obj.write(cr, uid, resp_id, {'state':'skip'})
@ -785,7 +785,7 @@ class survey_question_wiz(osv.osv_memory):
if que_rec['numeric_required_sum'] and numeric_sum > que_rec['numeric_required_sum']:
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['numeric_required_sum_err_msg']))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['numeric_required_sum_err_msg']))
if que_rec['type'] in ['multiple_textboxes_diff_type', 'multiple_choice_multiple_ans','matrix_of_choices_only_one_ans','matrix_of_choices_only_multi_ans','matrix_of_drop_down_menus','rating_scale','multiple_textboxes','numerical_textboxes','date','date_and_time'] and que_rec['is_require_answer']:
if matrix_list:
@ -796,7 +796,7 @@ class survey_question_wiz(osv.osv_memory):
(que_rec['required_type'] == 'a range' and (len(list(set(matrix_list))) < que_rec['minimum_req_ans'] or len(list(set(matrix_list))) > que_rec['maximum_req_ans'])):
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
elif (que_rec['required_type'] == 'all' and select_count < len(que_rec['answer_choice_ids'])) or \
(que_rec['required_type'] == 'at least' and select_count < que_rec['req_ans']) or \
@ -805,12 +805,12 @@ class survey_question_wiz(osv.osv_memory):
(que_rec['required_type'] == 'a range' and (select_count < que_rec['minimum_req_ans'] or select_count > que_rec['maximum_req_ans'])):
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
if que_rec['type'] in ['multiple_choice_only_one_ans','single_textbox','comment'] and que_rec['is_require_answer'] and select_count <= 0:
for res in resp_id_list:
sur_name_read['store_ans'].pop(res)
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
else:
resp_id_list = []
@ -884,7 +884,7 @@ class survey_question_wiz(osv.osv_memory):
if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val) == None:
error = True
if error:
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['comment_valid_err_msg']))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['comment_valid_err_msg']))
resp_obj.write(cr, uid, update, {'comment':val,'state': 'done'})
sur_name_read['store_ans'][update].update({key:val})
@ -920,7 +920,7 @@ class survey_question_wiz(osv.osv_memory):
if re.match("^[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}$", val) == None:
error = True
if error:
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['validation_valid_err_msg']))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' \n" + tools.ustr(que_rec['validation_valid_err_msg']))
if key.split('_')[1] == "single" :
resp_obj.write(cr, uid, update, {'single_text':val,'state': 'done'})
else:
@ -938,7 +938,7 @@ class survey_question_wiz(osv.osv_memory):
sur_name_read['store_ans'][update].update({key:val})
select_count += 1
except:
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "'\n" + _("Please enter an integer value."))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "'\n" + _("Please enter an integer value."))
elif val and len(key.split('_')) == 3:
resp_obj.write(cr, uid, update, {'state': 'done'})
@ -966,13 +966,13 @@ class survey_question_wiz(osv.osv_memory):
sur_name_read['store_ans'][update].update({key:val})
if comment_field and comment_value:
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['make_comment_field_err_msg']))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['make_comment_field_err_msg']))
if que_rec['type'] == "rating_scale" and que_rec['rating_allow_one_column_require'] and len(selected_value) > len(list(set(selected_value))):
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "\n" + _("You cannot select same answer more than one time.'"))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "\n" + _("You cannot select same answer more than one time.'"))
if que_rec['numeric_required_sum'] and numeric_sum > que_rec['numeric_required_sum']:
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['numeric_required_sum_err_msg']))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['numeric_required_sum_err_msg']))
if not select_count:
resp_obj.write(cr, uid, update, {'state': 'skip'})
@ -984,17 +984,17 @@ class survey_question_wiz(osv.osv_memory):
(que_rec['required_type'] == 'at most' and len(list(set(matrix_list))) > que_rec['req_ans']) or \
(que_rec['required_type'] == 'exactly' and len(list(set(matrix_list))) != que_rec['req_ans']) or \
(que_rec['required_type'] == 'a range' and (len(list(set(matrix_list))) < que_rec['minimum_req_ans'] or len(list(set(matrix_list))) > que_rec['maximum_req_ans'])):
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
elif (que_rec['required_type'] == 'all' and select_count < len(que_rec['answer_choice_ids'])) or \
(que_rec['required_type'] == 'at least' and select_count < que_rec['req_ans']) or \
(que_rec['required_type'] == 'at most' and select_count > que_rec['req_ans']) or \
(que_rec['required_type'] == 'exactly' and select_count != que_rec['req_ans']) or \
(que_rec['required_type'] == 'a range' and (select_count < que_rec['minimum_req_ans'] or select_count > que_rec['maximum_req_ans'])):
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
if que_rec['type'] in ['multiple_choice_only_one_ans','single_textbox','comment'] and que_rec['is_require_answer'] and select_count <= 0:
raise osv.except_osv(_('Warning !'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
raise osv.except_osv(_('Warning!'), "'" + que_rec['question'] + "' " + tools.ustr(que_rec['req_error_msg']))
return survey_question_wiz_id

View File

@ -77,10 +77,10 @@ class survey_name_wiz(osv.osv_memory):
res = cr.fetchone()[0]
sur_rec = survey_obj.browse(cr,uid,survey_id,context=context)
if sur_rec.response_user and res >= sur_rec.response_user:
raise osv.except_osv(_('Warning !'),_("You cannot give response for this survey more than %s times.") % (sur_rec.response_user))
raise osv.except_osv(_('Warning!'),_("You cannot give response for this survey more than %s times.") % (sur_rec.response_user))
if sur_rec.max_response_limit and sur_rec.max_response_limit <= sur_rec.tot_start_survey:
raise osv.except_osv(_('Warning !'),_("You cannot give more responses. Please contact the author of this survey for further assistance."))
raise osv.except_osv(_('Warning!'),_("You cannot give more responses. Please contact the author of this survey for further assistance."))
search_id = search_obj.search(cr,uid,[('model','=','survey.question.wiz'),('name','=','Survey Search')])
return {

View File

@ -71,7 +71,7 @@ class survey_send_invitation(osv.osv_memory):
if sur.state != 'open':
msg += sur.title + "\n"
if msg:
raise osv.except_osv(_('Warning !'), _('%sSurvey is not in open state') % msg)
raise osv.except_osv(_('Warning!'), _('%sSurvey is not in open state') % msg)
data['mail'] = '''Hello %(name)s, \n\n We are inviting you for following survey. \
\n ''' + name + '''\n Your login ID: %(login)s, Your password: %(passwd)s
\n link :- http://'''+ str(socket.gethostname()) + ''':8080 \n\n Thanks,'''

View File

@ -234,7 +234,7 @@ class wiki_history(osv.osv):
if text2:
line2=tools.ustr(text2.splitlines(1))
if (not line1 and not line2) or (line1 == line2):
raise osv.except_osv(_('Warning !'), _('There are no changes in revisions.'))
raise osv.except_osv(_('Warning!'), _('There are no changes in revisions.'))
diff = difflib.HtmlDiff()
return diff.make_file(line1, line2, "Revision-%s" % (v1), "Revision-%s" % (v2), context=False)

View File

@ -49,7 +49,7 @@ class wiki_make_index(osv.osv_memory):
order by section ", (tuple(data),))
lst0 = cr.fetchall()
if not lst0[0][1]:
raise osv.except_osv(_('Warning !'), _('There is no section in this Page.'))
raise osv.except_osv(_('Warning!'), _('There is no section in this Page.'))
lst = []
s_ids = {}

View File

@ -51,7 +51,7 @@ class showdiff(osv.osv_memory):
nids.sort()
diff = base64.encodestring(history.getDiff(cr, uid, ids[0], nids[-1]))
else:
raise osv.except_osv(_('Warning'), _('You need to select minimum one or maximum two history revisions!'))
raise osv.except_osv(_('Warning!'), _('You need to select minimum one or maximum two history revisions!'))
return diff