Skip to Content
Menu
This question has been flagged

Hello!

I have been reading and  learning on  this forum since Oct 2020 - thanks for all the great info!!

Now I have a question of my own, thought I would try the power of this forum:-)


I have already an automated action in operation that ensures that the quotations date ( when in draft or sent status) gets updated automatically to the date of editing (which is often later than the date of creation in our work flow); that works fine. 


However, the quotation's expiry date/validity date is set on 60 days by default, which gets set on the creation date, and this does not get automatically updated when editing the SO (and updating the quotation date via the automated action).


So I would like to set a 2nd line in that automated action, to define how to update the sales order for the validity field. But how do I define this? How can I tell Odoo which value to write (in fact: today + 90 days)?


I am not at all a programmer or developer, am just a 'self made Odoo superuser' in our company ...


Looking forward to your replies!

Avatar
Discard
Author

Ray, you are my hero!! it works like a charm! thank  you so much!

Best Answer


datetime.datetime.today() + dateutil.relativedelta.relativedelta(days = +90)

Avatar
Discard
Author

Hello again Ray,

would you happen to also have a tip for defining the domain on an automated action for sending an automated expiry reminder to the customer e.g. 14 days before expiration date? I was ablle to create this action and to define all quotations in status draft or sent, but how do I exclude all quotations that are pending and that expired previously? in other words: How do I limit the action to quotations with an expiry date in the future, counting from the day I activate this action?

Ray - how could one set a partiuclar time of day like this... my use case is "tomorrow, 8am"

(days = 1, hour =8) would be the arguments

perfect, this works!

Related Posts Replies Views Activity
0
Jan 21
1855
2
Sep 20
1933
1
Oct 24
183
0
Sep 24
121
0
May 24
23