|
5 | 5 | from odoo import fields
|
6 | 6 | from odoo.tests import Form, common, new_test_user
|
7 | 7 | from odoo.tests.common import users
|
8 |
| -from odoo.tools import html2plaintext |
9 | 8 |
|
10 | 9 |
|
11 | 10 | class TestAccountMove(common.TransactionCase):
|
@@ -68,7 +67,7 @@ def _create_invoice(self, move_type="in_invoice"):
|
68 | 67 | move_form.invoice_date = fields.Date.from_string("2000-01-01")
|
69 | 68 | with move_form.invoice_line_ids.new() as line_form:
|
70 | 69 | line_form.product_id = self.product_a
|
71 |
| - line_form.name = "Product A \nTest description product A" |
| 70 | + line_form.name = "Product A\nTest description product A" |
72 | 71 | line_form.quantity = 2
|
73 | 72 | line_form.account_id = self.account_expense
|
74 | 73 | with move_form.invoice_line_ids.new() as line_form:
|
@@ -103,9 +102,8 @@ def test_invoice_action_post_equipment_1(self):
|
103 | 102 | self.assertEqual(len(line_a.equipment_ids), 2)
|
104 | 103 | self.assertEqual(len(line_b.equipment_ids), 0)
|
105 | 104 | equipment = fields.first(equipments)
|
106 |
| - name_list = line_a.name.split("\n") |
107 |
| - self.assertEqual(equipment.name, name_list[0]) |
108 |
| - self.assertEqual(html2plaintext(equipment.note), name_list[1]) |
| 105 | + self.assertEqual(equipment.name, "Product A") |
| 106 | + self.assertEqual(equipment.note, "<p>Test description product A</p>") |
109 | 107 | self.assertEqual(equipment.product_id, self.product_a)
|
110 | 108 | self.assertEqual(equipment.category_id.product_category_id, self.categ)
|
111 | 109 | self.assertEqual(equipment.assign_date, invoice.date)
|
|
0 commit comments