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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from freezegun import freeze_time

from odoo import fields
from odoo.tests import tagged

from odoo.addons.stock_account.tests.test_stockvaluationlayer import (
Expand Down Expand Up @@ -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?

)
Loading