Skip to content

[FIX] product_pricelist_supplierinfo: compare timezone#1

Open
AlejandroVI99 wants to merge 2 commits into12.0-Fix-no-supplierinfo-min-qty-New-CarmenMirandafrom
12.0-Fix-no-supplierinfo-min-qty-New-AlejandroVI99
Open

[FIX] product_pricelist_supplierinfo: compare timezone#1
AlejandroVI99 wants to merge 2 commits into12.0-Fix-no-supplierinfo-min-qty-New-CarmenMirandafrom
12.0-Fix-no-supplierinfo-min-qty-New-AlejandroVI99

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

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

emtz10 pushed a commit that referenced this pull request Feb 28, 2026
…-test

[18.0] [mig] Add test to product_assortment
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.

4 participants