Odoo Help

0

0
2 答案
0
头像

Emipro Technologies Pvt. Ltd. 印度

--Emipro Technologies Pvt. Ltd.--
7770
| 7 8 10
Rajkot, 印度
--Emipro Technologies Pvt. Ltd.--

Emipro has been providing a wide range of business solutions in the domain of ERP & eCommerce. We take pride in serving 1000s of contented customers across the globe with strong roots in the US, Europe & India. Being a Certified Odoo Gold Partner in India as well as the United States, we bring our rich professional experience and unrivaled technical competence to help our customers obtain efficient and cost-effective business solutions in Odoo. With our team of 50+ Odoo Experts and highly experienced business analysts, we serve our customers which are companies of all sizes, ranging from start-ups to large enterprises. 

Our ERP Services:

  • Business Need Analysis & GAP Analysis

  • ERP Migration

  • Odoo Consultancy

  • Odoo Implementation & Customization

  • Odoo Training & Support

  • Odoo Website & eCommerce Development

  • Odoo Integration (Marketplaces, eCommerce platforms, Shipping Carriers, Payment Gateways etc.)

Our Achievements:


Reach Us:

Website: www.emiprotechnologies.com

Email: info@emiprotechnologies.com

Skype: emiprotech

Emipro Technologies Pvt. Ltd. 印度
2018/4/23 上午12:55

Hi,

You can write as following:

@api.onchange('integer_field')
def onchange_next_order_date(self):
	if self.date_field : 
		next_order_d1_obj = datetime.datetime.strptime(self.date_field, "%Y-%m-%d")
		next_date = next_order_d1_obj + datetime.timedelta(days=self.integer_field)
		self.date_field  = next_date.strftime("%Y-%m-%d")

Thanks



0
头像

Niyas Raphy 印度

--Niyas Raphy--
26418
| 7 7 11
Wayanad, Kerala, 印度
--Niyas Raphy--

Odoo Techno Functionalist

Feel free to connect :  niyasraphyk@gmail.com

Twitter:https://twitter.com/niyasraphy
LinkedIn: https://www.linkedin.com/in/niyasraphy/
FB:https://www.facebook.com/niyasraphy123
Whatsapp : +917736136763
Happy to help :)

Niyas Raphy 印度
2018/4/22 上午9:03

Hi,

Write and onchange function for the integer field and using the time Delta you can add this integer to the date.

Suppose if you have a date field date_1 then in on change of the integer field field_1 add the integer to date by timedelta.

In on change of field_1,


New_date = date_1 +timedelta(days=self.field_1)


Thanks

提问
Writer
Keep Informed
1 关注者(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now