summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-10-18 10:41:14 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-10-18 10:41:14 +0700
commit3be0a2a091c3736d660fe0586e72de7fdf789c64 (patch)
tree4cb10d4a1282dbf98f087faae01f4968c2c9e717
parent6fea26e1fa4249662a78d354181b2ccfc9f1aed7 (diff)
Update credit_limit.py
-rwxr-xr-xbase_accounting_kit/models/credit_limit.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/base_accounting_kit/models/credit_limit.py b/base_accounting_kit/models/credit_limit.py
index bcc9f3a..8cee2ed 100755
--- a/base_accounting_kit/models/credit_limit.py
+++ b/base_accounting_kit/models/credit_limit.py
@@ -219,17 +219,17 @@ class AccountMove(models.Model):
def action_post(self):
"""To check the selected customers due amount is exceed than
blocking stage"""
- pay_type = ['out_invoice', 'out_refund', 'out_receipt']
- for rec in self:
- if rec.partner_id.active_limit and rec.move_type in pay_type \
- and rec.partner_id.enable_credit_limit:
- if rec.outstanding_amount >= rec.partner_id.blocking_stage:
- if rec.partner_id.blocking_stage != 0:
- raise UserError(_(
- "%s is in Blocking Stage and "
- "has a due amount of %s %s to pay") % (
- rec.partner_id.name, rec.due_amount,
- rec.currency_id.symbol))
+ # pay_type = ['out_invoice', 'out_refund', 'out_receipt']
+ # for rec in self:
+ # if rec.partner_id.active_limit and rec.move_type in pay_type \
+ # and rec.partner_id.enable_credit_limit:
+ # if rec.outstanding_amount >= rec.partner_id.blocking_stage:
+ # if rec.partner_id.blocking_stage != 0:
+ # raise UserError(_(
+ # "%s is in Blocking Stage and "
+ # "has a due amount of %s %s to pay") % (
+ # rec.partner_id.name, rec.due_amount,
+ # rec.currency_id.symbol))
return super(AccountMove, self).action_post()
@api.onchange('partner_id')