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,21 @@
# Copyright 2015 Opener B.V. (<https://opener.am>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import Form, TransactionCase
class TestSalePartnerIncoterm(TransactionCase):
def test_sale_partner_incoterm(self):
"""
Check that the customer's default incoterm is retrieved in the
sales order's onchange
"""
customer = self.env.ref("base.res_partner_3")
incoterm = self.env["account.incoterms"].search([], limit=1)
address = self.env["res.partner"].search([], limit=1)
customer.write(
{"sale_incoterm_id": incoterm.id, "sale_incoterm_address_id": address.id}
)
sale_order = Form(self.env["sale.order"])
sale_order.partner_id = customer
self.assertEqual(sale_order.incoterm, incoterm)
self.assertEqual(sale_order.incoterm_address_id, address)