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,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import res_company
from . import res_config_settings

View File

@@ -0,0 +1,11 @@
# Copyright 2023 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
force_zero_units_included = fields.Boolean()
sale_line_recommendation_domain = fields.Char(default="[]")

View File

@@ -0,0 +1,39 @@
# Copyright 2020 Tecnativa - Sergio Teruel
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
default_sale_recommendation_price_origin = fields.Selection(
[("pricelist", "Pricelist"), ("last_sale_price", "Last sale price")],
string="Price origin",
default="pricelist",
default_model="sale.order.recommendation",
required=True,
)
default_use_delivery_address = fields.Boolean(
string="Use delivery address", default_model="sale.order.recommendation"
)
default_months = fields.Float(
string="Default sale recommendation months",
default_model="sale.order.recommendation",
default=6,
)
default_line_amount = fields.Integer(
string="Default sale number of recommendations",
default_model="sale.order.recommendation",
default=15,
)
force_zero_units_included = fields.Boolean(
related="company_id.force_zero_units_included",
readonly=False,
help="Add recomented products in so even if units included is zero.",
)
sale_line_recommendation_domain = fields.Char(
related="company_id.sale_line_recommendation_domain",
readonly=False,
help="Domain applied to find SO lines to propose as recommended products.",
)