odoo-addon-openupgrade-scripts 18.0.1.0.0.151__py3-none-any.whl → 18.0.1.0.0.154__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,6 @@
2
2
  <odoo>
3
3
  <record id="payment_method_wire_transfer" model="payment.method">
4
4
  <field name="support_refund">none</field>
5
- <!-- <field name="active">False</field> -->
5
+ <field name="active">False</field>
6
6
  </record>
7
7
  </odoo>
@@ -0,0 +1,7 @@
1
+ <?xml version='1.0' encoding='utf-8' ?>
2
+ <odoo>
3
+ <record id="payment_method_wire_transfer" model="payment.method">
4
+ <field name="support_refund">none</field>
5
+ <!-- <field name="active">False</field> -->
6
+ </record>
7
+ </odoo>
@@ -6,4 +6,4 @@ from openupgradelib import openupgrade
6
6
 
7
7
  @openupgrade.migrate()
8
8
  def migrate(env, version):
9
- openupgrade.load_data(env, "payment_custom", "18.0.2.0/noupdate_changes.xml")
9
+ openupgrade.load_data(env, "payment_custom", "18.0.2.0/noupdate_changes_work.xml")
@@ -0,0 +1,145 @@
1
+ # Copyright 2025 ForgeFlow S.L. (https://www.forgeflow.com)
2
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3
+
4
+ from openupgradelib import openupgrade
5
+
6
+
7
+ def fill_pos_order_reversed_pos_order_id(env):
8
+ openupgrade.logged_query(
9
+ env.cr,
10
+ """
11
+ UPDATE account_move am2
12
+ SET reversed_pos_order_id = po.id
13
+ FROM pos_order po
14
+ JOIN pos_session ps ON po.session_id = ps.id AND ps.state = 'closed'
15
+ JOIN pos_config pc ON ps.config_id = pc.id
16
+ JOIN account_journal aj ON pc.journal_id = aj.id
17
+ JOIN account_move am ON po.account_move = am.id
18
+ AND am.state = 'posted' AND am.journal_id = pc.invoice_journal_id
19
+ AND am.invoice_origin = po.name
20
+ JOIN account_move session_move ON session_move.id = ps.move_id
21
+ WHERE po.partner_id IS NOT NULL AND
22
+ am2.journal_id = pc.journal_id
23
+ -- we find correct move by looking into the ref
24
+ AND am2.ref like CONCAT('%', session_move.name, '%')
25
+ AND am2.ref like CONCAT('% ', po.name, '%')
26
+ AND am2.ref like CONCAT('%', ps.name, '%')""",
27
+ )
28
+
29
+
30
+ def fill_pos_config_customer_display_type(env):
31
+ openupgrade.logged_query(
32
+ env.cr,
33
+ """
34
+ UPDATE pos_config pc
35
+ SET customer_display_type = CASE
36
+ WHEN pc.iface_customer_facing_display_via_proxy THEN 'proxy'
37
+ WHEN pc.iface_customer_facing_display_local THEN 'local'
38
+ ELSE 'none' END""",
39
+ )
40
+ openupgrade.logged_query(
41
+ env.cr,
42
+ """
43
+ UPDATE pos_config pc
44
+ SET customer_display_bg_img_name = CASE
45
+ WHEN pc.customer_display_type != 'none' THEN 'image_display_' || pc.id
46
+ ELSE NULL END""",
47
+ )
48
+
49
+
50
+ def update_pos_config_show_images(env):
51
+ show_product_images = (
52
+ env["ir.config_parameter"]
53
+ .sudo()
54
+ .get_param("point_of_sale.show_product_images", "yes")
55
+ )
56
+ if show_product_images == "no":
57
+ openupgrade.logged_query(
58
+ env.cr,
59
+ """
60
+ UPDATE pos_config pc
61
+ SET show_product_images = FALSE
62
+ """,
63
+ )
64
+ show_category_images = (
65
+ env["ir.config_parameter"]
66
+ .sudo()
67
+ .get_param("point_of_sale.show_category_images", "yes")
68
+ )
69
+ if show_category_images == "no":
70
+ openupgrade.logged_query(
71
+ env.cr,
72
+ """
73
+ UPDATE pos_config pc
74
+ SET show_category_images = FALSE
75
+ """,
76
+ )
77
+
78
+
79
+ def fill_pos_uuid(env):
80
+ openupgrade.logged_query(
81
+ env.cr,
82
+ """
83
+ UPDATE pos_order
84
+ SET uuid = gen_random_uuid()
85
+ """,
86
+ )
87
+ openupgrade.logged_query(
88
+ env.cr,
89
+ """
90
+ UPDATE pos_payment
91
+ SET uuid = gen_random_uuid()
92
+ """,
93
+ )
94
+
95
+
96
+ def update_res_company_point_of_sale_ticket_portal_url_display_mode(env):
97
+ # in v17, url was always shown
98
+ openupgrade.logged_query(
99
+ env.cr,
100
+ """
101
+ UPDATE res_company rc
102
+ SET point_of_sale_ticket_portal_url_display_mode = CASE
103
+ WHEN rc.point_of_sale_use_ticket_qr_code THEN 'qr_code_and_url'
104
+ ELSE 'url' END""",
105
+ )
106
+
107
+
108
+ @openupgrade.migrate()
109
+ def migrate(env, version):
110
+ fill_pos_order_reversed_pos_order_id(env)
111
+ fill_pos_config_customer_display_type(env)
112
+ fill_pos_uuid(env)
113
+ update_pos_config_show_images(env)
114
+ update_res_company_point_of_sale_ticket_portal_url_display_mode(env)
115
+ openupgrade.delete_records_safely_by_xml_id(
116
+ env,
117
+ [
118
+ "point_of_sale.0_01",
119
+ "point_of_sale.0_02",
120
+ ],
121
+ )
122
+ imd = env["ir.model.data"].search(
123
+ [("module", "=", "point_of_sale"), ("name", "=", "pos_config_main")], limit=1
124
+ )
125
+ if imd:
126
+ imd.unlink()
127
+ imd = env["ir.model.data"].search(
128
+ [("module", "=", "point_of_sale"), ("name", "=", "product_product_consumable")],
129
+ limit=1,
130
+ )
131
+ if imd and not openupgrade.column_exists(
132
+ env.cr, "pos_config", "discount_product_id"
133
+ ):
134
+ # pos_discount is not installed
135
+ imd.unlink()
136
+ else:
137
+ openupgrade.rename_xmlids(
138
+ env.cr,
139
+ [
140
+ (
141
+ "point_of_sale.product_product_consumable",
142
+ "pos_discount.product_product_consumable",
143
+ )
144
+ ],
145
+ )
@@ -0,0 +1,88 @@
1
+ # Copyright 2025 ForgeFlow S.L. (https://www.forgeflow.com)
2
+ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3
+ from openupgradelib import openupgrade
4
+
5
+
6
+ def set_pos_printer_company_id(env):
7
+ openupgrade.logged_query(
8
+ env.cr,
9
+ """
10
+ UPDATE pos_printer pp
11
+ SET company_id = COALESCE(pp.company_id, pc.company_id)
12
+ FROM pos_config pc
13
+ JOIN pos_config_printer_rel rel ON rel.config_id = pc.id
14
+ WHERE rel.printer_id = pp.id AND pc.active
15
+ """,
16
+ )
17
+ openupgrade.logged_query(
18
+ env.cr,
19
+ """
20
+ UPDATE pos_printer pp
21
+ SET company_id = COALESCE(pp.company_id, pc.company_id)
22
+ FROM pos_config pc
23
+ JOIN pos_config_printer_rel rel ON rel.config_id = pc.id
24
+ WHERE rel.printer_id = pp.id AND pc.active IS DISTINCT FROM TRUE
25
+ """,
26
+ )
27
+ openupgrade.logged_query(
28
+ env.cr,
29
+ f"""
30
+ UPDATE pos_printer pp
31
+ SET company_id = {env.company.id}
32
+ WHERE pp.company_id IS NULL
33
+ """,
34
+ )
35
+
36
+
37
+ @openupgrade.migrate()
38
+ def migrate(env, version):
39
+ openupgrade.rename_fields(
40
+ env,
41
+ [
42
+ ("pos.category", "pos_category", "child_id", "child_ids"),
43
+ ("pos.order", "pos_order", "note", "floating_order_name"),
44
+ (
45
+ "pos.config",
46
+ "pos_config",
47
+ "iface_customer_facing_display_background_image_1920",
48
+ "customer_display_bg_img_name",
49
+ ),
50
+ ],
51
+ )
52
+ if openupgrade.column_exists(env.cr, "product_template", "description_self_order"):
53
+ # from pos_self_order
54
+ openupgrade.rename_fields(
55
+ env,
56
+ [
57
+ (
58
+ "product.template",
59
+ "product_template",
60
+ "description_self_order",
61
+ "public_description",
62
+ ),
63
+ ],
64
+ )
65
+ openupgrade.add_columns(
66
+ env,
67
+ [
68
+ ("sale.order.line", "technical_price_unit", "float"),
69
+ ("pos.order", "amount_difference", "float", None, "pos_order"),
70
+ ("pos.order.line", "price_type", "selection", "original", "pos_order_line"),
71
+ ("pos.printer", "company_id", "many2one", None, "pos_printer"),
72
+ ],
73
+ )
74
+ openupgrade.logged_query(
75
+ env.cr,
76
+ """
77
+ UPDATE sale_order_line
78
+ SET technical_price_unit = price_unit
79
+ """,
80
+ )
81
+ openupgrade.logged_query(
82
+ env.cr,
83
+ """
84
+ UPDATE pos_order
85
+ SET amount_difference = amount_paid - amount_total
86
+ """,
87
+ )
88
+ set_pos_printer_company_id(env)
@@ -0,0 +1,202 @@
1
+ ---Models in module 'point_of_sale'---
2
+ obsolete model pos.combo (renamed to product.combo in module product)
3
+ obsolete model pos.combo.line (renamed to product.combo.item in module product)
4
+ new model pos.bus.mixin [abstract]
5
+ new model pos.load.mixin [abstract]
6
+ new model pos.note
7
+ ---Fields in module 'point_of_sale'---
8
+ point_of_sale / account.move / pos_session_ids (one2many) : NEW relation: pos.session
9
+ # NOTHING TO DO
10
+
11
+ point_of_sale / account.move / reversed_pos_order_id (many2one): NEW relation: pos.order
12
+ # DONE: post-migration: filled by looking into the move ref
13
+
14
+ point_of_sale / pos.bill / for_all_config (boolean) : NEW hasdefault: default
15
+ # NOTHING TO DO: new functionality
16
+
17
+ point_of_sale / pos.category / child_id (one2many) : DEL relation: pos.category
18
+ point_of_sale / pos.category / child_ids (one2many) : NEW relation: pos.category
19
+ # DONE: pre-migration: renamed fields
20
+
21
+ point_of_sale / pos.category / color (integer) : NEW hasdefault: default
22
+ # NOTHING TO DO: new functionality
23
+
24
+ point_of_sale / pos.combo / _order : module is now 'product' ('point_of_sale')
25
+ point_of_sale / pos.combo / base_price (float) : module is now 'product' ('point_of_sale')
26
+ point_of_sale / pos.combo / display_name (char) : module is now 'product' ('point_of_sale')
27
+ point_of_sale / pos.combo / name (char) : module is now 'product' ('point_of_sale')
28
+ point_of_sale / pos.combo / sequence (integer) : module is now 'product' ('point_of_sale')
29
+ point_of_sale / pos.combo.line / _order : module is now 'product' ('point_of_sale')
30
+ point_of_sale / pos.combo.line / combo_id (many2one) : module is now 'product' ('point_of_sale')
31
+ point_of_sale / pos.combo.line / display_name (char) : module is now 'product' ('point_of_sale')
32
+ point_of_sale / pos.combo.line / lst_price (float) : module is now 'product' ('point_of_sale')
33
+ point_of_sale / pos.combo.line / product_id (many2one) : module is now 'product' ('point_of_sale')
34
+ point_of_sale / product.product / combo_ids (many2many) : module is now 'product' ('point_of_sale')
35
+ point_of_sale / product.template / combo_ids (many2many) : module is now 'product' ('point_of_sale')
36
+ # NOTHING TO DO: this is just informative
37
+
38
+ point_of_sale / pos.combo / combo_line_ids (one2many) : DEL relation: pos.combo.line
39
+ point_of_sale / pos.combo.line / combo_price (float) : DEL
40
+ # NOTHING TO DO: already renamed in 'product' module
41
+
42
+ point_of_sale / pos.config / access_token (char) : previously in module pos_self_order
43
+ point_of_sale / pos.config / basic_receipt (boolean) : NEW
44
+ # NOTHING TO DO: new functionality
45
+
46
+ point_of_sale / pos.config / customer_display_bg_img (binary): NEW attachment: True
47
+ point_of_sale / pos.config / iface_customer_facing_display_background_image_1920 (binary): DEL attachment: True
48
+ # DONE: pre-migration: renames
49
+
50
+ point_of_sale / pos.config / customer_display_type (selection): NEW selection_keys: function, hasdefault: default
51
+ point_of_sale / pos.config / iface_customer_facing_display_local (boolean): DEL
52
+ point_of_sale / pos.config / iface_customer_facing_display_via_proxy (boolean): DEL
53
+ # DONE: post-migration: filled customer_display_type
54
+
55
+ point_of_sale / pos.config / customer_display_bg_img_name (char): NEW
56
+ # DONE: post-migration: added a "name" when customer_display_type != 'none'
57
+
58
+ point_of_sale / pos.config / iface_start_categ_id (many2one): DEL relation: pos.category
59
+ point_of_sale / pos.config / start_category (boolean) : DEL
60
+ # NOTHING TO DO: https://github.com/odoo/odoo/commit/a53383143f2ab0ca2963bfac663165ec1244c9d3
61
+
62
+ point_of_sale / pos.config / is_closing_entry_by_product (boolean): NEW
63
+ # NOTHING TO DO: new functionality
64
+
65
+ point_of_sale / pos.config / module_pos_avatax (boolean) : NEW
66
+ point_of_sale / pos.config / module_pos_mercury (boolean) : DEL
67
+ point_of_sale / pos.config / module_pos_sms (boolean) : NEW
68
+ # NOTHING TO DO
69
+
70
+ point_of_sale / pos.config / note_ids (many2many) : NEW relation: pos.note
71
+ point_of_sale / pos.note / name (char) : NEW required
72
+ point_of_sale / pos.note / sequence (integer) : NEW hasdefault: default
73
+ # NOTHING TO DO: new functionality
74
+
75
+ point_of_sale / pos.config / order_edit_tracking (boolean) : NEW hasdefault: default
76
+ point_of_sale / pos.order / has_deleted_line (boolean) : NEW
77
+ point_of_sale / pos.order.line / is_edited (boolean) : NEW hasdefault: default
78
+ # NOTHING TO DO: new functionality
79
+
80
+ point_of_sale / pos.config / orderlines_sequence_in_cart_by_category (boolean): NEW hasdefault: default
81
+ # NOTHING TO DO: new functionality
82
+
83
+ point_of_sale / pos.config / show_category_images (boolean): NEW hasdefault: default
84
+ point_of_sale / pos.config / show_product_images (boolean) : NEW hasdefault: default
85
+ # DONE: post-migration: default is true, so set False if corresponding old ir.config_parameter is 'no'
86
+
87
+ point_of_sale / pos.order / amount_difference (float) : NEW
88
+ # DONE: pre-migration: pre-create and fill (amount_paid - amount_total)
89
+
90
+ point_of_sale / pos.order / email (char) : NEW hasdefault: compute
91
+ point_of_sale / pos.order / mobile (char) : NEW hasdefault: compute
92
+ # NOTHING TO DO: let the compute fill it
93
+
94
+ point_of_sale / pos.order / note (text) : DEL
95
+ point_of_sale / pos.order / floating_order_name (char) : NEW
96
+ # DONE: pre-migration: renamed field
97
+
98
+ point_of_sale / pos.order / general_note (text) : NEW
99
+ # NOTHING TO DO: new functionality
100
+
101
+ point_of_sale / pos.order / message_follower_ids (one2many): NEW relation: mail.followers
102
+ point_of_sale / pos.order / message_ids (one2many) : NEW relation: mail.message
103
+ point_of_sale / pos.order / rating_ids (one2many) : NEW relation: rating.rating
104
+ point_of_sale / pos.order / website_message_ids (one2many): NEW relation: mail.message
105
+ # NOTHING TO DO: one2many
106
+
107
+ point_of_sale / pos.order / uuid (char) : NEW
108
+ point_of_sale / pos.payment / uuid (char) : NEW
109
+ # DONE: post-migration: fill them
110
+
111
+ point_of_sale / pos.order.line / combo_item_id (many2one) : NEW relation: product.combo.item
112
+ # NOTHING TO DO?
113
+
114
+ point_of_sale / pos.order.line / note (char) : previously in module pos_restaurant
115
+ # NOTHING TO DO
116
+
117
+ point_of_sale / pos.order.line / price_type (selection) : NEW selection_keys: ['automatic', 'manual', 'original'], hasdefault: default
118
+ # DONE: pre-migration: pre-create and fill
119
+
120
+ point_of_sale / pos.payment / card_brand (char) : NEW
121
+ point_of_sale / pos.payment / card_no (char) : NEW
122
+ point_of_sale / pos.payment / payment_method_authcode (char): NEW
123
+ point_of_sale / pos.payment / payment_method_issuer_bank (char): NEW
124
+ point_of_sale / pos.payment / payment_method_payment_mode (char): NEW
125
+ point_of_sale / pos.payment / payment_ref_no (char) : NEW
126
+ # NOTHING TO DO: fields to be filled in pos_paytm and pos_razorpay
127
+
128
+ point_of_sale / pos.payment.method / payment_method_type (selection): NEW required, selection_keys: function, hasdefault: default
129
+ point_of_sale / pos.payment.method / qr_code_method (selection) : NEW selection_keys: function
130
+ # NOTHING TO DO: new functionality
131
+
132
+ point_of_sale / pos.printer / company_id (many2one) : NEW relation: res.company, required, hasdefault: default
133
+ # DONE: pre-migration: fill using pos.config company_id
134
+
135
+ point_of_sale / product.template / color (False) : NEW mode: modify, hasdefault: compute
136
+ # NOTHING TO DO: let ORM fill it
137
+
138
+ point_of_sale / product.template / public_description (html) : NEW
139
+ # DONE: pre-migration: renamed from description_self_order of description_self_order
140
+
141
+ point_of_sale / product.template / detailed_type (False) : DEL selection_keys: ['combo', 'consu', 'product', 'service'], mode: modify
142
+ point_of_sale / product.template / type (False) : DEL selection_keys: ['combo', 'consu', 'product', 'service'], mode: modify
143
+ # NOTHING TO DO
144
+
145
+ point_of_sale / res.company / point_of_sale_ticket_portal_url_display_mode (selection): NEW required, selection_keys: ['qr_code', 'qr_code_and_url', 'url'], hasdefault: default
146
+ # DONE: post-migration: set to 'url' if point_of_sale_use_ticket_qr_code is False (or 'qr_code_and_url' is true)
147
+
148
+ ---XML records in module 'point_of_sale'---
149
+ NEW ir.actions.act_window: point_of_sale.action_pos_note_model
150
+ NEW ir.actions.act_window: point_of_sale.product_product_action_add_pos
151
+ NEW ir.actions.act_window: point_of_sale.product_product_action_edit_pos
152
+ NEW ir.actions.act_window: point_of_sale.res_partner_action_edit_pos
153
+ DEL ir.actions.act_window: point_of_sale.action_pos_combo
154
+ NEW ir.actions.server: point_of_sale.action_send_mail
155
+ NEW ir.actions.server: point_of_sale.pos_order_set_cancel
156
+ NEW ir.model.access: point_of_sale.access_account_journal_item
157
+ NEW ir.model.access: point_of_sale.access_pos_note
158
+ NEW ir.model.access: point_of_sale.access_pos_note_manager
159
+ NEW ir.model.access: point_of_sale.access_product_combo_item_pos_manager
160
+ NEW ir.model.access: point_of_sale.access_product_combo_item_pos_user
161
+ NEW ir.model.access: point_of_sale.access_product_combo_pos_manager
162
+ NEW ir.model.access: point_of_sale.access_product_combo_pos_user
163
+ NEW ir.model.access: point_of_sale.access_update_product_attribute_value_pos_manager
164
+ DEL ir.model.access: point_of_sale.access_pos_combo_line_manager
165
+ DEL ir.model.access: point_of_sale.access_pos_combo_line_user
166
+ DEL ir.model.access: point_of_sale.access_pos_combo_manager
167
+ DEL ir.model.access: point_of_sale.access_pos_combo_user
168
+ NEW ir.model.constraint: point_of_sale.constraint_pos_note_name_unique
169
+ NEW ir.rule: point_of_sale.rule_invoice_line_pos_user (noupdate)
170
+ NEW ir.ui.menu: point_of_sale.menu_pos_note_model
171
+ NEW ir.ui.menu: point_of_sale.menu_product_combo
172
+ DEL ir.ui.menu: point_of_sale.menu_pos_combo
173
+ NEW ir.ui.view: point_of_sale.customer_display_index
174
+ NEW ir.ui.view: point_of_sale.pos_daily_sales_html_container
175
+ NEW ir.ui.view: point_of_sale.pos_daily_sales_report_layout
176
+ NEW ir.ui.view: point_of_sale.pos_session_sales_details
177
+ NEW ir.ui.view: point_of_sale.product_combo_view_form
178
+ NEW ir.ui.view: point_of_sale.product_product_view_form_normalized_pos
179
+ NEW ir.ui.view: point_of_sale.view_pos_note_tree
180
+ DEL ir.ui.view: point_of_sale.account_product_template_form_view
181
+ DEL ir.ui.view: point_of_sale.qunit_suite
182
+ DEL ir.ui.view: point_of_sale.view_pos_combo_form
183
+ DEL ir.ui.view: point_of_sale.view_pos_combo_tree
184
+ NEW mail.template: point_of_sale.pos_email_marketing_template (noupdate)
185
+ # NOTHING TO DO
186
+
187
+ DEL pos.bill: point_of_sale.0_01 (noupdate)
188
+ DEL pos.bill: point_of_sale.0_02 (noupdate)
189
+ # DONE: post-migration: safely delete
190
+
191
+ DEL pos.config: point_of_sale.pos_config_main (noupdate)
192
+ # DONE: post-migration: just remove ir_model_data
193
+
194
+ NEW pos.note: point_of_sale.pos_note_emergency
195
+ NEW pos.note: point_of_sale.pos_note_no_dressing
196
+ NEW pos.note: point_of_sale.pos_note_serve
197
+ NEW pos.note: point_of_sale.pos_note_wait
198
+ NEW web_tour.tour: point_of_sale.point_of_sale_tour
199
+ # NOTHING TO DO
200
+
201
+ DEL product.product: point_of_sale.product_product_consumable [renamed to pos_discount module] (noupdate)
202
+ # DONE: post-migration: delete ir_model_data if pos_discount is not installed, else rename it
@@ -65,9 +65,14 @@ def res_partner_specific_property_product_pricelist(env):
65
65
  env["ir.default"].search([("field_id", "=", new_field.id)]).unlink()
66
66
 
67
67
 
68
+ def delete_combo_items_without_combo(env):
69
+ env["product.combo.item"].search([("combo_id", "=", False)]).unlink()
70
+
71
+
68
72
  @openupgrade.migrate()
69
73
  def migrate(env, version):
70
74
  product_document_sequence(env)
71
75
  product_template_is_favorite(env)
72
76
  res_partner_specific_property_product_pricelist(env)
77
+ delete_combo_items_without_combo(env)
73
78
  openupgrade_180.convert_company_dependent(env, "product.product", "standard_price")
@@ -8,8 +8,8 @@ xmlid_renames = [
8
8
  ]
9
9
 
10
10
  column_creates = [
11
- ("product.attribute", "active", "boolean", "TRUE"),
12
- ("product.attribute.value", "active", "boolean", "TRUE"),
11
+ ("product.attribute", "active", "boolean", True),
12
+ ("product.attribute.value", "active", "boolean", True),
13
13
  ("product.pricelist.item", "display_applied_on", "char"),
14
14
  ("product.pricelist.item", "price_markup", "float"),
15
15
  ]
@@ -22,14 +22,22 @@ def rename_pos_models(env):
22
22
  """
23
23
  if not openupgrade.table_exists(env.cr, "pos_combo"):
24
24
  return
25
-
26
25
  openupgrade.rename_tables(
27
26
  env.cr,
28
27
  [
29
28
  ("pos_combo", "product_combo"),
30
29
  ("pos_combo_line", "product_combo_item"),
30
+ ("pos_combo_product_template_rel", "product_combo_product_template_rel"),
31
31
  ],
32
32
  )
33
+ openupgrade.rename_columns(
34
+ env.cr,
35
+ {
36
+ "product_combo_product_template_rel": [
37
+ ("pos_combo_id", "product_combo_id"),
38
+ ]
39
+ },
40
+ )
33
41
  openupgrade.rename_models(
34
42
  env.cr,
35
43
  [
@@ -65,9 +73,23 @@ def fill_product_pricelist_item_columns(env):
65
73
  )
66
74
 
67
75
 
76
+ def assure_service_tracking(env):
77
+ if not openupgrade.column_exists(env.cr, "product_template", "service_tracking"):
78
+ return
79
+ openupgrade.logged_query(
80
+ env.cr,
81
+ """
82
+ UPDATE product_template
83
+ SET service_tracking = 'no'
84
+ WHERE service_tracking IS NULL
85
+ """,
86
+ )
87
+
88
+
68
89
  @openupgrade.migrate()
69
90
  def migrate(env, version):
70
91
  openupgrade.rename_xmlids(env.cr, xmlid_renames)
71
92
  openupgrade.add_columns(env, column_creates)
72
93
  fill_product_pricelist_item_columns(env)
73
94
  rename_pos_models(env)
95
+ assure_service_tracking(env)
@@ -1,12 +1,24 @@
1
1
  ---Models in module 'product'---
2
- new model product.combo
3
- new model product.combo.item
2
+ new model product.combo (renamed from pos.combo in module point_of_sale)
3
+ new model product.combo.item (renamed from pos.combo.line in module point_of_sale)
4
4
  # DONE: pre-migration: rename models and fields from point_of_sale models if installed
5
5
 
6
6
  new model update.product.attribute.value [transient]
7
7
  # NOTHING TO DO: new functionality
8
8
 
9
9
  ---Fields in module 'product'---
10
+ point_of_sale / pos.combo.line / combo_id (many2one) : now required
11
+ # DONE: post-migration: delete lines without combo_id
12
+
13
+ point_of_sale / pos.combo.line / combo_id (many2one) : relation is now 'product.combo' ('pos.combo') [nothing to do]
14
+ point_of_sale / product.product / combo_ids (many2many) : relation is now 'product.combo' ('pos.combo') [nothing to do]
15
+ point_of_sale / product.template / combo_ids (many2many) : relation is now 'product.combo' ('pos.combo') [nothing to do]
16
+ # NOTHING TO DO
17
+
18
+ point_of_sale / product.template / combo_ids (many2many) : column2 is now 'product_combo_id' ('pos_combo_id') [pos_combo_product_template_rel]
19
+ point_of_sale / product.template / combo_ids (many2many) : table is now 'product_combo_product_template_rel' ('pos_combo_product_template_rel')
20
+ # DONE: pre-migration: renamed column and table
21
+
10
22
  product / product.attribute / active (boolean) : NEW hasdefault: default
11
23
  # DONE: added in pre-migration
12
24
 
@@ -80,6 +92,11 @@ product / product.template / type (selection) : select
80
92
  product / res.partner / specific_property_product_pricelist (many2one): NEW relation: product.pricelist
81
93
  # DONE: post-migration: convert from v17 property res.partner#property_product_pricelist
82
94
 
95
+ sale_project / product.product / service_tracking (selection) : now required
96
+ sale_project / product.template / service_tracking (selection) : now required
97
+ sale_project / product.template / service_tracking (selection) : selection_keys is now '['no']' ('['no', 'project_only', 'task_global_project', 'task_in_project']')
98
+ # DONE: pre-migration: add default 'no' if service_tracking is null
99
+
83
100
  ---XML records in module 'product'---
84
101
  NEW ir.actions.act_window: product.product_combo_action
85
102
  NEW ir.model.access: product.access_product_combo_item_manager
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-openupgrade_scripts
3
- Version: 18.0.1.0.0.151
3
+ Version: 18.0.1.0.0.154
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: odoo==18.0.*
6
6
  Requires-Dist: openupgradelib
@@ -369,8 +369,9 @@ odoo/addons/openupgrade_scripts/scripts/payment_aps/18.0.1.0/upgrade_analysis.tx
369
369
  odoo/addons/openupgrade_scripts/scripts/payment_asiapay/18.0.1.0/upgrade_analysis.txt,sha256=m8bAmzsKPDGNhOsSyY2FIkvuKp80vvIKlvNmMGMD6rU,168
370
370
  odoo/addons/openupgrade_scripts/scripts/payment_authorize/18.0.2.0/upgrade_analysis.txt,sha256=panWuXS18rWdpOC2X-ih8qhhZwPDs_KR6AJzW9kHvBM,174
371
371
  odoo/addons/openupgrade_scripts/scripts/payment_buckaroo/18.0.2.0/upgrade_analysis.txt,sha256=g1jJNuVhi9T4-5DuZtkV4SjIQxt8OGy6qTdHNqM3_F8,171
372
- odoo/addons/openupgrade_scripts/scripts/payment_custom/18.0.2.0/noupdate_changes.xml,sha256=mRqMrR29YAPtmKPJD41Sv1a0ZQhdGnZcWlL-Qwf3rEM,228
373
- odoo/addons/openupgrade_scripts/scripts/payment_custom/18.0.2.0/post-migration.py,sha256=t-AdAhwz4h3aIqFGRpMTpKkVnVv7biYKK93NGEGBeNU,283
372
+ odoo/addons/openupgrade_scripts/scripts/payment_custom/18.0.2.0/noupdate_changes.xml,sha256=KGJiT5f3-0zER6HsfD6tlbA96NkkqhUPDpCKVhZxhlM,219
373
+ odoo/addons/openupgrade_scripts/scripts/payment_custom/18.0.2.0/noupdate_changes_work.xml,sha256=keZ_IzVGVXYXUSaSIUydpm8Lr74EqP0kLXRyQ_rOZlE,229
374
+ odoo/addons/openupgrade_scripts/scripts/payment_custom/18.0.2.0/post-migration.py,sha256=KpSQgKfslV6t0533aUNor8Lf6XofVxKlK0bOqxqZ5qE,288
374
375
  odoo/addons/openupgrade_scripts/scripts/payment_custom/18.0.2.0/upgrade_analysis.txt,sha256=dX9h-s442HVWg2tv3W5_ln83us_Eg5YJRXmBljDvJ3E,233
375
376
  odoo/addons/openupgrade_scripts/scripts/payment_custom/18.0.2.0/upgrade_analysis_work.txt,sha256=TGnXV-0C4srz5b8BM2GaX8gXnURfGY8cbPZjaZo2qP8,273
376
377
  odoo/addons/openupgrade_scripts/scripts/payment_demo/18.0.2.0/upgrade_analysis.txt,sha256=54VUGFjayPhDNCtXYR7JHC6gbwMnvm6eDNXvqc6cmls,259
@@ -390,7 +391,10 @@ odoo/addons/openupgrade_scripts/scripts/payment_xendit/18.0.1.0/noupdate_changes
390
391
  odoo/addons/openupgrade_scripts/scripts/payment_xendit/18.0.1.0/upgrade_analysis.txt,sha256=WolBiFs4QXy3c3L6_aKMad18SgHsOMFoKeJt6INImX4,706
391
392
  odoo/addons/openupgrade_scripts/scripts/phone_validation/18.0.2.1/upgrade_analysis.txt,sha256=zHx1oo1qSI5f6kZeh24Jq5tPXtfnvgQYlBeO1isOOSw,171
392
393
  odoo/addons/openupgrade_scripts/scripts/phone_validation/18.0.2.1/upgrade_analysis_work.txt,sha256=r6ZZxEY8udYvp3vj59JewSzKuX4SprcezFqGf4l-cys,187
394
+ odoo/addons/openupgrade_scripts/scripts/point_of_sale/18.0.1.0.2/post-migration.py,sha256=tiyasJWrYq46M2E0i0eIrJDVx73L0gPiIi7UxVm2zCA,4380
395
+ odoo/addons/openupgrade_scripts/scripts/point_of_sale/18.0.1.0.2/pre-migration.py,sha256=wJrEIhmf-HTnizXFOOkjs4SBnIXl0gXFq3XtIDNWybI,2653
393
396
  odoo/addons/openupgrade_scripts/scripts/point_of_sale/18.0.1.0.2/upgrade_analysis.txt,sha256=QTdvrzHNIbalT39qfy6xXVFMmIPj7DYxVA9vFV7OOqI,10427
397
+ odoo/addons/openupgrade_scripts/scripts/point_of_sale/18.0.1.0.2/upgrade_analysis_work.txt,sha256=e4BCTZe7WRAqXoNhe52PRQ7RP-wlTKTtUVSaDK66ijY,12222
394
398
  odoo/addons/openupgrade_scripts/scripts/portal/18.0.1.0/noupdate_changes.xml,sha256=Du6sud3Wmb5rIn3UVwKgrB3A9CbnK5qFYugWq2qcf0E,6689
395
399
  odoo/addons/openupgrade_scripts/scripts/portal/18.0.1.0/post-migration.py,sha256=Fwcg9o6OAsHbDJ46wbYs587VMKo-U-92NJDN-GsMHPc,404
396
400
  odoo/addons/openupgrade_scripts/scripts/portal/18.0.1.0/upgrade_analysis.txt,sha256=7O30PHT9l9Td7LxfMio-JerP-3PwiLKtSnACDV9DyPk,958
@@ -417,10 +421,10 @@ odoo/addons/openupgrade_scripts/scripts/pos_sms/18.0.1.0/upgrade_analysis.txt,sh
417
421
  odoo/addons/openupgrade_scripts/scripts/pos_stripe/18.0.1.0/upgrade_analysis.txt,sha256=msYJoACfH4fpPoraAn3Z6NoclsSl2D3-B1v-CkNcCMM,153
418
422
  odoo/addons/openupgrade_scripts/scripts/pos_viva_wallet/18.0.1.0/upgrade_analysis.txt,sha256=papgWPA_nb2FLlo9OXYamidxXTcJ8DatToyQk_SW4Kk,168
419
423
  odoo/addons/openupgrade_scripts/scripts/privacy_lookup/18.0.1.0/upgrade_analysis.txt,sha256=l6bZO4RUtpRzJYYglTiPCXBa2Lni5Tl4AqAHkL0qU6g,165
420
- odoo/addons/openupgrade_scripts/scripts/product/18.0.1.2/post-migration.py,sha256=JjL8vnwrGY6yKAkzNfGDX-sw3UF7237x6FpxmNNhXcY,2132
421
- odoo/addons/openupgrade_scripts/scripts/product/18.0.1.2/pre-migration.py,sha256=rhHrHEAjZp55e8ee1vouAxY7l7jGIkKNkHfYSZWj-wc,2083
424
+ odoo/addons/openupgrade_scripts/scripts/product/18.0.1.2/post-migration.py,sha256=3M9VqL_i5gPLEGFtkVAJdKizmtK-EYUR21dtg2Kf-SY,2293
425
+ odoo/addons/openupgrade_scripts/scripts/product/18.0.1.2/pre-migration.py,sha256=xgLilibkXG-evblHKVGxpdmuKMkQmwjPeyNZou312R4,2713
422
426
  odoo/addons/openupgrade_scripts/scripts/product/18.0.1.2/upgrade_analysis.txt,sha256=yJxmoMirP0EdN76CoXZPw1QVVnVnbwN7M206lL36pBA,7174
423
- odoo/addons/openupgrade_scripts/scripts/product/18.0.1.2/upgrade_analysis_work.txt,sha256=smdswndL9a51eAYarCUprjJp6vrZk2NRvPJM-feBZpk,6215
427
+ odoo/addons/openupgrade_scripts/scripts/product/18.0.1.2/upgrade_analysis_work.txt,sha256=TbUIjvBsXhXu4ZRB2U5JL-AKwfXRaFwgJQNnvBfHMRw,7674
424
428
  odoo/addons/openupgrade_scripts/scripts/product/tests/data.py,sha256=chj9tmKaD5nwnkRWeC0NvjMDpeOSjQySIjNWsLh2Lks,530
425
429
  odoo/addons/openupgrade_scripts/scripts/product/tests/test_migration.py,sha256=O0n79F4V3fyd5HeIDqpaC5BfNHLD-ndUWNmYT3vQdL0,991
426
430
  odoo/addons/openupgrade_scripts/scripts/product_email_template/18.0.1.0/upgrade_analysis.txt,sha256=Dx6pySBrbJMWmtd4YMb2kJvvwUS13cMjXP0r6zLfLWk,189
@@ -596,7 +600,7 @@ odoo/addons/openupgrade_scripts/scripts/website_slides_survey/18.0.1.0/upgrade_a
596
600
  odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
597
601
  odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
598
602
  odoo/addons/openupgrade_scripts/static/description/index.html,sha256=Jc0qAThlH5WnoSq6vPamjC8WyMkdo_9zkhDuU1qW1VI,12722
599
- odoo_addon_openupgrade_scripts-18.0.1.0.0.151.dist-info/METADATA,sha256=76DoK2oQoc5gIi50NDGKXCS26sAdjjKZfKsHc-0kK0g,3775
600
- odoo_addon_openupgrade_scripts-18.0.1.0.0.151.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
601
- odoo_addon_openupgrade_scripts-18.0.1.0.0.151.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
602
- odoo_addon_openupgrade_scripts-18.0.1.0.0.151.dist-info/RECORD,,
603
+ odoo_addon_openupgrade_scripts-18.0.1.0.0.154.dist-info/METADATA,sha256=xKKo7G92uzRJ2J8MLgvTFGdg6EFmCFltwP7gH99Ir3I,3775
604
+ odoo_addon_openupgrade_scripts-18.0.1.0.0.154.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
605
+ odoo_addon_openupgrade_scripts-18.0.1.0.0.154.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
606
+ odoo_addon_openupgrade_scripts-18.0.1.0.0.154.dist-info/RECORD,,