Review: Needs Fixing

ok, the good thing is that it does fix the problem.

but i've some remarks related to the implementation:
* rest_qty_compute: The use is really weird, the name is meaningless and as 
there is no docstring it's really fuzzy. Here is what you should do: 
    - define in mrp/mrp.py a function named _get_quantity_to_produce() that 
returns production_qty. Write a docstring for it following our guidelines and 
with the explanation of such a method "will be overwritten by mrp_subproduct)
    - use this value to compute res_qty and as param of action_consume()
    - in mrp_subproduct, overwrite this function and return super() * sub_qty. 
sub_qty must also be divided by the quantity of products in BOM. (set a bom for 
5 products A that consume 1 raw material and produce 3 products B (variable) 
and 2 product C (fixed) and check that when you produce and consume 5 units in 
your production then it creates 3 products B instead of 15)

* line 29: you defined a function that as the context as param, that's a good 
reflex but you don't give the context when you call that function... that's 
idiot.

* line 72: the context is missing in the browse

btw, can you also set the default value of mrp.subproduct type to 'variable' 
instead of 'fixed' and set a proper help tooltip?

thanks,
Quentin
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-794431-aag/+merge/71830
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-794431-aag.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to