From 97914cc08131ce43b247b69e1332abaaa6aa212d Mon Sep 17 00:00:00 2001 From: Robin Heinz Date: Tue, 10 Dec 2019 14:03:23 +0000 Subject: [PATCH] [FIX] point_of_sale: fix indentation Account Cash Rounding. closes odoo/odoo#41655 X-original-commit: 03125ee8162e32ea91534a5fe8df9b597b9df5a7 Signed-off-by: pimodoo --- addons/point_of_sale/models/pos_order.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/point_of_sale/models/pos_order.py b/addons/point_of_sale/models/pos_order.py index df5ad7db13f..84df3b47579 100644 --- a/addons/point_of_sale/models/pos_order.py +++ b/addons/point_of_sale/models/pos_order.py @@ -832,12 +832,12 @@ class ReportSaleDetails(models.AbstractModel): data.update(self.get_sale_details(data['date_start'], data['date_stop'], configs)) return data - class AccountCashRounding(models.Model): - _inherit = 'account.cash.rounding' +class AccountCashRounding(models.Model): + _inherit = 'account.cash.rounding' - @api.constrains('rounding', 'rounding_method', 'strategy') - def _check_session_state(self): - open_session = self.env['pos.session'].search([('config_id.rounding_method', '=', self.id), ('state', '!=', 'closed')]) - if open_session: - raise ValidationError( - _("You are not allowed to change the cash rounding configuration while a pos session using it is already opened.")) + @api.constrains('rounding', 'rounding_method', 'strategy') + def _check_session_state(self): + open_session = self.env['pos.session'].search([('config_id.rounding_method', '=', self.id), ('state', '!=', 'closed')]) + if open_session: + raise ValidationError( + _("You are not allowed to change the cash rounding configuration while a pos session using it is already opened."))