Error in Modify Cost Price wizard
There is an error when executing the "Modify cost price" wizard on the Template model when the cost method is different from "Fixed".
File "/site-packages/trytond/modules/stock/product.py", line 743, in transition_modify
or product.type == 'service'):
UnboundLocalError: local variable 'product' referenced before assignment
At this moment is line http://hg.tryton.org/modules/stock/file/tip/product.py#l872
"product.type" should be replaced by "template.type"
Tested in v 5.6