diff --git a/docsource/modules130-140.rst b/docsource/modules130-140.rst index c99decb38a5a..924173823e79 100644 --- a/docsource/modules130-140.rst +++ b/docsource/modules130-140.rst @@ -20,7 +20,7 @@ Module coverage 13.0 -> 14.0 +--------------------------------------------+-------------------------------------------------+ |account_debit_note | | +--------------------------------------------+-------------------------------------------------+ -| |new| account_edi | | +| |new| account_edi | Nothing to do | +--------------------------------------------+-------------------------------------------------+ | |new| account_edi_extended | | +--------------------------------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/account/14.0.1.1/pre-migration.py b/openupgrade_scripts/scripts/account/14.0.1.1/pre-migration.py index 7bc6a4befa5e..081b12b46ec4 100644 --- a/openupgrade_scripts/scripts/account/14.0.1.1/pre-migration.py +++ b/openupgrade_scripts/scripts/account/14.0.1.1/pre-migration.py @@ -330,6 +330,27 @@ def add_move_id_field_account_payment(env): ) +def add_edi_state_field_account_move(env): + """ + Module account_edi: Created edi_state column and set the default value is false + """ + if not openupgrade.column_exists(env.cr, "account_move", "edi_state"): + openupgrade.logged_query( + env.cr, + """ + ALTER TABLE account_move + ADD COLUMN edi_state varchar + """, + ) + openupgrade.logged_query( + env.cr, + """ + UPDATE account_move + SET edi_state = false + """, + ) + + def fill_empty_partner_type_account_payment(env): openupgrade.logged_query( env.cr, @@ -383,6 +404,7 @@ def migrate(env, version): remove_constrains_reconcile_models(env) add_move_id_field_account_payment(env) add_move_id_field_account_bank_statement_line(env) + add_edi_state_field_account_move(env) fill_empty_partner_type_account_payment(env) fill_account_move_line_currency_id(env) fill_account_payment_partner_id(env) diff --git a/openupgrade_scripts/scripts/account_edi/14.0.1.0/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/account_edi/14.0.1.0/upgrade_analysis_work.txt new file mode 100644 index 000000000000..a4eb6084bdc8 --- /dev/null +++ b/openupgrade_scripts/scripts/account_edi/14.0.1.0/upgrade_analysis_work.txt @@ -0,0 +1,36 @@ +---Models in module 'account_edi'--- +new model account.edi.document +new model account.edi.format +# NOTHING TO DO: new models + +---Fields in module 'account_edi'--- +account_edi / account.edi.document / attachment_id (many2one) : NEW relation: ir.attachment +account_edi / account.edi.document / edi_format_id (many2one) : NEW relation: account.edi.format, required +account_edi / account.edi.document / error (html) : NEW +account_edi / account.edi.document / move_id (many2one) : NEW relation: account.move, required +account_edi / account.edi.document / state (selection) : NEW selection_keys: ['cancelled', 'sent', 'to_cancel', 'to_send'] +account_edi / account.edi.format / code (char) : NEW required +account_edi / account.edi.format / name (char) : NEW +account_edi / account.journal / edi_format_ids (many2many) : NEW relation: account.edi.format, isfunction: function, stored +# NOTHING TO DO + +account_edi / account.move / edi_document_ids (one2many) : NEW relation: account.edi.document +account_edi / account.move / edi_state (selection) : NEW selection_keys: ['cancelled', 'sent', 'to_cancel', 'to_send'], isfunction: function, stored +# NOTHING TO DO: created edi_state column and set the default value is false (in pre-migration on account module) + +---XML records in module 'account_edi'--- +NEW ir.actions.act_window: account_edi.action_open_edi_documents +NEW ir.actions.act_window: account_edi.action_open_payment_edi_documents +NEW ir.cron: account_edi.ir_cron_edi_network +NEW ir.model.access: account_edi.access_account_edi_document_group_invoice +NEW ir.model.access: account_edi.access_account_edi_document_readonly +NEW ir.model.access: account_edi.access_account_edi_format_group_invoice +NEW ir.model.access: account_edi.access_account_edi_format_readonly +NEW ir.model.constraint: account_edi.constraint_account_edi_document_unique_edi_document_by_move_by_format +NEW ir.model.constraint: account_edi.constraint_account_edi_format_unique_code +NEW ir.ui.view: account_edi.account_invoice_send_inherit_account_wizard_form +NEW ir.ui.view: account_edi.view_account_journal_form_inherited +NEW ir.ui.view: account_edi.view_move_form_inherit +NEW ir.ui.view: account_edi.view_payment_form_inherit +NEW ir.ui.view: account_edi.view_tree_account_edi_document +# NOTHING TO DO