[FIX] website_blog, website_sale: don't show frontend filter in backend
Dyanmic filters uses ir.filters. But domain is not exactly the same syntax. e.g. time.strftime() vs context_today() So we add a fake action_id to avoid to display these filters on each action of this model into the backend. task-2654131 closes odoo/odoo#77021 X-original-commit: f92cfa96b9337fce8451080bffd9b7e40bdedc0d Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
<field name="user_id" eval="False" />
|
||||
<field name="domain">[('post_date', '<=', context_today())]</field>
|
||||
<field name="sort">['post_date desc']</field>
|
||||
<field name="action_id" ref="website.action_website"/>
|
||||
</record>
|
||||
<record id="dynamic_snippet_most_viewed_blog_post_filter" model="ir.filters">
|
||||
<field name="name">Most Viewed Blog Posts</field>
|
||||
@@ -15,6 +16,7 @@
|
||||
<field name="user_id" eval="False" />
|
||||
<field name="domain">[('post_date', '<=', context_today()), ('visits', '!=', False)]</field>
|
||||
<field name="sort">['visits desc']</field>
|
||||
<field name="action_id" ref="website.action_website"/>
|
||||
</record>
|
||||
<!-- Dynamic Filter -->
|
||||
<record id="dynamic_filter_latest_blog_posts" model="website.snippet.filter">
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
<field name="domain">[('website_published', '=', True)]</field>
|
||||
<field name="context">{'display_default_code': False}</field>
|
||||
<field name="sort">['create_date desc']</field>
|
||||
<field name="action_id" ref="website.action_website"/>
|
||||
</record>
|
||||
<!-- Action Server for Dynamic Filter -->
|
||||
<record id="dynamic_snippet_latest_sold_products_action" model="ir.actions.server">
|
||||
|
||||
Reference in New Issue
Block a user