--- # asset_work_project # work_project to_uninstall: - account_invoice_post_in_tree - account_chart_speedup - account_invoice_data - account_invoice_post_in_tree - account_move_party_required - account_payment_es_csb_19 - account_payment_es_csb_32 - account_payment_es_csb_34 - account_payment_es_csb_34_01 - account_payment_es_csb_34_1_la_caixa - account_payment_es_csb_34_11 - account_payment_es_csb_58 - account_statement_of_account - aeat_303_es - aeat_349_es - analytic_account_move - asset_guarantee - asset_estate - audit_log - guarantee - party_identifier - product_configuration - project_unittest - stock_delivery_note_jreport #to_install: before: - UPDATE ir_model_data SET module = 'aeat_303' WHERE module = 'aeat_303_es'; - UPDATE ir_model_data SET module = 'aeat_349' WHERE module = 'aeat_349_es'; - UPDATE ir_translation SET module = 'aeat_303' WHERE module = 'aeat_303_es'; - UPDATE ir_translation SET module = 'aeat_349' WHERE module = 'aeat_349_es'; - DELETE from ir_ui_view where module = ''; - DELETE from ir_ui_view where data = '' and module = 'account_payment_type'; - UPDATE ir_ui_view SET type = NULL WHERE inherit IS NOT NULL AND type IS NOT NULL; - DELETE FROM ir_model_data WHERE model='stock.location' AND fs_id LIKE '%transit%' - comment: -> 4.0 query: ALTER TABLE res_user_login_attempt ALTER COLUMN login TYPE VARCHAR(512); - tables: stock_location query: INSERT INTO stock_location (name, code, type, create_uid, create_date, "right", "left") VALUES ('Migration Drop Shipment', 'DROPMIGRATION', 'drop', 0, '2016-10-04 00:00:00', 0, 0); - comment: # Rename table name - 3.6 migration tables: account_financial_statement query: ALTER TABLE account_financial_statement_report_line_account RENAME TO account_financial_statement_rep_lin_acco - tables: account_financial_statement query: ALTER TABLE account_financial_statement_report_line_account_id_seq RENAME TO account_financial_statement_rep_lin_acco_id_seq # - comment: # [SQL]: Change tax sign for credit note (must be run before update) # tables: account_tax_template # query: # UPDATE account_tax_template # SET # credit_note_base_sign = credit_note_base_sign * -1, # credit_note_tax_sign = credit_note_tax_sign * -1; # - tables: account_tax # query: # UPDATE account_tax # SET # credit_note_base_sign = credit_note_base_sign * -1, # credit_note_tax_sign = credit_note_tax_sign * -1; - comment: # [SQL]: Fix amount second currency with: tables: account_move_line query: UPDATE account_move_line SET amount_second_currency = (amount_second_currency * -1) WHERE amount_second_currency IS NOT NULL AND SIGN(amount_second_currency) != SIGN(debit - credit) - tables: shipment_work query: ALTER TABLE shipment_work RENAME COLUMN project TO work_project - fields: sale_sale.project query: ALTER TABLE sale_sale RENAME COLUMN project TO work_project after: - DELETE FROM ir_translation WHERE module = 'account_es'; - DELETE FROM ir_translation WHERE module = 'account_es_pyme'; - comment: -> 4.0 query: UPDATE account_move_reconciliation SET date=create_date::DATE WHERE date IS NULL; - comment: # Change login's length query: ALTER TABLE res_user_login_attempt ALTER COLUMN login TYPE character varying(512); - comment: # Mark all categories as accounting type tables: product_category query: UPDATE product_category SET accounting = True; - comment: # Set reconciliation date tables: account_move_reconciliation query: UPDATE account_move_reconciliation SET date=create_date WHERE date IS NULL; - tables: account_move_reconciliation query: ALTER TABLE account_move_reconciliation ALTER COLUMN date SET NOT NULL; - tables: contract query: UPDATE contract SET first_invoice_date=start_period_date WHERE first_invoice_date IS NULL AND state = 'cancelled'; - tables: asset query: ALTER TABLE asset ALTER COLUMN company SET NOT NULL; - tables: timesheet_line query: ALTER TABLE timesheet_line ALTER COLUMN duration SET NOT NULL; - tables: stock_shipment_in_return query: ALTER TABLE stock_shipment_in_return ALTER COLUMN supplier SET NOT NULL; - tables: contract query: ALTER TABLE contract ALTER COLUMN first_invoice_date SET NOT NULL; - tables: asset query: UPDATE asset SET company = 1 WHERE company IS NULL; - script: convert_domain_rules.py - tables: work_project script: migration_project_product.py - tables: project_work script: purchase_work.py - tables: shipment_work script: migration_shipment_work.py - tables: account_invoice_milestone script: milestone_migration.py purge: - comment: Drop category column fields: product_template.category query: ALTER TABLE product_template DROP COLUMN category;