Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
6184 มุมมอง
odoo 13 change date format overridden controllers below class and init method,
Changes not reflected.


from odoo.addons.web.controllers.main import ExportXlsxWriter


class ExportXlsxWriter(ExportXlsxWriter):

def __init__(self, fields, row_count=0):
super(ExportXlsxWriter, self).__init__(fields, row_count=row_count)
self.date_style = self.workbook.add_format({'text_wrap': True, 'num_format': 'mm-dd-yyyy'})

Odoo old to new all versions export date format change or set in user interface feature not available.
Is any custom module available export data date format and float_time widget change from user interface? or any plan to add this feature in the latest odoo 14 version.
อวตาร
ละทิ้ง

I experience the exact same problem. Why is this format fixed and not aligned with user settings for language in Odoo or Excel ?

คำตอบที่ดีที่สุด
def __myinit__(self, field_names, row_count=0):
self.field_names = field_names
self.output = io.BytesIO()
...

ExportXlsxWriter.__init__ = __myinit__


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด
just add format_date(self.env,date),'num_format': 'dd-mm-yyyy'},


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
4
ส.ค. 24
75069
Date format in Dashboard แก้ไขแล้ว
2
พ.ค. 25
1062
0
ต.ค. 23
2182
2
ต.ค. 23
2004
0
ก.ย. 23
957