def migrate(env, version): openupgrade.set_xml_ids_noupdate_value( env, "l10n_de_skr04", ["l10n_chart_de_skr04"], False, )
def migrate(env, version): cr = env.cr openupgrade.delete_records_safely_by_xml_id( env, ['account.action_view_account_move_line_reconcile'], ) openupgrade.copy_columns(cr, _column_copies) openupgrade.rename_columns(cr, _column_renames) openupgrade.rename_fields(env, _field_renames) openupgrade.rename_xmlids(cr, xmlid_renames) if openupgrade.table_exists(cr, 'sale_order'): openupgrade.rename_fields(env, _field_renames_sale) if openupgrade.table_exists(cr, 'sale_layout_category'): fill_account_invoice_line_sections(cr) if openupgrade.table_exists(cr, 'account_move_reverse'): # module account_reversal openupgrade.rename_fields(env, _field_renames_account_reversal) if not openupgrade.column_exists(env.cr, 'res_company', 'incoterm_id'): openupgrade.logged_query( env.cr, """ ALTER TABLE res_company ADD COLUMN incoterm_id INTEGER""", ) prefill_account_chart_template_transfer_account_prefix(env) openupgrade.set_xml_ids_noupdate_value( env, 'account', ['account_analytic_line_rule_billing_user'], False)
def migrate(env, _): cr = env.cr keep_old_data_fleet_vehicle_model(cr) keep_old_data_fleet_service_type(cr) keep_old_data_fleet_vehicle_tag(cr) openupgrade.set_xml_ids_noupdate_value( env, 'fleet', ['ir_cron_contract_costs_generator'], True)
def migrate(env, version): openupgrade.set_xml_ids_noupdate_value( env, 'l10n_generic_coa', [ 'a_capital', 'a_dividends', 'a_expense_finance', 'a_expense_invest', 'a_salary_expense', 'cas', 'conf_a_expense', 'conf_a_pay', 'conf_a_recv', 'conf_a_reserve_and_surplus', 'conf_a_sale', 'conf_cas', 'conf_cas_interim1', 'conf_cas_interim2', 'conf_cog', 'conf_iva', 'conf_ncas', 'conf_o_income', 'conf_ova', 'conf_prepayments', 'conf_stk', 'conf_xfa', 'current_liabilities', 'exchange_fx_expense', 'exchange_fx_income', ], False)
def migrate(env, version): if not version: return # Update A4 Compassion to A4 l10n_ch env.cr.execute(""" UPDATE report_paperformat_parameter SET paperformat_id = 21 WHERE paperformat_id IN (19,9,8,7) """) env.cr.execute(""" UPDATE partner_communication_job SET config_id = 1 WHERE config_id IN (29) """) openupgrade.set_xml_ids_noupdate_value(env, "report_compassion", [ "report_bvr_fund", "bvr_fund", "report_bvr_fund_document", "report_bvr_gift_sponsorship", "report_2bvr_gift_sponsorship", "bvr_gift_sponsorship_2bvr", "2bvr_gift_sponsorship", "report_bvr_sponsorship_gift_document_2bvr", "bvr_gift_sponsorship", "report_bvr_sponsorship_gift_document", "report_sponsorship_2bvr_top_slip", "report_sponsorship_2bvr_bottom_slip", "report_bvr_sponsorship", "report_2bvr_sponsorship", "report_bvr_due", "bvr_sponsorship", "report_bvr_sponsorship_document", "report_gift_document", "bvr_sponsorship_2bvr", "2bvr_sponsorship", "report_bvr_sponsorship_document_2bvr", "report_gift_document_2bvr", "bvr_due", "report_bvr_due_document", "report_partner_communication_mailing_bvr", "partner_communication_mailing_bvr", "paperformat_childpack", "paperformat_mini_childpack", "paperformat_a4_childpack", "style", "paperformat_anniversary_card", "tax_receipt_report", "tax_receipt" ], False)
def migrate(env, version): cr = env.cr openupgrade.rename_columns(cr, _column_renames) openupgrade.rename_fields(env, _field_renames) fill_mail_message_add_sign_default(env) openupgrade.set_xml_ids_noupdate_value(env, 'mail', ['mail_channel_rule'], False)
def migrate(env, version): if openupgrade.table_exists(env.cr, "crm_lead_tag"): openupgrade.rename_models( env.cr, [ ("crm.lead.tag", "crm.tag"), ], ) openupgrade.rename_tables( env.cr, [ ("crm_lead_tag", "crm_tag"), ], ) openupgrade.set_xml_ids_noupdate_value( env, "sales_team", ["crm_rule_all_salesteam", "sale_team_comp_rule"], True ) openupgrade.rename_xmlids( env.cr, [ ("crm.crm_lead_tag_action", "sales_team.sales_team_crm_tag_action"), ("crm.crm_lead_tag_form", "sales_team.sales_team_crm_tag_view_form"), ("crm.crm_lead_tag_tree", "sales_team.sales_team_crm_tag_view_tree"), ("crm.access_crm_lead_tag", "sales_team.access_crm_tag"), ("crm.access_crm_lead_tag_manager", "sales_team.access_crm_tag_manager"), ("crm.access_crm_lead_tag_salesman", "sales_team.access_crm_tag_salesman"), ], )
def migrate(env, version): fill_project_project_inherits_values(env) openupgrade.copy_columns(env.cr, column_copies) compute_project_task_rating_last_value(env) openupgrade.set_xml_ids_noupdate_value( env, 'project', ['ir_cron_rating_project', 'rating_project_request_email_template'], True)
def migrate(env, version): openupgrade.rename_columns(env.cr, COLUMN_RENAMES) openupgrade.set_xml_ids_noupdate_value( env, 'website', [ 'aboutus', 'contactus', 'homepage', ], True)
def migrate(env, version): # Now the record is declared as noupdate openupgrade.set_xml_ids_noupdate_value( env, "stock_mts_mto_rule", ["route_mto_mts"], True, )
def migrate(env, version): if not version: return # Allow updating languages openupgrade.set_xml_ids_noupdate_value( env, "child_switzerland", ["lang_compassion_german", "lang_compassion_italian"], False)
def switch_noupdate_records(env): openupgrade.set_xml_ids_noupdate_value( env, "website_blog", [ "mt_blog_blog_published", ], True, )
def switch_noupdate_records(env): openupgrade.set_xml_ids_noupdate_value( env, "l10n_nl", [ "tag_nl_34", ], False, )
def switch_noupdate_records(env): openupgrade.set_xml_ids_noupdate_value( env, "payment_adyen", [ "adyen_form", ], True, )
def migrate(env, version): openupgrade.set_xml_ids_noupdate_value( env, "report_qweb_signer", [ "report_qweb_signer_java_param", ], True, )
def migrate(env, version): openupgrade.set_xml_ids_noupdate_value( env, "iap", [ "user_iap_account", ], True, )
def migrate(env, version): if not version: return # Force loading new reports openupgrade.set_xml_ids_noupdate_value(env, "report_compassion", [ "childpack_document", "childpack_small", "childpack_full", "childpack_mini" ], False)
def migrate(env, version): openupgrade.set_xml_ids_noupdate_value( env, "hr_timesheet", [ "group_timesheet_manager", ], False, )
def update_record_xmlids(cr): old_module = "shopinvader_notification_default" new_module = "shopinvader_customer_validate" records_xmlids_spec = [ (f"{old_module}.{xmlid}", f"{new_module}.{xmlid}") for xmlid in RECORD_XMLIDS ] openupgrade.rename_xmlids(cr, records_xmlids_spec) with api.Environment.manage(): env = api.Environment(cr, SUPERUSER_ID, {}) openupgrade.set_xml_ids_noupdate_value(env, new_module, RECORD_XMLIDS, True)
def migrate(env, version): openupgrade.set_xml_ids_noupdate_value( env, 'survey', ['email_template_survey'], True) openupgrade.logged_query( env.cr, """ ALTER TABLE survey_user_input DROP CONSTRAINT IF EXISTS survey_user_input_deadline_in_the_past """, )
def migrate(env, version): openupgrade.rename_xmlids( env.cr, [("board.access_board_board all", "board.access_board_board_all")]) openupgrade.set_xml_ids_noupdate_value( env, "board", ["menu_board_my_dash"], False, )
def migrate(env, version): openupgrade.rename_models( env.cr, [("email_template.preview", "mail.template.preview")] ) openupgrade.rename_tables( env.cr, [("email_template_preview", "mail_template_preview")] ) openupgrade.set_xml_ids_noupdate_value(env, "mail", ["mail_channel_rule"], True) openupgrade.rename_columns(env.cr, {"mail_tracking_value": [("field", None)]}) fill_mail_tracking_value_field(env)
def migrate(env, version): openupgrade.set_xml_ids_noupdate_value( env, "stock_picking_batch", [ "seq_picking_batch", "mt_batch_state", ], True, )
def migrate(env, version): openupgrade.set_xml_ids_noupdate_value( env, 'account_payment_order', [ 'bank_payment_line_seq', 'account_payment_line_seq', 'account_payment_order_seq', ], True, )
def migrate(env, version): openupgrade.set_xml_ids_noupdate_value( env, "note", [ "note_note_create_unlink_global", "note_note_rule_global", "note_stage_rule_global", ], True, )
def migrate(env, version): # We shouldn't load anything from noupdate_changes, as this may be changed # by users in v12 according their needs # openupgrade.load_data( # env.cr, "payment_transfer", "migrations/13.0.1.0/noupdate_changes.xml") openupgrade.set_xml_ids_noupdate_value( env, "payment_transfer", ["transfer_form"], True, )
def migrate(env, version): openupgrade.set_xml_ids_noupdate_value( env, "account_payment_order", [ "bank_payment_line_seq", "account_payment_line_seq", "account_payment_order_seq", ], True, )
def migrate(env, version): cr = env.cr openupgrade.rename_fields(env, _field_renames) openupgrade.rename_xmlids(cr, _xml_ids_renames) fill_website_company_id(cr) fill_website_name(cr) fill_website_redirect_type(cr) fill_website_redirect_urls(cr) disable_less_customizations(env) bootstrap_4_migration(env) openupgrade.set_xml_ids_noupdate_value( env, 'website', ['aboutus', 'contactus', 'homepage'], False)
def migrate(env, version): openupgrade.rename_xmlids(env.cr, xmlid_renames) openupgrade.set_xml_ids_noupdate_value( env, "l10n_generic_coa", [ "configurable_chart_template", "purchase_tax_template", "sale_tax_template", ], False, )
def migrate(env, version): fill_project_project_inherits_values(env) openupgrade.copy_columns(env.cr, column_copies) compute_project_task_rating_last_value(env) openupgrade.set_xml_ids_noupdate_value( env, 'project', ['ir_cron_rating_project', 'rating_project_request_email_template'], True) openupgrade.delete_records_safely_by_xml_id( env, ['project.duplicate_field_xmlid'], )