Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
3 Odpovědi
5602 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit
Nejlepší odpověď

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

Avatar
Zrušit

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