-
-
Notifications
You must be signed in to change notification settings - Fork 721
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
[16.0][FIX] stock_valuation_layer_accounting_date: prevent tests failed for some timezone #2159
base: 16.0
Are you sure you want to change the base?
[16.0][FIX] stock_valuation_layer_accounting_date: prevent tests failed for some timezone #2159
Conversation
b7b33fd
to
c1515f9
Compare
@freeze_time("2022-12-02") | ||
def test_svl_accounting_date_real_time(self): | ||
self.product1.product_tmpl_id.categ_id.property_valuation = "real_time" |
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.
We shouldn't be changing the intention of the test.
@freeze_time("2022-12-02") | |
def test_svl_accounting_date_real_time(self): | |
self.product1.product_tmpl_id.categ_id.property_valuation = "real_time" | |
@freeze_time("2022-12-02 23:00:00") | |
def test_svl_accounting_date_real_time(self): | |
self.product1.categ_id.property_valuation = "real_time" | |
self.env.user.tz = "Asia/Tokyo" |
def test_svl_accounting_date_real_time(self): | ||
self.product1.product_tmpl_id.categ_id.property_valuation = "real_time" | ||
self._make_in_move(self.product1, 10) | ||
valuation_layer = self.product1.stock_valuation_layer_ids | ||
self.assertEqual(valuation_layer.accounting_date, date(2022, 12, 3)) | ||
self.assertEqual(valuation_layer.accounting_date, date(2022, 12, 2)) |
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.
Revert this change.
c1515f9
to
9fbcafa
Compare
This PR has the |
@rousseldenis Can we get this PR merged? |
This fix is to address the issue for failing tests depending on timezone.
Related: #2139 (comment)
ping matt454357
@qrtl