Hello, i use Odoo Online, so i can't create custom module here, but i want to compute a date fields here. The problem here, is that i can't import relativedelta from dateutil.relativedelta.
How can i do please ?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello, i use Odoo Online, so i can't create custom module here, but i want to compute a date fields here. The problem here, is that i can't import relativedelta from dateutil.relativedelta.
How can i do please ?
Hi,
You can do as follow:
new_date = datetime.date.today() + dateutil.relativedelta.relativedelta(days=1)
Thanks
Hello, thank you for your answer, it helped a lot !
Hi, a need to add a duration to a start_date to compute the end date of a leasing contract in my DB ... And i'm losing my head ;-))
So When you indicate "new_date = datetime.date.today() + dateutil\.relativedelta\.relativedelta\(days=1\)", do\ you\ means\ with\ automated\ action\ \?
I'm\ trying\ to\ do\ the\ same\ in\ computed\ field,\ but\ it\ is\ not\ working\ \.\.\.
for\ record\ in\ self:
\ \ x_studio_fin_start\ =\ fields\.Datetime\.from_string\(self\.x_studio_fin_start\)
\ \ record\['x_studio_fin_stop'\]\ =\ record\.x_studio_fin_start\ \+\ record.dateutil.relativedelta(months=x_studio_dure_mois)
Could you please help me ?
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-sePublicações relacionadas | Respostas | Visualizações | Atividade | |
---|---|---|---|---|
|
1
jul. 23
|
2280 | ||
Import button is missing
Resolvido
|
|
1
abr. 23
|
7624 | |
Import Create and Update Dates
Resolvido
|
|
1
out. 21
|
3416 | |
import in odoo 14
Resolvido
|
|
1
jun. 21
|
2666 | |
|
1
fev. 21
|
10152 |