I am using odoo9
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ờ
3
Trả lời
13173
Lượt xem
create new functional fields color in .py file that will change values as per state.
def change_colore_on_kanban(self):
""" this method is used to chenge color index base on fee status ---------------------------------------- :return: index of color for kanban view """
for record in self:
color = 0
if record.status == 'occupied':
color = 2
elif record.status == 'available':
color = 5
elif record.cleaning_status == 'dirty':
color = 7
elif record.cleaning_status == 'cleaned':
color = 5
else:
color=5
record.color = color
color = fields.Integer('Color Index', compute="change_colore_on_kanban")
then define kanban color on new field in xml file.
<div t-attf-class="#{kanban_color(record.color.raw_value)}">
Thanks Ajeet
How could I change the background color of the WHOLE kanban column?
I added a new field to the Stage model like this:
How can I use this field's value when rendering the column in the kanban view?
Thanks!
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ý