Skip to content

Commit

Permalink
[FIX] depend account_check_payee
Browse files Browse the repository at this point in the history
  • Loading branch information
Saran440 committed Sep 29, 2023
1 parent 5228ac1 commit 9f38ab7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
2 changes: 1 addition & 1 deletion l10n_th_bank_payment_export_scb/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"license": "AGPL-3",
"category": "Localization / Accounting",
"summary": "Bank Payment Export File SCB",
"depends": ["account", "l10n_th_bank_payment_export"],
"depends": ["account_check_payee", "l10n_th_bank_payment_export"],
"data": [
"data/report_action.xml",
"views/bank_payment_export_view.xml",
Expand Down
26 changes: 2 additions & 24 deletions l10n_th_bank_payment_export_scb/models/bank_payment_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -1078,9 +1078,9 @@ def _get_text_credit_detail_scb(

def _get_text_payee_detail_scb(self, idx, pe_line, line_batch_amount, internal_ref):
receiver_name = pe_line._get_receiver_information()[0]
# Cheque is not select Recipient
# For case cheque get name from payee name
if self.scb_product_code in ["MCP", "CCP", "DDP", "XMQ", "XDQ"]:
receiver_name = pe_line.payment_partner_id.name
receiver_name = pe_line.payment_id.check_payee
address = self._get_address(pe_line.payment_partner_id, 70)
text = (
"004{internal_ref}{idx}{payee_idcard}{payee_name}"
Expand Down Expand Up @@ -1359,28 +1359,6 @@ def onchange_scb_delivery_mode(self):
)
)

# @api.onchange("scb_product_code")
# def onchange_scb_product_code(self):
# if self.scb_product_code not in ("MCP", "DDP", "CCP"):
# self.scb_cheque_ref = False
# self.scb_delivery_mode = False
# if self.scb_product_code != "BNT":
# self.scb_payment_type_code = False
# self.scb_service_type_bahtnet = False
# if self.scb_product_code not in ("MCL", "PA4", "PA5", "PA6"):
# self.scb_service_type = False

# @api.onchange(
# "scb_is_invoice_present", "scb_is_wht_present", "scb_is_credit_advice"
# )
# def onchange_scb_present(self):
# if self.scb_product_code not in ("MCP", "DDP", "CCP") and not (
# self.scb_is_invoice_present
# or self.scb_is_wht_present
# or self.scb_is_credit_advice
# ):
# self.scb_delivery_mode = False

def _check_constraint_confirm(self):
res = super()._check_constraint_confirm()
for rec in self.filtered(lambda l: l.bank == "SICOTHBK"):
Expand Down

0 comments on commit 9f38ab7

Please sign in to comment.