Skip to content

Conversation

@racielperdomo1993
Copy link

Migration from 10.0 to 14.0

@racielperdomo1993
Copy link
Author

already implemented in v11

@racielperdomo1993
Copy link
Author

@pedrobaeza I realized that this module is implemented in v11 but it is not merged beacuse an error in the manifest (odoo version 10.0.1.0.0 instead of 11.0.1.0.0) and the pull request is still open since 2017, I migrated it to v14 whithout knowing that because I needed this behavior, is this module still necessary or is there another that has the same behavior? Thanks in advance.

@pedrobaeza pedrobaeza added this to the 14.0 milestone Jan 12, 2022
@pedrobaeza
Copy link
Member

No problem if your commit history contains till them and you have made directly the code adaptation from 10.0 to 14.0

@pedrobaeza
Copy link
Member

Please don't include merge commits.

@racielperdomo1993
Copy link
Author

Please don't include merge commits.
@pedrobaeza Sorry, first time contributing, I saw that the pre-commit hook failed and fixed it, how would be the procedure to add the new commits, squash all commits and don't include merge commits?

@pedrobaeza
Copy link
Member

Well, that's a question of git, you should rebase instead of pulling or merging.

https://git-scm.com/book/en/v2/Git-Branching-Rebasing

@racielperdomo1993 racielperdomo1993 force-pushed the 14.0-mig-website_field_autocomplete branch from d66e288 to cc1dcd6 Compare January 13, 2022 02:24
Copy link
Member

@Tardo Tardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the work! Can you update the source to use ES6?

* @param response function Callback for response, accepts array of str
*/
autocomplete: function (request, response) {
var self = this;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can avoid 'self' usage if use arrow functions to preserve the context.


var snippet_animation = require("website.content.snippets.animation");

snippet_animation.registry.field_autocomplete = snippet_animation.Animation.extend({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you are not using effects you can use 'web.public.widget'



class Website(Website):
@http.route(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use type="json" and POST?


/* Return arguments that are used to initialize autocomplete */
autocompleteArgs: function () {
var self = this;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use 'arrow functions' to avoid 'self' usage.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tardo I tried to change as little as possible the original code of the module, I modified it with your suggestions please check when you have time, thanks.

@racielperdomo1993 racielperdomo1993 requested a review from Tardo June 12, 2022 14:59
@miguel-S73
Copy link
Contributor

miguel-S73 commented Oct 25, 2022

@racielperdomo1993 thanks for the work!
I think that would be interesting add compatibility with many2one fields.
You can add this patch to apply this or If you open your repo i can add my patch.
website_field_autocomplete-many2one_compatibility.txt

With these changes I intend that the end user always visualizes the field indicated in data-displayField and uses the value of the data-valueField field internally.

@racielperdomo1993
Copy link
Author

@miguel-S73 great, added you as collaborator.

lasley and others added 16 commits October 27, 2022 17:17
* Return parsed records from promise
* Add `data-value-field` to allow for other value attributes
* Fix appearance of demo data (container)
* Break controller getters into two methods to allow for easier inheritance manipulation
* Add method in JS to return autocomplete initialization args
* Add self.record_ids to represent searched RecordSet
* Update request type to JSON in AJAX
* Switch model to website.menu to allow for anonymous access
* Use search_read in controller data getter, instead of custom implementation
@miguel-S73 miguel-S73 force-pushed the 14.0-mig-website_field_autocomplete branch from ff1664f to 9d76720 Compare October 27, 2022 15:25
Show Input with `displayField` value and generate hide field with `valueField` value
@miguel-S73 miguel-S73 force-pushed the 14.0-mig-website_field_autocomplete branch from 9d76720 to fa3d023 Compare October 27, 2022 15:28
@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 26, 2023
@miguel-S73
Copy link
Contributor

@pedrobaeza @Tardo How do you see this PR?

@pedrobaeza
Copy link
Member

Sorry, I don't know this module.

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 5, 2023
@github-actions
Copy link

github-actions bot commented Jul 9, 2023

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 9, 2023
@github-actions github-actions bot closed this Aug 13, 2023
Vicent-S73 pushed a commit to Studio73/e-commerce that referenced this pull request Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants