odoo-addon-openupgrade-scripts 17.0.1.0.1.92__py3-none-any.whl → 17.0.1.0.1.96__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.
@@ -0,0 +1,13 @@
1
+ # Copyright 2024 Tecnativa - Pedro M. Baeza
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3
+
4
+ from openupgradelib import openupgrade
5
+
6
+ _field_renames = [
7
+ ("crm.lead", "crm_lead", "date_action_last", "date_automation_last"),
8
+ ]
9
+
10
+
11
+ @openupgrade.migrate()
12
+ def migrate(env, version):
13
+ openupgrade.rename_fields(env, _field_renames)
@@ -0,0 +1,32 @@
1
+ ---Models in module 'crm'---
2
+ ---Fields in module 'crm'---
3
+ crm / crm.lead / activity_user_id (many2one) : not related anymore
4
+ crm / crm.lead / activity_user_id (many2one) : now a function
5
+ # NOTHING TO DO:
6
+
7
+ crm / crm.lead / date_action_last (datetime) : DEL
8
+ crm / crm.lead / date_automation_last (datetime): NEW
9
+ # DONE: pre-migration
10
+
11
+ crm / crm.lead / email_domain_criterion (char) : NEW isfunction: function, stored
12
+ crm / crm.lead / message_main_attachment_id (many2one): DEL relation: ir.attachment
13
+ crm / crm.lead / rating_ids (one2many) : NEW relation: rating.rating
14
+ crm / crm.lead / recurring_revenue_prorated (float): NEW isfunction: function, stored
15
+ # NOTHING TO DO:
16
+
17
+ ---XML records in module 'crm'---
18
+ NEW ir.actions.act_window: crm.mail_activity_plan_action_lead
19
+ DEL ir.actions.server: crm.action_mark_as_lost
20
+ NEW ir.model.access: crm.access_crm_activity_report_salesman
21
+ NEW ir.model.access: crm.access_mail_activity_plan_sale_manager
22
+ NEW ir.model.access: crm.access_mail_activity_plan_template_sale_manager
23
+ # NOTHING TO DO:
24
+
25
+ NEW ir.rule: crm.mail_plan_rule_group_sale_manager_lead (noupdate)
26
+ NEW ir.rule: crm.mail_plan_templates_rule_group_sale_manager_lead (noupdate)
27
+ # NOTHING TO DO: Handled by ORM
28
+
29
+ NEW ir.ui.menu: crm.mail_activity_plan_menu_config_lead
30
+ NEW ir.ui.view: crm.crm_lead_view_tree_opportunity_reporting
31
+ NEW ir.ui.view: crm.res_partner_view_form_simple_form
32
+ # NOTHING TO DO:
@@ -0,0 +1,50 @@
1
+ # Copyright 2024 Viindoo Technology Joint Stock Company (Viindoo)
2
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3
+
4
+ from openupgradelib import openupgrade
5
+
6
+
7
+ def _stock_move_convert_analytic_account_line_id_m2o_to_m2m(env):
8
+ openupgrade.m2o_to_x2m(
9
+ env.cr,
10
+ env["stock.move"],
11
+ "stock_move",
12
+ "analytic_account_line_ids",
13
+ "analytic_account_line_id",
14
+ )
15
+
16
+
17
+ def fill_account_move_line_cogs_origin_id(env):
18
+ openupgrade.logged_query(
19
+ env.cr,
20
+ """
21
+ UPDATE account_move_line aml
22
+ SET cogs_origin_id = line.id
23
+ FROM account_move_line line
24
+ WHERE aml.move_id = line.move_id
25
+ AND line.display_type != 'cogs' AND aml.display_type = 'cogs'
26
+ AND line.product_id = aml.product_id
27
+ AND line.product_uom_id = aml.product_uom_id
28
+ AND line.quantity = aml.quantity
29
+ AND left(line.name, 64) = aml.name""",
30
+ )
31
+
32
+
33
+ def delete_obsolete_ir_model_data(env):
34
+ xml_ids = [
35
+ "stock_account.property_stock_account_input_categ_id",
36
+ "stock_account.property_stock_account_output_categ_id",
37
+ ]
38
+ for xml_id in xml_ids:
39
+ module, name = xml_id.split(".")
40
+ imd = env["ir.model.data"].search(
41
+ [("module", "=", module), ("name", "=", name)]
42
+ )
43
+ imd.unlink()
44
+
45
+
46
+ @openupgrade.migrate()
47
+ def migrate(env, version):
48
+ _stock_move_convert_analytic_account_line_id_m2o_to_m2m(env)
49
+ fill_account_move_line_cogs_origin_id(env)
50
+ delete_obsolete_ir_model_data(env)
@@ -0,0 +1,37 @@
1
+ # Copyright 2023 Trần Trường Sơn
2
+ # Copyright 2023 Rémy Taymans
3
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
4
+
5
+ from openupgradelib import openupgrade
6
+
7
+ _new_fields = [
8
+ (
9
+ "categ_id", # Field name
10
+ "stock.valuation.layer", # Model name
11
+ "stock_valuation_layer", # Table name
12
+ "many2one", # Odoo Field type (in lower case)
13
+ False, # [Optional] SQL type (if custom fields)
14
+ "stock_account", # Module name
15
+ False, # [Optional] Default value
16
+ )
17
+ ]
18
+
19
+
20
+ def _fill_stock_valuation_layer_categ_id(env):
21
+ """Field `categ_id` on stock.valuation.layer is now a stored field."""
22
+ openupgrade.logged_query(
23
+ env.cr,
24
+ """
25
+ UPDATE stock_valuation_layer
26
+ SET categ_id = pt.categ_id
27
+ FROM product_product p
28
+ JOIN product_template pt ON p.product_tmpl_id = pt.id
29
+ WHERE stock_valuation_layer.product_id = p.id;
30
+ """,
31
+ )
32
+
33
+
34
+ @openupgrade.migrate()
35
+ def migrate(env, version):
36
+ openupgrade.add_fields(env, _new_fields)
37
+ _fill_stock_valuation_layer_categ_id(env)
@@ -0,0 +1,31 @@
1
+ ---Models in module 'stock_account'---
2
+ ---Fields in module 'stock_account'---
3
+ stock_account / account.move.line / cogs_origin_id (many2one) : NEW relation: account.move.line
4
+ # DONE: post-migration: filled using display_type = 'cogs'
5
+
6
+ stock_account / stock.move / analytic_account_line_id (many2one): DEL relation: account.analytic.line
7
+ stock_account / stock.move / analytic_account_line_ids (many2many): NEW relation: account.analytic.line
8
+ # DONE post-migraton: m2o to m2m
9
+
10
+ stock_account / stock.valuation.layer / categ_id (many2one) : is now stored
11
+ # DONE: pre-migration: Add new column & set value for it
12
+
13
+ ---XML records in module 'stock_account'---
14
+ NEW ir.actions.act_window: stock_account.inventory_aging_action
15
+ NEW ir.filters: stock_account.filter_invoice_inventory_valuation
16
+ # NOTHING TO DO: new feature
17
+
18
+ DEL ir.property: stock_account.property_stock_account_input_categ_id (noupdate)
19
+ DEL ir.property: stock_account.property_stock_account_output_categ_id (noupdate)
20
+ # DONE: post-migration: ir.model.data deleted to avoid deleting the default values during xmlid cleanup
21
+
22
+ NEW ir.ui.menu: stock_account.menu_inventory_aging
23
+ NEW ir.ui.view: stock_account.stock_valuation_layer_graph
24
+ NEW ir.ui.view: stock_account.stock_valuation_layer_valuation_at_date_tree_inherited
25
+ # NOTHING TO DO: new feature
26
+
27
+ DEL ir.ui.view: stock_account.stock_account_report_product_product_replenishment
28
+ # NOTHING TO DO
29
+
30
+ NEW res.groups: stock_account.group_stock_accounting_automatic (noupdate)
31
+ # NOTHING TO DO: New noupdate="1" records
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-openupgrade_scripts
3
- Version: 17.0.1.0.1.92
3
+ Version: 17.0.1.0.1.96
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: odoo>=17.0a,<17.1dev
6
6
  Requires-Dist: openupgradelib
@@ -74,7 +74,9 @@ odoo/addons/openupgrade_scripts/scripts/calendar/17.0.1.1/upgrade_analysis.txt,s
74
74
  odoo/addons/openupgrade_scripts/scripts/calendar/17.0.1.1/upgrade_analysis_work.txt,sha256=9Cs4S3AqZ0G10G4K4pSqSLMSwRRGNBTnaJEeu-dy32E,1526
75
75
  odoo/addons/openupgrade_scripts/scripts/calendar_sms/17.0.1.1/upgrade_analysis.txt,sha256=ov0HAtIQqr4W1AZIQ-NMGlXb_gSZsbqm5mq-kn2Zre4,199
76
76
  odoo/addons/openupgrade_scripts/scripts/calendar_sms/17.0.1.1/upgrade_analysis_work.txt,sha256=EMuCv6ctxria1jdXRX3RsdXbjE6pBkj7w6lWrUban4Q,134
77
+ odoo/addons/openupgrade_scripts/scripts/crm/17.0.1.8/pre-migration.py,sha256=V-Xoj3kFRrjJeiEb4EdvC9U7Q1b9P_GZGJVjPjL8wZU,352
77
78
  odoo/addons/openupgrade_scripts/scripts/crm/17.0.1.8/upgrade_analysis.txt,sha256=ZsCcp6uA15KE3LExKlK3aCCSzenNfiPoOTcVWmZh-wk,1483
79
+ odoo/addons/openupgrade_scripts/scripts/crm/17.0.1.8/upgrade_analysis_work.txt,sha256=y8Z5f-Vfhcmq3Su_xOkbuSseheqddFxGmTyzDXU5FaU,1610
78
80
  odoo/addons/openupgrade_scripts/scripts/crm_iap_enrich/17.0.1.1/noupdate_changes.xml,sha256=-izWXk6Bj_LdL2MvG6TYJSV4HWy4PuI8vOLeK4ET9Q0,645
79
81
  odoo/addons/openupgrade_scripts/scripts/crm_iap_enrich/17.0.1.1/upgrade_analysis.txt,sha256=n6quRXxaa0Eja2cD9MiahP67CbyHHJ-iD6YWg-iP6EI,165
80
82
  odoo/addons/openupgrade_scripts/scripts/crm_iap_mine/17.0.1.2/upgrade_analysis.txt,sha256=zy8cIWN2w2yeL75ibIGR8SJxoW-AhVREU_OZ-keAvUQ,225
@@ -487,7 +489,10 @@ odoo/addons/openupgrade_scripts/scripts/stock/17.0.1.1/upgrade_analysis.txt,sha2
487
489
  odoo/addons/openupgrade_scripts/scripts/stock/17.0.1.1/upgrade_analysis_work.txt,sha256=1dAfPQawFTknmbB7s9aoXPgz4yaSs0QsoLwoeQ4iTOI,9765
488
490
  odoo/addons/openupgrade_scripts/scripts/stock/tests/data_stock_migration.py,sha256=JoFlIv3hBE7MXIhKsLA5ng4hT4cgo4nQWLWS0jbFvdo,420
489
491
  odoo/addons/openupgrade_scripts/scripts/stock/tests/test_stock_migration.py,sha256=UIQNIUdL9qRalb1CJp9tZa_7-IFGS3Kr4n-fXIzhFhs,1212
492
+ odoo/addons/openupgrade_scripts/scripts/stock_account/17.0.1.1/post-migration.py,sha256=BmcNA8xqkjpf6_tceV2S45nGoKr0Ca5Lx9vGtsU96Cg,1551
493
+ odoo/addons/openupgrade_scripts/scripts/stock_account/17.0.1.1/pre-migration.py,sha256=Uw4ZiP57yAS4oPn_Y_h4SOu_jQSUCCzy5lPl49SpN_4,1097
490
494
  odoo/addons/openupgrade_scripts/scripts/stock_account/17.0.1.1/upgrade_analysis.txt,sha256=_ofS0N620PedBYmOA8N9ZVMYRI9wLpwFWdI6LYgwn4s,1191
495
+ odoo/addons/openupgrade_scripts/scripts/stock_account/17.0.1.1/upgrade_analysis_work.txt,sha256=xLUEOeCNZCqiStCJfba65zuBTNd5ZabBRirAUZ9EIio,1567
491
496
  odoo/addons/openupgrade_scripts/scripts/stock_delivery/17.0.1.0/upgrade_analysis.txt,sha256=CLgw08khF3b9hOisl8TGCFjl6B39MDMIimyNDq25AzA,6177
492
497
  odoo/addons/openupgrade_scripts/scripts/stock_dropshipping/17.0.1.0/upgrade_analysis.txt,sha256=hcBfhjP7WZQKAPAP1YrQ27M7wowBjSoq3KdMomof7w8,555
493
498
  odoo/addons/openupgrade_scripts/scripts/stock_landed_costs/17.0.1.1/upgrade_analysis.txt,sha256=Br1-ciAX9gqR-PM5ehCWgKjpsWUrtaJHYowwvZIzNik,677
@@ -560,7 +565,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/17.0.1.0/upgrade_analysi
560
565
  odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
561
566
  odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
562
567
  odoo/addons/openupgrade_scripts/static/description/index.html,sha256=iV41-zYBM4uvZPuunpcr7bQeRgBaojVsKo_gkeyJyA4,12639
563
- odoo_addon_openupgrade_scripts-17.0.1.0.1.92.dist-info/METADATA,sha256=0TdTJv5qlseSTGVN5BpttquMbKJtPJmzEX_RApUTkEU,3785
564
- odoo_addon_openupgrade_scripts-17.0.1.0.1.92.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
565
- odoo_addon_openupgrade_scripts-17.0.1.0.1.92.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
566
- odoo_addon_openupgrade_scripts-17.0.1.0.1.92.dist-info/RECORD,,
568
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.96.dist-info/METADATA,sha256=Xsh_DrV10V6PGzr-6kIn46asTwKu_3S9rB1GhufR_yY,3785
569
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.96.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
570
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.96.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
571
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.96.dist-info/RECORD,,