mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
@@ -27,7 +27,7 @@ class SaleOrder(models.Model):
|
|||||||
or False,
|
or False,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
for line in order.order_line:
|
for line in order.order_line.filtered(lambda l: not l.display_type):
|
||||||
# Create agreement line
|
# Create agreement line
|
||||||
self.env["agreement.line"].create(
|
self.env["agreement.line"].create(
|
||||||
self._get_agreement_line_vals(line)
|
self._get_agreement_line_vals(line)
|
||||||
|
|||||||
@@ -53,7 +53,13 @@ class TestSaleOrder(TransactionCase):
|
|||||||
"agreement_template_id": self.test_agreement_template.id,
|
"agreement_template_id": self.test_agreement_template.id,
|
||||||
"date_order": fields.Date.today(),
|
"date_order": fields.Date.today(),
|
||||||
"order_line": [
|
"order_line": [
|
||||||
(0, 0, {"product_id": self.test_product.id, "product_uom_qty": 1.0})
|
(0, 0, {"display_type": "line_section", "name": "Test section"}),
|
||||||
|
(0, 0, {"display_type": "line_note", "name": "Test note"}),
|
||||||
|
(
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
{"product_id": self.test_product.id, "product_uom_qty": 1.0},
|
||||||
|
),
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -73,6 +79,8 @@ class TestSaleOrder(TransactionCase):
|
|||||||
"agreement_template_id": self.test_agreement_template.id,
|
"agreement_template_id": self.test_agreement_template.id,
|
||||||
"date_order": fields.Date.today(),
|
"date_order": fields.Date.today(),
|
||||||
"order_line": [
|
"order_line": [
|
||||||
|
(0, 0, {"display_type": "line_section", "name": "Test section"}),
|
||||||
|
(0, 0, {"display_type": "line_note", "name": "Test note"}),
|
||||||
(
|
(
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
@@ -80,7 +88,7 @@ class TestSaleOrder(TransactionCase):
|
|||||||
"product_id": self.test_product_is_serviceprofile.id,
|
"product_id": self.test_product_is_serviceprofile.id,
|
||||||
"product_uom_qty": 1.0,
|
"product_uom_qty": 1.0,
|
||||||
},
|
},
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user