mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] Delete invoice count field
This commit is contained in:
@@ -232,7 +232,6 @@ class PmsFolio(models.Model):
|
|||||||
"Checkin Pending", compute="_compute_checkin_partner_count"
|
"Checkin Pending", compute="_compute_checkin_partner_count"
|
||||||
)
|
)
|
||||||
# Invoice Fields-----------------------------------------------------
|
# Invoice Fields-----------------------------------------------------
|
||||||
invoice_count = fields.Integer(compute="_get_invoiced")
|
|
||||||
invoice_status = fields.Selection(
|
invoice_status = fields.Selection(
|
||||||
[
|
[
|
||||||
("invoiced", "Fully Invoiced"),
|
("invoiced", "Fully Invoiced"),
|
||||||
@@ -386,7 +385,6 @@ class PmsFolio(models.Model):
|
|||||||
|
|
||||||
folio.update(
|
folio.update(
|
||||||
{
|
{
|
||||||
"invoice_count": len(set(move_ids.ids + refund_ids.ids)),
|
|
||||||
"move_ids": move_ids.ids + refund_ids.ids,
|
"move_ids": move_ids.ids + refund_ids.ids,
|
||||||
"invoice_status": invoice_status,
|
"invoice_status": invoice_status,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ class PmsReservation(models.Model):
|
|||||||
related="folio_id.reservation_type", default=lambda *a: "normal"
|
related="folio_id.reservation_type", default=lambda *a: "normal"
|
||||||
)
|
)
|
||||||
splitted = fields.Boolean("Splitted", compute="_compute_splitted", store=True,)
|
splitted = fields.Boolean("Splitted", compute="_compute_splitted", store=True,)
|
||||||
invoice_count = fields.Integer(related="folio_id.invoice_count")
|
|
||||||
credit_card_details = fields.Text(related="folio_id.credit_card_details")
|
credit_card_details = fields.Text(related="folio_id.credit_card_details")
|
||||||
cancelled_reason = fields.Selection(
|
cancelled_reason = fields.Selection(
|
||||||
[("late", "Late"), ("intime", "In time"), ("noshow", "No Show")],
|
[("late", "Late"), ("intime", "In time"), ("noshow", "No Show")],
|
||||||
|
|||||||
@@ -54,22 +54,6 @@
|
|||||||
<span class="o_stat_text">Pending Payment</span>
|
<span class="o_stat_text">Pending Payment</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
type="object"
|
|
||||||
class="oe_stat_button"
|
|
||||||
id="invoice_button"
|
|
||||||
icon="fa-pencil-square-o"
|
|
||||||
name="open_invoices_folio"
|
|
||||||
attrs="{'invisible': [('invoice_count', '=', 0)]}"
|
|
||||||
context="{'default_folio_id': active_id}"
|
|
||||||
>
|
|
||||||
<div class="o_form_field o_stat_info">
|
|
||||||
<span class="o_stat_value">
|
|
||||||
<field name="invoice_count" />
|
|
||||||
</span>
|
|
||||||
<span class="o_stat_text">Invoices</span>
|
|
||||||
</div>
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
<h2>
|
<h2>
|
||||||
<field name="name" />
|
<field name="name" />
|
||||||
|
|||||||
@@ -131,21 +131,6 @@
|
|||||||
<span class="o_stat_text">Pending Payment</span>
|
<span class="o_stat_text">Pending Payment</span>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
type="object"
|
|
||||||
class="oe_stat_button"
|
|
||||||
id="invoice_button"
|
|
||||||
icon="fa-pencil-square-o"
|
|
||||||
name="open_invoices_reservation"
|
|
||||||
attrs="{'invisible': [('invoice_count','<=',0)]}"
|
|
||||||
>
|
|
||||||
<div class="o_field_widget o_stat_info">
|
|
||||||
<span class="o_stat_value">
|
|
||||||
<field name="invoice_count" />
|
|
||||||
</span>
|
|
||||||
<span class="o_stat_text">Invoices</span>
|
|
||||||
</div>
|
|
||||||
</button>
|
|
||||||
<button
|
<button
|
||||||
type="object"
|
type="object"
|
||||||
class="oe_stat_button"
|
class="oe_stat_button"
|
||||||
|
|||||||
Reference in New Issue
Block a user