[18.0][MIG] server_action_mass_edit: Migration to 18.0#951
[18.0][MIG] server_action_mass_edit: Migration to 18.0#951OCA-git-bot merged 26 commits intoOCA:18.0from
Conversation
29381ab to
0f93b99
Compare
|
/ocabot migration server_action_mass_edit |
|
@trisdoan Hi! I tested the module but it didn't worked. This are the last lines of the error: |
0f93b99 to
7399b98
Compare
Hi @florenciafrigieri2, thank you for the review I just added a fix, could you please try again? |
TDu
left a comment
There was a problem hiding this comment.
I don't see the error mentioned by @florenciafrigieri2 anymore, but I am not familiar with this module !
Code review looks good.
henrybackman
left a comment
There was a problem hiding this comment.
Couple of minor comments
|
|
||
| @common.tagged("-at_install", "post_install") | ||
| class TestMassEditing(common.TransactionCase): | ||
| def setUp(self): |
There was a problem hiding this comment.
Would setUpClass work for the common test setup to avoid running the setup separately for each test case?
| def test_wiz_fields_view_get(self): | ||
| """Test whether fields_view_get method returns arch. |
There was a problem hiding this comment.
| def test_wiz_fields_view_get(self): | |
| """Test whether fields_view_get method returns arch. | |
| def test_wiz_get_view(self): | |
| """Test whether get_view method returns arch. |
| return vals_list | ||
|
|
||
| def read(self, fields=None, load="_classic_read"): | ||
| """Without this call, dynamic fields build by fields_view_get() |
There was a problem hiding this comment.
| """Without this call, dynamic fields build by fields_view_get() | |
| """Without this call, dynamic fields build by get_view() |
florenciafrigieri2
left a comment
There was a problem hiding this comment.
Functional test! Now is working ok!
|
This PR has the |
legalsylvain
left a comment
There was a problem hiding this comment.
See @stefsava comment.
|
Hello @stefsava, I checked and it looks to me that the issue is not because of the module |
|
Hello @trisdoan your suggestion doesn't solve my use case. If I change create='true' I can see "Add a row", but the choice doesn't lead to anything useful. Instead I found a workaround that brings the behavior back to that of 17.0 that I think can help you understand the problem detected. I discovered that 17.0 only has the view "product.template.attribute.line.form" while My workaround was simply to deactive the list view, although I fear it may introduce regressions elsewhere. |
87e31a4 to
6b8dca7
Compare
|
|
6b8dca7 to
f88d10f
Compare
|
Hi, I updated the code to include a pre-hook which handles the renaming (benefit those who use the addon in 14.0 and now migrate to 18.0) |
|
Thanks for the mig. |
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-ux-17.0/server-ux-17.0-server_action_mass_edit Translate-URL: https://translation.odoo-community.org/projects/server-ux-17-0/server-ux-17-0-server_action_mass_edit/
Currently translated at 100.0% (44 of 44 strings) Translation: server-ux-17.0/server-ux-17.0-server_action_mass_edit Translate-URL: https://translation.odoo-community.org/projects/server-ux-17-0/server-ux-17-0-server_action_mass_edit/es_MX/
Currently translated at 100.0% (44 of 44 strings) Translation: server-ux-17.0/server-ux-17.0-server_action_mass_edit Translate-URL: https://translation.odoo-community.org/projects/server-ux-17-0/server-ux-17-0-server_action_mass_edit/it/
add pre-init-hook
b9d666f to
c22320c
Compare
|
Hello @pedrobaeza, @grindtildeath , @legalsylvain , @etobella , @rousseldenis , I extracted the proposal of Akim into a new module: #985 |
I tried it locally, it doesn't work. 2025-01-13 22:11:13,708 18900 ERROR odoo_v18 odoo.sql_db: bad query: b'INSERT INTO "product_supplierinfo" ("company_id", "create_date", "create_uid", "currency_id", "date_end", "date_start", "delay", "discount", "min_qty", "price", "product_code", "product_id", "product_name", "product_tmpl_id", "sequence", "write_date", "write_uid") VALUES (2, '2025-01-13 22:11:13.699676', 2, 31, NULL, NULL, 1, '0.00', '0.00', '0.00', NULL, NULL, NULL, 281, 1, '2025-01-13 22:11:13.699676', 2) RETURNING "id"' 2025-01-13 22:11:13,712 18900 WARNING odoo_v18 odoo.http: The operation cannot be completed:
Model: Supplier Pricelist (product.supplierinfo) |
Hello @tate11, it looks to me the issue is not due to the module I got same error with version 17.0 Could you please provide steps to reproduce? |
|
@legalsylvain A little UP on this topic to go forward. |
Unfortunately, we don't find any solution for the onchange bug. So at this step, we are stuck. I don't know how to move forward. Regards. |
|
It's not a bug. Just have the base module and add an extra module for executing the onchanges. |
StefanRijnhart
left a comment
There was a problem hiding this comment.
Thank you @trisdoan! Tested successfully.
@tate11 I think the issue is that the supplierinfo list view sets partner_id to readonly (https://github.com/odoo/odoo/blob/18.0/addons/product/views/product_supplierinfo_views.xml#L93). If I reset this attribute in my local database the mass editing of vendors on products works as expected. I don't think we can fix it easily here.
About the onchange situation, @trisdoan has already done the work to split it up in a separate module (in #985) so I think we can go ahead on this one and continue the discussion there.
|
Yes, we can continue thus: /ocabot merge nobump |
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
Congratulations, your PR was merged at 27c4d32. Thanks a lot for contributing to OCA. ❤️ |
|
Why in v18, we have external dependency to openupgradelib package? |
| from openupgradelib import openupgrade | ||
|
|
||
|
|
||
| def pre_init_hook(env): |
There was a problem hiding this comment.
Indeed. @trisdoan : could you elaborate, why you re-introduced this pre-init hook. It looks quite obsolete, and force to install openupgradelib.
thanks for your answer !













Note