Mute reconciled payable/receivable lines

issue10951
review364371002
This commit is contained in:
Adrià Tarroja Caubet
2022-04-11 20:13:16 +02:00
parent 1d11822903
commit ef3bc6c231
2 changed files with 18 additions and 0 deletions
+1
View File
@@ -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
+17
View File
@@ -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')