[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

@ -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

@ -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

@ -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

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

@ -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

@ -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