当前位置:网站首页>Odoo14 | about the abnormal display of statusbar keyword after use and Its Solutions
Odoo14 | about the abnormal display of statusbar keyword after use and Its Solutions
2022-07-25 05:20:00 【There are always bugs in the code】
Today I met an interesting bug, I'll follow odoo14 Code in the development manual , Because the teaching structure of the textbook is written according to the function , There are differences in the code descriptions before and after , There have been some conflicts , What I met today is based on state The field of the status bar bug
This is my field
state = fields.Selection(
[('draft', ' Unavailable '),
('available', ' You can use '),
('borrowed', ' Lent out '),
('lost', ' Lost ')], u' state ', default='draft')As shown in the figure below

<header>
.... Here is the code of the button part, so it is omitted
<field name="state" widget="statusbar"/>
</header>The reason why this place is like this , This is not because the code is written incorrectly
But in the previous chapter , stay form In the lower half of the view, there is also a state Display of fields
....... It's on it form The top half of the view
<group>
<group>
<field name="name"/>
<field name="author_ids" widget="many2many_tags"/>
-> <field name="state"/> <- you 're right , This is the line of business
<field name="pages"/>
<field name="age_days"/>
<field name="publisher_id"/>
<field name="publisher_city"/>
<field name="notes"/>
</group>
.........Comment it out or delete it , Installing or upgrading modules

Now the status bar can be displayed normally
analysis :state The common field of does not comment will conflict with the status bar without error , The status bar will be displayed as a normal enumeration field
边栏推荐
- 微服务 - 网关Gateway组件
- STM32 Development Notes 121: Kalman filter I understand
- The second day of rhcsa summer vacation
- 一篇文章带你读懂Redis的哨兵模式
- Seven suggestions for Server Protection
- Learning records [email protected] R & D effectiveness measurement indicators
- Xiaohongshu joins hands with HMS core to enjoy HD vision and grow grass for a better life
- JWT(json web token)
- 1310_一个printf的实现分析
- Bypass XSS filters in Web Applications
猜你喜欢

Now the operator wants to check the answer details of all user questions from Zhejiang University. Please take out the corresponding data

Solution of win11 blue screen code 0x0000001a

微服务 - 远程调用(Feign组件)

Necessary skills for mobile terminal test: ADB command and packet capturing

An article takes you to understand the sentinel mode of redis

单点登录(一处登录,处处可用)

龙蜥社区发布首个 Anolis OS 安全指南 为用户业务系统保驾护航

JWT(json web token)

RHCE first day

项目管理工具——项目开发者工具
随机推荐
[untitled]
弹性布局总结
Harbor installation
初步了解Panda3d粒子系统
The second day of rhcsa summer vacation
STL notes (VII): container deque
Nexttick principle analysis
Sword finger offer II 014. anagrams in strings
Redis集群搭建(Windows)
FinClip实现微信授权登录的三种方案
rhce第一天
Solution of win11 blue screen code 0x0000001a
微服务 - 远程调用(Feign组件)
The global shipment of glory 8x series exceeded 10million units, and the glory V20 exceeded 1.5 million units!
Exchange 2010 SSL certificate installation document
自己实现is_convertible
JWT(json web token)
Interface idempotency
Implement is by yourself_ base_ of
Panda3D keyboard moving scene