コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3272 ビュー

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

関連投稿 返信 ビュー 活動
2
11月 22
3680
1
7月 22
2305
3
11月 21
25931
1
8月 15
5451
2
3月 15
5277