/
portal_templates.xml
510 lines (479 loc) · 30.8 KB
/
portal_templates.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="frontend_layout" name="Main Frontend Layout">
<t t-call="web.layout">
<t t-set="head_website">
<script type="text/javascript">
odoo.session_info = {
is_admin: <t t-esc="json.dumps(request.env.user._is_admin())"/>,
is_system: <t t-esc="json.dumps(request.env.user._is_system())"/>,
is_website_user: <t t-esc="json.dumps(request.env.user._is_public())"/>,
user_id: <t t-esc="json.dumps(request.env.user.id)" />,
is_frontend: true,
translationURL: '/website/translations',
};
</script>
<t t-call-assets="web.assets_common" t-js="false"/>
<t t-call-assets="web.assets_frontend" t-js="false"/>
<t t-call-assets="web.assets_common" t-css="false"/>
<t t-call-assets="web.assets_frontend" t-css="false"/>
</t>
<t t-set="head" t-value="head_website + (head or '')"/>
<t t-set="direction" t-value="request.env['res.lang'].search([('code', '=', request.env.lang)]).direction"/>
<div id="wrapwrap" t-attf-class="#{pageName or ''} #{direction == 'rtl' and 'o_rtl' or ''} #{'o_portal' if is_portal else ''}">
<header>
<nav class="navbar navbar-expand-md navbar-light bg-light">
<div class="container">
<a href="/" class="navbar-brand logo">
<span t-field="res_company.logo" t-options="{'widget': 'image'}" t-att-alt="'Logo of %s' % res_company.name" t-att-title="res_company.name"/>
</a>
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#top_menu_collapse">
<span class="navbar-toggler-icon"/>
</button>
<div class="collapse navbar-collapse" id="top_menu_collapse">
<!-- FIXME We want menu to open to the right by default (except cases handled in JS) -->
<ul class="nav navbar-nav ml-auto text-right" id="top_menu">
<li class="nav-item divider" t-ignore="true" t-if="not user_id._is_public()"/>
<li class="nav-item dropdown" t-ignore="true" t-if="not user_id._is_public()">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">
<b>
<span t-esc="user_id.name[:23] + '...' if user_id.name and len(user_id.name) > 25 else user_id.name"/>
</b>
</a>
<div class="dropdown-menu js_usermenu" role="menu">
<a id="o_logout" class="dropdown-item" t-attf-href="/web/session/logout?redirect=/" role="menuitem">Logout</a>
</div>
</li>
</ul>
</div>
</div>
</nav>
</header>
<main>
<t t-raw="0"/>
</main>
<footer class="bg-light o_footer">
<div class="container mt16 mb16" id="footer">
<div class="float-right mb16" t-ignore="true" t-if="not editable">
Powered by <a target="_blank" href="http://www.odoo.com?utm_source=db&utm_medium=portal">Odoo</a>
</div>
</div>
</footer>
</div>
</t>
</template>
<template id="portal_breadcrumbs" name="Portal Breadcrumbs">
<ol t-if="page_name != 'home'" class="o_portal_submenu breadcrumb mb-0 py-2 flex-grow-1">
<li class="breadcrumb-item"><a href="/my/home" aria-label="Home" title="Home"><i class="fa fa-home"/></a></li>
<li t-if="page_name == 'my_details'" class="breadcrumb-item">Your Details</li>
</ol>
</template>
<template id="portal_back_in_edit_mode" name="Back to edit mode">
<div t-ignore="true" class="text-center">
This is a preview of the customer portal. <a t-att-href="backend_url"><i class="fa fa-arrow-right"/> Back to edit mode</a>
</div>
<button type="button" class="close" data-dismiss="alert" aria-label="Close"> × </button>
</template>
<template id="portal_layout" name="Portal Layout">
<t t-call="portal.frontend_layout">
<t t-set="is_portal" t-value="True"/>
<div t-if="o_portal_fullwidth_alert" class="alert alert-info alert-dismissible rounded-0 fade show d-print-none css_editable_mode_hidden">
<div class="container">
<t t-raw="o_portal_fullwidth_alert"/>
</div>
<button type="button" class="close" data-dismiss="alert" aria-label="Close"> × </button>
</div>
<div t-if="not no_breadcrumbs and not my_details and not breadcrumbs_searchbar" class="o_portal container mt-3">
<div class="row align-items-center bg-white no-gutters border rounded">
<div class="col">
<t t-call="portal.portal_breadcrumbs"></t>
</div>
<div t-if="prev_record or next_record" class="col flex-grow-0">
<t t-call='portal.record_pager'/>
</div>
</div>
</div>
<div id="wrap" class='o_portal_wrap'>
<div class="container mb64">
<t t-if="my_details">
<div class="row justify-content-between mt-4">
<div t-attf-class="col-12 col-md col-lg-6">
<t t-raw="0"/>
</div>
<div id="o_my_sidebar" class="col-12 col-md col-lg-4 col-xl-3 o_my_sidebar">
<div class="o_my_contact" t-if="sales_user">
<t t-call="portal.portal_contact"/>
</div>
<div class="o_portal_my_details">
<h4>Your Details <a role="button" href="/my/account" class="btn btn-sm btn-link"><i class="fa fa-pencil"/> Edit</a></h4>
<hr class="mt-1 mb-0"/>
<div t-field="user_id.partner_id" t-options='{"widget": "contact", "fields": ["email", "phone", "address", "name"]}'/>
</div>
<div class="o_my_archives" t-if="archive_groups">
<t t-call="portal.portal_archive_groups"/>
</div>
</div>
</div>
</t>
<t t-else="">
<t t-raw="0"/>
</t>
</div>
</div>
</t>
</template>
<template id="portal_show_sign_in" inherit_id="portal.frontend_layout" name="Show Sign In">
<xpath expr="//ul[@id='top_menu']" position="inside">
<li class="nav-item divider" groups="base.group_public"/>
<li groups="base.group_public" class="nav-item">
<a t-attf-href="/web/login" class="nav-link">
<b>Sign in</b>
</a>
</li>
</xpath>
</template>
<template id="portal_my_home" name="My Portal">
<t t-call="portal.portal_layout">
<t t-set="my_details" t-value="True"/>
<div class="o_portal_my_home">
<div class="oe_structure" id="oe_structure_portal_my_home_1"/>
<h3>Your Documents</h3>
<div class="o_portal_docs list-group">
</div>
</div>
<div class="oe_structure" id="oe_structure_portal_my_home_2"/>
</t>
</template>
<template id="portal_docs_entry" name="My Portal Docs Entry">
<a t-att-href="url" t-att-title="title" class="list-group-item list-group-item-action d-flex align-items-center justify-content-between">
<t t-esc="title"/>
<span class="badge badge-secondary badge-pill" t-esc="count"/>
</a>
</template>
<template id="portal_table" name="My Portal Table">
<div t-attf-class="table-responsive border rounded border-top-0 #{classes if classes else ''}">
<table class="table rounded mb-0 bg-white o_portal_my_doc_table">
<t t-raw="0"/>
</table>
</div>
<div t-if="pager" class="o_portal_pager text-center">
<t t-call="portal.pager"/>
</div>
</template>
<template id="portal_record_sidebar" name="My Portal Record Sidebar">
<div t-attf-class="col-12 col-lg flex-lg-grow-0 #{classes}">
<div class="card bg-white mb-4" id="sidebar_content">
<div t-if="title" class="card-body text-center pb-2 pt-3">
<t t-raw="title"/>
</div>
<t t-if="entries" t-raw="entries"/>
<div class="card-footer small text-center text-muted border-top-0 pt-1 pb-1 d-none d-lg-block">
Powered by <a target="_blank" href="http://www.odoo.com?utm_source=db&utm_medium=portal" title="odoo"><img src="/web/static/src/img/logo.png" alt="Odoo Logo" height="15"/></a>
</div>
</div>
</div>
</template>
<!--
The search bar is composed of 2 buttons : a "filter by" and a "sort by". Changing the 'sortby'
criteria will keep the number of page, query params, ... Changing the 'filterby' param will
redirect the user to the beginning of document list, keeping query parameters.
These 2 buttons can be prepended by a advanced search input, to activate it, search_input need
to be initialized at 'True' and the content of the t-call is the list of li elements searchable.
:param dict searchbar_sortings : containing the sort criteria like
{'date': {'label': _('Newest'), 'order': 'create_date desc'}}
:param string sortby : name of the sort criteria
:param dict searchbar_filters : containing the filter criteria like
{'open': {'label': _('In Progress'), 'domain': [('state', '=', 'open')]}}
:param string filterby : name of the filter criteria
:param default_url : the base url of the pages (like '/my/orders')
:param boolean breadcrumbs_searchbar : set to True to show breadcrumbs rather than the title
:param boolean o_portal_search_panel : set to True to active the input search
:param html $0 : content of the t-call
:param title : bavbar title
:param classes : navbar classes
-->
<template id="portal_searchbar" name="Portal Search Bar">
<nav t-attf-class="navbar navbar-light navbar-expand-lg border py-0 mb-2 o_portal_navbar {{classes if classes else ''}} {{'mt-3 rounded' if breadcrumbs_searchbar else 'border-top-0' }}">
<!-- Navbar breadcrumb or title -->
<t t-if="breadcrumbs_searchbar">
<t t-call="portal.portal_breadcrumbs"/>
</t>
<span t-else="" class="navbar-brand mb-0 h1 mr-auto" t-esc="title or 'No title'"/>
<!-- Collapse button -->
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#o_portal_navbar_content" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle filters">
<span class="navbar-toggler-icon small"/>
</button>
<!-- Collapsable content -->
<div class="collapse navbar-collapse" id="o_portal_navbar_content">
<div class="nav flex-column flex-lg-row ml-auto p-0 mb-3 mb-lg-0 mt-1 mt-lg-0">
<div t-if="searchbar_sortings" class="form-inline">
<span class="small mr-1 navbar-text">Sort By:</span>
<div class="btn-group">
<button id="portal_searchbar_sortby" data-toggle="dropdown" class="btn btn-secondary btn-sm dropdown-toggle">
<t t-esc="searchbar_sortings[sortby].get('label', 'Newest')"/>
</button>
<div class="dropdown-menu" aria-labelledby="portal_searchbar_sortby">
<t t-foreach="searchbar_sortings" t-as="option">
<a t-att-href="request.httprequest.path + '?' + keep_query('*', sortby=option)"
t-attf-class="dropdown-item#{sortby == option and ' active' or ''}">
<span t-esc="searchbar_sortings[option].get('label')"/>
</a>
</t>
</div>
</div>
</div>
<div t-if="searchbar_filters" class="form-inline ml-lg-2">
<span class="small mr-1 navbar-text">Filter By:</span>
<div class="btn-group">
<button id="portal_searchbar_filters" data-toggle="dropdown" class="btn btn-secondary btn-sm dropdown-toggle">
<t t-esc="searchbar_filters[filterby].get('label', 'All')"/>
</button>
<div class="dropdown-menu" aria-labelledby="portal_searchbar_filters">
<t t-foreach="searchbar_filters" t-as="option">
<a t-att-href="default_url + '?' + keep_query('*', filterby=option)"
t-attf-class="dropdown-item#{filterby == option and ' active' or ''}">
<span t-esc="searchbar_filters[option].get('label')"/>
</a>
</t>
</div>
</div>
</div>
<div t-if="searchbar_groupby" class="form-inline ml-lg-2">
<span class="small mr-1 navbar-text">Group By:</span>
<div class="btn-group">
<button id="portal_searchbar_groupby" data-toggle="dropdown" class="btn btn-secondary btn-sm dropdown-toggle">
<t t-esc="searchbar_groupby[groupby].get('label', 'None')"/>
</button>
<div class="dropdown-menu" aria-labelledby="portal_searchbar_groupby">
<t t-foreach="searchbar_groupby" t-as="option">
<a t-att-href="default_url + '?' + keep_query('*', groupby=option)"
t-attf-class="dropdown-item#{groupby == option and ' active' or ''}">
<span t-esc="searchbar_groupby[option].get('label')"/>
</a>
</t>
</div>
</div>
</div>
<t t-raw="0"/>
</div>
<form t-if="searchbar_inputs" class="form-inline o_portal_search_panel ml-lg-4">
<div class="input-group input-group-sm w-100">
<div class="input-group-prepend">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown"/>
<div class="dropdown-menu" role="menu">
<t t-foreach='searchbar_inputs' t-as='input'>
<a t-att-href="'#' + searchbar_inputs[input]['input']"
t-attf-class="dropdown-item#{search_in == searchbar_inputs[input]['input'] and ' active' or ''}">
<span t-raw="searchbar_inputs[input]['label']"/>
</a>
</t>
</div>
</div>
<input type="text" class="form-control form-control-sm" placeholder="Search" t-att-value='search' name="search"/>
<span class="input-group-append">
<button class="btn btn-secondary search-submit" type="button">
<span class="fa fa-search"/>
</button>
</span>
</div>
</form>
</div>
</nav>
</template>
<template id="portal_record_layout" name="Portal single record layout">
<div t-attf-class="card mt-0 border-top-0 rounded-0 rounded-bottom #{classes if classes else ''}">
<div t-if="card_header" t-attf-class="card-header #{header_classes if header_classes else ''}">
<t t-raw="card_header"/>
</div>
<div t-if="card_body" t-attf-class="card-body #{body_classes if body_classes else ''}">
<t t-raw="card_body"/>
</div>
</div>
</template>
<template id="portal_contact" name="Contact">
<div class="o_portal_contact_details mb-5">
<h4><t t-if="title" t-esc="title"/><t t-else="">Your contact</t></h4>
<hr class="mt-1 mb0"/>
<h6 class="mb-1"><b t-esc="sales_user.name"/></h6>
<div class="d-flex align-items-center mb-1">
<div class="fa fa-envelope fa-fw mr-1"></div>
<a t-att-href="'mailto:'+sales_user.email" t-esc="sales_user.email"/>
</div>
<div class="d-flex flex-nowrap align-items-center mb-1">
<div class="fa fa-phone fa-fw mr-1"></div>
<span t-esc="sales_user.phone"/>
</div>
<div class="d-flex flex-nowrap align-items-center mb-1">
<div class="fa fa-map-marker fa-fw mr-1"></div>
<span t-esc="sales_user.city"/>
</div>
</div>
</template>
<template id="portal_archive_groups" name="Portal Archive Groups">
<h3 class="o_page_header">Archives</h3>
<ul class="nav nav-pills flex-column">
<t t-foreach="archive_groups" t-as="group">
<t t-if="group['date_begin'] == date">
<li class="nav-item">
<a t-att-href="default_url" class="nav-link active" t-ignore="True"><t t-esc="group['name']"/><span class="float-right badge badge-pill" t-esc="group['item_count']"/></a>
</li>
</t>
<t t-if="group['date_begin'] != date">
<li class="nav-item">
<a t-ignore="True" t-attf-href="#{default_url}?date_begin=#{group['date_begin']}&date_end=#{group['date_end']}" class="nav-link"><t t-esc="group['name']"/><span class="float-right badge badge-pill" t-esc="group['item_count']"/></a>
</li>
</t>
</t>
</ul>
</template>
<template id="portal_my_details">
<t t-call="portal.portal_layout">
<t t-set="additional_title">Your Contact Details</t>
<h3>Your Details</h3>
<form action="/my/account" method="post">
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
<div class="row o_portal_details">
<div class="col-lg-8">
<div class="row">
<div class="col-lg-12">
<div t-if="error_message" class="alert alert-danger" role="alert">
<t t-foreach="error_message" t-as="err"><t t-esc="err"/><br /></t>
</div>
</div>
<div t-attf-class="form-group #{error.get('name') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="name">Your Name</label>
<input type="text" name="name" t-attf-class="form-control #{error.get('name') and 'is-invalid' or ''}" t-att-value="name or partner.name" />
</div>
<div t-attf-class="form-group #{error.get('email') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="email">Email</label>
<input type="email" name="email" t-attf-class="form-control #{error.get('email') and 'is-invalid' or ''}" t-att-value="email or partner.email" />
</div>
<div t-attf-class="form-group #{error.get('phone') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="phone">Phone</label>
<input type="tel" name="phone" t-attf-class="form-control #{error.get('phone') and 'is-invalid' or ''}" t-att-value="phone or partner.phone" />
</div>
<div class="clearfix" />
<div t-attf-class="form-group #{error.get('company_name') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label label-optional" for="company_name">Company Name</label>
<p t-if="partner.commercial_partner_id.is_company" t-attf-class="form-control #{error.get('company_name') and 'is-invalid' or ''}" t-esc="partner.commercial_company_name"/>
<input t-else="" type="text" name="company_name" t-attf-class="form-control #{error.get('company_name') and 'is-invalid' or ''}" t-att-value="company_name or partner.company_name" t-att-readonly="None if partner.can_edit_vat() else '1'" t-att-title="None if partner.can_edit_vat() else 'Changing company name is not allowed once document(s) have been issued for your account. Please contact us directly for this operation.'"/>
</div>
<div t-attf-class="form-group #{error.get('vat') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label label-optional" for="vat">VAT Number</label>
<input type="text" name="vat" t-attf-class="form-control #{error.get('vat') and 'is-invalid' or ''}" t-att-value="vat or partner.vat" t-att-readonly="None if partner.can_edit_vat() else '1'" t-att-title="None if partner.can_edit_vat() else 'Changing VAT number is not allowed once document(s) have been issued for your account. Please contact us directly for this operation.'" />
</div>
<div class="clearfix" />
<div t-attf-class="form-group #{error.get('street') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="street">Street</label>
<input type="text" name="street" t-attf-class="form-control #{error.get('street') and 'is-invalid' or ''}" t-att-value="street or partner.street"/>
</div>
<div t-attf-class="form-group #{error.get('city') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="city">City</label>
<input type="text" name="city" t-attf-class="form-control #{error.get('city') and 'is-invalid' or ''}" t-att-value="city or partner.city" />
</div>
<div t-attf-class="form-group #{error.get('zip') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="zipcode">Zip / Postal Code</label>
<input type="text" name="zipcode" t-attf-class="form-control #{error.get('zip') and 'is-invalid' or ''}" t-att-value="zipcode or partner.zip" />
</div>
<div t-attf-class="form-group #{error.get('country_id') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label" for="country_id">Country</label>
<select name="country_id" t-attf-class="form-control #{error.get('country_id') and 'is-invalid' or ''}">
<option value="">Country...</option>
<t t-foreach="countries or []" t-as="country">
<option t-att-value="country.id" t-att-selected="country.id == int(country_id) if country_id else country.id == partner.country_id.id">
<t t-esc="country.name" />
</option>
</t>
</select>
</div>
<div t-attf-class="form-group #{error.get('state_id') and 'o_has_error' or ''} col-xl-6">
<label class="col-form-label label-optional" for="state_id">State / Province</label>
<select name="state_id" t-attf-class="form-control #{error.get('state_id') and 'is-invalid' or ''}">
<option value="">select...</option>
<t t-foreach="states or []" t-as="state">
<option t-att-value="state.id" style="display:none;" t-att-data-country_id="state.country_id.id" t-att-selected="state.id == partner.state_id.id">
<t t-esc="state.name" />
</option>
</t>
</select>
</div>
<input type="hidden" name="redirect" t-att-value="redirect"/>
</div>
<div class="clearfix">
<button type="submit" class="btn btn-primary float-right mb32 ">
Confirm
<span class="fa fa-long-arrow-right" />
</button>
</div>
</div>
</div>
</form>
</t>
</template>
<template id="record_pager" name="Portal Record Pager">
<t t-if='prev_record or next_record'>
<div class="record_pager btn-group" role="group">
<a role="button" t-att-class="'btn btn-link %s' % ('disabled' if not prev_record else '')" t-att-href="prev_record or '#'" ><i class="fa fa-chevron-left" role="img" aria-label="Previous" title="Previous"></i></a>
<a role="button" t-att-class="'btn btn-link %s' % ('disabled' if not next_record else '')" t-att-href="next_record or '#'" ><i class="fa fa-chevron-right" role="img" aria-label="Next" title="Previous"></i></a>
</div>
</t>
</template>
<template id="pager" name="Pager">
<ul t-if="pager['page_count'] > 1" t-attf-class="#{ classname or '' } pagination m-0 #{_classes}" t-att-style="style or None">
<li t-attf-class="page-item #{'disabled' if pager['page']['num'] == 1 else ''}">
<a t-att-href=" pager['page_previous']['url'] if pager['page']['num'] != 1 else None" class="page-link">Prev</a>
</li>
<t t-foreach="pager['pages']" t-as="page">
<li t-attf-class="page-item #{'active' if page['num'] == pager['page']['num'] else ''}"> <a t-att-href="page['url']" class="page-link" t-raw="page['num']"></a></li>
</t>
<li t-attf-class="page-item #{'disabled' if pager['page']['num'] == pager['page_count'] else ''}">
<a t-att-href="pager['page_next']['url'] if pager['page']['num'] != pager['page_count'] else None" class="page-link">Next</a>
</li>
</ul>
</template>
<template id="my_account_link" name="Link to frontend portal" inherit_id="portal.frontend_layout">
<xpath expr="//a[@id='o_logout']" position="before">
<a href="/my/home" role="menuitem" class="dropdown-item">My Account</a>
</xpath>
</template>
<!--
Generic chatter template for the frontend
This template provide the container of the chatter. The rest is done in js.
To use this template, you need to call it after setting the following variable in your template or in your controller:
:object browserecord : the mail_thread object
:message_per_page int (optional): number of message per chatter page
:token string (optional): if you want your chatter to be available for non-logged user,
you can use a token to verify the identity of the user;
the message will be posted with the identity of the partner_id of the object
-->
<template id="message_thread">
<div id="discussion" class="d-print-none o_portal_chatter o_not_editable p-0"
t-att-data-token="token" t-att-data-res_model="object._name" t-att-data-pid="pid" t-att-data-hash="hash" t-att-data-res_id="object.id" t-att-data-pager_step="message_per_page or 10" t-att-data-allow_composer="'0' if disable_composer else '1'">
</div>
</template>
<!--
Container signature template for frontend
:partner-name string: customer name that signs
:res-model string: model of the signed document
:res-id stringied int: id of the signed document
:call-url string: url to call once clicking on the sign button
:access-token string: access token for customer portal
-->
<template id="portal_signature" name="Ask Signature">
<div t-att-class="'o_portal_signature_form'"
t-att-data-partner-name="partner_name"
t-att-data-res-model="object._name"
t-att-data-res-id="object.id"
t-att-data-call-url="callUrl"
t-att-data-sign-label="signLabel"
t-att-data-access-token="accessToken"/>
</template>
<template id="portal_sidebar" name="Sidebar">
<t t-call="portal.portal_layout">
<body data-spy="scroll" data-target=".navspy" data-offset="50">
<div class="container o_portal_sidebar"></div>
<div class="oe_structure mb32" id="oe_structure_portal_sidebar_1"/>
</body>
</t>
</template>
</odoo>