Hi, How can I do to hide the buttons of the workflow when editing a leave request? What I want is: when you click on the edit button to edit a leave request, workflow buttons are hidden. How can I do it?
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ờ
Try this: http://stackoverflow.com/questions/23568345/how-to-hide-a-workflow-button-based-on-user-in-openerp-7
I had this same problem (and in my humble opinion, this should be a native option in OpenERP) and finaly I found the answer here:
help.openerp.com/question/11853/inverse-of-css-class-oe_edit_only
(I guess my karma isn't high enough to post a link to the answer, so i'll adapt it)
In my case, since I'm developing an entire new module, I created a CSS file with the following content (so, no need to edit base.css!)
.openerp .oe_form_editable .oe_view_mode_only, .openerp .oe_form_editable .oe_form_field:empty {
display: none !important;
}
Don't forget to add it's declaration it in __openerp__.py:
'css': [ 'static/css/uc_css.css' ],
And to add the class to your workflow buttons
<button name="submit_request" class="oe_highlight oe_view_mode_only" string="Submit Request" type="workflow" states="draft"/>
And this way you can remove all extra (and confusing) buttons on form editing view, leaving only the "Save" or cancel options to the user
Thanks for the edit! :)
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 | |
---|---|---|---|---|
|
0
thg 9 17
|
3894 | ||
|
1
thg 8 25
|
406 | ||
|
2
thg 7 25
|
573 | ||
|
1
thg 7 25
|
527 | ||
|
2
thg 7 25
|
554 |