[TMP]pms: add context variable to avoid auto create transactions cash payments

This commit is contained in:
Darío Lodeiros
2022-11-14 14:03:47 +01:00
parent 4ccbcea560
commit 5ca48a0cf2

View File

@@ -2129,7 +2129,8 @@ class PmsFolio(models.Model):
move._autoreconcile_folio_payments()
# Automatic register payment in cash register
if pay_type == "cash":
# TODO: no_cash_register to avoid flow in the new api (delete it in the future)
if pay_type == "cash" and not self.env.context.get("no_cash_register"):
line = self._get_statement_line_vals(
journal=journal,
receivable_account=receivable_account,
@@ -2214,7 +2215,8 @@ class PmsFolio(models.Model):
pay.action_post()
# Automatic register refund in cash register
if pay_type == "cash":
# TODO: no_cash_register to avoid flow in the new api (delete it in the future)
if pay_type == "cash" and not self.env.context.get("no_cash_register"):
line = self._get_statement_line_vals(
journal=journal,
receivable_account=receivable_account,