-
Notifications
You must be signed in to change notification settings - Fork 8
[IMP] Add Most Recently Used Option to M20 Field. #4
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
Conversation
[ADD] support 'no_open_edit' on many2one [FIX] typos
Adapt JS file to the new JS API and make the module installable [MIG] adapt form.js to the new API. [FIX] Fix bug mentioned in pull OCA#262. [MIG] Make the module installable.
Make the module installable and update the module version [MIG] Make the module installable and update the version [FIX] Add the render_value function for the FieldMany2ManyTags and change selector from oe_tag to badge [FIX] change selector in the base.xml from span.oe_tag to span.badge
…n the many2many tag widget
…is set or not and improve search_more condition statement
…nstead of the doing it in the render_value
| queue.push(self.get_value(true)); | ||
| } | ||
| restore_mru_list[key] = queue; | ||
| } |
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 it's already in the queue, then it should be removed and reinserted on top?
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.
Nope it will stay in place, you referring that the most recurrent one
should be on top?
On Wed, Sep 14, 2016 at 5:32 PM Stéphane Bidoul (ACSONE) <
notifications@github.com> wrote:
In web_m2x_options/static/src/js/form.js
#4 (comment):
var key = self.compute_mru_key();
// check if the localstorage has some items for the current modelif (localStorage.getItem(mru_option)) {var restore_mru_list = JSON.parse(localStorage.getItem(mru_option));if (restore_mru_list[key]) {var queue = restore_mru_list[key];if (queue.indexOf(self.get_value(true)) < 0 && self.get_value(true)){if (queue.length < 5) {queue.push(self.get_value(true));}else {queue.shift();queue.push(self.get_value(true));}restore_mru_list[key] = queue;}if it's already in the queue, then it should be removed and reinserted on
top?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/acsone/web/pull/4/files/1ab5431bcf13c489922e34a1ea8c6f97bb38dcfc#r78785062,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANkfciG82hE6aWYUnO1n8ooTvYdF_ehks5qqCG1gaJpZM4J8-Ur
.
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.
he most recurrent one should be on top
Yes, otherwise your most frequently used one will drop off the list, ex with a size of 3
- A -> [ A ]
- B -> [ B, A ]
- A -> [ B, A ]
- C -> [ C, B, A ]
- A -> [ C, B, A ]
- D -> [ D, C, B ] and you've lost A even though you use it often
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.
Yeah I,ll do
On Wed, Sep 14, 2016 at 5:45 PM Stéphane Bidoul (ACSONE) <
notifications@github.com> wrote:
In web_m2x_options/static/src/js/form.js
#4 (comment):
var key = self.compute_mru_key();
// check if the localstorage has some items for the current modelif (localStorage.getItem(mru_option)) {var restore_mru_list = JSON.parse(localStorage.getItem(mru_option));if (restore_mru_list[key]) {var queue = restore_mru_list[key];if (queue.indexOf(self.get_value(true)) < 0 && self.get_value(true)){if (queue.length < 5) {queue.push(self.get_value(true));}else {queue.shift();queue.push(self.get_value(true));}restore_mru_list[key] = queue;}he most recurrent one should be on top
Yes, otherwise your most frequently used one will drop off the list, ex
with a size of 3
- A -> [ A ]
- B -> [ B, A ]
- A -> [ B, A ]
- C -> [ C, B, A ]
- A -> [ C, B, A ]
- D -> [ D, C, B ] and you've lost A even though you use it often
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/acsone/web/pull/4/files/1ab5431bcf13c489922e34a1ea8c6f97bb38dcfc#r78787414,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANkfdW_F88NTUYXC1ydsTvvmUZ56MNXks5qqCSXgaJpZM4J8-Ur
.
…edit options aren't set
d26a86e to
e586cd8
Compare
…edit options aren't set.
e586cd8 to
b65e90d
Compare
sbidoul
left a comment
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.
Don't worry with translations, they will be managed with transifex when merged. Touch this now generates merge conflicts.
|
@zakiuu This looks suspicious. |
|
@zakiuu when web_m2x_options is installed, the style of the "create and edit..." changes. This is suspicious too, can you look into it? I've not tested on community, I hope it's possible to have a solution that works both on community and enterprise. |
|
@sbidoul for the "create and edit...", unfortunately, there is a difference in the CSS class between the enterprise and community edition (o_m2o_dropdown_option,oe_m2o_dropdown_option respectively). |
|
@zakiuu would it work if you put both classes (o and oe)? |
|
Yeah it does work, but shouldn't we add something specific to enterprise On Mon, Sep 19, 2016 at 7:44 AM Stéphane Bidoul (ACSONE) <
|
|
Using both oe and o classes is not shocking to me. Odoo always sais the web api must be compatible for community and enterprise, so if using both classes it what it takes to have that compatibility, that's fine with me. Also the |
|
Ok sounds good to me On Mon, Sep 19, 2016 at 8:45 AM Stéphane Bidoul (ACSONE) <
|
display most recently used record to the user when the search_mru is true. [IMP] add compute_mru_key to compute the key of the field in the local storage in the form: dbname/model/view_id | action_id/field_name [IMP] add get_search_mru to search if there is a list of values stored in the local storage using the key generate. [IMP] add update_mru_list to update they list of mru saved in local storage [IMP] Add mru behavior to the get_search_value [IMP] add web_m2x_options.search_mru option to the OPTIONS list
… item in the top of the list and add some important comments
03ce849 to
d40f3bc
Compare
a9128a6 to
b2303e5
Compare
2ca4915 to
0789d8f
Compare
|
superseded by #6 |
[FIX] web_shortcut: QWeb render doesn't use string keys






No description provided.