Good to all, I have an error when generating a report. I have two programs connected to the same database, but they generate two different reports, although the calculation process is the same, and the issue of the time zone I think I have it solved.
This is the wizard code that allows me to select the date and time range:
@api.multi
def action_print_report(self):
report_data = self.env.context.copy()
report_data['active_model'] = 'res.company'
report_data['active_ids'] = [self.env.user.company_id.id]
report_data['active_id'] = self.env.user.company_id.id
report_data['report_type'] = self.report_type
report_data['date_from'] = self.date_from
report_data['date_to'] = self.date_to
report_data['shop_ids'] = self.shop_ids.ids
report_data['printer_ids'] = self.printer_ids.ids
report_name = "aldelo_conector.report_%s" % self.report_type
return self.env['report'].with_context(report_data).get_action(self.env.user.company_id, report_name, report_data)
Report generated by program X
2024/06/01 - 11:00:00
HORA | SALES | COUNT |
11:00:00 | $28.03 | 3 |
23:00:00 | $730.87 | 69 |
00:00:00 | $295.90 | 26 |
01:00:00 | $57.41 | 6 |
02:00:00 | $35.98 | 4 |
This is an extract of the report summary, only values coincide in the hours 00 to 02 AM, of course the sum of the sales are also different, can someone help me find a solution, thank you
Report generated by Odoo v8
2024/06/01 - 02:00:00
HORA | SALES | COUNT |
11:00:00 | $30.20 | 4 |
23:00:00 | $758.96 | 69 |
00:00:00 | $295.90 | 26 |
01:00:00 | $57.41 | 6 |
02:00:00 | $35.98 | 4 |