[IMP] base_global_discount: Add discounted amount selection

This commit is contained in:
Simone Rubino
2022-05-04 10:32:28 +02:00
parent 0074a68153
commit dc5c73695f
4 changed files with 18 additions and 0 deletions

View File

@@ -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'),