[FIX] point_of_sale: fix indentation Account Cash Rounding.

closes odoo/odoo#41655

X-original-commit: 03125ee8162e32ea91534a5fe8df9b597b9df5a7
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
Robin Heinz
2019-12-10 14:03:23 +00:00
parent d821999025
commit 97914cc081
+8 -8
View File
@@ -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."))