Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
3257 Представления

I need to extract month from invoice_date as a custom Character or selection field (NO DATE).

Thanks

Аватар
Отменить
Лучший ответ

Hi,

Please try like this:- 

import datetime
month = datetime.strptime(self.date_invoice, '%Y-%m-%d').strftime("%B")

It will return the month name.

Regards

Аватар
Отменить
Автор

I forgot to comment that I would like to do it in the frontend, directly in the web as a custom field x_MONTH. And in the model invoice.account.report

Related Posts Ответы Просмотры Активность
2
нояб. 22
3659
1
июл. 22
2276
3
нояб. 21
25916
1
авг. 15
5417
2
мар. 15
5277