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

Add "Save Snippet" sidebar button + display custom inner content in the sidebar #3952

Open
wants to merge 3 commits into
base: master-mysterious-egg
Choose a base branch
from

Conversation

sobo-odoo
Copy link

No description provided.

@robodoo
Copy link

robodoo commented Jan 15, 2025

This PR targets the un-managed branch odoo-dev/odoo:master-mysterious-egg, it needs to be retargeted before it can be merged.

@sobo-odoo sobo-odoo force-pushed the master-mysterious-egg-sobo-2 branch from 21a0353 to b2480c8 Compare January 15, 2025 18:07
@sobo-odoo sobo-odoo marked this pull request as ready for review January 15, 2025 18:16
@robodoo
Copy link

robodoo commented Jan 15, 2025

This PR targets the un-managed branch odoo-dev/odoo:master-mysterious-egg, it needs to be retargeted before it can be merged.

expect(saveButtonSelector).toHaveCount(1);

// TODO improve when "request_save" will be done.
// Maybe make a tour to test the behavior ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the behavior ?

this.context["model"] = editableParentEl.dataset.oeModel;
this.context["field"] = editableParentEl.dataset.oeField;
this.context["resId"] = editableParentEl.dataset.oeId;
await rpc("/web/dataset/call_kw/ir.ui.view/save_snippet", {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use orm.call like delete_snippet ?

context: this.context,
},
});
resolve();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add new customSnippet to snippetsByCategory.snippet_custom. It will trigger the reactivity. We probably not need to reload the page

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