Try to post only clearing move of journals from the contextual company
Closes #12453 (grafted from b71b06a871a7fb67a202f1ae242a04185078c614) --HG-- branch : 6.0
This commit is contained in:
@@ -41,6 +41,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:
|
||||
@@ -50,7 +51,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