What's the difference between col
and colspan
and how to use then in OpenERP?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Every form view container (form itself, group, page, I think there are more) in OpenERP consists of 4 columns to start with.
<form>
┌───┬───┬───┬───┐
│ 1 │ 2 │ 3 │ 4 │
└───┴───┴───┴───┘
</form>
Every takes 2 columns: label & input field
<field name="input" />
<field name="inpt2" />
┌───────┬───────┬───────┬───────┐ │ label │ input │ labl2 │ inpt2 │ └───────┴───────┴───────┴───────┘
With colspan, you can widen items.
<field name="inpt4" colspan="4"/>
<field name="input" />
<field name="inpt2" />
┌───────┬───────────────────────┐ │ labl4 │ inpt4_______________ │ ├───────┼───────┬───────┬───────┤ │ label │ input │ labl2 │ inpt2 │ └───────┴───────┴───────┴───────┘
<field name="input" />
<field name="inpt4" colspan="4"/>
<field name="inpt2" /> ┌───────┬───────┬───────┬───────┐ │ label │ input │ │ │ ├───────┼───────┴───────┴───────┤ │ labl4 │ inpt4_______________ │ ├───────┼───────┬───────┬───────┤ │ labl2 │ inpt2 │ │ │ └───────┴───────┴───────┴───────┘
When you add additional containers, like a page, you can tell OpenERP to use more or less columns.
<group col="2" colspan="2">
<field name="a" />
<field name="b" />
</group>
<group col="6" colspan="2">
<field name="d" />
<field name="e" />
<field name="f" />
</group>
│ │ │ │ │ ├───────┴───────┼────────────────┴────────────────┤ │ ┌────┬───┐ │ ┌────┬───┬────┬───┬────┬───┐ │ │ │ lb │ a │ │ │ lb │ d │ lb │ e │ lb │ f │ │ │ ├────┼───┤ │ └────┴───┴────┴───┴────┴───┘ │ │ │ lb │ b │ │ │ │ └────┴───┘ │ │ ├───────┬───────┼────────────────┬────────────────┤ │ │ │ │ │
good answer. Just changed your answer, it's col
, not cols
I fixed the answer based on archive.org page: https://web.archive.org/web/20140215040610/http://help.openerp.com/question/1490/what-is-the-different-between-col-and-colspan
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
2
thg 12 23
|
25462 | ||
|
1
thg 10 21
|
9387 | ||
|
1
thg 3 15
|
6590 | ||
|
1
thg 3 15
|
6533 | ||
|
3
thg 12 23
|
21276 |