mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP] get name folio with reservations count
This commit is contained in:
@@ -16,6 +16,15 @@ class PmsFolio(models.Model):
|
||||
_order = "date_order"
|
||||
|
||||
# Default Methods ang Gets
|
||||
def name_get(self):
|
||||
result = []
|
||||
for folio in self:
|
||||
name = folio.name
|
||||
if len(folio.reservation_ids) > 1:
|
||||
name += ' (%s)' % len(folio.reservation_ids)
|
||||
result.append((folio.id, name))
|
||||
return result
|
||||
|
||||
@api.model
|
||||
def _default_diff_invoicing(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user