File tree Expand file tree Collapse file tree
openupgrade_scripts/scripts/point_of_sale/18.0.1.0.2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Copyright 2025 ForgeFlow S.L. (https://www.forgeflow.com)
22# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
33
4+ from uuid import uuid4
5+
46from openupgradelib import openupgrade
57
68
9+ def fill_pos_config_token (env ):
10+ """Set the access_token to an appropriate value, thereby preventing all records
11+ from having the same value and causing unexpected consequences.
12+ """
13+ for config in env ["pos.config" ].search ([]):
14+ config .access_token = uuid4 ().hex [:16 ]
15+
16+
717def fill_pos_order_reversed_pos_order_id (env ):
818 openupgrade .logged_query (
919 env .cr ,
@@ -109,6 +119,7 @@ def update_res_company_point_of_sale_ticket_portal_url_display_mode(env):
109119def migrate (env , version ):
110120 fill_pos_order_reversed_pos_order_id (env )
111121 fill_pos_config_customer_display_type (env )
122+ fill_pos_config_token (env )
112123 fill_pos_uuid (env )
113124 update_pos_config_show_images (env )
114125 update_res_company_point_of_sale_ticket_portal_url_display_mode (env )
You can’t perform that action at this time.
0 commit comments