|
1 | 1 | # Copyright 2022-2023 Tecnativa - Víctor Martínez
|
| 2 | +# Copyright 2024 Tecnativa - Carolina Fernandez |
2 | 3 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
|
3 | 4 |
|
4 | 5 | from odoo import fields
|
5 | 6 | from odoo.tests import Form, common, new_test_user
|
6 | 7 | from odoo.tests.common import users
|
| 8 | +from odoo.tools import html2plaintext |
7 | 9 |
|
8 | 10 |
|
9 | 11 | class TestAccountMove(common.TransactionCase):
|
@@ -66,6 +68,7 @@ def _create_invoice(self, move_type="in_invoice"):
|
66 | 68 | move_form.invoice_date = fields.Date.from_string("2000-01-01")
|
67 | 69 | with move_form.invoice_line_ids.new() as line_form:
|
68 | 70 | line_form.product_id = self.product_a
|
| 71 | + line_form.name = "Test Product A" |
69 | 72 | line_form.quantity = 2
|
70 | 73 | line_form.account_id = self.account_expense
|
71 | 74 | with move_form.invoice_line_ids.new() as line_form:
|
@@ -101,6 +104,7 @@ def test_invoice_action_post_equipment_1(self):
|
101 | 104 | self.assertEqual(len(line_b.equipment_ids), 0)
|
102 | 105 | equipment = fields.first(equipments)
|
103 | 106 | self.assertEqual(equipment.name, self.product_a.name)
|
| 107 | + self.assertEqual(html2plaintext(equipment.note), line_a.name) |
104 | 108 | self.assertEqual(equipment.product_id, self.product_a)
|
105 | 109 | self.assertEqual(equipment.category_id.product_category_id, self.categ)
|
106 | 110 | self.assertEqual(equipment.assign_date, invoice.date)
|
|
0 commit comments