mirror of
https://github.com/bringout/oca-ocb-sale.git
synced 2026-04-27 04:52:04 +02:00
19.0 vanilla
This commit is contained in:
parent
79f83631d5
commit
73afc09215
6267 changed files with 1534193 additions and 1130106 deletions
|
|
@ -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(),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue