blob: 946d0a4ab5ccdbbf727f792ef1c07404092d05c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, SUPERUSER_ID
from . import models
from . import controllers
from . import wizards
def reset_payment_provider(cr, registry, provider):
env = api.Environment(cr, SUPERUSER_ID, {})
acquirers = env['payment.acquirer'].search([('provider', '=', provider)])
acquirers.write({
'view_template_id': acquirers._get_default_view_template_id().id,
'provider': 'manual',
'state': 'disabled',
})
|