alanhou / odoo12-development Goto Github PK
View Code? Open in Web Editor NEWOdoo 12 Development Essentials - Fourth Edition Learning Code
Odoo 12 Development Essentials - Fourth Edition Learning Code
<?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 代码注释掉, 能正常启动,但是新建的菜单无法显示,请教下 这个怎么解决? 谢谢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.