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

[5096][FIX] stock_valuation_layer_accounting_date: update tests #174

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

AungKoKoLin1997
Copy link
Contributor

@AungKoKoLin1997 AungKoKoLin1997 changed the title [5096][UPD] update tests [5096][UPD] stock_valuation_layer_accounting_date: update tests Jan 17, 2025
@AungKoKoLin1997 AungKoKoLin1997 marked this pull request as draft January 17, 2025 10:19
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-fix-tests-stock_valuation_layer_accounting_date branch from 4f7a2bb to 78351af Compare January 17, 2025 10:23
@AungKoKoLin1997 AungKoKoLin1997 marked this pull request as ready for review January 17, 2025 10:29
@AungKoKoLin1997
Copy link
Contributor Author

I can't reproduce the issue in my env but I assume using context_today can avoid the potential issues.

@@ -38,5 +39,6 @@ def test_svl_accounting_date_manual_periodic(self):
self._make_in_move(self.product1, 10)
valuation_layer = self.product1.stock_valuation_layer_ids
self.assertEqual(
valuation_layer.accounting_date, valuation_layer.create_date.date()
valuation_layer.accounting_date,
fields.Date.context_today(valuation_layer, valuation_layer.create_date),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
fields.Date.context_today(valuation_layer, valuation_layer.create_date),
fields.Date.context_today(self, valuation_layer.create_date),

I guess it doesn't change the result, but isn't it more appropriate this way?

@yostashiro yostashiro changed the title [5096][UPD] stock_valuation_layer_accounting_date: update tests [5096][FIX] stock_valuation_layer_accounting_date: update tests Jan 18, 2025
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.

2 participants