|
1 | 1 | # Copyright 2022-2024 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
|
@@ -60,6 +61,7 @@ def _create_invoice(self, move_type="in_invoice"):
|
60 | 61 | move_form.invoice_date = fields.Date.from_string("2000-01-01")
|
61 | 62 | with move_form.invoice_line_ids.new() as line_form:
|
62 | 63 | line_form.product_id = self.product_a
|
| 64 | + line_form.name = "Product A\nTest description product A\nB" |
63 | 65 | line_form.quantity = 2
|
64 | 66 | with move_form.invoice_line_ids.new() as line_form:
|
65 | 67 | line_form.product_id = self.product_b
|
@@ -92,8 +94,8 @@ def test_invoice_action_post_equipment_1(self):
|
92 | 94 | self.assertEqual(len(line_a.equipment_ids), 2)
|
93 | 95 | self.assertEqual(len(line_b.equipment_ids), 0)
|
94 | 96 | equipment = fields.first(equipments)
|
95 |
| - self.assertEqual(equipment.name, self.product_a.name) |
96 |
| - self.assertEqual(equipment.product_id, self.product_a) |
| 97 | + self.assertEqual(equipment.name, "Product A") |
| 98 | + self.assertEqual(equipment.note, "<p>Test description product A<br>B</p>") |
97 | 99 | self.assertEqual(equipment.category_id.product_category_id, self.categ)
|
98 | 100 | self.assertEqual(equipment.assign_date, invoice.date)
|
99 | 101 | self.assertEqual(equipment.effective_date, invoice.date)
|
|
0 commit comments