[15.0][MIG] document_page_portal: Migration to 15.0

This commit is contained in:
Mikheil Barnaveli 2024-05-29 11:21:29 +04:00
parent 4681daa124
commit 3748ffe9a4
5 changed files with 46 additions and 53 deletions

View File

@ -95,4 +95,4 @@ msgstr "Cercare fra tutti"
#. module: document_page_portal
#: model_terms:ir.ui.view,arch_db:document_page_portal.portal_my_knowledge_document_pages
msgid "There are currently no Knowledge Document for your account."
msgstr "Al momento non ci sono documenti knowledge per il tuo account."
msgstr "Al momento non ci sono documenti knowledge per il tuo account."

View File

@ -118,4 +118,4 @@ msgstr ""
#~ msgstr "Documentos"
#~ msgid "There are no documents in your account."
#~ msgstr "Não há documentos em sua conta."
#~ msgstr "Não há documentos em sua conta."

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data noupdate="1">
<odoo noupdate="1">
<record model="ir.rule" id="knowledge_user_document_page_rule">
<field name="name">Documents: knowledge user: see all</field>
<field name="model_id" ref="document_page.model_document_page" />
@ -17,9 +16,8 @@
]
</field>
<field
name="groups"
eval="[(4, ref('base.group_portal')),(4, ref('base.group_user'))]"
/>
name="groups"
eval="[(4, ref('base.group_portal')),(4, ref('base.group_user'))]"
/>
</record>
</data>
</odoo>

View File

@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

View File

@ -1,22 +1,20 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data noupdate="0">
<odoo noupdate="1">
<template
id="portal_my_home_menu_Knowledge"
name="Portal layout : Knowledge document_pages menu entries"
inherit_id="portal.portal_breadcrumbs"
priority="50"
>
id="portal_my_home_menu_Knowledge"
name="Portal layout : Knowledge document_pages menu entries"
inherit_id="portal.portal_breadcrumbs"
priority="50"
>
<xpath expr="//ol[hasclass('o_portal_submenu')]" position="inside">
<li
t-if="page_name == 'document_page' or document_page"
t-attf-class="breadcrumb-item #{'active ' if not document_page else ''}"
>
t-if="page_name == 'document_page' or document_page"
t-attf-class="breadcrumb-item #{'active ' if not document_page else ''}"
>
<a
t-if="document_page"
t-attf-href="/my/knowledge/documents?{{ keep_query() }}"
>Knowledge Documents</a>
t-if="document_page"
t-attf-href="/my/knowledge/documents?{{ keep_query() }}"
>Knowledge Documents</a>
<t t-else="">Knowledge Documents</t>
</li>
<li t-if="document_page" class="breadcrumb-item active">
@ -26,11 +24,11 @@
</template>
<template
id="portal_my_home_Knowledge_document_page"
name="Portal My Home : Knowledge Documents"
inherit_id="portal.portal_my_home"
priority="50"
>
id="portal_my_home_Knowledge_document_page"
name="Portal My Home : Knowledge Documents"
inherit_id="portal.portal_my_home"
priority="50"
>
<xpath expr="//div[hasclass('o_portal_docs')]" position="inside">
<t t-if="document_page_count" t-call="portal.portal_docs_entry">
<t t-set="title">Knowledge Documents</t>
@ -62,18 +60,18 @@
<t t-foreach="document_pages" t-as="document_page">
<tr>
<td class="text-right"><a
t-attf-href="/knowledge/document/#{document_page.id}"
><small>#</small><t t-esc="document_page.id" /></a></td>
t-attf-href="/knowledge/document/#{document_page.id}"
><small>#</small><t t-esc="document_page.id" /></a></td>
<td>
<a
t-attf-href="/knowledge/document/#{document_page.id}"
><span t-field="document_page.name" /></a>
t-attf-href="/knowledge/document/#{document_page.id}"
><span t-field="document_page.name" /></a>
</td>
<td />
<td class="text-center"><span
class="badge badge-pill badge-info"
t-field="document_page.parent_id.name"
/></td>
class="badge badge-pill badge-info"
t-field="document_page.parent_id.name"
/></td>
</tr>
</t>
</t>
@ -85,14 +83,14 @@
<t t-set="wrapwrap_classes" t-value="'o_portal_bg_dark'" />
<t
t-set="o_portal_fullwidth_alert"
groups="knowledge.group_document_user"
>
t-set="o_portal_fullwidth_alert"
groups="knowledge.group_document_user"
>
<t t-call="portal.portal_back_in_edit_mode">
<t
t-set="backend_url"
t-value="'/web#return_label=Website&amp;model=document.page&amp;id=%s&amp;view_type=form' % (document_page.id)"
/>
t-set="backend_url"
t-value="'/web#return_label=Website&amp;model=document.page&amp;id=%s&amp;view_type=form' % (document_page.id)"
/>
</t>
</t>
@ -103,17 +101,17 @@
<h5 class="mb-1 mb-md-0">
<span t-field="document_page.name" />
<small class="text-muted"> (#<span
t-field="document_page.id"
/>)</small>
t-field="document_page.id"
/>)</small>
</h5>
</div>
<div class="col-md text-md-right">
<small class="text-right">Category:</small>
<span
t-field="document_page.parent_id.name"
class=" badge badge-pill badge-info"
title="Current Category of this document"
/>
t-field="document_page.parent_id.name"
class=" badge badge-pill badge-info"
title="Current Category of this document"
/>
</div>
</div>
</t>
@ -123,10 +121,10 @@
<span t-field="document_page.name" />
</h1>
<div
t-if="document_page.content"
class="col-lg-12"
t-raw="document_page.content"
/>
t-if="document_page.content"
class="col-lg-12"
t-raw="document_page.content"
/>
<div t-else="" class="col-lg-10">
<em class="text-muted"><small>No content</small></em>
</div>
@ -136,6 +134,4 @@
</t>
</template>
</data>
</odoo>