-
-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8.0][product_dimension][FIX] Fix volume being incorrectly calculated due to rounding issues. #284
Conversation
ping @jjscarafia |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, otherwise 👍
@@ -16,7 +16,7 @@ | |||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
{ | |||
'name': 'Product Dimension', | |||
'version': '8.0.2.0.0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should only be increased a patch version. 8.0.2.0.1
@@ -83,7 +84,8 @@ def convert_to_meters(self, measure, dimensional_uom): | |||
return self.env['product.uom']._compute_qty_obj( | |||
from_unit=dimensional_uom, | |||
qty=measure, | |||
to_unit=uom_meters) | |||
to_unit=uom_meters, | |||
round=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a trailing comma & put the )
on the next line. Notice how you had to edit two lines to diff in order for one line of change? The trailing comma + )
on its own line prevents this & reduces the possibility for conflicts.
@moylop260 - the Runbot build on this is skipping for some reason. The only way I know of to identify the reasoning for this is in the server logs themselves - is there another way? |
The .travis.yml looks like as a too old version. |
Let me know if it's ok now, and I'll squash commits. |
Thanks @ivantodorovich. No need on the squash, it's a merge option as long as we're squashing everything 👍 |
[9.0][product_dimension][FIX] Fix volume being incorrectly calculated due to rounding issues (#284)2
[10.0][product_dimension][FIX] Fix volume being incorrectly calculated due to rounding issues (#284)
* rename product_dimensions -> product_dimension osv -> orm test computation of volume in same UOM add test with conversion from cm refactor, new API, generic UOM computation fix wording in readme do not use camelcase for Models put dimensions in their own group Otherwise they are shown as weights. fill in placeholders in README README is actually rst, not md use a new-api onchange, update tests, refactor Also, spell "height" correctly. * Add missing default oca icons * [ADD] Dimensions fields in product.template FIX remove oldname in field height ADD onchange calculate volume on product template * [UPD] prefix versions with 8.0 * [MIG] Make modules uninstallable * [FIX] product_dimension: Now domain on dimensional_uom_id is working also with other languages than english * [FIX] flake 8 error on modules product_dimension, product_gtin, product_supplierinfo_tree_price_info * ADD test case with product template REF remove executable permission ADD missing tag images Conflicts: product_dimension/__openerp__.py * Module structure, views & license headers [MIG] Make modules uninstallable [MIG] Rename manifest files * [MIG] product_dimension: Migration to 11.0 * [9.0][product_dimension][FIX] Fix volume being incorrectly calculated due to rounding issues (#284)2 * [MIG]: Adding suggested changes
… due to rounding issues (OCA#284)2
… due to rounding issues (OCA#284)2
… due to rounding issues (OCA#284)2
… due to rounding issues (OCA#284)2
… due to rounding issues (OCA#284)2
… due to rounding issues (OCA#284)2
… due to rounding issues (OCA#284)2
… due to rounding issues (OCA#284)2
… due to rounding issues (OCA#284)2
Without this fix, volume was being incorrectly calculated in some cases.
For instance,
UOM: cm
Length: 57.00
Height: 8.00
Width: 19.50
Resulting volume: 0.005 when it should be 0.009 (0.008892, if not rounded)