diff --git a/connector_opencart/__manifest__.py b/connector_opencart/__manifest__.py index 630a5319..ddd2c9bc 100644 --- a/connector_opencart/__manifest__.py +++ b/connector_opencart/__manifest__.py @@ -3,7 +3,7 @@ { 'name': 'Opencart Connector', - 'version': '12.0.1.0.0', + 'version': '12.0.1.1.0', 'category': 'Connector', 'depends': [ 'account', diff --git a/delivery_gls_nl/models/delivery_gls_nl.py b/delivery_gls_nl/models/delivery_gls_nl.py index 46fcebff..c0694d70 100644 --- a/delivery_gls_nl/models/delivery_gls_nl.py +++ b/delivery_gls_nl/models/delivery_gls_nl.py @@ -232,21 +232,23 @@ class ProviderGLSNL(models.Model): # } if picking.package_ids: for package in picking.package_ids: - rate = self._gls_nl_rate(to.country_id.code, package.shipping_weight or 0.0) + converted_weight = self._gls_convert_weight(package.shipping_weight) + rate = self._gls_nl_rate(to.country_id.code, converted_weight or 0.0) if rate and rate != self.GLS_NL_COUNTRY_NOT_FOUND: total_rate += rate unit = { 'unitId': package.name, - 'weight': package.shipping_weight, + 'weight': converted_weight } request_body['units'].append(unit) else: - rate = self._gls_nl_rate(to.country_id.code, picking.shipping_weight or 0.0) + converted_weight = self._gls_convert_weight(picking.shipping_weight) + rate = self._gls_nl_rate(to.country_id.code, converted_weight or 0.0) if rate and rate != self.GLS_NL_COUNTRY_NOT_FOUND: total_rate += rate unit = { 'unitId': picking.name, - 'weight': picking.shipping_weight, + 'weight': converted_weight, } request_body['units'].append(unit) @@ -292,3 +294,11 @@ class ProviderGLSNL(models.Model): picking.write({'carrier_tracking_ref': '', 'carrier_price': 0.0}) except HTTPError as e: raise ValidationError(e) + + def _gls_convert_weight(self, weight): + get_param = self.env['ir.config_parameter'].sudo().get_param + product_weight_in_lbs_param = get_param('product.weight_in_lbs') + if product_weight_in_lbs_param == '1': + return weight / 2.20462 + else: + return weight diff --git a/l10n_us_hr_payroll/__manifest__.py b/l10n_us_hr_payroll/__manifest__.py index db997dae..046b526b 100755 --- a/l10n_us_hr_payroll/__manifest__.py +++ b/l10n_us_hr_payroll/__manifest__.py @@ -7,7 +7,7 @@ 'hr_payroll_rate', 'hibou_professional', ], - 'version': '12.0.2020.2.1', + 'version': '12.0.2020.2.2', 'description': """ USA Payroll Rules. ==================