-
-
Notifications
You must be signed in to change notification settings - Fork 699
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
[16.0][OU-ADD] sale: migration #4004
Conversation
/ocabot migration sale Could you take a look on the red CI ? Depends on :
|
b1c8341
to
3570e55
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this job. Some remarks. I may be wrong on some of them.
openupgrade_scripts/scripts/sale/16.0.1.2/upgrade_analysis_work.txt
Outdated
Show resolved
Hide resolved
openupgrade_scripts/scripts/sale/16.0.1.2/upgrade_analysis_work.txt
Outdated
Show resolved
Hide resolved
openupgrade_scripts/scripts/sale/16.0.1.2/upgrade_analysis_work.txt
Outdated
Show resolved
Hide resolved
openupgrade_scripts/scripts/sale/16.0.1.2/upgrade_analysis_work.txt
Outdated
Show resolved
Hide resolved
openupgrade_scripts/scripts/sale/16.0.1.2/upgrade_analysis_work.txt
Outdated
Show resolved
Hide resolved
openupgrade_scripts/scripts/sale/16.0.1.2/upgrade_analysis_work.txt
Outdated
Show resolved
Hide resolved
@remytms Thanks for your help. I will check it again |
3570e55
to
9614320
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here are some changes needed to be able to run the migration. i did not look into all changes.
37e9a76
to
64c15de
Compare
…_file [IMP [16.0] *: update analysis files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this great work! here are some needed changes.
openupgrade_scripts/scripts/sale/16.0.1.2/upgrade_analysis_work.txt
Outdated
Show resolved
Hide resolved
sale / sale.order.line / analytic_distribution_stored_char (char): NEW isfunction: function, stored | ||
# NOTHINGH TO DO: handle by ORM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a new computed field (analytic_distribution
) coming from the analytic.mixin
model. its compute function is _compute_analytic_distribution()
. a fast precomputation could be useful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@huguesdk analytic_distribution_stored_char
fields is not found in source code. Can you show me where it is located?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This the reason why we need the new analysis file because sometime it cause us some confusion
BTW, for the field analytic_distribution_stored_char
which is in my lates analysis file it is analytic_distribution
, i have created a dynamic method at https://github.com/OCA/OpenUpgrade/pull/4070/files#diff-90f733d1f5eba9ea514de973136064df20f321c35c019951653200d2c0e582d3R501-R515.
Please make a test with this situation then let me know it is working ok then i will decide to have it in the openupgrade_160
openupgrade_scripts/scripts/sale/16.0.1.2/upgrade_analysis_work.txt
Outdated
Show resolved
Hide resolved
openupgrade_scripts/scripts/sale/16.0.1.2/upgrade_analysis_work.txt
Outdated
Show resolved
Hide resolved
@huguesdk Thanks bro. I have learned more things from you lately 👍 . I will check it again |
64c15de
to
81fd94a
Compare
Merge upstream 16 230710 01
* [MISC] apriori: add section for Viindoo * [MISC] apriori: add project section for Viindoo --------- Co-authored-by: Tran Truong Son <truongson290893@gmail.com>
* [OU-ADD] website_profile: Nothing to do * Update docsource/modules150-160.rst --------- Co-authored-by: Roy Le <43790414+royleviindoo@users.noreply.github.com>
* [OU-ADD] account_edi_ubl: Nothing to do * Update modules150-160.rst --------- Co-authored-by: Roy Le <43790414+royleviindoo@users.noreply.github.com>
* [OU-ADD] account_sale_timesheet: Nothing to do * Update modules150-160.rst --------- Co-authored-by: Roy Le <43790414+royleviindoo@users.noreply.github.com>
* [OU-ADD] stock: migration * imp --------- Co-authored-by: Roy Le <roy.le@viindoo.com>
"viin_website_image_optimization_disable": "viin_web_editor",
51135ab
to
55d01dd
Compare
55d01dd
to
3a20d38
Compare
Hi @hoangtiendung070797 looks like your PR requires a rebase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you finishing this @hoangtiendung070797 ?
ir.actions.server: sale.model_sale_order_action_share (noupdate switched) | ||
# DONE: pre-migration: noupdate switched to 0 | ||
|
||
NEW ir.config_parameter: sale.default_invoice_email_template (noupdate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hoangtiendung070797 thanks for your work on this PR !
Actually this one is not new, it was already existing in v15.0 here : https://github.com/odoo/odoo/blob/7d90bce4c90cb77f2268332a5f1225cd884ac674/addons/sale/models/res_config_settings.py#L59-L65 (except it was not loaded from data but directly in Python model).
Obviously when migrating I get the following errors :
2023-10-12 12:15:55,539 65829 INFO lf_20231011_v16mig odoo.modules.loading: loading sale/data/sale_data.xml
2023-10-12 12:15:55,556 65829 ERROR lf_20231011_v16mig odoo.sql_db: bad query: INSERT INTO "ir_config_parameter" ("create_date", "create_uid", "key", "value", "write_date", "write_uid") VALUES ('2023-10-12 12:15:52.952317', 1, 'sale.default_invoice_email_template', '11', '2023-10-12 12:15:52.952317', 1) RETURNING "id"
ERROR: duplicate key value violates unique constraint "ir_config_parameter_key_uniq"
DETAIL: Key (key)=(sale.default_invoice_email_template) already exists.
You should probably add a XML id on that parameter in pre_migration using openupgrade.add_xmlid() function (https://github.com/OCA/openupgradelib/blob/d0aee908031876a95dc36c7a9a2c847186155aa2/openupgradelib/openupgrade.py#L1288)
Hi @hoangtiendung070797 , do you plan to rebase and finish this PR? We'll need it for our migration script. Thanks. |
Hi , im in charge now, i will create a new PR |
Migration module