diff --git a/CHANGELOG b/CHANGELOG index 4cd4f3a9a8..65c86e116b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Mute reconciled payable/receivable lines * Add delegated amount on move lines * Enforce same type for children account as their parent * Show debit / credit columns in ledgers when they contain lines diff --git a/move.py b/move.py index ee38d5f718..4d0e543d53 100644 --- a/move.py +++ b/move.py @@ -1206,6 +1206,23 @@ class Line(MoveLineMixin, ModelSQL, ModelView): gettext('account.msg_modify_line_reconciled', line=line.rec_name)) + @classmethod + def view_attributes(cls): + attributes = super().view_attributes() + view_ids = cls._view_reconciliation_muted() + if Transaction().context.get('view_id') in view_ids: + attributes.append( + ('/tree', 'visual', + If(Bool(Eval('reconciliation')), 'muted', ''))) + return attributes + + @classmethod + def _view_reconciliation_muted(cls): + pool = Pool() + ModelData = pool.get('ir.model.data') + return {ModelData.get_id( + 'account', 'move_line_view_list_payable_receivable')} + @classmethod def delete(cls, lines): Move = Pool().get('account.move')