[FIX] product_pricelist_supplierinfo: compare timezone#1
Conversation
Issue Was comparing the date utc with date of the user timezone Implement Was fixed comparing the date to be the same when comparing the date of the seller with the receive one
|
Hello @CarmenMiranda @keylor2906 could you please review this change pls? |
|
LGTM |
|
Technically LGTM 👍🏼 |
|
para mezclar esto, aquien debemos avisar? o mejor lo metemos como un extra patch no lo quiero mezclar, por que directamente se verá afectado el pipeline de estable 12.0 |
|
Imagino que este fix es para absa? pregunto porque no estoy en contexto. En caso de ser positiva la respuesta, entonces que se haga un dummy en donde se utlice como extra patch, que se genere una instancia dev en deployv, que hagan las pruebas funcionales y en caso de que todo este correcto entonces se mergea este PR como esta y se cierra el MR dummy. |
|
tal cual, es para absa, ya tenemos la dummy, gracias por la infor @AlejandroVI99 Saludos! |
Was fixed comparing the date to be the same when comparing the date of the seller with the receive one
| if ( | ||
| (not seller.date_start or seller.date_start <= date) | ||
| and (not seller.date_end or seller.date_end >= date) | ||
| (not seller.date_start or fields.context_today(seller, seller.date_start) <= date) |
There was a problem hiding this comment.
| (not seller.date_start or fields.context_today(seller, seller.date_start) <= date) | |
| (not seller.date_start or fields.Date.context_today(seller, datetime.combine(seller.date_start, datetime.min.time()) + timedelta(hours=6)) <= date) |
Vas a necesitar importar al incio del archivo
from datetime import datetime, timedelta
| (not seller.date_start or seller.date_start <= date) | ||
| and (not seller.date_end or seller.date_end >= date) | ||
| (not seller.date_start or fields.context_today(seller, seller.date_start) <= date) | ||
| and (not seller.date_end or fields.context_today(seller, seller.date_end) >= date) |
There was a problem hiding this comment.
| and (not seller.date_end or fields.context_today(seller, seller.date_end) >= date) | |
| and (not seller.date_end or fields.Date.context_today(seller, datetime.combine(seller.date_end, datetime.min.time()) + timedelta(hours=6)) >= date) |
…-test [18.0] [mig] Add test to product_assortment
Issue
Was comparing the date utc with date of the user timezone
Implement
Was fixed comparing the date to be the same when comparing the date of the seller with the receive one