Merge PR #165 into 12.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2022-08-23 06:57:35 +00:00
4 changed files with 18 additions and 0 deletions

View File

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

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

View File

@@ -4,3 +4,6 @@
* David Vidal
* Carlos Dauden
* Rafael Blasco
* `TAKOBI <https://takobi.online>`_:
* Simone Rubino <sir@takobi.online>

View File

@@ -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>