diff --git a/base_global_discount/__manifest__.py b/base_global_discount/__manifest__.py index 25971d33..61c66429 100644 --- a/base_global_discount/__manifest__.py +++ b/base_global_discount/__manifest__.py @@ -1,5 +1,6 @@ # Copyright 2019 Tecnativa S.L. - David Vidal # Copyright 2020 Xtendoo - Manuel Calero +# Copyright 2022 Simone Rubino - TAKOBI # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Base Global Discount', diff --git a/base_global_discount/models/global_discount.py b/base_global_discount/models/global_discount.py index 10f5b294..4e32917c 100644 --- a/base_global_discount/models/global_discount.py +++ b/base_global_discount/models/global_discount.py @@ -1,4 +1,5 @@ # Copyright 2019 Tecnativa - David Vidal +# Copyright 2022 Simone Rubino - TAKOBI # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import fields, models from odoo.addons import decimal_precision as dp @@ -21,6 +22,16 @@ class GlobalDiscount(models.Model): required=True, default=0.0, ) + discount_base = fields.Selection( + selection=[ + ('subtotal', 'Subtotal'), + ('total', 'Total'), + ], + default='subtotal', + required='True', + string='Discount Base', + help='Amount that will be discounted.', + ) discount_scope = fields.Selection( selection=[ ('sale', 'Sales'), diff --git a/base_global_discount/readme/CONTRIBUTORS.rst b/base_global_discount/readme/CONTRIBUTORS.rst index 7b1dda35..03793ba3 100644 --- a/base_global_discount/readme/CONTRIBUTORS.rst +++ b/base_global_discount/readme/CONTRIBUTORS.rst @@ -4,3 +4,6 @@ * David Vidal * Carlos Dauden * Rafael Blasco +* `TAKOBI `_: + + * Simone Rubino diff --git a/base_global_discount/views/global_discount_views.xml b/base_global_discount/views/global_discount_views.xml index 4a293a51..8f04aa9b 100644 --- a/base_global_discount/views/global_discount_views.xml +++ b/base_global_discount/views/global_discount_views.xml @@ -1,5 +1,6 @@ @@ -10,6 +11,7 @@ + @@ -25,6 +27,7 @@ +