From 67c2bcc15031ed3c5f9ba6ad6c5f3540946ce03d Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sat, 15 Apr 2017 18:37:15 +0200 Subject: [PATCH 1/2] [IMP] base+doc * base: Preserve 'birthday' column for not losing data. * doc: Include 9.0 module list, not 10.0 one. * doc: Remove 'No change' state, as it's mixed frequently with 'Nothing to do' --- .../10.0.1.3/openupgrade_analysis_work.txt | 4 +- .../base/migrations/10.0.1.3/pre-migration.py | 7 ++ odoo/openupgrade/doc/source/modules90-100.rst | 69 ++++++++++++------- 3 files changed, 53 insertions(+), 27 deletions(-) diff --git a/odoo/addons/base/migrations/10.0.1.3/openupgrade_analysis_work.txt b/odoo/addons/base/migrations/10.0.1.3/openupgrade_analysis_work.txt index e0794f338b2f..ea026dcb5efb 100644 --- a/odoo/addons/base/migrations/10.0.1.3/openupgrade_analysis_work.txt +++ b/odoo/addons/base/migrations/10.0.1.3/openupgrade_analysis_work.txt @@ -21,12 +21,14 @@ base / res.company / sequence (integer) : NEW base / res.currency / symbol (char) : now required # Use the value of name if symbol is blank -base / res.partner / birthdate (char) : DEL base / res.partner / company_name (char) : NEW base / res.partner / company_type (selection) : now a function base / res.partner / use_parent_address (boolean) : DEL # NOTHING TO DO +base / res.partner / birthdate (char) : DEL +# Done: Preserve field in case of being needed + ---XML records in module 'base'--- NEW ir.actions.act_url: base.action_open_website NEW ir.actions.act_window: base.action_currency_form_company diff --git a/odoo/addons/base/migrations/10.0.1.3/pre-migration.py b/odoo/addons/base/migrations/10.0.1.3/pre-migration.py index da8152fc8d5f..e776e61f3847 100644 --- a/odoo/addons/base/migrations/10.0.1.3/pre-migration.py +++ b/odoo/addons/base/migrations/10.0.1.3/pre-migration.py @@ -3,9 +3,16 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openupgradelib import openupgrade +_column_renames = { + 'res_partner': [ + ('birthdate', None), + ], +} + @openupgrade.migrate() def migrate(cr, version): + openupgrade.rename_columns(cr, _column_renames) cr.execute( # we rely on the ORM to write this value 'alter table ir_model_fields add column store boolean' diff --git a/odoo/openupgrade/doc/source/modules90-100.rst b/odoo/openupgrade/doc/source/modules90-100.rst index fc3685e1c9a2..d8d44454de95 100644 --- a/odoo/openupgrade/doc/source/modules90-100.rst +++ b/odoo/openupgrade/doc/source/modules90-100.rst @@ -6,9 +6,8 @@ Status : * Empty : No information available : Please see the 'openupgrade_analysis.txt' file of the module and share your analyse; -* 'No change' : No change between 9.0 and 10.0; - -* 'Nothing to do' : Analyse has been done, and there is nothing to do; +* 'Nothing to do' : Analyse has been done, and there is nothing to do or + there's no change between 9.0 and 10.0; * 'Work in progress' : Analyse / Work in progress. Please review the merge proposals at https://github.com/OCA/OpenUpgrade/pulls @@ -34,8 +33,16 @@ Status : +-----------------------------------+-----------------------------------+ |account_check_printing | Nothing to do | +-----------------------------------+-----------------------------------+ +|account_extra_reports | | ++-----------------------------------+-----------------------------------+ +|account_full_reconcile | | ++-----------------------------------+-----------------------------------+ +|account_tax_adjustments | | ++-----------------------------------+-----------------------------------+ |account_tax_cash_basis | | +-----------------------------------+-----------------------------------+ +|account_tax_exigible | | ++-----------------------------------+-----------------------------------+ |account_tax_python | | +-----------------------------------+-----------------------------------+ |account_test | Nothing to do | @@ -82,10 +89,14 @@ Status : +-----------------------------------+-----------------------------------+ |calendar | | +-----------------------------------+-----------------------------------+ -|contacts | | +|claim_from_delivery | | +-----------------------------------+-----------------------------------+ |crm | | +-----------------------------------+-----------------------------------+ +|crm_claim | | ++-----------------------------------+-----------------------------------+ +|crm_partner_assign | | ++-----------------------------------+-----------------------------------+ |crm_project_issue | | +-----------------------------------+-----------------------------------+ |decimal_precision | Nothing to do | @@ -120,26 +131,22 @@ Status : +-----------------------------------+-----------------------------------+ |hr_contract | | +-----------------------------------+-----------------------------------+ +|hr_equipment | | ++-----------------------------------+-----------------------------------+ |hr_expense | | +-----------------------------------+-----------------------------------+ |hr_gamification | | +-----------------------------------+-----------------------------------+ |hr_holidays | | +-----------------------------------+-----------------------------------+ -|hr_maintenance | | -+-----------------------------------+-----------------------------------+ |hr_payroll | | +-----------------------------------+-----------------------------------+ |hr_payroll_account | | +-----------------------------------+-----------------------------------+ |hr_recruitment | | +-----------------------------------+-----------------------------------+ -|hr_recruitment_survey | | -+-----------------------------------+-----------------------------------+ |hr_timesheet | | +-----------------------------------+-----------------------------------+ -|hr_timesheet_attendance | | -+-----------------------------------+-----------------------------------+ |hr_timesheet_sheet | | +-----------------------------------+-----------------------------------+ |hw_blackbox_be | | @@ -292,7 +299,7 @@ Status : +-----------------------------------+-----------------------------------+ |mail | | +-----------------------------------+-----------------------------------+ -|maintenance | | +|mail_tip | | +-----------------------------------+-----------------------------------+ |marketing_campaign | | +-----------------------------------+-----------------------------------+ @@ -306,6 +313,8 @@ Status : +-----------------------------------+-----------------------------------+ |mrp_byproduct | | +-----------------------------------+-----------------------------------+ +|mrp_operations | | ++-----------------------------------+-----------------------------------+ |mrp_repair | | +-----------------------------------+-----------------------------------+ |note | | @@ -328,12 +337,8 @@ Status : +-----------------------------------+-----------------------------------+ |payment_paypal | | +-----------------------------------+-----------------------------------+ -|payment_payumoney | | -+-----------------------------------+-----------------------------------+ |payment_sips | | +-----------------------------------+-----------------------------------+ -|payment_stripe | | -+-----------------------------------+-----------------------------------+ |payment_transfer | | +-----------------------------------+-----------------------------------+ |point_of_sale | | @@ -348,8 +353,6 @@ Status : +-----------------------------------+-----------------------------------+ |pos_cache | Nothing to do | +-----------------------------------+-----------------------------------+ -|pos_data_drinks | | -+-----------------------------------+-----------------------------------+ |pos_discount | | +-----------------------------------+-----------------------------------+ |pos_mercury | | @@ -372,15 +375,19 @@ Status : +-----------------------------------+-----------------------------------+ |product_margin | | +-----------------------------------+-----------------------------------+ +|product_uos | | ++-----------------------------------+-----------------------------------+ +|product_visible_discount | | ++-----------------------------------+-----------------------------------+ |project | | +-----------------------------------+-----------------------------------+ |project_issue | | +-----------------------------------+-----------------------------------+ |project_issue_sheet | | +-----------------------------------+-----------------------------------+ -|purchase | | +|project_timesheet | | +-----------------------------------+-----------------------------------+ -|purchase_mrp | | +|purchase | | +-----------------------------------+-----------------------------------+ |purchase_requisition | | +-----------------------------------+-----------------------------------+ @@ -394,6 +401,8 @@ Status : +-----------------------------------+-----------------------------------+ |report_intrastat | Nothing to do | +-----------------------------------+-----------------------------------+ +|report_webkit | | ++-----------------------------------+-----------------------------------+ |resource | Nothing to do | +-----------------------------------+-----------------------------------+ |sale | | @@ -402,20 +411,22 @@ Status : +-----------------------------------+-----------------------------------+ |sale_expense | | +-----------------------------------+-----------------------------------+ +|sale_layout | | ++-----------------------------------+-----------------------------------+ |sale_margin | | +-----------------------------------+-----------------------------------+ |sale_mrp | | +-----------------------------------+-----------------------------------+ |sale_order_dates | | +-----------------------------------+-----------------------------------+ -|sale_service_rating | | -+-----------------------------------+-----------------------------------+ -|sales_team | | +|sale_service | | +-----------------------------------+-----------------------------------+ |sale_stock | | +-----------------------------------+-----------------------------------+ |sale_timesheet | | +-----------------------------------+-----------------------------------+ +|sales_team | | ++-----------------------------------+-----------------------------------+ |stock | | +-----------------------------------+-----------------------------------+ |stock_account | Nothing to do | @@ -440,8 +451,12 @@ Status : +-----------------------------------+-----------------------------------+ |utm | | +-----------------------------------+-----------------------------------+ +|warning | | ++-----------------------------------+-----------------------------------+ |web | | +-----------------------------------+-----------------------------------+ +|web_analytics | | ++-----------------------------------+-----------------------------------+ |web_calendar | | +-----------------------------------+-----------------------------------+ |web_diagram | | @@ -456,12 +471,18 @@ Status : +-----------------------------------+-----------------------------------+ |web_settings_dashboard | | +-----------------------------------+-----------------------------------+ +|web_tip | | ++-----------------------------------+-----------------------------------+ +|web_view_editor | | ++-----------------------------------+-----------------------------------+ |website | | +-----------------------------------+-----------------------------------+ |website_blog | | +-----------------------------------+-----------------------------------+ |website_crm | | +-----------------------------------+-----------------------------------+ +|website_crm_claim | | ++-----------------------------------+-----------------------------------+ |website_crm_partner_assign | | +-----------------------------------+-----------------------------------+ |website_customer | Nothing to do | @@ -516,8 +537,6 @@ Status : +-----------------------------------+-----------------------------------+ |website_project_issue_sheet | | +-----------------------------------+-----------------------------------+ -|website_project_timesheet | | -+-----------------------------------+-----------------------------------+ |website_quote | | +-----------------------------------+-----------------------------------+ |website_rating_project_issue | | @@ -538,5 +557,3 @@ Status : +-----------------------------------+-----------------------------------+ |website_twitter | Nothing to do | +-----------------------------------+-----------------------------------+ -|web_tour | | -+-----------------------------------+-----------------------------------+ From 27a1748230e33116ae89d1fa2c38d581a258e498 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Sat, 15 Apr 2017 19:13:36 +0200 Subject: [PATCH 2/2] [FIX] base: Specify use_env=False With the change in openupgradelib, now use_env is by default True, so we need to explicitly say no to this. --- odoo/addons/base/migrations/10.0.1.3/pre-migration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/addons/base/migrations/10.0.1.3/pre-migration.py b/odoo/addons/base/migrations/10.0.1.3/pre-migration.py index e776e61f3847..078de84cfda1 100644 --- a/odoo/addons/base/migrations/10.0.1.3/pre-migration.py +++ b/odoo/addons/base/migrations/10.0.1.3/pre-migration.py @@ -10,7 +10,7 @@ } -@openupgrade.migrate() +@openupgrade.migrate(use_env=False) def migrate(cr, version): openupgrade.rename_columns(cr, _column_renames) cr.execute(