mirror of
https://github.com/OCA/server-backend.git
synced 2025-02-18 09:52:42 +02:00
@@ -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',
|
||||
|
||||
@@ -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'),
|
||||
|
||||
@@ -4,3 +4,6 @@
|
||||
* David Vidal
|
||||
* Carlos Dauden
|
||||
* Rafael Blasco
|
||||
* `TAKOBI <https://takobi.online>`_:
|
||||
|
||||
* Simone Rubino <sir@takobi.online>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2019 Tecnativa - David Vidal
|
||||
Copyright 2022 Simone Rubino - TAKOBI
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<odoo>
|
||||
|
||||
@@ -10,6 +11,7 @@
|
||||
<field name="sequence" widget="handle"/>
|
||||
<field name="name"/>
|
||||
<field name="discount"/>
|
||||
<field name="discount_base"/>
|
||||
<field name="discount_scope"/>
|
||||
<field name="company_id"/>
|
||||
</tree>
|
||||
@@ -25,6 +27,7 @@
|
||||
<field name="name"/>
|
||||
<field name="sequence"/>
|
||||
<field name="discount"/>
|
||||
<field name="discount_base"/>
|
||||
<field name="discount_scope"/>
|
||||
<field name="company_id"/>
|
||||
</group>
|
||||
|
||||
Reference in New Issue
Block a user