跳至內容
選單
此問題已被標幟

Hello Odooers, 


Is there any way to set date field format for specific field, not for all fields. I mean not general settings. I want different different date format to display in different different field.


Thanks in advance.

頭像
捨棄
最佳答案

Odoo leverages the Bootstrap Tempus Dominus datepicker.


The best option is to use XML field options to change the format used:

options="{'datepicker': {'format': 'L'}}"


You can see us using this approach in Odoo (account.view_move_form)

options="{'datepicker': {'warn_future': true}}"
頭像
捨棄