Files
odoo_source/addons/payment/models/payment_method.py
T
Gorash 1e12f68a1d [REF] base,all: Update modifier syntax: prepare view migration
These changes are made as a result of simplifying attrs and 'states' in
views.

Before applying the migration script, it is necessary to fix some views.
These views are erroneous and either work by chance or are simply
untested. We have for example wrong domains, elements used by modifiers
but not present in the view, obsolete domain operators, inherit views
not targeting the right views, xpaths using attributes as target, the
use of %(...)s in views, false attribute value types in python.

Part-of: odoo/odoo#104741
2023-08-18 09:49:12 +02:00

25 lines
884 B
Python

# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class PaymentMethod(models.Model):
_name = 'payment.method'
_description = 'Payment Method'
_order = 'sequence, name'
name = fields.Char(string="Name", required=True)
provider_ids = fields.Many2many(
string="Providers", comodel_name='payment.provider',
help="The list of providers supporting this payment method")
image = fields.Image(
string="Image",
max_width=64,
max_height=64,
required=True,
help="This field holds the image used for this payment method, limited to 64x64 px")
image_payment_form = fields.Image(
string="Image displayed on the payment form", related='image', store=True, max_width=45,
max_height=30)
sequence = fields.Integer('Sequence', default=1)