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,7 @@
# -*- coding: utf-8 -*-
from odoo.addons.sale.tests.common import TestSaleCommonBase
from odoo.addons.sale.tests.common import TestSaleCommon
class TestSaleFlow(TestSaleCommonBase):
class TestSaleFlow(TestSaleCommon):
''' Test running at-install to test flows independently to other modules, e.g. 'sale_stock'. '''
@classmethod
@ -12,7 +11,7 @@ class TestSaleFlow(TestSaleCommonBase):
user = cls.env['res.users'].create({
'name': 'Because I am saleman!',
'login': 'saleman',
'groups_id': [(6, 0, cls.env.user.groups_id.ids), (4, cls.env.ref('account.group_account_user').id)],
'group_ids': [(6, 0, cls.env.user.group_ids.ids), (4, cls.env.ref('account.group_account_user').id)],
})
user.partner_id.email = 'saleman@test.com'
@ -20,12 +19,6 @@ class TestSaleFlow(TestSaleCommonBase):
cls.env = cls.env(user=user)
cls.cr = cls.env.cr
cls.company = cls.env['res.company'].create({
'name': 'Test Company',
'currency_id': cls.env.ref('base.USD').id,
})
cls.company_data = cls.setup_sale_configuration_for_company(cls.company)
cls.partner_a = cls.env['res.partner'].create({
'name': 'partner_a',
'company_id': False,
@ -33,7 +26,6 @@ class TestSaleFlow(TestSaleCommonBase):
cls.analytic_plan = cls.env['account.analytic.plan'].create({
'name': 'Plan',
'company_id': cls.company.id,
})
cls.analytic_account = cls.env['account.analytic.account'].create({
@ -54,15 +46,12 @@ class TestSaleFlow(TestSaleCommonBase):
'partner_id': self.partner_a.id,
'partner_invoice_id': self.partner_a.id,
'partner_shipping_id': self.partner_a.id,
'analytic_account_id': self.analytic_account.id,
'pricelist_id': self.company_data['default_pricelist'].id,
'order_line': [
(0, 0, {
'name': self.company_data['product_order_cost'].name,
'product_id': self.company_data['product_order_cost'].id,
'product_uom_qty': 2,
'qty_delivered': 1,
'product_uom': self.company_data['product_order_cost'].uom_id.id,
'price_unit': self.company_data['product_order_cost'].list_price,
}),
(0, 0, {
@ -70,7 +59,6 @@ class TestSaleFlow(TestSaleCommonBase):
'product_id': self.company_data['product_delivery_cost'].id,
'product_uom_qty': 4,
'qty_delivered': 1,
'product_uom': self.company_data['product_delivery_cost'].uom_id.id,
'price_unit': self.company_data['product_delivery_cost'].list_price,
}),
],