Skip to content

Commit

Permalink
[MIG]purchase: add mig script 14->15
Browse files Browse the repository at this point in the history
  • Loading branch information
hieu1211 committed Jun 20, 2022
1 parent 2aa22ab commit 8ffb6b3
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docsource/modules140-150.rst
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ Module coverage 14.0 -> 15.0
+-------------------------------------------------+----------------------+-------------------------------------------------+
| project_timesheet_holidays | | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| purchase | | |
| purchase |Done | |
+-------------------------------------------------+----------------------+-------------------------------------------------+
| purchase_mrp | |No DB layout changes. |
+-------------------------------------------------+----------------------+-------------------------------------------------+
Expand Down
16 changes: 16 additions & 0 deletions openupgrade_scripts/scripts/purchase/15.0.1.2/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.load_data(env.cr, "purchase", "15.0.1.2/noupdate_changes.xml")
openupgrade.delete_record_translations(
env.cr,
"purchase",
[
"email_template_edi_purchase",
"email_template_edi_purchase_done",
"email_template_edi_purchase_reminder",
],
)
openupgrade.convert_field_to_html(env.cr, "purchase_order", "notes", "notes")
14 changes: 14 additions & 0 deletions openupgrade_scripts/scripts/purchase/15.0.1.2/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from openupgradelib import openupgrade


@openupgrade.migrate()
def migrate(env, version):
openupgrade.set_xml_ids_noupdate_value(
env,
"purchase",
[
"track_po_line_qty_received_template",
"track_po_line_template",
],
True,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---Models in module 'purchase'---
---Fields in module 'purchase'---
purchase / product.packaging / purchase (boolean) : NEW hasdefault
# NOTHING TO DO: new feature

purchase / purchase.order / notes (text) : type is now 'html' ('text')
# DONE: pre-migration: convert plaintext to html

purchase / purchase.order.line / product_packaging_id (many2one): NEW relation: product.packaging
purchase / purchase.order.line / product_packaging_qty (float) : NEW
# NOTHING TO DO: new feature

---XML records in module 'purchase'---
NEW ir.actions.act_window: purchase.action_accrued_expense_entry
NEW ir.ui.menu: purchase.purchase_report_main
NEW ir.ui.view: purchase.account_analytic_account_view_form_purchase
NEW ir.ui.view: purchase.portal_my_purchase_rfqs
NEW ir.ui.view: purchase.product_packaging_form_view_purchase
NEW ir.ui.view: purchase.product_packaging_tree_view_purchase
NEW ir.ui.view: purchase.purchase_order_portal_content
NEW ir.ui.view: purchase.purchase_order_portal_content_totals_table
NEW ir.ui.view: purchase.purchase_report_view_tree
# NOTHING TO DO

ir.ui.view: purchase.track_po_line_qty_received_template (noupdate) (noupdate switched)
ir.ui.view: purchase.track_po_line_template (noupdate) (noupdate switched)
# DONE: pre-migration: change noupdate to "1"

DEL ir.ui.view: purchase.assets_backend
DEL ir.ui.view: purchase.assets_frontend
# NOTHING TO DO

0 comments on commit 8ffb6b3

Please sign in to comment.