Try to post only clearing move of journals from the contextual company
Closes #12453
This commit is contained in:
1 parent
69c88b6a8a
commit
0fe7228d58
1 file changed
+2
-1
@@ -49,6 +49,7 @@ class Journal(metaclass=PoolMeta):
|
||||
date = Date.today()
|
||||
moves = []
|
||||
journals = cls.search([
|
||||
('company', '=', Transaction().context.get('company')),
|
||||
('clearing_posting_delay', '!=', None),
|
||||
])
|
||||
for journal in journals:
|
||||
@@ -58,7 +59,7 @@ class Journal(metaclass=PoolMeta):
|
||||
('origin.journal.id', '=', journal.id,
|
||||
'account.payment'),
|
||||
('state', '=', 'draft'),
|
||||
('company', '=', Transaction().context.get('company')),
|
||||
('company', '=', journal.company.id),
|
||||
]))
|
||||
Move.post(moves)
|
||||
|
||||
|
||||
Reference in new issue
Block a user