Criptomart/red-supermercados-coop#4 add pos_full_refund from OCA/pos/pull/1458
This commit is contained in:
parent
5c213a3d6a
commit
6b1b032101
12 changed files with 714 additions and 0 deletions
1
pos_full_refund/tests/__init__.py
Normal file
1
pos_full_refund/tests/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
from . import test_pos_full_refund
|
||||
35
pos_full_refund/tests/test_pos_full_refund.py
Normal file
35
pos_full_refund/tests/test_pos_full_refund.py
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo.tests import tagged
|
||||
|
||||
from odoo.addons.point_of_sale.tests.test_frontend import TestPointOfSaleHttpCommon
|
||||
|
||||
|
||||
@tagged("post_install", "-at_install")
|
||||
class TestPosFullRefund(TestPointOfSaleHttpCommon):
|
||||
"""Test the Full Refund functionality in POS.
|
||||
|
||||
This test verifies that when a user clicks the "Do Full Refund" button
|
||||
in the ticket screen, all lines from the selected order are automatically
|
||||
added to a new refund order with their full quantities.
|
||||
"""
|
||||
|
||||
def test_pos_full_refund(self):
|
||||
"""Test that clicking 'Do Full Refund' creates a refund order with all lines."""
|
||||
# Open a POS session
|
||||
self.main_pos_config.open_ui()
|
||||
|
||||
# Start the tour that will:
|
||||
# 1. Create an order with multiple products
|
||||
# (Desk Pad, Monitor Stand, Letter Tray)
|
||||
# 2. Pay for the order
|
||||
# 3. Open refund mode
|
||||
# 4. Select the paid order
|
||||
# 5. Click "Do Full Refund" button
|
||||
# 6. Verify all lines are in the refund order with negative quantities
|
||||
# 7. Complete the refund payment
|
||||
self.start_tour(
|
||||
"/pos/ui?config_id=%d" % self.main_pos_config.id,
|
||||
"PosFullRefundTour",
|
||||
login="accountman",
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue