-
-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migration scripts for v13 #1733
Comments
Hi @pedrobaeza and @mreficent. |
We appreciate your efforts ! Big Thanks |
Then @pedrobaeza the method is say here: Hey! We don't need to migrate https://github.com/OCA/website/tree/12.0/website_canonical_url because Odoo did it in v13 here odoo/odoo#35852 Is it? |
Yes, that's it, but as it's still a PR, we don't annotate yet in the main issue |
@pedrobaeza You already know this. I think we should add this in the description. selection key must be of type string like: [('0', 'Zero'), ('1', 'One')] and cannot be number like: [(0, 'Zero'), (1, 'One')] See discussion and source commit: odoo/odoo#28891 |
@sudhir-erpharbor thanks for the info. I'm afraid this can't be treated in a general way, and should be handled in each module that was using numbers and know need strings, as selection values may change as well. The strategy should be:
|
Great stuff @pedrobaeza What is the process for creating the migration script for v13? Are there some folks already working on them on a branch somewhere? I'm keen to help if I can! |
There's no written process for creating such scripts yet, but there are plenty of examples in previous versions scripts. For now there's no more work on this. |
I'd like to contribute to this project, but I'm a bit lost. |
Hi @ivantodorovich. Thanks for your interest in openUpgrade. First, you can take a look on that documentation :
Then, the basic process to migrate a module for 12.0 to 13.0 is :
Propose a PR ! That's all ! You can ping @pedrobaeza, @StefanRijnhart, or other contributors if you have any questions. kind regards. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi all, what is the current state of the openupgrade migration to v13 ? Does anyone here has a working branch for this already - where we can help ? kind regards. |
@wpichler just check the open PRs as well as recently merged PRs with target tag 13.0: https://github.com/OCA/OpenUpgrade/pulls?q=is%3Apr+milestone%3A13.0+ Currently that is only base and some basic dependencies, so if you want to help please pick a module that is next up in the hierarchy chain and start writing the migration scripts! |
@kos94ok-3D if you plan to work on other migration scripts, better to say in advance for coordinating and not duplicating efforts |
Hi, @pedrobaeza. |
We are going to work on all of them (my colleague @MiquelRForgeFlow is already in fact and have some draft scripts), so if you want to wait, just review ours. All depends on your deadlines. We want to finish all across April. |
Ok. I can wait. |
FYI I have changed the default branch in the repo to 13.0 now that we are starting to have some base. |
Hello, I just tried to migrate mass_mailing but i saw mail.mass_mailing.campaign merged into utm.campaign. I looked into openupgradelib and i find move_field_m2o function but in this case mail.mass_mailing.campaign will be removed before migration so I copied mail_mass_mailing_campaign in pre-migration.py: from openupgradelib import openupgrade
_table_renames = [
# removed tables
('mail_mass_mailing_campaign', None),
]
@openupgrade.migrate()
def migrate(env, version):
openupgrade.rename_tables(env.cr, _table_renames) then I changed move_field_m2o to work with table in post-migration and did like below: from openupgradelib import openupgrade
def move_table_m2o(
cr, table_old_model, field_old_model,
m2o_field_old_model, table_new_model, field_new_model):
cr.execute(
" SELECT %s"
" FROM %s"
" GROUP BY %s"
" HAVING count(*) = 1;" % (
m2o_field_old_model, table_old_model, m2o_field_old_model
))
ok_ids = [x[0] for x in cr.fetchall()]
query = (
" UPDATE %s as new_table"
" SET %s=("
" SELECT old_table.%s"
" FROM %s as old_table"
" WHERE old_table.%s=new_table.id"
" LIMIT 1) "
" WHERE id in %%s" % (
table_new_model, field_new_model, field_old_model,
table_old_model, m2o_field_old_model))
openupgrade.logged_query(cr, query, [tuple(ok_ids)])
def move_campaign_fields(cr):
table_old_model = openupgrade.get_legacy_name('mail.mass_mailing.campaign')
table_new_model = 'utm_campaign'
m2o_field_old_model = 'campaign_id'
move_table_m2o(cr, table_old_model, 'color', m2o_field_old_model, table_new_model, 'color')
@openupgrade.migrate()
def migrate(env, version):
move_campaign_fields(env.cr) Now i just want to know is this the correct way? or maybe some changes in openupgradelib's move_field_m2o in: I some models in another module this problem came to me. so it's a general question not just for this module |
Sorry, I see now you did a PR with the thing you commented. Thanks. |
@pedrobaeza What is the process for something like |
Yes, that's it, @gdgellatly |
This is something to be taken into account for the migration: |
@pedrobaeza but that's not a migration issue as I understand. I mean, the problem they are facing is for newly created databases in v13. But the ones coming from v12 are ok, they have that xmlid. |
Read again that there's a part about recreating on migration the XML-ID. |
@pedrobaeza where we can help for accounting migration ? |
There's already a PR for it and I'm now checking it in deeply, but no result of my review will be available until finished. Please wait a bit. |
I have been working on v12 to v13 migration of db using openupgrade. All the data is transferred but invoices are not displayed. |
Some fields from the old account.invoice are not yet transferred. You are not seeing any invoices because the 'type' on account.move is all set to 'entry' instead of 'out_invoice', 'out_refund', etc. On account.move.line the price_unit, price_subtotal, price_total are not set, as is exclude_from_invoice_tab (NULL) (for showing in Invoice Lines or in Journal Items). There's more to be done, like invoice date, salesperson. |
@BartvandenHout thanks for the response. |
@mr-module |
@BartvandenHout when can we expect this to be done? |
@mr-module For now I'm just a user like you. But I also am eager to get the v13-migration done. That's why I'm looking at the database, what is still needed and the OpenUpgrade-code to see if I can help the developers a bit. |
@BartvandenHout |
I have same issue with invoices after migration to odoo13. Can somebody suggest how to fix it? |
Still waiting for @BartvandenHout as suggested this will be done in next
release.
…On Fri, Aug 21, 2020 at 2:06 AM stepanetssergey ***@***.***> wrote:
I have same issue with invoices after migration to odoo13. Can somebody
suggest how to fix it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1733 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFJR2VK7JSIGGU75MGAC6F3SBWCNBANCNFSM4GU7OIBQ>
.
|
Thanks. But I need to fix it to Monday :( |
Ohh update if u get any solution
…On Fri, Aug 21, 2020, 2:38 AM stepanetssergey ***@***.***> wrote:
Thanks. But I need to fix it to Monday :(
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1733 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFJR2VIFJNVYN43FF7WYHRDSBWGDJANCNFSM4GU7OIBQ>
.
|
@pedrobaeza ! is there any update about the invoices migration.. |
@pedrobaeza Could you update the status for modules that were migrated? |
Is this issue resolved, can someone provide me with additional information on how to migrate from v12 to v13 without losing any customer invoices? |
We can consider it completed. |
(del)
means that the module has been removed in this version(add)
means that the module has been added in this version>
means that it has been identified that the module has been renamed to the name below<
means that it has been identified that the module has been rename from the name below->
means that the module has been merged in the module below<-
means that the module is the target where the module below has been mergedOCA has funded the development of the migration scripts that are installed in their Odoo instance. They are marked as
(OCA project)
for being recognized and expect them to be done in the near future if not yet done.models:
sale
toaccount
: odoo/odoo@ca25a69sale
toproduct
: odoo/odoo@a216473sale
toproduct
: odoo/odoo@ef99ea2>
account.payment.register: odoo/odoo@3c2e3b8>
crm.iap.lead.industry: odoo/odoo@6703840>
crm.iap.lead.role: odoo/odoo@6703840>
crm.iap.lead.seniority: odoo/odoo@6703840>
mail.thread.blacklist: odoo/odoo@dbd4aab>
mailing.trace(.report): odoo/odoo@2896aad>
mailing.list(.merge): odoo/odoo@772e1c0>
mailing.contact: odoo/odoo@772e1c0>
mailing.contact.subscription: odoo/odoo@772e1c0>
mailing.mailing: odoo/odoo@49d2899>
mailing.stage/tag: odoo/odoo@2011c24(later,
>
utm.stage/tag): odoo/odoo@a661b00>
utm.campaign: odoo/odoo@a661b00>
mrp.bom.byproduct: odoo/odoo@12da02d>
sms.composer: odoo/odoo@566244b>
stock.putaway.rule: odoo/odoo@bad6db2>
survey.invite: odoo/odoo@cb59cb0->
account.move: odoo/odoo@beaa30a->
account.move.line: odoo/odoo@beaa30a->
account.move.line odoo/odoo@beaa30a->
account.move: odoo/odoo@beaa30a->
account.move.line: odoo/odoo@beaa30a->
lunch.order: odoo/odoo@855c6da->
slide.slide: odoo/odoo@b180c66other:
ar_AR
toar_001
: [FIX] base: Arabic generic World locale is ar_001 odoo/odoo#32393fil_PH
tofil
: [FIX] base: use correct code for Filipino odoo/odoo#32868modules (additions):
document
): odoo/odoo@adab361crm_iap_lead_website
): odoo/odoo@6703840crm_reveal
): odoo/odoo@f597916hr_payroll
): odoo/odoo@981907fpayment_ogone
): odoo/odoo@f1ae167purchase_requisition
): odoo/odoo@826f927sale
): odoo/odoo@3cb46ecwebsite_sale
): odoo/odoo@55ed70fwebsite_sale_stock
): odoo/odoo@76c25f1*- modules (deletions):
account_cancel (merged into
account
): odoo/odoo@ab483a3account_voucher (merged into
account
): odoo/odoo@beaa30acrm_phone_validation (merged into
crm
): odoo/odoo@79040bacrm_project: odoo/odoo@5cfbead [substituted for
crm_helpdesk
in enterprise]crm_reveal (renamed to
crm_iap_lead_website
): odoo/odoo@f597916decimal_precision (merged into
base
): odoo/odoo@1e69bacdelivery_hs_code (merged into
delivery
): odoo/odoo@1c28ba8document (renamed to
attachment_indexation
): odoo/odoo@adab361hr_payroll (and l10n_be_hr_payroll*): odoo/odoo@3b38197 [moved to enterprise]
hw_scale (merged into
hw_drivers
): odoo/odoo@c4aade6hw_scanner (merged into
hw_drivers
): odoo/odoo@4e649a8hw_screen (merged into
hw_drivers
): odoo/odoo@f03026al10n_fr_certification (merged into
account
): odoo/odoo@ab483a3l10n_fr_sale_closing (merged into
l10n_fr
): odoo/odoo@7aa9062l10n_in_schedule6: odoo/odoo@f0455c7
mrp_bom_cost (merged into
mrp_account
): odoo/odoo@a765a38mrp_byproduct (merged into
mrp
): odoo/odoo@5d1e73cpayment_ogone (renamed to
payment_ingenico
): odoo/odoo@f1ae167stock_zebra (merged into
stock
): odoo/odoo@78ab56esurvey_crm (merged into
survey
): odoo/odoo@c95b149web_settings_dashboard (merged into
base_setup
): odoo/odoo@78565b1website_crm_phone_validation (merged into
website_crm
): odoo/odoo@20fb024website_form_editor (merged into
website_editor
): odoo/odoo@82ea590 [was moved from enterprise]website_hr: odoo/odoo@7b9bf47
website_sale_link_tracker (merged into
website_sale
): odoo/odoo@f7fab43website_survey (merged into
survey
moreless): odoo/odoo@e9be0bbOther interesting things:
sudo(flag)
andwith_user(user)
(splits ofsudo(user)
): odoo/odoo@b7fd679The text was updated successfully, but these errors were encountered: