Skip to content

Commit

Permalink
Fix volume being incorrectly calculated due to rounding issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivantodorovich committed Jul 11, 2017
1 parent c61cd5b commit 0103d4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion product_dimension/__openerp__.py
Expand Up @@ -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',
'version': '8.0.3.0.0',
'category': 'Product',
'author': 'ADHOC SA,Camptocamp,Odoo Community Association (OCA)',
'license': 'AGPL-3',
Expand Down
6 changes: 4 additions & 2 deletions product_dimension/product.py
Expand Up @@ -42,7 +42,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)

@api.model
def _get_dimension_uom_domain(self):
Expand Down Expand Up @@ -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)

length = fields.Float(related='product_variant_ids.length')
height = fields.Float(related='product_variant_ids.height')
Expand Down

0 comments on commit 0103d4a

Please sign in to comment.