Unreconcile lines when cancelling statement
As it is not allowed to delete a move with lines reconciled. issue4017 review37631002
This commit is contained in:
1 parent
16a64ab622
commit
8b826906c8
3 files changed
+30
-1
No files matched your search
+8
-1
@@ -719,7 +719,14 @@ class Line(sequence_ordered(), ModelSQL, ModelView):
|
||||
|
||||
@classmethod
|
||||
def delete_move(cls, lines):
|
||||
Move = Pool().get('account.move')
|
||||
pool = Pool()
|
||||
Move = pool.get('account.move')
|
||||
Reconciliation = pool.get('account.move.reconciliation')
|
||||
|
||||
reconciliations = [l.reconciliation
|
||||
for line in lines for l in line.move.lines
|
||||
if line.move and l.reconciliation]
|
||||
Reconciliation.delete(reconciliations)
|
||||
Move.delete(list({l.move for l in lines if l.move}))
|
||||
|
||||
def get_move_line(self):
|
||||
|
||||
Reference in new issue
Block a user