[IMP]improved exception warnings as per suggestion
bzr revid: help-20120731124210-7vjw7puesjm3884p
This commit is contained in:
parent
bc68e4079c
commit
c5427f3faa
|
@ -315,7 +315,7 @@ class hr_timesheet_sheet(osv.osv):
|
|||
def check_sign(self, cr, uid, ids, typ, context=None):
|
||||
sheet = self.browse(cr, uid, ids, context=context)[0]
|
||||
if not sheet.date_current == time.strftime('%Y-%m-%d'):
|
||||
raise osv.except_osv(_('Error !'), _('You cannot sign in/sign out from an other date than today.'))
|
||||
raise osv.except_osv(_('Error !'), _('You cannot sign in/sign out from other date than today.'))
|
||||
return True
|
||||
|
||||
def sign(self, cr, uid, ids, typ, context=None):
|
||||
|
|
|
@ -971,7 +971,7 @@ msgstr ""
|
|||
#. module: hr_timesheet_sheet
|
||||
#: code:addons/hr_timesheet_sheet/hr_timesheet_sheet.py:318
|
||||
#, python-format
|
||||
msgid "You cannot sign in/sign out from an other date than today."
|
||||
msgid "You cannot sign in/sign out from other date than today."
|
||||
msgstr ""
|
||||
|
||||
#. module: hr_timesheet_sheet
|
||||
|
|
|
@ -33,8 +33,8 @@ msgstr ""
|
|||
#. module: import_google
|
||||
#: code:addons/import_google/wizard/import_google_data.py:71
|
||||
#, python-format
|
||||
msgid "No Google username or password is defined for user.\n"
|
||||
"Please define in user view."
|
||||
msgid "No Google Username or password is defined for user.\n"
|
||||
"Please define on user's form."
|
||||
msgstr ""
|
||||
|
||||
#. module: import_google
|
||||
|
|
|
@ -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 in user view."))
|
||||
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')]
|
||||
|
|
|
@ -164,7 +164,7 @@ msgstr ""
|
|||
#. module: mrp_operations
|
||||
#: code:addons/mrp_operations/mrp_operations.py:486
|
||||
#, python-format
|
||||
msgid "There is no Operation to be cancelled!"
|
||||
msgid "No operation to cancel."
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp_operations
|
||||
|
|
|
@ -533,7 +533,7 @@ class mrp_operations_operation(osv.osv):
|
|||
return False
|
||||
if code.start_stop=='cancel':
|
||||
if not 'start' in code_lst :
|
||||
raise osv.except_osv(_('Error!'),_('There is no Operation to be cancelled!'))
|
||||
raise osv.except_osv(_('Error!'),_('No operation to cancel.'))
|
||||
return False
|
||||
if 'done' in code_lst:
|
||||
raise osv.except_osv(_('Error!'),_('Operation is already finished!'))
|
||||
|
|
|
@ -443,7 +443,7 @@ msgstr ""
|
|||
#. module: purchase
|
||||
#: code:addons/purchase/purchase.py:499
|
||||
#, python-format
|
||||
msgid "First cancel all receptions related to this purchase order."
|
||||
msgid "You must first cancel all receptions related to this purchase order."
|
||||
msgstr ""
|
||||
|
||||
#. module: purchase
|
||||
|
|
|
@ -503,7 +503,7 @@ class purchase_order(osv.osv):
|
|||
if inv and inv.state not in ('cancel','draft'):
|
||||
raise osv.except_osv(
|
||||
_('Unable to cancel this purchase order.'),
|
||||
_('First cancel all receptions related to this purchase order.'))
|
||||
_('You must first cancel all receptions related to this purchase order.'))
|
||||
if inv:
|
||||
wf_service.trg_validate(uid, 'account.invoice', inv.id, 'invoice_cancel', cr)
|
||||
self.write(cr,uid,ids,{'state':'cancel'})
|
||||
|
|
|
@ -131,7 +131,7 @@ msgstr ""
|
|||
#: code:addons/sale/sale.py:295
|
||||
#, python-format
|
||||
msgid ""
|
||||
"In order to delete a confirmed sales order, you must cancel it before ! To "
|
||||
"In order to delete a confirmed sales order, you must cancel it! To "
|
||||
"cancel a sale order, you must first cancel related picking for delivery "
|
||||
"orders."
|
||||
msgstr ""
|
||||
|
@ -1492,7 +1492,7 @@ msgstr ""
|
|||
#. module: sale
|
||||
#: code:addons/sale/sale.py:604
|
||||
#, python-format
|
||||
msgid "First cancel all picking attached to this sales order."
|
||||
msgid "You must first cancel all delivery order(s) attached to this sales order."
|
||||
msgstr ""
|
||||
|
||||
#. module: sale
|
||||
|
|
|
@ -295,7 +295,7 @@ class sale_order(osv.osv):
|
|||
if s['state'] in ['draft', 'cancel']:
|
||||
unlink_ids.append(s['id'])
|
||||
else:
|
||||
raise osv.except_osv(_('Invalid action !'), _('In order to delete a confirmed sales order, you must cancel it before ! To cancel a sale order, you must first cancel related picking for delivery orders.'))
|
||||
raise osv.except_osv(_('Invalid action !'), _('In order to delete a confirmed sales order, you must cancel it! To cancel a sale order, you must first cancel related picking for delivery orders.'))
|
||||
|
||||
return osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
|
||||
|
||||
|
@ -703,7 +703,7 @@ class sale_order(osv.osv):
|
|||
if pick.state not in ('draft', 'cancel'):
|
||||
raise osv.except_osv(
|
||||
_('Cannot cancel sales order!'),
|
||||
_('First cancel all picking attached to this sales order.'))
|
||||
_('You must first cancel all delivery order(s) attached to this sales order.'))
|
||||
if pick.state == 'cancel':
|
||||
for mov in pick.move_lines:
|
||||
proc_ids = proc_obj.search(cr, uid, [('move_id', '=', mov.id)])
|
||||
|
@ -1210,7 +1210,7 @@ class sale_order_line(osv.osv):
|
|||
account_id = self.pool.get('account.fiscal.position').map_account(cr, uid, fpos, account_id)
|
||||
if not account_id:
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('Please define Fiscal Position or income category account for Product Categories default Properties.'))
|
||||
_('There is no Fiscal Position defined or Income category account defined for default properties of Product categories.'))
|
||||
return {
|
||||
'name': line.name,
|
||||
'origin': line.order_id.name,
|
||||
|
|
|
@ -2842,7 +2842,7 @@ msgstr ""
|
|||
#: code:addons/stock/stock.py:2379 code:addons/stock/stock.py:2440
|
||||
#: code:addons/stock/wizard/stock_partial_picking.py:141
|
||||
#, python-format
|
||||
msgid "Please provide proper quantity."
|
||||
msgid "Please provide proper Quantity."
|
||||
msgstr ""
|
||||
|
||||
#. module: stock
|
||||
|
|
|
@ -167,7 +167,7 @@ class stock_partial_picking(osv.osv_memory):
|
|||
|
||||
#Quantiny must be Positive
|
||||
if wizard_line.quantity < 0:
|
||||
raise osv.except_osv(_('Warning!'), _('Please provide proper quantity.'))
|
||||
raise osv.except_osv(_('Warning!'), _('Please provide proper Quantity.'))
|
||||
|
||||
#Compute the quantity for respective wizard_line in the line uom (this jsut do the rounding if necessary)
|
||||
qty_in_line_uom = uom_obj._compute_qty(cr, uid, line_uom.id, wizard_line.quantity, line_uom.id)
|
||||
|
|
Loading…
Reference in New Issue