I created a new module which adds a new table and screen to Odoo. In the action record, I declared a view_type of "form" and view_mode of "tree,form". The tree view displays correctly, but the form view does not. It doesn't display the title correctly, instead showing the object name and a number. When on the list view, the debug select list shows "Debug View#1221", but on the form view, the select list just says, "Debug View#". If I go into debug-->Manage Views, both views (form and tree) are listed correctly by the strings given them, but both show up as type "tree". What gives?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- ลูกค้าสัมพันธ์
- e-Commerce
- ระบบบัญชี
- สินค้าคงคลัง
- PoS
- Project
- MRP
คำถามนี้ถูกตั้งค่าสถานะ
Well, not sure what exactly was causing both the form and tree views to show up as type "tree" in the debug window, but I figured out the weird title issue. Turns out that Odoo really wants to have a field called "name" in your model, and that's what it displays at the top of a form view, at the end of the breadcrumb trail. The "string" attribute of the "form" tag (I wish this editor had a [code] button) is ignored. Odoo will use the "string" attribute of the "tree" tag as the title of the tree view. Since my model only contained fields "alpha_code", "description", and "num_code", I was getting the funky title at the top of the form view. I didn't see anything about this in the several pieces of scattered documentation that I could find. Hope this info helps someone else.
Sorry, I misspoke. The title at the top of a tree view comes from the "name" field of the action record definition. I'm not sure what the "string" attribute in the "form" and "tree" tags does, if anything . . .
สนุกกับการพูดคุยนี้ใช่ไหม? เข้าร่วมเลย!
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อRelated Posts | ตอบกลับ | มุมมอง | กิจกรรม | |
---|---|---|---|---|
Hide field in a tree view
แก้ไขแล้ว
|
|
11
ก.ย. 21
|
31880 | |
|
1
ก.ย. 16
|
4427 | ||
|
1
ก.พ. 24
|
12618 | ||
Why can't Odoo find my view?
แก้ไขแล้ว
|
|
1
มี.ค. 15
|
4521 | |
|
1
มี.ค. 15
|
3540 |