Git Product home page Git Product logo

odoo12-development's Issues

你好,odoo12 菜单显示不了,

<?xml version="1.0" ?>
<odoo>
    <record id="module_library_category" model="ir.module.category">
        <field name="name">Library</field>
    </record>
    <!-- Library User Group -->
    <record id="library_group_user" model="res.groups">
        <field name="name">User</field>
        <field name="category_id" ref="module_library_category" />
        <field name="implied_ids" eval="[(4, ref('base.group_user'))]" />
    </record>
    <!-- Library Manager Group -->
    <record id="library_group_manager" model="res.groups">
        <field name="name">Manager</field>
        <field name="category_id" ref="module_library_category" />
        <field name="implied_ids" eval="[(4, ref('base.group_user'))]" />
        <field name="users" eval="[
                    (4, ref('base.user_root')),
                    (4, ref('base.user_admin'))
                ]" />
    </record>
    <data noupdate="1">
        <record id="book_user_rule" model="ir.rule">
            <field name="name">Library Book User Access</field>
            <field name="model_id" ref="model_library_book" />
            <field name="domain_force">
                [('active','=',True)]
            </field>
            <field name="groups" eval="[(4,ref('library_group_user'))]" />
        </record>
    </data>
</odoo>

以上代码中,

<record id="library_group_manager" model="res.groups">
        <field name="name">Manager</field>
        <field name="category_id" ref="module_library_category" />
        <field name="implied_ids" eval="[(4, ref('base.group_user'))]" />
        <field name="users" eval="[
                    (4, ref('base.user_root')),
                    (4, ref('base.user_admin'))
                ]" />
    </record>

服务器代码启动一直报错,

raise ValidationError(_('The user cannot have more than one user types.'))
odoo.tools.convert.ParseError: "一个用户不能有多种用户类型
None" while parsing /Users/odoo-12.0/my-modules/library_app/security/library_security.xml:13, near
<record id="library_group_manager" model="res.groups">
        <field name="name">Manager</field>
        <field name="category_id" ref="module_library_category"/>
        <field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
        <field name="users" eval="[                     (4, ref('base.user_root')),                     (4, ref('base.user_admin'))                 ]"/>
    </record>

把users 代码注释掉, 能正常启动,但是新建的菜单无法显示,请教下 这个怎么解决? 谢谢

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.