[FIX] account: Use 'parent_state' instead of 'move_id.state'
closes odoo/odoo#94287 X-original-commit: fd51248bf4c5535b33fb5a6335dbb3b10cb1d2d9 Related: odoo/enterprise#28744 Signed-off-by: Quentin De Paoli <qdp@odoo.com> Signed-off-by: Laurent Smet <las@odoo.com>
This commit is contained in:
@@ -973,7 +973,7 @@ class AccountBankStatementLine(models.Model):
|
||||
return [
|
||||
# Base domain.
|
||||
('display_type', 'not in', ('line_section', 'line_note')),
|
||||
('move_id.state', '=', 'posted'),
|
||||
('parent_state', '=', 'posted'),
|
||||
('company_id', '=', self.company_id.id),
|
||||
# Reconciliation domain.
|
||||
('reconciled', '=', False),
|
||||
|
||||
@@ -725,6 +725,7 @@ class AccountReconcileModel(models.Model):
|
||||
)
|
||||
) AS token
|
||||
FROM {tables}
|
||||
JOIN account_move account_move_line__move_id ON account_move_line__move_id.id = account_move_line.move_id
|
||||
WHERE {where_clause} AND {table_alias}.{field} IS NOT NULL
|
||||
''')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user