Files
pms/payment_acquirer_multi_pms_properties/models/payment_acquirer.py

22 lines
622 B
Python

# Copyright 2009-2020 Noviat
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class PaymentAcquirer(models.Model):
_inherit = "payment.acquirer"
_check_pms_properties_auto = True
pms_property_ids = fields.Many2many(
string="Properties",
help="Properties with access to the element;"
" if not set, all properties can access",
required=False,
comodel_name="pms.property",
relation="pms_acquirer_property_rel",
column1="acquirer_id",
column2="property_id",
check_pms_properties=True,
)