common.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # -*- coding: utf-8 -*-
  2. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  3. from odoo import Command
  4. from odoo.addons.event_booth.tests.common import TestEventBoothCommon
  5. class TestEventBoothSaleCommon(TestEventBoothCommon):
  6. @classmethod
  7. def setUpClass(cls):
  8. super(TestEventBoothSaleCommon, cls).setUpClass()
  9. cls.event_booth_product = cls.env['product.product'].create({
  10. 'name': 'Test Booth Product',
  11. 'description_sale': 'Mighty Booth Description',
  12. 'list_price': 20,
  13. 'standard_price': 60.0,
  14. 'detailed_type': 'event_booth',
  15. })
  16. (cls.event_booth_category_1 + cls.event_booth_category_2).write({
  17. 'product_id': cls.event_booth_product.id,
  18. })
  19. cls.tax_10 = cls.env['account.tax'].sudo().create({
  20. 'name': 'Tax 10',
  21. 'amount': 10,
  22. })
  23. cls.test_pricelist = cls.env['product.pricelist'].sudo().create({
  24. 'name': 'Test Pricelist',
  25. })
  26. cls.test_pricelist_with_discount_included = cls.env['product.pricelist'].sudo().create({
  27. 'name': 'Test Pricelist',
  28. 'discount_policy': 'with_discount',
  29. 'item_ids': [
  30. Command.create({
  31. 'compute_price': 'percentage',
  32. 'percent_price': '10.0',
  33. })
  34. ],
  35. })