1
0
forked from Mapan/odoo17e
odoo17e-kedaikipas58/addons/pos_blackbox_be/models/pos_make_payment.py
2024-12-10 09:04:09 +07:00

21 lines
594 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
from odoo.exceptions import UserError
from odoo.tools.translate import _
class PosMakePayment(models.TransientModel):
_inherit = "pos.make.payment"
def check(self):
order = self.env["pos.order"].browse(self.env.context.get("active_id"))
if order.config_id.iface_fiscal_data_module:
raise UserError(
_("Adding additional payments to registered orders is not allowed.")
)
return super().check()