LaOsaCoop/Odoo16#14 add pos_require_product_quantity

This commit is contained in:
Luis 2025-05-12 13:17:19 +02:00
parent 468e3267ec
commit b34eaceda5
16 changed files with 826 additions and 0 deletions

View file

@ -0,0 +1,2 @@
from . import pos_config
from . import res_config_setting

View file

@ -0,0 +1,14 @@
# Copyright 2019-2020 Coop IT Easy SCRLfs
# @author Robin Keunen <robin@coopiteasy.be>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class PosConfig(models.Model):
_inherit = "pos.config"
require_product_quantity = fields.Boolean(
string="Require product quantity in POS",
default=False,
)

View file

@ -0,0 +1,11 @@
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
require_product_quantity = fields.Boolean(
related="pos_config_id.require_product_quantity",
readonly=False,
help="Require product quantity in POS",
)