diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml
index 532777a5066..05393c94518 100644
--- a/addons/account/views/account_view.xml
+++ b/addons/account/views/account_view.xml
@@ -1194,7 +1194,7 @@
-
+
diff --git a/addons/account/wizard/account_reconcile.py b/addons/account/wizard/account_reconcile.py
index 3ca9d5cc47f..c0d1b29d210 100644
--- a/addons/account/wizard/account_reconcile.py
+++ b/addons/account/wizard/account_reconcile.py
@@ -36,7 +36,7 @@ class AccountMoveLineReconcile(models.TransientModel):
credit = debit = 0
lines = self.env['account.move.line'].browse(context.get('active_ids', []))
for line in lines:
- if not line.reconciled:
+ if not line.full_reconcile_id:
credit += line.credit
debit += line.debit
precision = self.env.user.company_id.currency_id.decimal_places
@@ -64,9 +64,13 @@ class AccountMoveLineReconcile(models.TransientModel):
if aml.currency_id.id == currency:
continue
raise UserError(_('Operation not allowed. You can only reconcile entries that share the same secondary currency or that don\'t have one. Edit your journal items or make another selection before proceeding any further.'))
+ #Don't consider entrires that are already reconciled
+ move_lines_filtered = move_lines.filtered(lambda aml: not aml.reconciled)
#Because we are making a full reconcilition in batch, we need to consider use cases as defined in the test test_manual_reconcile_wizard_opw678153
- #So we force the reconciliation in company currency only at first, then in second pass the amounts in secondary currency.
- move_lines.with_context(skip_full_reconcile_check='amount_currency_excluded', manual_full_reconcile_currency=currency).reconcile()
+ #So we force the reconciliation in company currency only at first
+ move_lines_filtered.with_context(skip_full_reconcile_check='amount_currency_excluded', manual_full_reconcile_currency=currency).reconcile()
+
+ #then in second pass the amounts in secondary currency, only if some lines are still not fully reconciled
move_lines_filtered = move_lines.filtered(lambda aml: not aml.reconciled)
if move_lines_filtered:
move_lines_filtered.with_context(skip_full_reconcile_check='amount_currency_only', manual_full_reconcile_currency=currency).reconcile()
@@ -123,13 +127,18 @@ class AccountMoveLineReconcileWriteoff(models.TransientModel):
if aml.currency_id.id == currency:
continue
raise UserError(_('Operation not allowed. You can only reconcile entries that share the same secondary currency or that don\'t have one. Edit your journal items or make another selection before proceeding any further.'))
+ #Don't consider entrires that are already reconciled
+ move_lines_filtered = move_lines.filtered(lambda aml: not aml.reconciled)
#Because we are making a full reconcilition in batch, we need to consider use cases as defined in the test test_manual_reconcile_wizard_opw678153
- #So we force the reconciliation in company currency only at first, then in second pass the amounts in secondary currency.
+ #So we force the reconciliation in company currency only at first,
context['skip_full_reconcile_check'] = 'amount_currency_excluded'
context['manual_full_reconcile_currency'] = currency
- writeoff = move_lines.with_context(context).reconcile(self.writeoff_acc_id, self.journal_id)
+ writeoff = move_lines_filtered.with_context(context).reconcile(self.writeoff_acc_id, self.journal_id)
+ #then in second pass the amounts in secondary currency, only if some lines are still not fully reconciled
move_lines_filtered = move_lines.filtered(lambda aml: not aml.reconciled)
if move_lines_filtered:
move_lines_filtered.with_context(skip_full_reconcile_check='amount_currency_only', manual_full_reconcile_currency=currency).reconcile()
- (move_lines + writeoff).compute_full_after_batch_reconcile()
+ if not isinstance(writeoff, bool):
+ move_lines += writeoff
+ move_lines.compute_full_after_batch_reconcile()
return {'type': 'ir.actions.act_window_close'}
diff --git a/addons/web/static/src/less/list_view.less b/addons/web/static/src/less/list_view.less
index 545f6fcafc7..267ee7aa78a 100644
--- a/addons/web/static/src/less/list_view.less
+++ b/addons/web/static/src/less/list_view.less
@@ -138,6 +138,10 @@
&.o_readonly {
visibility: visible;
color: transparent;
+
+ > .o_checkbox {
+ visibility: hidden;
+ }
}
}
}
@@ -158,7 +162,7 @@
max-width: 100%; // Fix a chrome bug where badge would not break on multiple lines
}
- &.o_readonly {
+ &.o_readonly:not(.o_checkbox) {
background-color: transparent;
padding: 5px;
}