I suppose you tested that it works to solve the bug, so it looks ok.
However I would also suggest to let the price computation go through with
negative amounts too, as that would be the expected behavior for the user if
they set a negative price, whatever the final result.
So only one safety line would be needed, really, in case price is None (not
sure it's possible), or no test at all if price is always float or False.
if not price:
price = 0.0
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-bug-710521-jvo/+merge/55473
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-bug-710521-jvo.
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-web
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-web
More help : https://help.launchpad.net/ListHelp