Commit 93f29e7
committed
[FIX] point_of_sale: prevent duplicate preparation ticket
Before this change, when a device sent an order in preparation via the
ticket printer, this could result in the same order being printed by
multiple devices, as the order was not synchronized after it was sent.
The error is a bit tricky, because if the user had installed a
preparation screen, the order was sent to the preparation screen via
syncAllOrders. In this case, the order was correctly synchronized and
the other devices were informed of the changes.
This commit adds two things.
- We check the server before sending the order to preparation to make
sure it has not already been sent.
- Even when the user does not have a preparation display, the order
will be synchronized after being sent to a printer.
closes odoo#220716
X-original-commit: 9240148
Related: odoo/enterprise#91093
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
Signed-off-by: David Monnom (moda) <moda@odoo.com>1 parent 90292e6 commit 93f29e7
6 files changed
Lines changed: 94 additions & 5 deletions
File tree
- addons
- point_of_sale
- models
- static
- src/app
- models
- screens/receipt_screen
- services
- tests/unit/data
- pos_restaurant/static/src/app/services
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
358 | 386 | | |
359 | 387 | | |
360 | 388 | | |
| |||
1120 | 1148 | | |
1121 | 1149 | | |
1122 | 1150 | | |
| 1151 | + | |
1123 | 1152 | | |
1124 | 1153 | | |
1125 | 1154 | | |
| |||
1128 | 1157 | | |
1129 | 1158 | | |
1130 | 1159 | | |
| 1160 | + | |
1131 | 1161 | | |
1132 | 1162 | | |
1133 | 1163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
343 | 347 | | |
344 | 348 | | |
345 | 349 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Lines changed: 47 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
510 | | - | |
| 510 | + | |
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
| |||
1660 | 1660 | | |
1661 | 1661 | | |
1662 | 1662 | | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
1663 | 1694 | | |
1664 | 1695 | | |
| 1696 | + | |
| 1697 | + | |
1665 | 1698 | | |
1666 | 1699 | | |
1667 | 1700 | | |
| |||
1688 | 1721 | | |
1689 | 1722 | | |
1690 | 1723 | | |
1691 | | - | |
| 1724 | + | |
1692 | 1725 | | |
1693 | 1726 | | |
1694 | 1727 | | |
1695 | 1728 | | |
1696 | 1729 | | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
1697 | 1736 | | |
1698 | 1737 | | |
1699 | 1738 | | |
1700 | 1739 | | |
1701 | 1740 | | |
1702 | 1741 | | |
1703 | | - | |
| 1742 | + | |
1704 | 1743 | | |
1705 | 1744 | | |
1706 | 1745 | | |
| |||
1794 | 1833 | | |
1795 | 1834 | | |
1796 | 1835 | | |
| 1836 | + | |
1797 | 1837 | | |
1798 | 1838 | | |
1799 | 1839 | | |
| |||
1812 | 1852 | | |
1813 | 1853 | | |
1814 | 1854 | | |
| 1855 | + | |
| 1856 | + | |
1815 | 1857 | | |
1816 | 1858 | | |
1817 | 1859 | | |
| |||
1824 | 1866 | | |
1825 | 1867 | | |
1826 | 1868 | | |
| 1869 | + | |
| 1870 | + | |
1827 | 1871 | | |
1828 | 1872 | | |
1829 | 1873 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
6 | 14 | | |
7 | 15 | | |
8 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
885 | | - | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
886 | 889 | | |
887 | 890 | | |
888 | 891 | | |
| |||
0 commit comments