Last active
September 19, 2023 09:03
-
-
Save tong-odoo/c1cfffb5ec6215296892e8b561a14872 to your computer and use it in GitHub Desktop.
Project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| env.cr.execute(""" | |
| UPDATE ir_ui_view SET arch_db = REPLACE(arch_db, 'x_studio_payment_date', 'x_payment_date') WHERE arch_db LIKE '%x_studio_payment_date%'; | |
| UPDATE ir_ui_view SET arch_db = REPLACE(arch_db, 'x_studio_payment_entry', 'x_payment_entry') WHERE arch_db LIKE '%x_studio_payment_entry%'; | |
| UPDATE ir_act_server SET code = REPLACE(code, 'x_studio_payment_date', 'x_payment_date') WHERE code LIKE '%x_studio_payment_date%' and id = 615; | |
| DELETE FROM ir_model_fields WHERE name = 'x_studio_payment_date'; | |
| DELETE FROM ir_model_fields WHERE name = 'x_studio_payment_entry'; | |
| DELETE FROM base_automation WHERE id = 9; | |
| DELETE FROM ir_actions WHERE id = 608; | |
| """) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| old_categ = env["product.category"].search([("name", "=", "Side Diamond")]) | |
| new_categ = env.ref("flawless_mrp.product_category_side_diamonds") | |
| new_categ["property_valuation"] = "real_time" | |
| new_categ["property_stock_account_production_cost_id"] = env.ref("account.1_l10n_id_29000000") | |
| products = env["product.template"].search([("categ_id", "=", old_categ.id)]) | |
| products["categ_id"] = new_categ | |
| old_categ.unlink() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| env.cr.execute(""" | |
| UPDATE mail_template | |
| SET subject = replace(subject, 'x_studio_many2one_field_c1H8O', 'site_id'), | |
| body_html = replace(body_html, 'x_studio_many2one_field_c1H8O', 'site_id') | |
| WHERE subject like '%x_studio_many2one_field_c1H8O%' | |
| OR body_html like '%x_studio_many2one_field_c1H8O%'; | |
| UPDATE mail_template | |
| SET subject = replace(subject, 'x_studio_om_partner_pic', 'om_partner_pic'), | |
| body_html = replace(body_html, 'x_studio_om_partner_pic', 'om_partner_pic'), | |
| email_to = replace(email_to, 'x_studio_om_partner_pic', 'om_partner_pic'), | |
| partner_to = replace(partner_to, 'x_studio_om_partner_pic', 'om_partner_pic') | |
| WHERE subject like '%x_studio_om_partner_pic%' | |
| OR body_html like '%x_studio_om_partner_pic%' | |
| OR email_to like '%x_studio_om_partner_pic%' | |
| OR partner_to like '%x_studio_om_partner_pic%'; | |
| """) | |
| env.cr.execute(""" | |
| UPDATE mail_template | |
| SET subject = replace(subject, 'x_studio_staff_id', 'staff_id'), | |
| body_html = replace(body_html, 'x_studio_staff_id', 'staff_id'), | |
| email_to = replace(email_to, 'x_studio_staff_id', 'staff_id'), | |
| partner_to = replace(partner_to, 'x_studio_staff_id', 'staff_id') | |
| WHERE subject like '%x_studio_staff_id%' | |
| OR body_html like '%x_studio_staff_id%' | |
| OR email_to like '%x_studio_staff_id%' | |
| OR partner_to like '%x_studio_staff_id%'; | |
| """) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment