[REF]removed deprecated add_possible_customer field and add_customer method from reservation, folio and checkin

This commit is contained in:
braisab
2021-09-15 18:22:58 +02:00
parent 4f5aa2c0e4
commit 3ac1fa29ec
3 changed files with 0 additions and 17 deletions

View File

@@ -389,7 +389,6 @@ class PmsCheckinPartner(models.Model):
"firstname",
"lastname",
"lastname2",
# "add_possible_customer",
)
def _compute_partner_id(self):
for record in self:

View File

@@ -478,8 +478,6 @@ class PmsFolio(models.Model):
inverse_name="folio_possible_customer_id",
)
add_possible_customer = fields.Boolean(string="Add possible Customer")
def name_get(self):
result = []
for folio in self:
@@ -678,7 +676,6 @@ class PmsFolio(models.Model):
"reservation_type",
"document_number",
"document_type",
"add_possible_customer",
"partner_name",
"email",
"mobile",
@@ -691,8 +688,6 @@ class PmsFolio(models.Model):
folio.partner_id = folio.agency_id.id
elif folio.document_number and folio.document_type:
self._create_partner(folio)
elif folio.add_possible_customer:
self._add_customer(folio)
elif not folio.partner_id:
folio.partner_id = False
@@ -1880,12 +1875,3 @@ class PmsFolio(models.Model):
self.env["res.partner.id_number"].create(number_values)
record.partner_id = partner
# REVIEW: we should not force the email and mobile computes,
# but if we do not do so,the cache sets the partner_id to False
# and therefore also the document_number, email or mobile
@api.model
def _add_customer(self, record):
record.partner_id = record.possible_existing_customer_ids.id
record._compute_document_number()
record._compute_email()
record._compute_mobile()

View File

@@ -644,8 +644,6 @@ class PmsReservation(models.Model):
inverse_name="reservation_possible_customer_id",
)
add_possible_customer = fields.Boolean(string="Add possible Customer")
is_mail_send = fields.Boolean(string="Mail Sent", default=False)
is_modified_reservation = fields.Boolean(