Community mailing list archives
Re: Issue in the Dateby
Anyway, You should set the default value as a method that will be called each time you create a new record.
If you're using Odoo v7.0, then you need to write it like:
def _set_default_date(self, cr, uid, ids, context=None):
......# Write your logic that will calculate the default value of the date
date = fields.Date(string='Date', default='_set_default_date', )
Hi Mohamed,I did what you've said and I've got the same result that you expected, it shows the new time and date of the new start of the server.Please, show me where to go to make changes on the good.Thank in advance.2016-04-21 16:00 GMT+01:00 Mohamed Magdy <firstname.lastname@example.org>:Hi Hacene,
If the date is the same each time, then I assume the date is the same as you did run the server for the first time.
If you can restart the Odoo server and give another try, it will show the new time and date of the new start of the server.
Well, if you have the result as I described, you have to change a few lines in the code written for the default value of this field.The time zone is correct2016-04-21 3:14 GMT+01:00 Fabrice Henrion <email@example.com>:Do you confirm that your user preferences are properly set and that you don't have a warning icon as shown here:
If you have a warning icon, it means that your Odoo user preferences do not match with your computer's regional settings and that Odoo is displaying a different time zone than your actual time zone. This is one reason that could explain a date/time in the past.
On Wed Apr 20 16 1:15 PM, Hacene MEZIANI wrote:
sorry,not in the PO but in the request of quotation.the date order is always in the paste,See the attached order that I made today but, it shows a past date.thanksDear All, I hope you are fine.
I have an issue in the expected date in the PO. It always shows the same date ( paste date)
Please, help me solve this issue.(see attached picture )Thanks