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

Proposed by Rohan Nayani(Open ERP)
Status: Merged
Merged at revision: 4758
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-768430-ron
Merge into: lp:openobject-addons
Diff against target: 18 lines (+6/-2)
1 file modified
product/product.py (+6/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-768430-ron
Reviewer Review Type Date Requested Status
qdp (OpenERP) Needs Information
Rucha (Open ERP) (community) Approve
Rohan Nayani(Open ERP) (community) Needs Resubmitting
Review via email: mp+59170@code.launchpad.net

Description of the change

product:Fixed-After delete All product category you cannot create new product

To post a comment you must log in.
Revision history for this message
Rucha (Open ERP) (rpa-openerp) wrote :

return res and res[1] or False

get proper result in above code and then return only res

review: Needs Fixing
Revision history for this message
Rohan Nayani(Open ERP) (ron-tinyerp) :
review: Needs Resubmitting
Revision history for this message
Rucha (Open ERP) (rpa-openerp) :
review: Approve
Revision history for this message
qdp (OpenERP) (qdp) wrote :

i cannot reproduce this bug. Am i missing something?

review: Needs Information
Revision history for this message
Rucha (Open ERP) (rpa-openerp) wrote :

1) Create a new database without demo data
2) Remove Product Category "All Products"
3) Go to product view and try to create new product

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'product/product.py'
--- product/product.py 2011-03-23 12:08:18 +0000
+++ product/product.py 2011-04-27 06:34:33 +0000
@@ -315,8 +315,12 @@
315 if 'categ_id' in context and context['categ_id']:315 if 'categ_id' in context and context['categ_id']:
316 return context['categ_id']316 return context['categ_id']
317 md = self.pool.get('ir.model.data')317 md = self.pool.get('ir.model.data')
318 res = md.get_object_reference(cr, uid, 'product', 'cat0') or False318 res = False
319 return res and res[1] or False319 try:
320 res = md.get_object_reference(cr, uid, 'product', 'cat0')[1]
321 except ValueError:
322 res = False
323 return res
320324
321 def onchange_uom(self, cursor, user, ids, uom_id,uom_po_id):325 def onchange_uom(self, cursor, user, ids, uom_id,uom_po_id):
322 if uom_id:326 if uom_id:

Subscribers

People subscribed via source and target branches

to all changes: