[IMP] avoid SaaS to crash + better product error msg
bzr revid: fp@fp-laptop-20111231071416-6ofgfvjll9584c71
This commit is contained in:
@@ -34,7 +34,7 @@ class account_automatic_reconcile(osv.osv_memory):
|
||||
'journal_id': fields.many2one('account.journal', 'Journal'),
|
||||
'period_id': fields.many2one('account.period', 'Period'),
|
||||
'max_amount': fields.float('Maximum write-off amount'),
|
||||
'power': fields.selection([(p, str(p)) for p in range(2, 10)], 'Power', required=True, help='Number of partial amounts that can be combined to find a balance point can be chosen as the power of the automatic reconciliation'),
|
||||
'power': fields.selection([(p, str(p)) for p in range(2, 5)], 'Power', required=True, help='Number of partial amounts that can be combined to find a balance point can be chosen as the power of the automatic reconciliation'),
|
||||
'date1': fields.date('Starting Date', required=True),
|
||||
'date2': fields.date('Ending Date', required=True),
|
||||
'reconciled': fields.integer('Reconciled transactions', readonly=True),
|
||||
|
||||
@@ -342,7 +342,7 @@ class product_template(osv.osv):
|
||||
for product in self.browse(cr, uid, ids, context=context):
|
||||
old_uom = product.uom_po_id
|
||||
if old_uom.category_id.id != new_uom.category_id.id:
|
||||
raise osv.except_osv(_('UoM categories Mismatch!'), _("New UoM '%s' must belongs to same UoM category '%s' as of old UoM '%s'.") % (new_uom.name, old_uom.category_id.name, old_uom.name,))
|
||||
raise osv.except_osv(_('UoM categories Mismatch!'), _("New UoM '%s' must belong to same UoM category '%s' as of old UoM '%s'. If you need to change the unit of measure, you may desactivate this product from the 'Procurement & Locations' tab and create a new one.") % (new_uom.name, old_uom.category_id.name, old_uom.name,))
|
||||
return super(product_template, self).write(cr, uid, ids, vals, context=context)
|
||||
|
||||
_defaults = {
|
||||
|
||||
Reference in New Issue
Block a user