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] util/method: added variable to add_view #138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ammu-odoo
Copy link

Description:

The util method add_view was previously used to create views for view_type such as form, tree, and qweb. However, it lacked support for setting the website_id, which limited its ability to create website-specific views.

This PR introduces a new website_id parameter to the add_view method. By adding this parameter, the method can now be used to create views specific to a website, enabling the creation of both backend views (form, tree, qweb) and frontend website views.

Changes:

  • Added website_id parameter to the add_view method.
  • Adjusted the SQL query to include website_id where applicable.
  • Website views can now be created using this method by passing the appropriate website_id.

This enhancement makes the add_view method more flexible, supporting both regular and website-specific views.

@robodoo
Copy link
Contributor

robodoo commented Sep 16, 2024

Pull request status dashboard

**Description:**

The util method `add_view` was previously used to create views
for `view_type` such as form, tree, and qweb. However, it lacked
support for setting the `website_id`, which limited its ability
to create website-specific views.

This PR introduces a new `website_id` parameter to the
`add_view` method. By adding this parameter, the method can now
be used to create views specific to a website, enabling the creation
of both backend views (form, tree, qweb) and frontend website views.

**Changes:**
- Added `website_id` parameter to the `add_view` method.
- Adjusted the SQL query to include `website_id` where applicable.
- Website views can now be created using this method by passing the
appropriate `website_id`.

This enhancement makes the `add_view` method more flexible,
supporting both regular and website-specific views.
@ammu-odoo ammu-odoo force-pushed the master-added-website_id-variable-ammu branch from 28e11fe to 75f336e Compare September 19, 2024 11:26
@KangOl
Copy link
Contributor

KangOl commented Sep 19, 2024

This doesn't work. The key website_id is not used in the query. Note that the column website_id isn't always present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants