mirror of
https://github.com/OCA/server-backend.git
synced 2025-02-18 09:52:42 +02:00
[IMP] base_global_discount: Add discounted amount selection
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user