Public bug reported: To reproduce:
Create a manufactured product with a bom that includes a quantity which can't be represented as a float proper, i.e. 0.033. Create a production order for this product and confirm the production. Now have a look on the moves created: You'll find a quantity of 0.033000000000000002 which will cause all sorts of trouble afterwards. Analysis: In http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/stock/stock.py#L2189 we update the database directly, thereby circumventing the decimal precision adjustments for product_qty and product_uos_qty. I think changing this to move.write({'location_id': r[1], 'product_qty': r[0], 'product_uos_qty': product_uos_qty}) already fixes the problem. ** Affects: openobject-addons Importance: Undecided Status: New -- You received this bug notification because you are a member of OpenERP Indian Team, which is subscribed to OpenERP Addons. https://bugs.launchpad.net/bugs/1268594 Title: [trunk] [7.0] stock.check_assign ignores decimal precision Status in OpenERP Addons (modules): New Bug description: To reproduce: Create a manufactured product with a bom that includes a quantity which can't be represented as a float proper, i.e. 0.033. Create a production order for this product and confirm the production. Now have a look on the moves created: You'll find a quantity of 0.033000000000000002 which will cause all sorts of trouble afterwards. Analysis: In http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/stock/stock.py#L2189 we update the database directly, thereby circumventing the decimal precision adjustments for product_qty and product_uos_qty. I think changing this to move.write({'location_id': r[1], 'product_qty': r[0], 'product_uos_qty': product_uos_qty}) already fixes the problem. To manage notifications about this bug go to: https://bugs.launchpad.net/openobject-addons/+bug/1268594/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~openerp-india Post to : [email protected] Unsubscribe : https://launchpad.net/~openerp-india More help : https://help.launchpad.net/ListHelp

