Initial commit: OCA Technical packages (595 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:03 +02:00
commit 2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions

View file

@ -0,0 +1 @@
from . import test_partner_find

View file

@ -0,0 +1,22 @@
# Copyright 2018 Creu Blanca
# Copyright 2020 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo.tests.common import TransactionCase
class TestPartnerFind(TransactionCase):
def test_partner(self):
partner_obj = self.env["res.partner"]
ref = "testing_partner_internal_reference"
partner = partner_obj.create({"name": "Testing partner", "ref": ref})
# We should find the partner when the ref is found
self.assertEqual(
partner.id,
partner_obj.find_res_partner_by_ref_using_barcode(ref).get("res_id", False),
)
# No partner is found, then there is no res_id on the result
self.assertFalse(
partner_obj.find_res_partner_by_ref_using_barcode(
"{}-{}".format(ref, ref)
).get("res_id", False)
)