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 @@
from . import account_move_line

View File

@@ -0,0 +1,31 @@
# Copyright 2013-2017 Agile Business Group sagl
# (<http://www.agilebg.com>)
# Copyright 2021 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class AccountInvoiceLine(models.Model):
_inherit = "account.move.line"
@api.depends("product_id")
def _compute_product_customer_code(self):
for line in self:
if line.product_id and line.partner_show_customer_code:
product = line.product_id
code_id = product._select_customerinfo(partner=line.move_id.partner_id)
line.product_customer_code = code_id.product_code or ""
else:
line.product_customer_code = ""
product_customer_code = fields.Char(
compute="_compute_product_customer_code",
)
partner_show_customer_code = fields.Boolean(
compute="_compute_partner_show_customer_code"
)
def _compute_partner_show_customer_code(self):
for rec in self:
rec.partner_show_customer_code = rec.move_id.is_sale_document()