diff --git a/addons/account/models/account.py b/addons/account/models/account.py
index 30ab7082504..5cd647e5648 100644
--- a/addons/account/models/account.py
+++ b/addons/account/models/account.py
@@ -1419,13 +1419,15 @@ class AccountTax(models.Model):
# Compute the tax lines
tax_repartition_lines = (is_refund and tax.refund_repartition_line_ids or tax.invoice_repartition_line_ids).filtered(lambda x: x.repartition_type == 'tax')
+ sum_factor = sum(tax_repartition_lines.mapped('factor'))
repartition_lines_to_treat = len(tax_repartition_lines)
total_amount = 0
for repartition_line in tax_repartition_lines:
- if repartition_lines_to_treat != 1:
+ if repartition_lines_to_treat != 1 or sum_factor != 1.0:
line_amount = round(tax_amount * repartition_line.factor, prec)
else:
- # In case some rounding error occurs, we compensate for it on the last line
+ # When the sum of the repartition lines factor is 100%, we need to ensure the whole tax amount has
+ # been spread into the repartition lines.
line_amount = round(tax_amount - total_amount, prec)
taxes_vals.append({
diff --git a/addons/hr/security/hr_security.xml b/addons/hr/security/hr_security.xml
index e3a33270e73..bbafaf7fb38 100644
--- a/addons/hr/security/hr_security.xml
+++ b/addons/hr/security/hr_security.xml
@@ -54,12 +54,5 @@
['|',('company_id','=',False),('company_id', 'in', company_ids)]
-
- Employee multi company rule
-
-
- ['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]
-
-
diff --git a/addons/hr_holidays/models/hr_employee.py b/addons/hr_holidays/models/hr_employee.py
index c0a47809e04..c5be1cd73a9 100644
--- a/addons/hr_holidays/models/hr_employee.py
+++ b/addons/hr_holidays/models/hr_employee.py
@@ -63,7 +63,7 @@ class HrEmployeeBase(models.AbstractModel):
) h
join hr_leave_type s ON (s.id=h.holiday_status_id)
WHERE
- h.state='validate' AND
+ s.active = true AND h.state='validate' AND
(s.allocation_type='fixed' OR s.allocation_type='fixed_allocation') AND
h.employee_id in %s
GROUP BY h.employee_id""", (tuple(self.ids),))
@@ -82,6 +82,7 @@ class HrEmployeeBase(models.AbstractModel):
for employee in self:
allocations = self.env['hr.leave.allocation'].search([
('employee_id', '=', employee.id),
+ ('holiday_status_id.active', '=', True),
('state', '=', 'validate'),
'|',
('date_to', '=', False),
diff --git a/addons/website_crm_partner_assign/static/src/js/crm_partner_assign.js b/addons/website_crm_partner_assign/static/src/js/crm_partner_assign.js
index bc5b17b5151..59a835945a0 100644
--- a/addons/website_crm_partner_assign/static/src/js/crm_partner_assign.js
+++ b/addons/website_crm_partner_assign/static/src/js/crm_partner_assign.js
@@ -264,7 +264,7 @@ publicWidget.registry.crmPartnerAssign = publicWidget.Widget.extend({
_parse_date: function (value) {
console.log(value);
- var date = moment(value, time.getLangDateFormat(), true);
+ var date = moment(value, "YYYY-MM-DD", true);
if (date.isValid()) {
return time.date_to_str(date.toDate());
}