Files
odoo_source/addons/payment_odoo/models/account_move.py
T
Kevin BaptisteandAntoine Prieels 208a82f344 [IMP] adyen_platforms,payment_odoo: add notification support
- Improved onboarding / KYC flow
    - Display KYC stage for each "document" (identity, bank account,
    shareholder, etc.)
    - Only update to the API what's been updated by the user to prevent
    undergoing another full round of data verification

- Show new pricing

- Support refund of adyen.transaction

- Simplify payouts (let Adyen automatically handle them)
    - They are now automatically handled by Adyen and not manually
    triggered by a cron

- "Balance" dashboard
    - Show the balance per currency
    - List of payouts and their status

- Handle account/transaction notifications
    - Show split of fees
    - Details on payment method (card country, card type, etc.) used
    - Display details from the linked payment.transaction

- Verify proxy signature for notifications
    - Notifications are now signed and authenticity verified

TaskID: 2129218
Closes odoo/odoo#68952

Co-authored-by: Antoine Prieels <anp@odoo.com>
2021-06-02 14:12:40 +00:00

24 lines
877 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class AccountMove(models.Model):
_inherit = 'account.move'
adyen_transaction_ids = fields.One2many(related='transaction_ids.adyen_transaction_ids')
def action_view_payment_transactions(self):
if any(provider != 'odoo' for provider in self.transaction_ids.mapped('provider')):
return super().action_view_payment_transactions()
action = self.env['ir.actions.act_window']._for_xml_id('adyen_platforms.adyen_transaction_action')
if len(self.adyen_transaction_ids) == 1:
action['view_mode'] = 'form'
action['res_id'] = self.adyen_transaction_ids.id
action['views'] = []
else:
action['domain'] = [('id', 'in', self.adyen_transaction_ids.ids)]
return action