[FIX] pos_daily_sales_reports: traceback on printing daily sales
before this commit, on printing the daily sales report
without selecting the pos session in the wizard, it
raises traceback.
traceback:
ValueError: Not naive datetime (tzinfo is already set)
Template: point_of_sale.report_saledetails
Path: /t/t[2]/t/div/div[1]/t[3]/strong/t[1]
Node: <t t-esc="date_start" t-options="{\'widget\': \'datetime\'}"/>
after this commit, the session field will be required
in the wizard and report will get correctly printed
closes odoo/odoo#128096
X-original-commit: a77e2936790fdb179f88c3cd2de08aec801bb24c
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
This commit is contained in:
@@ -8,7 +8,7 @@ class PosDailyReport(models.TransientModel):
|
||||
_name = 'pos.daily.sales.reports.wizard'
|
||||
_description = 'Point of Sale Daily Report'
|
||||
|
||||
pos_session_id = fields.Many2one('pos.session')
|
||||
pos_session_id = fields.Many2one('pos.session', required=True)
|
||||
|
||||
def generate_report(self):
|
||||
data = {'date_start': False, 'date_stop': False, 'config_ids': self.pos_session_id.config_id.ids, 'session_ids': self.pos_session_id.ids}
|
||||
|
||||
Reference in New Issue
Block a user