This commit replaces the old online payments API of the `payment` module with the new one and adapts to it all the implementing modules. See the merge commit for more details. task-2085989 task-2119838 task-2165982 task-2289255 Co-authored-by: Victor Feyens <vfe@odoo.com>
18 lines
467 B
Python
18 lines
467 B
Python
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from . import controllers
|
|
from . import models
|
|
from . import utils
|
|
from . import wizards
|
|
|
|
from odoo import api, SUPERUSER_ID
|
|
|
|
|
|
def reset_payment_acquirer(cr, registry, provider):
|
|
env = api.Environment(cr, SUPERUSER_ID, {})
|
|
acquirers = env['payment.acquirer'].search([('provider', '=', provider)])
|
|
acquirers.write({
|
|
'provider': 'none',
|
|
'state': 'disabled',
|
|
})
|