chore: import enterprise addons 19.0 bulk snapshot

This commit is contained in:
1b-agent committed 2026-09-16 10:13:08 +00:00
commit ca4af030d3
39951 files changed
+15570005

No files matched your search

@@ -0,0 +1,47 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.fields import Command
from odoo.tests import HttpCase, tagged
from odoo.addons.sale_subscription.tests.common_sale_subscription import TestSubscriptionCommon
@tagged('post_install', '-at_install')
class TestSaleSubscriptionConfigurators(HttpCase, TestSubscriptionCommon):
def test_sale_subscription_product_configurator(self):
optional_product = self._create_product(
name="Optional product",
subscription_rule_ids=[
Command.create({'plan_id': self.plan_week.id, 'fixed_price': 6}),
Command.create({'plan_id': self.plan_2_month.id, 'fixed_price': 16}),
],
)
self._create_product(
name="Main product",
optional_product_ids=[Command.set(optional_product.product_tmpl_id.ids)],
subscription_rule_ids=[
Command.create({'plan_id': self.plan_week.id, 'fixed_price': 5}),
Command.create({'plan_id': self.plan_2_month.id, 'fixed_price': 15}),
],
)
self.start_tour('/', 'sale_subscription_product_configurator', login='salesman')
def test_sale_subscription_combo_configurator(self):
combo = self.env['product.combo'].create({
'name': "Test combo",
'combo_item_ids': [
Command.create({'product_id': self._create_product().id}),
Command.create({'product_id': self._create_product().id}),
],
})
self._create_product(
name="Combo product",
type='combo',
combo_ids=[Command.link(combo.id)],
subscription_rule_ids=[
Command.create({'plan_id': self.plan_week.id, 'fixed_price': 5}),
Command.create({'plan_id': self.plan_2_month.id, 'fixed_price': 15}),
],
)
self.start_tour('/', 'sale_subscription_combo_configurator', login='salesman')