mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] comment return payment lines
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
"data/pms_sequence.xml",
|
||||
"report/pms_folio.xml",
|
||||
"report/pms_folio_templates.xml",
|
||||
"templates/pms_email_template.xml",
|
||||
#"templates/pms_email_template.xml",
|
||||
"views/general.xml",
|
||||
"data/menus.xml",
|
||||
"views/pms_amenity_views.xml",
|
||||
|
||||
@@ -26,10 +26,10 @@ class PaymentReturn(models.Model):
|
||||
folios_line = self.env["pms.folio"].browse(
|
||||
payments.mapped("folio_id.id")
|
||||
)
|
||||
for folio in folios_line:
|
||||
if self.id not in folio.return_ids.ids:
|
||||
folio.update({"return_ids": [(4, self.id)]})
|
||||
msg = _("Return of %s registered") % (line.amount)
|
||||
folio.message_post(subject=_("Payment Return"), body=msg)
|
||||
# for folio in folios_line:
|
||||
# if self.id not in folio.return_ids.ids:
|
||||
# folio.update({"return_ids": [(4, self.id)]})
|
||||
# msg = _("Return of %s registered") % (line.amount)
|
||||
# folio.message_post(subject=_("Payment Return"), body=msg)
|
||||
folios += folios_line
|
||||
folios.compute_amount()
|
||||
|
||||
@@ -413,8 +413,9 @@ class PmsFolio(models.Model):
|
||||
}
|
||||
)
|
||||
|
||||
#TODO: Add return_ids to depends
|
||||
@api.depends(
|
||||
"amount_total", "payment_ids", "return_ids", "reservation_type", "state"
|
||||
"amount_total", "payment_ids", "reservation_type", "state"
|
||||
)
|
||||
def compute_amount(self):
|
||||
acc_pay_obj = self.env["account.payment"]
|
||||
|
||||
Reference in New Issue
Block a user