mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
31 lines
804 B
Python
31 lines
804 B
Python
import logging
|
|
|
|
from odoo import api, models
|
|
|
|
CODE_SPAIN = "ES"
|
|
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
|
|
class PmsCheckinParnert(models.Model):
|
|
_inherit = "pms.checkin.partner"
|
|
|
|
@api.model
|
|
def _checkin_mandatory_fields(self, country=False, depends=False):
|
|
mandatory_fields = super(PmsCheckinParnert, self)._checkin_mandatory_fields(
|
|
depends
|
|
)
|
|
mandatory_fields.extend(
|
|
[
|
|
"birthdate_date",
|
|
"gender",
|
|
"document_number",
|
|
"document_type",
|
|
"document_expedition_date",
|
|
"nationality_id",
|
|
]
|
|
)
|
|
if depends or (country and country.code == CODE_SPAIN):
|
|
mandatory_fields.append("state_id")
|
|
return mandatory_fields
|