Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Payment Engine
Entity: payment.provider
Compute Method: _compute_transaction_count
| Inputs | Method | Outputs |
|---|---|---|
|
+ transaction_data = self.env["payment.transaction"]._read_group( + [("provider_id", "in", self.ids)], ["provider_id"], ["__count"] + ) + provider_data = {provider.id: count for provider, count in transaction_data} + for provider in self: + provider.transaction_count = provider_data.get(provider.id, 0) |
|
