[FIX] pms_api_rest: fix date format in transaction report service

This commit is contained in:
Sara Lago
2022-11-08 17:07:30 +01:00
committed by Darío Lodeiros
parent 55e258abf7
commit 533e1bd769

View File

@@ -437,12 +437,9 @@ class PmsTransactionService(Component):
)
def transactions_report(self, pms_transaction_report_search_param):
pms_property_id = pms_transaction_report_search_param.pmsPropertyId
date_from = (
datetime.strptime(pms_transaction_report_search_param.dateFrom, "%Y-%m-%d"),
)
date_to = (
datetime.strptime(pms_transaction_report_search_param.dateTo, "%Y-%m-%d"),
)
date_from = fields.Date.from_string(pms_transaction_report_search_param.dateFrom)
date_to = fields.Date.from_string(pms_transaction_report_search_param.dateTo)
report_wizard = self.env["cash.daily.report.wizard"].create(
{
"date_start": date_from,