mrp_production_bysumqt: Faulty logic rev 89

Bug #1257440 reported by Daniel Stenlöv
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenMRP
New
Undecided
Unassigned

Bug Description

I just notice after adding the rev 89 to my merge branch that the logic is faulty and part of the code need to be rewritten. Checks shouldn't be done against language specific names, if checks should be done, the code need to be the same in multilanguage systems and systems in other languages. Therefor the checks need to be done another way. I will look at it some more and post a solution.

------CUT------
44 if lm.product_uom.name == 'ML' or lm.product_uom.name == 'Litro':
45 if line.product_uom.name in ('ML','Litro'):
46 uom_ids = product_uom_obj.search(cr, uid,[('name','=','ML')])
47 if uom_ids:
48 uom = product_uom_obj.browse(cr,uid,uom_ids[0])
49 if uom.uom_type == 'bigger':
50 qty = line.product_qty * uom.factor
51 else:
52 if uom.uom_type == 'smaller':
53 qty = line.product_qty / uom.factor
54
                                            sum = sum + qty
------CUT------

summary: - mrp_master_extension: Faulty logic rev 89
+ mrp_production_bysumqt: Faulty logic rev 89
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.