Skip to content

Commit

Permalink
Merge PR #343 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by simahawk
  • Loading branch information
OCA-git-bot committed Sep 26, 2024
2 parents 0fa11ca + c3e3ae5 commit 530623f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions stock_card_report/tests/test_stock_card_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
from datetime import date

import pytz
from freezegun import freeze_time

from odoo import fields
from odoo import Command, fields
from odoo.tests import common, tagged
from odoo.tools import test_reports

Expand Down Expand Up @@ -124,11 +125,12 @@ def _getReportTitle(self):

def _getBaseFilters(self):
return {
"product_ids": [(6, 0, [self.product_A.id])],
"product_ids": [Command.set([self.product_A.id])],
"location_id": self.location_1.id,
}


@freeze_time("2022-02-01 00:00:00")
@tagged("post_install", "-at_install")
class TestStockCardReport(common.TransactionCase):
@classmethod
Expand Down Expand Up @@ -213,7 +215,7 @@ def setUpClass(cls):
def test_reports(self):
report = self.env["report.stock.card.report"].create(
{
"product_ids": [(6, 0, [self.product_A.id, self.product_B.id])],
"product_ids": [Command.set([self.product_A.id, self.product_B.id])],
"location_id": self.location_1.id,
}
)
Expand All @@ -238,7 +240,7 @@ def test_reports(self):
def test_get_report_html(self):
report = self.env["report.stock.card.report"].create(
{
"product_ids": [(6, 0, [self.product_A.id, self.product_B.id])],
"product_ids": [Command.set([self.product_A.id, self.product_B.id])],
"location_id": self.location_1.id,
}
)
Expand All @@ -263,7 +265,7 @@ def test_wizard_date_range(self):
"date_range_id": dt.id,
"date_from": time.strftime("%Y-%m-28"),
"date_to": time.strftime("%Y-%m-01"),
"product_ids": [(6, 0, [self.product_A.id, self.product_B.id])],
"product_ids": [Command.set([self.product_A.id, self.product_B.id])],
"location_id": self.location_1.id,
}
)
Expand Down

0 comments on commit 530623f

Please sign in to comment.