-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] product_pricelist_supplierinfo: compare timezone #1
base: 12.0-Fix-no-supplierinfo-min-qty-New-CarmenMiranda
Are you sure you want to change the base?
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
@@ -45,8 +45,8 @@ def _select_seller( | |||
lambda s: not s.company_id or s.company_id.id == company_id) | |||
for seller in sellers: | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
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