Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

I want to add a new input field inside the existing DateTimeField input field to support the Nepali Date Field. I have inherited the "web.DateTimeField" template and added an input field, which works perfectly.

I need to ensure the input fields convert dates between the Nepali Date and the standard DateTime widget. Users should be able to select dates using either the Odoo Datepicker or NepaliDatepicker, with automatic conversion between them based on the selected date.

I have patched the DateTimeField JS class and successfully displayed the Nepali Date in read-only mode as a label, but I couldn't set it to the input field.

The NepaliDatepicker works in the input field, but I want to update the Odoo Date Field value when the user selects a date in the NepaliDatepicker and vice versa.

I don't want to create a new widget because I don't want to add a custom widget to all Date and Datetime fields.

Note: I am using Odoo 17 Community.


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 7 25
1208
1
thg 6 24
4352
2
thg 5 24
2353
2
thg 5 24
4251
Owl Tutotrial Đã xử lý
1
thg 3 22
8637