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 @@
from . import res_partner
from . import sale_order
from . import stock_picking

View File

@@ -0,0 +1,22 @@
# Copyright 2023 Moduon Team S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0)
from odoo import fields, models
class Partner(models.Model):
_inherit = "res.partner"
picking_note = fields.Html(
string="Picking Internal Note",
help="The notes will be added to the sales order and"
"pickings but will not be printed "
"on the delivery slip.",
)
picking_customer_note = fields.Text(
string="Picking Customer Comments",
help="The notes will be added to the sales order and"
"pickings and will be printed on "
"the delivery slip.",
)

View File

@@ -0,0 +1,36 @@
# Copyright 2018 Tecnativa - Carlos Dauden
# Copyright 2021 Tecnativa - Víctor Martínez
# Copyright 2023 Moduon Team S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class SaleOrder(models.Model):
_inherit = "sale.order"
picking_note = fields.Html(
string="Picking Internal Note",
compute="_compute_picking_notes",
store=True,
readonly=False,
)
picking_customer_note = fields.Text(
string="Picking Customer Comments",
compute="_compute_picking_notes",
store=True,
readonly=False,
)
@api.depends("partner_id", "partner_shipping_id")
def _compute_picking_notes(self):
for order in self:
if order.state not in {"sale", "cancel"}:
order.picking_note = (
order.partner_shipping_id.picking_note
or order.partner_id.picking_note
)
order.picking_customer_note = (
order.partner_shipping_id.picking_customer_note
or order.partner_id.picking_customer_note
)

View File

@@ -0,0 +1,41 @@
# Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class StockPicking(models.Model):
_inherit = "stock.picking"
customer_note = fields.Text(
string="Customer Comments",
compute="_compute_picking_notes",
store=True,
readonly=False,
)
note = fields.Html(
compute="_compute_picking_notes",
store=True,
readonly=False,
)
@api.depends(
"sale_id",
"sale_id.picking_note",
"sale_id.picking_customer_note",
"partner_id",
"picking_type_id",
)
def _compute_picking_notes(self):
for picking in self:
if picking.picking_type_id.code != "incoming" and picking.state not in (
"done",
"cancel",
):
picking.note = (
picking.sale_id.picking_note or picking.partner_id.picking_note
)
picking.customer_note = (
picking.sale_id.picking_customer_note
or picking.partner_id.picking_customer_note
)