Loan (LSE)
d271b213a5
[FIX] barcodes: handle ^ with | barcode rule patterns
...
Before this commit:
If the barcode nomenclature uses the or `|` symbol.
The part after it would be used as a "contains" instead of a
"start with".
e.g: `123|456`
would be transformed in the JS code to `^123|456` instead of:
`^123|^456`
As such, you would have error "can't find product with barcode" if
you set such a rule and a product barcode contains the second part.
For e.g: the barcode `44445666` would match, but should not!
After this commit:
Force the second (and following if any) part to start with.
Note: in practice it is pretty rare to have `|` in the pattern, but
it is the case for a default rule in version 16, see:
https://github.com/odoo/odoo/blob/5ac58ebf983c1c02019253c0430fde3502e13e7c/addons/pos_loyalty/data/default_barcode_patterns.xml#L10
In this case, if a regular product have `044` in its product barcode,
the PoS will tell that there is no corresponding coupon instead of
adding the product.
But the issue itself still apply in version 14 in case of custom rules
opw-3356951
closes odoo/odoo#130961
X-original-commit: 103566699d3492b682219efc3614f26d2ea972e5
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com >
Signed-off-by: Loan Sens (lse) <lse@odoo.com >
2023-08-05 01:55:50 +02:00
..
2023-08-04 16:35:08 +02:00
2023-07-19 18:24:15 +02:00
2023-07-19 18:24:15 +02:00
2023-07-24 23:04:02 +02:00
2023-08-03 08:26:28 +02:00
2023-07-24 11:28:47 +02:00
2023-06-01 11:43:51 +02:00
2023-06-01 11:43:51 +02:00
2023-07-27 11:58:34 +02:00
2023-08-03 08:26:28 +02:00
2023-07-20 06:40:43 +02:00
2023-06-01 11:43:51 +02:00
2023-07-15 04:01:09 +02:00
2023-08-04 09:43:20 +02:00
2023-06-01 11:43:51 +02:00
2023-08-01 13:51:17 +02:00
2023-07-27 11:58:34 +02:00
2023-07-27 11:58:34 +02:00
2023-07-27 11:58:34 +02:00
2023-07-19 13:13:16 +02:00
2023-06-01 11:43:51 +02:00
2023-07-27 11:58:34 +02:00
2023-08-05 01:55:50 +02:00
2023-08-02 17:29:05 +02:00
2023-06-28 17:41:19 +02:00
2023-08-02 17:29:05 +02:00
2023-06-21 15:53:15 +02:00
2023-06-01 11:43:51 +02:00
2023-08-02 17:29:05 +02:00
2023-07-24 12:49:21 +02:00
2023-07-19 18:24:15 +02:00
2023-07-20 11:49:06 +02:00
2023-06-28 17:41:19 +02:00
2023-07-20 11:49:06 +02:00
2023-08-01 13:51:17 +02:00
2023-08-03 10:43:01 +02:00
2023-08-02 19:46:31 +02:00
2023-08-02 18:50:17 +02:00
2023-07-24 20:17:50 +02:00
2023-08-03 21:56:56 +02:00
2023-06-01 11:43:51 +02:00
2023-08-03 10:43:53 +02:00
2023-08-01 13:51:17 +02:00
2023-07-31 23:21:10 +02:00
2023-07-31 23:21:18 +02:00
2023-08-01 13:51:47 +02:00
2023-06-01 11:43:51 +02:00
2023-07-10 16:59:11 +02:00
2023-08-04 09:42:51 +02:00
2023-07-25 17:36:08 +02:00
2023-08-02 17:29:05 +02:00
2023-08-02 18:50:17 +02:00
2023-08-02 18:50:17 +02:00
2023-08-02 18:50:17 +02:00
2023-08-02 15:59:33 +02:00
2023-07-25 17:36:08 +02:00
2023-06-01 11:43:51 +02:00
2023-07-06 15:03:42 +02:00
2023-08-03 21:56:56 +02:00
2023-06-05 14:50:20 +02:00
2023-07-27 11:58:34 +02:00
2023-08-03 19:31:40 +02:00
2023-07-25 21:22:46 +02:00
2023-08-02 15:59:16 +02:00
2023-08-02 17:29:27 +02:00
2023-07-05 14:21:28 +02:00
2023-07-19 18:24:15 +02:00
2023-08-04 06:56:33 +02:00
2023-06-28 17:41:19 +02:00
2023-08-02 17:29:05 +02:00
2023-06-01 11:43:51 +02:00
2023-06-22 18:29:50 +02:00
2023-07-24 20:17:50 +02:00
2023-06-12 22:39:26 +02:00
2023-08-02 02:24:46 +02:00
2023-06-27 17:33:02 +02:00
2023-07-05 14:21:28 +02:00
2023-07-25 17:35:35 +02:00
2023-07-11 12:00:40 +02:00
2023-08-02 17:29:00 +02:00
2023-07-13 14:47:44 +02:00
2023-06-01 11:43:51 +02:00
2023-07-26 09:22:17 +02:00
2023-07-19 18:24:10 +02:00
2023-07-24 20:18:08 +02:00
2023-07-20 05:03:02 +02:00
2023-07-15 10:54:46 +02:00
2023-08-02 17:29:27 +02:00
2023-07-27 11:58:34 +02:00
2023-08-03 10:43:01 +02:00
2023-06-01 11:43:51 +02:00
2023-07-13 19:28:04 +02:00
2023-07-25 00:54:53 +02:00
2023-08-04 22:30:21 +02:00
2023-06-15 17:35:42 +02:00
2023-07-24 23:04:20 +02:00
2023-08-02 13:20:03 +02:00
2023-06-15 17:35:42 +02:00
2023-06-15 17:35:42 +02:00
2023-07-25 00:54:54 +02:00
2023-08-03 21:57:01 +02:00
2023-07-25 00:54:54 +02:00
2023-07-25 00:54:53 +02:00
2023-06-26 22:15:22 +02:00
2023-08-02 17:29:05 +02:00
2023-07-10 15:32:26 +02:00
2023-07-21 12:48:34 +02:00
2023-07-07 16:42:41 +02:00
2023-07-10 15:32:29 +02:00
2023-07-20 11:49:06 +02:00
2023-06-14 10:54:24 +02:00
2023-07-10 15:32:28 +02:00
2023-06-15 17:35:42 +02:00
2023-07-10 11:48:57 +02:00
2023-07-27 20:32:39 +02:00
2023-08-02 06:18:20 +02:00
2023-08-01 05:59:54 +02:00
2023-07-11 06:52:57 +02:00
2023-06-15 17:35:42 +02:00
2023-08-02 01:15:53 +02:00
2023-07-11 09:10:21 +02:00
2023-07-27 14:47:24 +02:00
2023-08-04 16:35:05 +02:00
2023-06-26 13:21:03 +02:00
2023-08-02 17:29:05 +02:00
2023-07-24 23:04:20 +02:00
2023-08-02 17:29:05 +02:00
2023-08-02 06:18:50 +02:00
2023-07-10 15:32:28 +02:00
2023-07-20 06:40:43 +02:00
2023-07-10 15:32:28 +02:00
2023-06-15 17:35:42 +02:00
2023-06-15 17:35:42 +02:00
2023-07-10 15:32:07 +02:00
2023-07-22 10:11:13 +02:00
2023-07-15 12:00:33 +02:00
2023-06-15 17:35:42 +02:00
2023-08-04 09:43:37 +02:00
2023-07-20 11:49:06 +02:00
2023-08-02 17:29:05 +02:00
2023-06-16 13:41:00 +02:00
2023-06-16 13:41:00 +02:00
2023-06-15 17:35:42 +02:00
2023-08-04 10:59:19 +02:00
2023-07-07 12:09:57 +02:00
2023-07-10 15:32:27 +02:00
2023-08-03 10:42:49 +02:00
2023-07-20 17:01:08 +02:00
2023-06-15 17:35:42 +02:00
2023-06-28 17:41:19 +02:00
2023-07-20 11:49:06 +02:00
2023-06-28 17:41:19 +02:00
2023-06-15 17:35:42 +02:00
2023-06-15 17:35:42 +02:00
2023-06-07 08:59:00 +02:00
2023-07-27 14:47:07 +02:00
2023-07-10 15:32:29 +02:00
2023-07-10 15:32:27 +02:00
2023-06-15 17:35:42 +02:00
2023-07-10 15:32:25 +02:00
2023-07-20 11:49:06 +02:00
2023-07-19 18:24:15 +02:00
2023-07-18 10:20:08 +02:00
2023-06-15 17:35:42 +02:00
2023-06-30 01:32:47 +02:00
2023-06-15 17:35:42 +02:00
2023-07-15 10:54:20 +02:00
2023-08-02 05:10:51 +02:00
2023-08-02 17:29:05 +02:00
2023-06-15 17:35:42 +02:00
2023-07-20 06:40:43 +02:00
2023-06-15 17:35:42 +02:00
2023-07-24 23:04:20 +02:00
2023-08-02 16:00:19 +02:00
2023-06-24 03:35:44 +02:00
2023-06-15 17:35:42 +02:00
2023-07-10 15:32:26 +02:00
2023-07-10 15:32:28 +02:00
2023-07-20 06:40:43 +02:00
2023-06-15 17:35:42 +02:00
2023-08-01 09:40:55 +02:00
2023-08-03 19:31:14 +02:00
2023-08-02 17:29:05 +02:00
2023-08-04 16:34:58 +02:00
2023-06-01 11:43:51 +02:00
2023-07-27 11:58:34 +02:00
2023-07-19 19:37:55 +02:00
2023-07-28 16:29:00 +02:00
2023-08-04 15:02:38 +02:00
2023-06-01 11:43:51 +02:00
2023-06-01 11:43:51 +02:00
2023-07-13 12:26:17 +02:00
2023-06-01 11:43:51 +02:00
2023-06-01 11:43:51 +02:00
2023-08-02 18:50:17 +02:00
2023-07-19 21:59:57 +02:00
2023-07-19 18:24:15 +02:00
2023-06-01 11:43:51 +02:00
2023-08-02 17:29:05 +02:00
2023-07-20 15:45:05 +02:00
2023-08-03 10:43:49 +02:00
2023-07-20 11:49:06 +02:00
2023-07-20 11:49:27 +02:00
2023-07-20 17:01:00 +02:00
2023-08-03 18:02:55 +02:00
2023-07-18 09:07:16 +02:00
2023-06-01 11:43:51 +02:00
2023-07-20 17:01:00 +02:00
2023-07-04 10:16:13 +02:00
2023-07-17 13:30:46 +02:00
2023-07-31 23:21:10 +02:00
2023-07-27 11:58:34 +02:00
2023-07-27 11:58:34 +02:00
2023-07-27 11:58:34 +02:00
2023-07-31 23:21:10 +02:00
2023-06-19 10:41:00 +02:00
2023-08-02 17:29:39 +02:00
2023-06-01 11:44:13 +02:00
2023-08-02 18:50:17 +02:00
2023-08-02 14:41:26 +02:00
2023-08-02 18:50:17 +02:00
2023-08-05 01:55:50 +02:00
2023-08-02 18:50:17 +02:00
2023-07-27 11:58:34 +02:00
2023-08-02 17:29:05 +02:00
2023-08-02 17:29:05 +02:00
2023-08-02 17:29:05 +02:00
2023-08-03 09:23:24 +02:00
2023-08-02 17:29:05 +02:00
2023-08-04 10:59:26 +02:00
2023-08-02 17:29:05 +02:00
2023-07-05 14:33:58 +02:00
2023-08-02 17:29:05 +02:00
2023-08-02 17:29:05 +02:00
2023-08-02 17:29:05 +02:00
2023-08-03 12:11:46 +02:00
2023-08-02 17:29:05 +02:00
2023-08-02 17:29:05 +02:00
2023-08-02 17:29:05 +02:00
2023-08-02 17:29:05 +02:00
2023-08-03 09:23:44 +02:00
2023-08-02 17:29:05 +02:00
2023-07-25 08:18:58 +02:00
2023-06-28 17:41:19 +02:00
2023-08-02 17:29:05 +02:00
2023-08-03 10:43:23 +02:00
2023-08-03 10:43:26 +02:00
2023-07-20 14:23:15 +02:00
2023-07-25 00:54:53 +02:00
2023-08-04 10:59:01 +02:00
2023-07-19 23:17:53 +02:00
2023-07-19 23:17:53 +02:00
2023-06-01 11:43:51 +02:00
2023-07-19 23:17:53 +02:00
2023-07-19 23:17:53 +02:00
2023-07-19 23:17:53 +02:00
2023-07-20 13:06:46 +02:00
2023-08-02 17:29:05 +02:00
2023-07-27 11:58:34 +02:00
2023-08-02 17:29:05 +02:00
2023-07-24 20:17:50 +02:00
2023-07-28 16:29:11 +02:00
2023-07-17 18:13:30 +02:00
2023-08-02 17:28:56 +02:00
2023-08-02 17:29:05 +02:00
2023-07-25 17:36:08 +02:00
2023-06-29 22:38:49 +02:00
2023-08-03 19:31:07 +02:00
2023-07-19 18:24:15 +02:00
2023-07-27 11:58:34 +02:00
2023-06-01 11:43:51 +02:00
2023-07-19 18:24:15 +02:00
2023-08-03 19:31:15 +02:00
2023-07-27 11:58:34 +02:00
2023-06-22 08:34:58 +02:00
2023-07-18 09:07:13 +02:00
2023-08-03 19:32:02 +02:00
2023-08-02 17:29:05 +02:00
2023-08-04 10:59:01 +02:00
2023-06-23 09:20:57 +02:00
2023-07-26 12:00:30 +02:00
2023-08-02 17:29:05 +02:00
2023-07-20 10:07:11 +02:00
2023-08-03 19:31:48 +02:00
2023-07-25 17:36:08 +02:00
2023-08-02 18:50:17 +02:00
2023-08-02 17:29:05 +02:00
2023-06-09 17:01:17 +02:00
2023-08-02 17:29:05 +02:00
2023-08-01 13:51:17 +02:00
2023-08-01 23:52:30 +02:00
2023-06-15 10:44:58 +02:00
2023-06-01 11:43:51 +02:00
2023-06-13 14:07:27 +02:00
2023-06-13 14:07:27 +02:00
2023-08-04 08:25:57 +02:00
2023-08-02 17:29:05 +02:00
2023-08-01 13:51:47 +02:00
2023-07-15 13:05:53 +02:00
2023-07-25 17:36:08 +02:00
2023-07-25 17:36:08 +02:00
2023-08-02 18:50:17 +02:00
2023-08-04 15:02:27 +02:00
2023-06-12 22:39:26 +02:00
2023-06-28 17:41:19 +02:00
2023-07-31 23:21:10 +02:00
2023-08-03 19:31:23 +02:00
2023-08-04 08:26:01 +02:00
2023-08-02 18:50:17 +02:00
2023-08-02 18:50:18 +02:00
2023-08-03 21:56:56 +02:00
2023-07-24 20:17:50 +02:00
2023-06-12 22:39:26 +02:00
2023-08-02 17:29:05 +02:00
2023-07-27 11:58:34 +02:00
2023-08-03 19:31:23 +02:00
2023-06-28 17:41:19 +02:00
2023-06-01 11:43:51 +02:00
2023-06-28 17:41:19 +02:00
2023-08-01 13:51:17 +02:00
2023-08-04 16:34:51 +02:00
2023-08-04 16:35:12 +02:00
2023-08-04 13:42:00 +02:00
2023-07-27 11:58:34 +02:00
2023-08-04 16:34:51 +02:00
2023-08-02 17:29:05 +02:00
2023-07-27 11:58:34 +02:00
2023-08-02 18:50:17 +02:00
2023-07-18 11:42:26 +02:00
2023-06-01 11:43:51 +02:00
2023-07-31 19:02:45 +02:00
2023-07-11 22:33:47 +02:00
2023-08-04 09:42:51 +02:00
2023-07-27 11:58:34 +02:00
2023-07-27 11:58:34 +02:00
2023-08-03 19:31:23 +02:00
2023-08-03 19:31:23 +02:00
2023-06-01 11:43:51 +02:00
2023-07-27 11:58:34 +02:00
2023-07-27 11:58:34 +02:00
2023-06-01 11:43:51 +02:00
2023-08-03 19:31:23 +02:00
2023-07-27 11:58:34 +02:00
2023-07-27 11:58:34 +02:00
2023-07-27 11:58:34 +02:00
2023-07-27 11:58:34 +02:00
2023-07-27 11:58:34 +02:00
2023-08-04 10:58:55 +02:00
2023-06-28 17:41:19 +02:00
2023-08-02 13:20:23 +02:00
2023-07-27 11:58:34 +02:00
2023-07-27 11:58:34 +02:00
2023-08-03 10:43:01 +02:00
2023-07-27 11:58:34 +02:00
2023-07-27 11:58:34 +02:00
2023-08-02 13:20:23 +02:00
2023-07-11 22:33:47 +02:00
2023-05-30 10:31:43 +02:00
2023-07-27 11:58:34 +02:00
2023-07-27 11:58:34 +02:00
2023-08-04 13:42:03 +02:00
2023-08-03 19:31:23 +02:00
2023-07-27 11:58:34 +02:00
2023-07-27 11:58:34 +02:00
2023-06-26 21:10:01 +02:00
2023-08-03 19:31:23 +02:00
2023-07-27 11:58:34 +02:00
2023-08-03 19:31:23 +02:00
2023-08-02 17:29:05 +02:00
2023-07-27 11:58:34 +02:00
2023-08-02 17:29:05 +02:00
2023-07-27 11:58:34 +02:00
2023-08-02 13:20:23 +02:00
2023-08-04 16:34:50 +02:00
2023-07-18 16:58:43 +02:00
2023-08-03 12:11:49 +02:00
2023-06-01 11:43:51 +02:00
2023-07-27 11:58:34 +02:00