19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:29:53 +01:00
parent 6e54c1af6c
commit 3ca647e428
1087 changed files with 132065 additions and 108499 deletions

View file

@ -2,3 +2,5 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import test_frontend
from . import test_pos_restaurant_flow
from . import test_devices_synchronization

View file

@ -0,0 +1,36 @@
from odoo.addons.pos_restaurant.tests.test_frontend import TestFrontendCommon
class TestFrontend(TestFrontendCommon):
def test_devices_synchronization(self):
self.main_pos_config.open_ui()
self.env['pos.order'].create({
'pos_reference': 'device_sync',
'table_id': self.main_floor_table_5.id,
'company_id': self.env.company.id,
'session_id': self.main_pos_config.current_session_id.id,
'partner_id': self.partner_a.id,
'lines': [(0, 0, {
'name': "Coca-Cola",
'product_id': self.coca_cola_test.id,
'price_unit': 2.20,
'discount': 0,
'qty': 1,
'price_subtotal': 2.20,
'price_subtotal_incl': 2.20,
})],
'amount_paid': 2.20,
'amount_total': 2.20,
'amount_tax': 0.0,
'amount_return': 0.0,
'to_invoice': False,
})
self.start_pos_tour('test_devices_synchronization')
def test_synchronisation_of_orders(self):
""" Test order synchronization with order data using the notify_synchronisation method.
First, an ongoing order is created on the server, and verify its presence in the POS UI.
Then, the order is paid from the server, and confirm if the order state is updated correctly.
"""
self.start_pos_tour("OrderSynchronisationTour")

View file

@ -0,0 +1,14 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import tagged
from odoo.addons.pos_restaurant.tests.test_frontend import TestFrontendCommon
@tagged('post_install', '-at_install')
class TestPosRestaurantFlow(TestFrontendCommon):
def test_floor_plans_archive(self):
floors = self.main_floor + self.second_floor
floors.action_archive()
# All floors should be archived successfully
self.assertTrue(all(floor.active is False for floor in floors), "All floors should be archived")