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

Master search panel #30517

Closed
wants to merge 6 commits into
base: master
from

Conversation

Projects
None yet
6 participants

@robodoo robodoo added the seen 🙂 label Jan 24, 2019

@C3POdoo C3POdoo added the RD label Jan 24, 2019

@aab-odoo aab-odoo force-pushed the odoo-dev:master-search-panel branch to 5b680cf Jan 25, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Jan 25, 2019

@Polymorphe57 Polymorphe57 force-pushed the odoo-dev:master-search-panel branch Jan 25, 2019

@robodoo robodoo removed the CI 🤖 label Jan 25, 2019

@Polymorphe57 Polymorphe57 force-pushed the odoo-dev:master-search-panel branch 3 times, most recently Jan 28, 2019

@aab-odoo aab-odoo force-pushed the odoo-dev:master-search-panel branch 3 times, most recently Jan 31, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Feb 1, 2019

@aab-odoo aab-odoo force-pushed the odoo-dev:master-search-panel branch 3 times, most recently Feb 4, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Feb 4, 2019

@Polymorphe57 Polymorphe57 force-pushed the odoo-dev:master-search-panel branch Feb 4, 2019

@robodoo robodoo added the CI 🤖 label Feb 8, 2019

@aab-odoo aab-odoo force-pushed the odoo-dev:master-search-panel branch to 36f2da1 Feb 8, 2019

@robodoo robodoo removed the CI 🤖 label Feb 8, 2019

@aab-odoo aab-odoo requested a review from odony Feb 11, 2019

@aab-odoo aab-odoo force-pushed the odoo-dev:master-search-panel branch from 36f2da1 to 2718464 Feb 11, 2019

@robodoo robodoo added the CI 🤖 label Feb 11, 2019

from odoo.tools import lazy
from odoo.exceptions import UserError

CATEGORY_SUPPORTED_TYPES = ['many2one']

This comment has been minimized.

@odony

odony Feb 13, 2019

Contributor

looks confusing at the top, maybe inline it in the methods, this way we don't have to find a proper name ;-)

@@ -114,3 +121,150 @@ def fields_view_get(self, view_id=None, view_type='form', toolbar=False, submenu
if r['type'] == 'qweb':
r['arch'] = '<qweb/>'
return r

@api.model
def get_search_panel_category(self, field_name):

This comment has been minimized.

@odony

odony Feb 13, 2019

Contributor
Suggested change Beta
def get_search_panel_category(self, field_name):
def search_panel_select_range(self, field_name):
}

@api.model
def get_search_panel_filter(self, field_name, **kwargs):

This comment has been minimized.

@odony

odony Feb 13, 2019

Contributor
Suggested change Beta
def get_search_panel_filter(self, field_name, **kwargs):
def search_panel_select_multi_range(self, field_name, **kwargs):
"""
field = self._fields[field_name]
if field.type not in CATEGORY_SUPPORTED_TYPES:
raise UserError('Only types {} are supported for category (found type {})'.format(

This comment has been minimized.

@odony

odony Feb 13, 2019

Contributor

translate + name placeholders with %s() that transifex seems to better support

Suggested change Beta
raise UserError('Only types {} are supported for category (found type {})'.format(
raise UserError(_('Only types %(supported_types)s are supported for category (found type %(field_type)s)') % (
"""
field = self._fields[field_name]
if field.type not in FILTER_SUPPORTED_TYPES:
raise UserError('Only types {} are supported for filter (found type {})'.format(

This comment has been minimized.

@odony

odony Feb 13, 2019

Contributor

same thing as above

@robodoo robodoo removed the CI 🤖 label Feb 13, 2019

@api.model
def search_panel_select_range(self, field_name):
"""
Return possible category values, and their parent field.

This comment has been minimized.

@aab-odoo

aab-odoo Feb 13, 2019

Contributor

doc?

@api.model
def search_panel_select_multi_range(self, field_name, **kwargs):
"""
Return values of filter field, possibly with counters and group.

This comment has been minimized.

@aab-odoo

aab-odoo Feb 13, 2019

Contributor

doc?

'</div>' +
'</t></templates>' +
'<searchpanel>' +
'<category name="product_id"/>' +

This comment has been minimized.

@aab-odoo

aab-odoo Feb 13, 2019

Contributor

oups

@Polymorphe57 Polymorphe57 force-pushed the odoo-dev:master-search-panel branch 2 times, most recently from 39c6526 to 1b73b2b Feb 13, 2019

aab-odoo and others added some commits Jan 17, 2019

[IMP] web: force activeActions to be boolean
The docstring says they are boolean, but they actually aren't
(e.g. edit="0" in the arch would lead to activeActions.edit=0).

This could cause issue if that value is used to toggle a class
with jQuery, as in this case the flag argument *must* be a boolean.
[IMP] web: add kanban searchPanel
This rev. defines a searchPanel widget used in Kanban views to
refine search according to specific dimensions. This wigdet is
displayed as a sidebar to the left of the kanban view.

Part of task 1892462

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
[IMP] hr: use searchPanel in Employee kanban view
Part of task 1892462

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
[IMP] lunch: use searchPanel in New Order kanban view
This rev. updates the 'New order' kanban view to make it use a
searchPanel.

Minor changes on the custom lunch_kanban view were necessary to
 - obtain the desired layout,
 - correctly combine the lunch widget (top bar) domain with the
   searchPanel domain.

Part of task 1892462

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>

@Polymorphe57 Polymorphe57 force-pushed the odoo-dev:master-search-panel branch from 1b73b2b to 9721d2b Feb 13, 2019

@aab-odoo

This comment has been minimized.

Copy link
Contributor

aab-odoo commented Feb 13, 2019

robodoo rebase-ff

@aab-odoo

This comment has been minimized.

Copy link
Contributor

aab-odoo commented Feb 13, 2019

robodoo r+

@robodoo robodoo added the r+ 👌 label Feb 13, 2019

@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Feb 13, 2019

Merge method set to rebase and fast-forward

@robodoo robodoo added the CI 🤖 label Feb 13, 2019

@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Feb 13, 2019

Linked pull request(s) odoo/enterprise#3585 not ready. Linked PRs are not staged until all of them are ready.

robodoo pushed a commit that referenced this pull request Feb 13, 2019

[IMP] hr: use searchPanel in Employee kanban view
Part of task 1892462

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>

closes #30517
@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Feb 13, 2019

Merged, thanks!

@robodoo robodoo closed this Feb 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment