Skip to content

Commit

Permalink
[16.0][FIX] clean_context not working correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Kev-Roche committed Sep 2, 2024
1 parent 10f79b3 commit ed7d0cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion account_invoice_inter_company/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def _inter_company_create_invoice(self, dest_company):
force_number = inter_invoice.name
inter_invoice.with_context(force_delete=True).unlink()
# create destination invoice
self = self.with_context(**clean_context(self.env.context))
dest_invoice_data = self._prepare_invoice_data(dest_company)
if force_number:
dest_invoice_data["name"] = force_number
Expand Down Expand Up @@ -214,7 +215,6 @@ def _prepare_invoice_data(self, dest_company):
:rtype dest_company : res.company record
"""
self.ensure_one()
self = self.with_context(**clean_context(self.env.context))
# check if the journal is define in dest company
self._check_dest_journal(dest_company)
vals = {
Expand Down

0 comments on commit ed7d0cb

Please sign in to comment.