mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[RFC]pms_apie_rest: return folio transactions
Avoid search in all transactions
This commit is contained in:
@@ -330,11 +330,8 @@ class PmsFolioService(Component):
|
||||
partner=partner_id,
|
||||
date=datetime.strptime(pms_account_payment_info.date, "%m/%d/%Y"),
|
||||
)
|
||||
folio_transactions = self.env["account.payment"].search(
|
||||
[
|
||||
("folio_ids", "in", folio_id),
|
||||
("pms_api_transaction_type", "=", "customer_inbound"),
|
||||
]
|
||||
folio_transactions = folio.payment_ids.filtered(
|
||||
lambda p: p.folio_transactions == "customer_inbound"
|
||||
)
|
||||
return folio_transactions.ids
|
||||
|
||||
|
||||
Reference in New Issue
Block a user