hi, i am a newer of python. Now i create a field named "production_date" in stock.production.lot and set exipry date on lot. In odoo 11 ,the start day of product expiry is from the day i purchase. how can i change the start day to production date?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
1
الرد
2069
أدوات العرض
A common scenario involving date and times involve performing mathematical operations on dates and times themselves. For example when you want to calculate number of days, events or you want to find out what is the next date and time than we use timedelta class in python to find out these operations.
#!/usr/bin/python3
from datetime import time
from datetime import date
from datetime import datetime
from datetime import timedelta
def main():
#construct a basic timedelta and print it
print(timedelta(days=365, hours = 5, minutes=1))
if __name__ == "__main__": main()
Reference: http://learnopenerp.blogspot.com/2018/02/python-timedelta.html
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيل