Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Payment - Account
Entity: account.payment
Compute Method: _compute_suitable_payment_token_ids
| Inputs | Method | Outputs |
|---|---|---|
|
for payment in self:
if payment.use_electronic_payment_method:
payment.suitable_payment_token_ids = self.env['payment.token'].sudo().search([
*self.env['payment.token']._check_company_domain(payment.company_id),
('provider_id.capture_manually', '=', False),
- ('partner_id', '=', payment.partner_id.id),
+ ('partner_id', '=', payment.commercial_partner_id.id),
('provider_id', '=', payment.payment_method_line_id.payment_provider_id.id),
])
else:
payment.suitable_payment_token_ids = [Command.clear()]
|
|
