mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[TMP]pms: add context variable to avoid auto create transactions cash payments
This commit is contained in:
@@ -2129,7 +2129,8 @@ class PmsFolio(models.Model):
|
|||||||
move._autoreconcile_folio_payments()
|
move._autoreconcile_folio_payments()
|
||||||
|
|
||||||
# Automatic register payment in cash register
|
# 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(
|
line = self._get_statement_line_vals(
|
||||||
journal=journal,
|
journal=journal,
|
||||||
receivable_account=receivable_account,
|
receivable_account=receivable_account,
|
||||||
@@ -2214,7 +2215,8 @@ class PmsFolio(models.Model):
|
|||||||
pay.action_post()
|
pay.action_post()
|
||||||
|
|
||||||
# Automatic register refund in cash register
|
# 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(
|
line = self._get_statement_line_vals(
|
||||||
journal=journal,
|
journal=journal,
|
||||||
receivable_account=receivable_account,
|
receivable_account=receivable_account,
|
||||||
|
|||||||
Reference in New Issue
Block a user