Hi guys, is there a way to not allowed user to add hours in the cells on the Grid View in the TimeSheet App?? I tried inheriting the Grid View but I couldn't do it. Thanks in advance!
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ờ
Hi,
Here is custom module please try this,
__manifest__.py
{
'name': 'Readonly Timesheet Grid',
'version': '1.0',
'summary': 'Make timesheet hours readonly in Grid View',
'category': 'Human Resources',
'depends': ['hr_timesheet'],
'data': [
'views/timesheet_grid_view.xml',
],
'installable': True,
'application': False,
'auto_install': False,
}
views/timesheet_grid_view.xml – Override Grid View
<odoo>
<record id="readonly_timesheet_grid_view" model="ir.ui.view">
<field name="name">account.analytic.line.grid.readonly</field>
<field name="model">account.analytic.line</field>
<field name="arch" type="xml">
<grid string="Timesheets (Readonly)" cell_edit="false">
<field name="employee_id" type="row"/>
<field name="project_id" type="row"/>
<field name="task_id" type="row"/>
<field name="date" type="col"/>
<field name="unit_amount" readonly="1"/>
</grid>
</field>
</record>
</odoo>
I hope it is usefull
please did you find any solution? i am facing the same problem
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 5 25
|
854 | ||
|
1
thg 4 25
|
975 | ||
|
1
thg 2 24
|
2696 | ||
|
0
thg 10 24
|
4006 | ||
|
0
thg 4 23
|
1901 |
Did you find a solution? I'm facing the same