Skip to content
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

[FIX] website: ensure websites have snippet filters #62041

Closed

Conversation

rdeodoo
Copy link
Contributor

@rdeodoo rdeodoo commented Nov 19, 2020

Since the feature was implemented with the default snippets having a website_id
set to the default website, it means that every other websites won't have
snippet filters.

This commit bootstrap filters for every new created website.

Note that in master, multi-website and generic filters are handled with
550d293.

opw-2381423

@rdeodoo rdeodoo force-pushed the 14.0-fix-snippet-filter-website-rde branch from bf62525 to 6c357e5 Compare November 19, 2020 17:41
@rdeodoo
Copy link
Contributor Author

rdeodoo commented Nov 19, 2020

@JKE-be Can you have a first look to see if that's the way you want it to go?

The backport commit should be enough to fix when the user do a -u (its backport + set website_id to False)

For when no -u, the other commit should handle cases of creating a new website, removing the default website.

But one issue remain: User do not -u, delete the default website (filters are lost), then create a new website (no filters).
Solution : Since no -u, we can't play with ondelete or required so maybe we prevent delete of default website while the user hasn't done -u, or we hardcode in python the creation of the default filters instead of copy, again only if no -u

@C3POdoo C3POdoo added the RD research & development, internal work label Nov 19, 2020
@rdeodoo rdeodoo force-pushed the 14.0-fix-snippet-filter-website-rde branch from 10263ef to 6c357e5 Compare November 20, 2020 10:27
@rdeodoo
Copy link
Contributor Author

rdeodoo commented Nov 26, 2020

As a reminder since those messages are folded, the forward port is disabled, so this is just for 14.0.
The fix typo commit will be cherry picked in #62409

@rdeodoo rdeodoo force-pushed the 14.0-fix-snippet-filter-website-rde branch from 93d00a9 to 68bd9dc Compare November 27, 2020 10:47
@rdeodoo rdeodoo force-pushed the 14.0-fix-snippet-filter-website-rde branch from 68bd9dc to d5e7025 Compare November 27, 2020 11:59
@rdeodoo rdeodoo force-pushed the 14.0-fix-snippet-filter-website-rde branch from d5e7025 to e5385d1 Compare November 27, 2020 16:51
@rdeodoo rdeodoo force-pushed the 14.0-fix-snippet-filter-website-rde branch from e5385d1 to dfc4f49 Compare November 27, 2020 16:53
Since the feature was implemented with the default snippets having a website_id
set to the default website, it means that every other websites won't have
snippet filters.

This commit bootstrap filters for every new created website.

Note that in master, multi-website and generic filters are handled with
550d293.

opw-2381423

Closes odoo#62041
Because there is a trailing comma, the code crashes and the domain becomes a
tuple.

Closes odoo#62041
@rdeodoo rdeodoo force-pushed the 14.0-fix-snippet-filter-website-rde branch from dfc4f49 to 1af91ac Compare November 27, 2020 16:54
@rdeodoo
Copy link
Contributor Author

rdeodoo commented Nov 27, 2020

@JKE-be Fixed the right error for non admin user

@JKE-be
Copy link
Contributor

JKE-be commented Dec 4, 2020

@robodoo r+

@robodoo
Copy link
Contributor

robodoo commented Dec 4, 2020

Because this PR has multiple commits, I need to know how to merge it:

  • merge to merge directly, using the PR as merge commit message
  • rebase-merge to rebase and merge, using the PR as merge commit message
  • rebase-ff to rebase and fast-forward

@JKE-be
Copy link
Contributor

JKE-be commented Dec 4, 2020

@robodoo rebase-ff

@robodoo
Copy link
Contributor

robodoo commented Dec 4, 2020

Merge method set to rebase and fast-forward

robodoo pushed a commit that referenced this pull request Dec 4, 2020
Because there is a trailing comma, the code crashes and the domain becomes a
tuple.

Closes #62041

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
@robodoo robodoo closed this in 01fafec Dec 4, 2020
@robodoo robodoo temporarily deployed to merge December 4, 2020 13:35 Inactive
@fw-bot fw-bot deleted the 14.0-fix-snippet-filter-website-rde branch December 18, 2020 13:46
fmdl pushed a commit to fmdl/odoo that referenced this pull request Apr 29, 2021
Since the feature was implemented with the default snippets having a website_id
set to the default website, it means that every other websites won't have
snippet filters.

This commit bootstrap filters for every new created website.

Note that in master, multi-website and generic filters are handled with
550d293.

opw-2381423

Closes odoo#62041
fmdl pushed a commit to fmdl/odoo that referenced this pull request Apr 29, 2021
Because there is a trailing comma, the code crashes and the domain becomes a
tuple.

Closes odoo#62041

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants