Initial commit: Odoo 18.0-20251222 extra-addons
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled

This commit is contained in:
tocmo0nlord
2026-03-13 20:43:25 +00:00
parent 36e847a7df
commit adbe430761
9472 changed files with 1265727 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
# Copyright 2019 Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import res_company
from . import res_config_settings
from . import sale_order
from . import tier_definition

View File

@@ -0,0 +1,13 @@
# Copyright 2024 Quartile (https://www.quartile.co)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
sale_report_print_block = fields.Boolean(
help="Block the printing of the sale order report "
"if the order is not validated."
)

View File

@@ -0,0 +1,15 @@
# Copyright 2024 Quartile (https://www.quartile.co)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
sale_report_print_block = fields.Boolean(
related="company_id.sale_report_print_block",
readonly=False,
help="Block the printing of the sale order report "
"if the order is not validated.",
)

View File

@@ -0,0 +1,22 @@
# Copyright 2019 Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class SaleOrder(models.Model):
_name = "sale.order"
_inherit = ["sale.order", "tier.validation"]
_state_from = ["draft", "sent"]
_state_to = ["sale"]
_tier_validation_manual_config = False
def _get_requested_notification_subtype(self):
return "sale_tier_validation.sale_order_tier_validation_requested"
def _get_accepted_notification_subtype(self):
return "sale_tier_validation.sale_order_tier_validation_accepted"
def _get_rejected_notification_subtype(self):
return "sale_tier_validation.sale_order_tier_validation_rejected"

View File

@@ -0,0 +1,14 @@
# Copyright 2019 Open Source Integrators
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
class TierDefinition(models.Model):
_inherit = "tier.definition"
@api.model
def _get_tier_validation_model_names(self):
res = super()._get_tier_validation_model_names()
res.append("sale.order")
return res