mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[ADD]pms_payment_acquirer_multiproperty Payment acquirer multi property logic
This commit is contained in:
1
payment_acquirer_multi_pms_properties/models/__init__.py
Normal file
1
payment_acquirer_multi_pms_properties/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import payment_acquirer
|
||||
@@ -0,0 +1,21 @@
|
||||
# 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,
|
||||
)
|
||||
Reference in New Issue
Block a user