[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 #. module: document_page_portal
#: model_terms:ir.ui.view,arch_db:document_page_portal.portal_my_knowledge_document_pages #: 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." 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" #~ msgstr "Documentos"
#~ msgid "There are no documents in your account." #~ 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" ?> <?xml version="1.0" encoding="utf-8" ?>
<odoo> <odoo noupdate="1">
<data noupdate="1">
<record model="ir.rule" id="knowledge_user_document_page_rule"> <record model="ir.rule" id="knowledge_user_document_page_rule">
<field name="name">Documents: knowledge user: see all</field> <field name="name">Documents: knowledge user: see all</field>
<field name="model_id" ref="document_page.model_document_page" /> <field name="model_id" ref="document_page.model_document_page" />
@ -17,9 +16,8 @@
] ]
</field> </field>
<field <field
name="groups" name="groups"
eval="[(4, ref('base.group_portal')),(4, ref('base.group_user'))]" eval="[(4, ref('base.group_portal')),(4, ref('base.group_user'))]"
/> />
</record> </record>
</data>
</odoo> </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"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head> <head>

View File

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