安装没有价格odoo模块的电子商务时的父视图错误

时间:2017-02-01 20:09:11

标签: odoo-9

我在远程服务器上的CentOS7中安装了Odoo v9。我将没有price模块文件夹的电子商务目录复制到addons文件夹,激活了开发人员模式,更新了模块列表,点击了安装该模块。我在下面发布了此错误,如果我回到模块显示为“正在安装”的应用程序。

Error details:Element '<xpath expr="//del[@class='text-danger mr8']">' cannot be located in parent view


Error context:View `Suggested Products Without Catalog Price`[view_id: 924, xml_id: n/a, model: n/a, parent_id: 894]None" while parsing None:23, near<data inherit_id="website_sale.cart_lines" name="Suggested Products Without Catalog Price"> <xpath expr="//del[@class='text-danger mr8']" position="replace"> <field name="text-danger" invisible="1" nolabel="1"/> </xpath> </data> 

以下是它引用的xml视图:

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>

        <template id="products_item" inherit_id="website_sale.products_item" name="Shop Without Catalog Price">
            <xpath expr="//del[@class='text-danger mr8']" position="replace">
                <field name="text-danger" invisible="1" nolabel="1"/>
            </xpath>
        </template>

        <template id="cart" inherit_id="website_sale.cart_lines" name="Shopping Cart Without Catalog Price">
            <xpath expr="//del[@t-field='line.product_id.lst_price']" position="replace">
                <field name="text-danger" invisible="1" nolabel="1"/>
            </xpath>
        </template>

        <template id="product_price" inherit_id="website_sale.product_price" name="Product Page Without Catalog Price">
            <xpath expr="//span[@class='text-danger oe_default_price']" position="replace">
                <field name="text-danger oe_default_price" invisible="1" nolabel="1"/>
            </xpath>
        </template>

        <template id="suggested_products_list" inherit_id="website_sale.cart_lines" name="Suggested Products Without Catalog Price">
            <xpath expr="//del[@class='text-danger mr8']" position="replace">
                <field name="text-danger" invisible="1" nolabel="1"/>
            </xpath>
        </template>

        <template id="modal_cart" inherit_id="website_sale_options.modal" name="Modal Cart Without Catalog Price">
            <xpath expr="//span[@t-attf-class='text-danger oe_default_price']" position="replace">
                <field name="text_danger oe_default_price" invisible="1" nolabel="1"/>
            </xpath>
            <xpath expr="//span[@class='text-danger oe_optional']" position="replace">
                <field name="text-danger oe_optional" invisible="1" nolabel="1"/>
            </xpath>
        </template>
    </data>
</openerp>

1 个答案:

答案 0 :(得分:0)

这里发生的是基本上ViewB尝试使用ViewA xpath作为挂钩在//del[@class='text-danger mr8']上添加内容。但ViewA上的这个元素可能已被另一个模块删除。那么,你可以在这里做的是找到哪个视图使用这个xpath表达式并编辑它以使用另一个表达式或找到该表达式引用的ViewA并添加class='text-danger mr8'元素以便ViewB可以运行通常