mirror of
https://github.com/bringout/oca-pos.git
synced 2026-04-22 08:22:02 +02:00
Move all OCA POS modules from oca-technical to dedicated oca-pos submodule
Reorganized 74 POS-related modules for better structure: - Moved all odoo-bringout-oca-pos-* packages from packages/oca-technical/ - Now organized in dedicated packages/oca-pos/ submodule - Includes payment, receipt, loyalty, order, product, and partner modules - Maintains all module functionality while improving project organization This creates a cleaner separation between general technical modules and Point of Sale specific functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
3791451dc1
commit
377f346a99
2675 changed files with 93308 additions and 0 deletions
|
|
@ -0,0 +1,2 @@
|
|||
from . import test_pos_container_deposit
|
||||
from . import test_pos_container_deposit_frontend
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
# Copyright 2024 Hunki Enterprises BV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
||||
class TestPosDeposit(TransactionCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.deposit_product = cls.env.ref("pos_container_deposit.demo_deposit_product")
|
||||
cls.product = cls.env.ref("pos_container_deposit.demo_product")
|
||||
cls.product_template = cls.product.product_tmpl_id
|
||||
|
||||
def test_product_behavior(self):
|
||||
"""
|
||||
Test that product search, write, copy behaves as expected with deposit products
|
||||
"""
|
||||
self.assertIn(
|
||||
self.product,
|
||||
self.env["product.product"].search(
|
||||
[
|
||||
("deposit_product_id", "=", self.deposit_product.id),
|
||||
]
|
||||
),
|
||||
)
|
||||
self.assertIn(
|
||||
self.product_template,
|
||||
self.env["product.template"].search(
|
||||
[
|
||||
("deposit_product_id", "=", self.deposit_product.id),
|
||||
]
|
||||
),
|
||||
)
|
||||
self.product_template.deposit_product_id = False
|
||||
self.assertFalse(self.product.deposit_product_id)
|
||||
self.product.deposit_product_id = self.deposit_product
|
||||
self.assertEqual(self.product_template.deposit_product_id, self.deposit_product)
|
||||
product2 = self.product.copy({})
|
||||
self.assertEqual(product2.deposit_product_id, self.deposit_product)
|
||||
self.assertEqual(self.product_template.deposit_product_id, self.deposit_product)
|
||||
template2 = self.product_template.copy()
|
||||
self.assertEqual(template2.deposit_product_id, self.deposit_product)
|
||||
|
||||
def test_pos_session(self):
|
||||
"""
|
||||
Be sure the extra field and domain are included
|
||||
"""
|
||||
params = self.env["pos.session"]._loader_params_product_product()
|
||||
self.assertIn("deposit_product_id", params["search_params"]["fields"])
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
from odoo.tests.common import tagged
|
||||
|
||||
from odoo.addons.point_of_sale.tests.test_frontend import TestPointOfSaleHttpCommon
|
||||
|
||||
|
||||
@tagged("post_install", "-at_install")
|
||||
class TestPosContainerDeposit(TestPointOfSaleHttpCommon):
|
||||
def run_tour(self):
|
||||
self.main_pos_config.open_ui()
|
||||
self.start_tour(
|
||||
"/pos/ui?config_id=%d" % self.main_pos_config.id,
|
||||
"pos_container_deposit.test_tour",
|
||||
login="accountman",
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue