2017-01-19 01:59:38 +01:00
---
# 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_statement_of_account
- aeat_303_es
- aeat_349_es
- analytic_account_move
- asset_guarantee
- asset_estate
- audit_log
2017-08-08 13:41:04 +02:00
- calendar
- calendar_classification
- calendar_scheduling
- calendar_todo
2017-01-19 01:59:38 +01:00
- guarantee
- party_identifier
- product_configuration
- project_unittest
2018-01-31 14:00:40 +01:00
- sale_invoices_paid
- sale_shipments_done
2017-01-19 01:59:38 +01:00
- stock_delivery_note_jreport
2017-08-08 13:41:04 +02:00
- webdav
2017-01-19 01:59:38 +01:00
2017-12-06 10:14:44 +01:00
to_install :
2018-03-15 23:21:18 +01:00
- account_invoice_credit_note_related_invoice
2018-03-14 22:18:58 +01:00
- account_invoice_price_list
2018-02-06 17:45:40 +01:00
- account_statement_of_account
2018-03-14 22:18:58 +01:00
- html_report
2018-01-30 16:12:21 +01:00
2017-01-19 01:59:38 +01:00
before :
2017-03-27 15:02:15 +02:00
2017-04-19 09:54:53 +02:00
# - tables: ir_model_data
# version: 3.2
# query: ALTER TABLE ir_model_data ADD COLUMN fs_values TEXT;
2017-01-20 01:01:29 +01:00
- 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%'
2017-07-14 15:18:55 +02:00
- DELETE FROM ir_ui_view where module = '%sale%milestone%'
2017-01-20 23:48:59 +01:00
- comment : -> 4.0
query : ALTER TABLE res_user_login_attempt ALTER COLUMN login TYPE VARCHAR(512);
2017-01-20 23:23:49 +01:00
- 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);
2017-01-20 01:01:29 +01:00
- comment : # Rename table name - 3.6 migration
tables : account_financial_statement
2017-01-19 01:59:38 +01:00
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
2017-01-21 00:57:09 +01:00
# - comment: # [SQL]: Change tax sign for credit note (must be run before update)
# tables: account_tax_template
2017-01-23 22:50:28 +01:00
# version: 4.0
2017-01-21 00:57:09 +01:00
# query:
# UPDATE account_tax_template
# SET
# credit_note_base_sign = credit_note_base_sign * -1,
# credit_note_tax_sign = credit_note_tax_sign * -1;
2017-01-23 22:50:28 +01:00
- tables : account_tax
version : 4.0
query :
UPDATE account_tax
SET
credit_note_base_sign = credit_note_base_sign * -1,
credit_note_tax_sign = credit_note_tax_sign * -1;
2017-01-19 01:59:38 +01:00
2017-01-21 01:42:34 +01:00
- comment: # [SQL] : Fix amount second currency with 3.4 -> 3.6
2017-01-23 22:50:28 +01:00
version : 3.6
2017-01-20 01:01:29 +01:00
tables : account_move_line
2017-01-19 01:59:38 +01:00
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
2018-01-03 15:27:41 +01:00
# - comment: # change PYSON context menu
# version: 4.0
# tables: babi_report
# query: UPDATE ir_action_act_window SET domain = '[["parent", "=", null]]', context = '{"babi_tree_view": true}' WHERE context like '%babi%';
2017-10-02 14:22:55 +02:00
2018-02-05 11:52:40 +01:00
- comment : # set domain to null in account bank statement
version : 4.0
query : UPDATE ir_action_act_window SET domain = null where id in (SELECT db_id FROM ir_model_data where fs_id = 'act_account_bank_statement');
2018-01-30 16:12:21 +01:00
- comment : # set domain to null in account bank statement line
version : 4.0
query : UPDATE ir_action_act_window SET domain = null where id in (SELECT db_id FROM ir_model_data where fs_id = 'act_account_bank_statement_line');
2018-03-12 22:52:00 +01:00
- comment : # set update_unit_price to false
version : 4.0
query : update account_tax_template set update_unit_price = false where id = (select db_id from ir_model_data where fs_id = 'iva_reagp_compras_12_1');
2018-01-30 16:12:21 +01:00
2017-01-19 01:59:38 +01:00
after :
- DELETE FROM ir_translation WHERE module = 'account_es';
- DELETE FROM ir_translation WHERE module = 'account_es_pyme';
2017-01-21 00:58:39 +01:00
- comment : -> 4.0
2017-01-21 01:30:25 +01:00
version : 4.0
2017-01-21 00:58:39 +01:00
query : UPDATE account_move_reconciliation SET date=create_date::DATE WHERE date IS NULL;
2017-01-20 01:01:29 +01:00
- 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
2017-01-21 01:30:25 +01:00
version : 4.0
2017-01-20 01:01:29 +01:00
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
2017-04-19 09:54:53 +02:00
query : UPDATE contract SET first_invoice_date=start_period_date WHERE first_invoice_date IS NULL;
2017-01-20 01:01:29 +01:00
- 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;
2017-01-21 00:57:41 +01:00
- comment : Drop category column
fields : product_template.category
query : ALTER TABLE product_template DROP COLUMN category;
2017-03-13 17:45:32 +01:00
- tables : country_zip
version : 4.0
query : update country_zip set country = (select id from country_country where code = 'ES') where country_zip is null;
2017-03-20 13:11:29 +01:00
version : 4.0
- tables : electronic_mail_template
query : update electronic_mail_template set subject = regexp_replace(subject, 'record.code', 'record.number', 'g'), plain = regexp_replace(plain, 'record.code', 'record.number', 'g'), html = regexp_replace(html, 'record.code', 'record.number', 'g') where model in (select id from ir_model where model in ('account.invoice', 'sale.sale', 'purchase.purchase', 'stock.shipment.in', 'stock.shipment.out', 'stock.shipment.in'));
- comment : # change code to number electronic mail template
version : 4.0
query : update ir_translation set value = regexp_replace(value, 'record.code', 'record.number', 'g') where res_id in (select id from electronic_mail_template where model in (select id from ir_model where model in ('account.invoice', 'sale.sale', 'purchase.purchase', 'stock.shipment.in', 'stock.shipment.out', 'stock.shipment.in'))) and name like 'electronic.mail.template,%';
2017-04-19 09:54:53 +02:00
2017-09-22 11:44:07 +02:00
# - script: ./upgrades/after/convert_domain_rules.py
# - tables: work_project
# script: ./upgrades/after/migration_project_product.py
# - tables: project_work
# script: ./upgrades/after/purchase_work.py
# - tables: shipment_work
# script: ./upgrades/after/migration_shipment_work.py
# - tables: account_invoice_milestone
# script: ./upgrades/after/milestone_migration.py