From 917d1718048cd148ef64cf7014ac08dff1d586d0 Mon Sep 17 00:00:00 2001 From: fp Date: Sat, 31 Dec 2011 08:14:16 +0100 Subject: [PATCH] [IMP] avoid SaaS to crash + better product error msg bzr revid: fp@fp-laptop-20111231071416-6ofgfvjll9584c71 --- addons/account/wizard/account_automatic_reconcile.py | 2 +- addons/product/product.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/wizard/account_automatic_reconcile.py b/addons/account/wizard/account_automatic_reconcile.py index b9e5363e7d2..4dfe263799f 100644 --- a/addons/account/wizard/account_automatic_reconcile.py +++ b/addons/account/wizard/account_automatic_reconcile.py @@ -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), diff --git a/addons/product/product.py b/addons/product/product.py index a0d3901ed70..874680cb17d 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -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 = {