首页 > 解决方案 > 面包屑网站 Odoo 9 显示错误

问题描述

我在odoo 9中文章页面的序列树视图有问题这里是正常显示

在此处输入图像描述

如果我更改为第二页或第三页,它将隐藏为图片:

在此处输入图像描述

这是模板源代码:

<odoo>

<template id="breadcrumb" name="Breadcrumb snippet">
    <!-- Know if current page is in a menu item -->
    <t t-set="bc_item"
       t-value="request.env['website.menu']
                .search([('url', '=', request.httprequest.path)], limit=1)"/>

    <!-- If so, create the breadcrumbs -->
    <ol t-if="bc_item" class="breadcrumb">
        <!-- Parents -->
        <t t-foreach="bc_item.get_parents(True)" t-as="step">
            <li t-if="step.url or step_first">
                <a t-att-href="step.url or (step_first and '/')">
                    <t t-if="step_first and not step.url">
                        Home
                    </t>
                    <t t-if="not step_first and step.url">
                       <t t-esc="step.name_get()[0][1]"/>
                   </t>
                </a>
            </li>
        </t>

        <!-- Current -->
        <li class="active" t-esc="bc_item.name_get()[0][1]"/>
    </ol>
</template>

</odoo>

标签: xmlodoo-9breadcrumbs

解决方案


推荐阅读