Skip to content
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

Open
wants to merge 2 commits into
base: 12.0-Fix-no-supplierinfo-min-qty-New-CarmenMiranda
Choose a base branch
from

Conversation

AlejandroVI99
Copy link

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

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
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
@AlejandroVI99
Copy link
Author

Hello @CarmenMiranda @keylor2906 could you please review this change pls?

@keylor2906
Copy link

LGTM

@CarmenMiranda
Copy link

Technically LGTM 👍🏼

@hugho-ad
Copy link

hugho-ad commented Jul 7, 2023

@keylor2906

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

@keylor2906
Copy link

@hugho-ad

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.

@hugho-ad
Copy link

hugho-ad commented Jul 8, 2023

@keylor2906

tal cual, es para absa, ya tenemos la dummy, gracias por la infor

@AlejandroVI99
cualquier duda nos dices porfavor

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)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(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)
Copy link

@keylor2906 keylor2906 Jul 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants