Hi community,
I need to take a day from o.date_invoice can someone help me
Thanks for yours opinions
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi community,
I need to take a day from o.date_invoice can someone help me
Thanks for yours opinions
Hello Giovanni,
You can get this with 2 ways.
(1) You can pass this date via function and convert this to date and get day from that.
Ex. In .py file
from datetime import datetime
In Init method update localcontext with {'get_day' : self.get_day}
def get_day(date_string): date = datetime.strptime(date_string , '%Y-%m-%d') return date.day
In ODS file.
You can call this method with Key name which is passed inside localcontext and pass o.date_invoice to it.
(2) You can pass datetime library from localcontext and access inside ODS file.
Thanks, Serpent Consulting Services.
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
0
thg 7 22
|
1640 | ||
|
1
thg 12 15
|
3495 | ||
|
0
thg 5 15
|
3629 | ||
|
1
thg 3 15
|
4272 | ||
|
1
thg 3 15
|
4330 |