← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-addons/trunk-bug-768430-ron into lp:openobject-addons

 

Rohan Nayani(openerp) has proposed merging lp:~openerp-dev/openobject-addons/trunk-bug-768430-ron into lp:openobject-addons.

Requested reviews:
  Rucha (Open ERP) (rpa-openerp)
Related bugs:
  Bug #768430 in OpenERP Addons: "[6.0.2] Error when creating new product "
  https://bugs.launchpad.net/openobject-addons/+bug/768430

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-768430-ron/+merge/59170

product:Fixed-After delete All product category you cannot create new product
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-768430-ron/+merge/59170
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-bug-768430-ron.
=== modified file 'product/product.py'
--- product/product.py	2011-03-23 12:08:18 +0000
+++ product/product.py	2011-04-27 06:05:50 +0000
@@ -315,7 +315,11 @@
         if 'categ_id' in context and context['categ_id']:
             return context['categ_id']
         md = self.pool.get('ir.model.data')
-        res = md.get_object_reference(cr, uid, 'product', 'cat0') or False
+        res = False
+        try:
+            res = md.get_object_reference(cr, uid, 'product', 'cat0')
+        except ValueError:
+            res = False
         return res and res[1] or False
 
     def onchange_uom(self, cursor, user, ids, uom_id,uom_po_id):


Follow ups