19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:32:12 +01:00
parent 79f83631d5
commit 73afc09215
6267 changed files with 1534193 additions and 1130106 deletions

View file

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.sale.tests.common import SaleCommon
class SaleManagementCommon(SaleCommon):
@classmethod
@ -10,8 +10,15 @@ class SaleManagementCommon(SaleCommon):
super().setUpClass()
# Ensure user has access to sale order templates
cls.env.user.groups_id += cls.env.ref('sale_management.group_sale_order_template')
cls.env.user.group_ids += cls.env.ref('sale_management.group_sale_order_template')
cls.empty_order_template = cls.env['sale.order.template'].create({
'name': "Test Quotation Template",
})
@staticmethod
def _get_optional_product_lines(order):
"""Returns the order lines that are optional products. """
return order.order_line.filtered(
lambda line: not line.display_type and line._is_line_optional(),
)