跳至内容
菜单
此问题已终结
3 回复
5612 查看

Im trying to remove the time from Date Confirmed so that it prints without time.But on changing the variable from Datetime to Date it gives me this error Properties of base fields cannot be altered in this manner! Please modify them through Python code, preferably through a custom addon! . Please help

形象
丢弃
最佳答案

You can remove the display of the Time portion of a Date system wide by configuring the Language.

In Developer Mode, visit the Translations --> Languages Menu in the Settings App

Open the Language you are using and modify the display format of Time:

The default is %H:%M:%S which displays Hours/Minutes/Seconds with a 24 hour clock - so 6pm is shown as 18:00:00

Use % to remove time entirely

Use %H:%M to display just Hours and Minutes

Use %I:%M %p to display just Hours and Minutes - 12 hour clock -so 6pm is shown as 6:00 PM

Use %I %p to display just Hours and AM/PM

形象
丢弃
最佳答案

Hi,

You might be trying to do this change from the user interface, that is why you are getting this message. Field properties is not allowed to change from the user interface, it is only allowed to change it using the code, which you can do by editing the original code or by making a custom module. The second one is preferred.


Thanks

形象
丢弃
最佳答案

You should not do that in Python and try to change some of the very basic structure. Do adjust your QWeb report instead.

形象
丢弃

+1, you should do these changes in XML with an xpath on the report :)