Skip to content

Commit

Permalink
[FIX] account_payment_group: Fix when creating a receipt from another…
Browse files Browse the repository at this point in the history
… company different of the self.env.company
  • Loading branch information
rov-adhoc committed May 3, 2024
1 parent 793ae0b commit 2ea851f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions account_payment_group/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,9 @@ def _compute_made_sequence_hole(self):
pay_group_recs = self.filtered(lambda x: x.journal_id.type not in ('bank', 'cash') and x.payment_group_id)
pay_group_recs.made_sequence_hole = False
super(AccountMove, self - pay_group_recs)._compute_made_sequence_hole()

def _search_default_journal(self):
if self.env.context.get('default_company_id') != self.env.company.id:
company_id = self.env.context.get('default_company_id')
self.company_id = company_id
super(AccountMove, self)._search_default_journal()

0 comments on commit 2ea851f

Please sign in to comment.