mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP]pms: add functionality sidebar buttons
This commit is contained in:
@@ -14,7 +14,7 @@ class PortalFolio(CustomerPortal):
|
|||||||
values["folio_count"] = (
|
values["folio_count"] = (
|
||||||
Folio.search_count(
|
Folio.search_count(
|
||||||
[
|
[
|
||||||
("partner_id", "child_of", partner.id),
|
("partner_id", "=", partner.id),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
if Folio.check_access_rights("read", raise_exception=False)
|
if Folio.check_access_rights("read", raise_exception=False)
|
||||||
@@ -67,7 +67,7 @@ class PortalFolio(CustomerPortal):
|
|||||||
return self._show_report(
|
return self._show_report(
|
||||||
model=folio_sudo,
|
model=folio_sudo,
|
||||||
report_type=report_type,
|
report_type=report_type,
|
||||||
report_ref="action_report_folio",
|
report_ref="pms.action_report_folio",
|
||||||
download=download,
|
download=download,
|
||||||
)
|
)
|
||||||
values = self._folio_get_page_view_values(folio_sudo, access_token, **kw)
|
values = self._folio_get_page_view_values(folio_sudo, access_token, **kw)
|
||||||
|
|||||||
@@ -734,6 +734,9 @@ class PmsFolio(models.Model):
|
|||||||
record.max_reservation_prior = max(reservation_priors)
|
record.max_reservation_prior = max(reservation_priors)
|
||||||
|
|
||||||
# Action methods
|
# Action methods
|
||||||
|
def _get_report_base_filename(self):
|
||||||
|
self.ensure_one()
|
||||||
|
return 'Folio %s' % self.name
|
||||||
|
|
||||||
def action_pay(self):
|
def action_pay(self):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
|
|||||||
@@ -6,11 +6,12 @@
|
|||||||
priority="20"
|
priority="20"
|
||||||
>
|
>
|
||||||
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
|
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
|
||||||
<li t-attf-class="breadcrumb-item #{'active ' if not folios else ''}">
|
<li t-if="page_name == 'folios'" t-attf-class="breadcrumb-item #{'active ' if not folios else ''}">
|
||||||
<a t-attf-href="/my/folios?{{ keep_query() }}">Folios</a>
|
<a t-attf-href="/my/folios?{{ keep_query() }}">Folios</a>
|
||||||
</li>
|
</li>
|
||||||
<li t-if="folio" class="breadcrumb-item active">
|
<li t-if="folio" class="breadcrumb-item active">
|
||||||
<t t-esc="folio.name" />
|
<a t-attf-href="/my/folios?{{ keep_query() }}">Folios/</a>
|
||||||
|
<t t-esc="folio.name"/>
|
||||||
</li>
|
</li>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
@@ -111,14 +112,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li
|
|
||||||
class="navspy list-group-item pl-0 flex-grow-1"
|
|
||||||
t-ignore="true"
|
|
||||||
role="complementary"
|
|
||||||
>
|
|
||||||
<ul class="nav flex-column bs-sidenav" />
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li
|
<li
|
||||||
t-if="folio.user_id.name"
|
t-if="folio.user_id.name"
|
||||||
class="list-group-item flex-grow-1"
|
class="list-group-item flex-grow-1"
|
||||||
@@ -127,10 +120,10 @@
|
|||||||
class="text-muted"
|
class="text-muted"
|
||||||
>Salesperson</strong></div>
|
>Salesperson</strong></div>
|
||||||
<div class="row flex-nowrap">
|
<div class="row flex-nowrap">
|
||||||
<!--<div class="col flex-grow-0 pr-2">
|
<div class="col flex-grow-0 pr-2">
|
||||||
<img class="rounded-circle mr4 float-left o_portal_contact_img" t-if="folio.user_id.image_1024" t-att-src="image_data_uri(sale_order.user_id.image_1024)" alt="Contact"/>
|
<img class="rounded-circle mr4 float-left o_portal_contact_img" t-if="folio.user_id.image_1024" t-att-src="image_data_uri(folio.user_id.image_1024)" alt="Contact"/>
|
||||||
<img class="rounded-circle mr4 float-left o_portal_contact_img" t-if="not folio.user_id.image_1024" src="/web/static/src/img/placeholder.png" alt="Contact"/>
|
<img class="rounded-circle mr4 float-left o_portal_contact_img" t-if="not folio.user_id.image_1024" src="/web/static/src/img/placeholder.png" alt="Contact"/>
|
||||||
</div>-->
|
</div>
|
||||||
<div class="col pl-0" style="min-width: 150px">
|
<div class="col pl-0" style="min-width: 150px">
|
||||||
<span
|
<span
|
||||||
t-field="folio.user_id"
|
t-field="folio.user_id"
|
||||||
|
|||||||
Reference in New Issue
Block a user