Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upMaster search panel #30517
+2,927
−110
Conversation
robodoo
added
the
seen 🙂
label
Jan 24, 2019
C3POdoo
added
the
RD
label
Jan 24, 2019
aab-odoo
force-pushed the
odoo-dev:master-search-panel
branch
to
5b680cf
Jan 25, 2019
robodoo
added
CI 🤖
and removed
CI 🤖
labels
Jan 25, 2019
Polymorphe57
force-pushed the
odoo-dev:master-search-panel
branch
Jan 25, 2019
robodoo
removed
the
CI 🤖
label
Jan 25, 2019
Polymorphe57
force-pushed the
odoo-dev:master-search-panel
branch
3 times, most recently
Jan 28, 2019
aab-odoo
force-pushed the
odoo-dev:master-search-panel
branch
3 times, most recently
Jan 31, 2019
robodoo
added
CI 🤖
and removed
CI 🤖
labels
Feb 1, 2019
aab-odoo
force-pushed the
odoo-dev:master-search-panel
branch
3 times, most recently
Feb 4, 2019
robodoo
added
CI 🤖
and removed
CI 🤖
labels
Feb 4, 2019
Polymorphe57
force-pushed the
odoo-dev:master-search-panel
branch
Feb 4, 2019
robodoo
added
the
CI 🤖
label
Feb 8, 2019
aab-odoo
force-pushed the
odoo-dev:master-search-panel
branch
to
36f2da1
Feb 8, 2019
robodoo
removed
the
CI 🤖
label
Feb 8, 2019
aab-odoo
requested a review
from
odony
Feb 11, 2019
aab-odoo
force-pushed the
odoo-dev:master-search-panel
branch
from
36f2da1
to
2718464
Feb 11, 2019
robodoo
added
the
CI 🤖
label
Feb 11, 2019
odony
reviewed
Feb 13, 2019
addons/web/models/models.py
Outdated
from odoo.tools import lazy | ||
from odoo.exceptions import UserError | ||
|
||
CATEGORY_SUPPORTED_TYPES = ['many2one'] |
This comment has been minimized.
This comment has been minimized.
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 ;-)
addons/web/models/models.py
Outdated
@@ -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.
This comment has been minimized.
odony
Feb 13, 2019
Contributor
Suggested change Beta
def get_search_panel_category(self, field_name): | |
def search_panel_select_range(self, field_name): |
addons/web/models/models.py
Outdated
} | ||
|
||
@api.model | ||
def get_search_panel_filter(self, field_name, **kwargs): |
This comment has been minimized.
This comment has been minimized.
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): |
addons/web/models/models.py
Outdated
""" | ||
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.
This comment has been minimized.
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)') % ( |
addons/web/models/models.py
Outdated
""" | ||
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.
This comment has been minimized.
robodoo
removed
the
CI 🤖
label
Feb 13, 2019
aab-odoo
reviewed
Feb 13, 2019
addons/web/models/models.py
Outdated
@api.model | ||
def search_panel_select_range(self, field_name): | ||
""" | ||
Return possible category values, and their parent field. |
This comment has been minimized.
This comment has been minimized.
addons/web/models/models.py
Outdated
@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.
This comment has been minimized.
'</div>' + | ||
'</t></templates>' + | ||
'<searchpanel>' + | ||
'<category name="product_id"/>' + |
This comment has been minimized.
This comment has been minimized.
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
Polymorphe57
force-pushed the
odoo-dev:master-search-panel
branch
from
1b73b2b
to
9721d2b
Feb 13, 2019
This comment has been minimized.
This comment has been minimized.
robodoo rebase-ff |
This comment has been minimized.
This comment has been minimized.
robodoo r+ |
robodoo
added
the
r+ 👌
label
Feb 13, 2019
This comment has been minimized.
This comment has been minimized.
Merge method set to rebase and fast-forward |
robodoo
added
the
CI 🤖
label
Feb 13, 2019
This comment has been minimized.
This comment has been minimized.
Linked pull request(s) odoo/enterprise#3585 not ready. Linked PRs are not staged until all of them are ready. |
pushed a commit
that referenced
this pull request
Feb 13, 2019
robodoo
added
merging 👷
merged 🎉
and removed
merging 👷
labels
Feb 13, 2019
This comment has been minimized.
This comment has been minimized.
Merged, thanks! |
robodoo
closed this
Feb 13, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Polymorphe57 commentedJan 24, 2019
Link to task: https://www.odoo.com/web#id=1892462&action=333&active_id=133&model=project.task&view_type=form&menu_id=4720