-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[MIG] web_m2x_options: Migration to 17.0 #2847
Conversation
Base functionality should work. Widgets still need to be tested and fine-tuned. For example widget res_partner_many2one gives no error and works with the system parameters but the view options do not work yet. Update: res_partner_many2one should work as well now. |
af5d385
to
23bef24
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.
Test... limit, create, create and edit working fine.
The commit history is quite long and could be shortened. Here are some examples:
https://github.com/OCA/maintainer-tools/wiki/Merge-commits-in-pull-requests#mergesquash-the-commits-generated-by-bots-or-weblate
web_m2x_options/readme/USAGE.md
Outdated
|
||
``` xml | ||
... | ||
<field name="partner_id" options="{'limit': 10, 'create': false, 'create_edit': false, 'search_more': true, 'field_color':'state', 'colors':{'active':'green'}}"/> |
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.
Could you update the sample because 'state' is not valid anymore.
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.
I have updated it with a working example.
I started this concurring migration here: #2848
Please feel free to take from my PR what you consider useful. |
dbb0775
to
add4730
Compare
I have made some squashes. Should commits like this be squashed as well? |
Thanks, I will try to go through it this week. |
yes, everything from author oca-*, weblate and when there are multiple translation commits of the same person and language. git config --global --add rebase.instructionFormat "(%an <%ae>) %s" |
dc52f64
to
7627e92
Compare
@pedrobaeza Could you assign this PR to the migration issue? And I think there is a "forgotten" to be closed --> #2661 (comment) THX! |
/ocabot migration web_m2x_options |
event.preventDefault(); | ||
event.stopPropagation(); | ||
const action = await self.orm.call( | ||
self.props.relation, |
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.
I think it should be replaced by record.resModel
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.
Correct, the function was broken. It should be fixed now.
self.actionService.doAction(action); | ||
} else { | ||
const view_id = await self.orm.call( | ||
self.props.relation, |
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.
I think it should be replaced by record.resModel
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.
Correct, the function was broken. It should be fixed now.
); | ||
var can_write = self.props.canWrite; | ||
self.dialog.add(FormViewDialog, { | ||
resModel: self.props.relation, |
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.
I think it should be replaced by resModel: record.resModel
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.
Correct, the function was broken. It should be fixed now.
); | ||
|
||
const write_access = await self.orm.call( | ||
self.props.relation, |
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.
I think it should be replaced by record.resModel
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.
Correct, the function was broken. It should be fixed now.
var self = this; | ||
if (self.props.open) { | ||
var context = self.context; | ||
var id = record.data.id; |
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.
If think is should be replaced by var id = record.resId;
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.
Correct, the function was broken. It should be fixed now.
|
||
> Whether to display "Create and Edit..." entry in dropdown panel | ||
|
||
`m2o_dialog` *boolean* (Default: depends if user have create rights) |
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.
I couldn't make this option work. Are we sure it is working?
|
||
> Used to force disable/enable search more button. | ||
|
||
`field_color` *string* |
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.
Isn't it color_field instead of field_color?
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.
field_color should work using a xml definition like this:
<field name="partner_id" options="{'limit': 10, 'create': false, 'create_edit': false, 'search_more': true, 'field_color':'type', 'colors':{'contact':'green', 'invoice': 'red', 'delivery': 'blue'}}"/>
> A dictionary to link field value with a HTML color. This option has to | ||
> be used with field_color. | ||
|
||
`no_open_edit` *boolean* (Default: value of `no_open` which is `False` |
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.
I couldn't make this option work. Are we sure it is working?
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.
There is no logic for this option in the v16 code. It is only referenced in the readme/translation files. Not sure what to do with this. Remove it from the readme or look at older versions of this module to see how it worked?
> Makes many2many_tags and one2many rows buttons that open the linked | ||
> resource | ||
|
||
`no_color_picker` *boolean* (Default: `False`) |
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.
I couldn't make this option work. Are we sure it is working?
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.
There is no logic for this option in the v16 code. It is only referenced in the readme files. Not sure what to do with this. Remove it from the readme or look at older versions of this module to see how it worked?
I still get this kind of error, when this module is enabled:
I'm not sure where it is exactly from, but it does not happen, when the module is not loaded. |
Hi, In which view or action do you get the error? |
aa85595
to
b6928d8
Compare
It was not really consistent, there had been occurrences where it was not happening on the same pages. The most common thing about this is, that the pages have forms on them, like the settings, or creating a manufacturing order. |
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.
Could you also remove some of the cli-bot commits?
pandoc-3.2-1-amd64.deb
Outdated
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.
Please remove the pandoc-3.2.1-amd64.deb file.
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.
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.
you can squash them with the previous commit.
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.
It should be okay now
b6928d8
to
8487720
Compare
@@ -0,0 +1,412 @@ | |||
<?xml version="1.0" encoding="utf-8" ?> |
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.
Can you remove this line please ?
It raises a warning at module installation
DeprecationWarning: XML declarations in HTML module descriptions are deprecated since Odoo 17, web_m2x_options can just have a UTF8 description with not need for a declaration.
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.
I have deleted the line
- Add static/description/index.html fix: use include instead of extend in js function inheritance. fix: not overwriting the existing object references with the result of the include fix: update name according to new module name. fix: error when displaying many2many field without options defined.
[ADD] support 'no_open_edit' on many2one [FIX] typos
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: web-16.0/web-16.0-web_m2x_options Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_m2x_options/
Currently translated at 100.0% (14 of 14 strings) Translation: web-16.0/web-16.0-web_m2x_options Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_m2x_options/de/
Instead of calling interactively to the server to get the options, they are stored at the beginning of the session.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: web-16.0/web-16.0-web_m2x_options Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_m2x_options/
Currently translated at 100.0% (15 of 15 strings) Translation: web-16.0/web-16.0-web_m2x_options Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_m2x_options/es/
JS Issue: OwlError: Invalid props for component 'FieldMany2OneMailingFilter': unknown key 'searchMore', unknown key 'nodeOptions' at Object.validateProps (https://odoo.simplyfeu.com/web/assets/1913698-b61fd5b/web.assets_common.min.js:1698:67) at Field.template (eval at compile (https://odoo.simplyfeu.com/web/assets/1913698-b61fd5b/web.assets_common.min.js:2057:374), <anonymous>:17:13) at Fiber._render (https://odoo.simplyfeu.com/web/assets/1913698-b61fd5b/web.assets_common.min.js:1496:96) at Fiber.render (https://odoo.simplyfeu.com/web/assets/1913698-b61fd5b/web.assets_common.min.js:1495:6) at ComponentNode.initiateRender (https://odoo.simplyfeu.com/web/assets/1913698-b61fd5b/web.assets_common.min.js:1563:47)
Currently translated at 100.0% (15 of 15 strings) Translation: web-16.0/web-16.0-web_m2x_options Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_m2x_options/it/
Currently translated at 40.0% (6 of 15 strings) Translation: web-16.0/web-16.0-web_m2x_options Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_m2x_options/fr/
Currently translated at 53.3% (8 of 15 strings) Translation: web-16.0/web-16.0-web_m2x_options Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_m2x_options/fr/
Currently translated at 100.0% (15 of 15 strings) Translation: web-16.0/web-16.0-web_m2x_options Translate-URL: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_m2x_options/pt_BR/
f41613d
to
264d9ed
Compare
I'm afraid not. You are removing the .deb in the last commit, while adding it in the previous one, doing 60 MB of diff. You should totally remove it in the same commit. |
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 our proposal for the migration of the web_m2x_options module --> #2888
From our point of view, we think that the module needed a minor refactoring to improve it and remove options that have become obsolete in newest versions. If all the contributors agree, we propose to supersede this PR in favor of ours.
I think that this could help to move forward with the migration of this module.
What do you think @dyngnijs @CRogos @pedrobaeza ?
264d9ed
to
d3f7482
Compare
d3f7482
to
c215b56
Compare
c215b56
to
c6beecb
Compare
@dyngnijs are you doing changes here by your own? What do you think about @HaraldPanten's proposal? |
@pedrobaeza @HaraldPanten |
Could you check ours, and see if it works well enough? |
@pedrobaeza considering the last comments, could we close this PR and keep working on this one? --> #2888 |
No description provided.