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

[14.0][ADD] web list view general buttons #1846

Open
wants to merge 8 commits into
base: 14.0
Choose a base branch
from

Conversation

dhongu
Copy link

@dhongu dhongu commented Mar 9, 2021

No description provided.

Copy link
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

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

what is the purpose of this module ?

thanks.

web_list_view_general_buttons/readme/DESCRIPTION.rst Outdated Show resolved Hide resolved
web_list_view_general_buttons/__manifest__.py Outdated Show resolved Hide resolved
@danila12
Copy link

danila12 commented Mar 12, 2021

A custom button can be added:

custom-button

For this button, the context of the action must contain the "general_buttons" directive:
'general_buttons': [ { 'action': "print_pdf", 'name': "Print Preview"}]
The action "print_pdf" will be applied on selected records.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@dhongu
Copy link
Author

dhongu commented Mar 28, 2021

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Sorry @dhongu you are not allowed to merge.

To do so you must either have push permissions on the repository, or be a declared maintainer of all modified addons.

If you wish to adopt an addon and become it's maintainer, open a pull request to add your GitHub login to the maintainers key of its manifest.

@feketemihai
Copy link
Member

@OCA/web-maintainers Can somebody merge this, please.

Copy link
Member

@Tardo Tardo left a comment

Choose a reason for hiding this comment

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

Nice! some suggestions...

@@ -0,0 +1,2 @@
# © 2018 Terrabit
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# © 2018 Terrabit
# Copyright 2018 Terrabit

@@ -0,0 +1,17 @@
# © 2018 Terrabit
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# © 2018 Terrabit
# Copyright 2018 Terrabit

Comment on lines +1 to +4




Copy link
Member

Choose a reason for hiding this comment

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

🔥

Suggested change

Comment on lines +21 to +31
var self = this;
if (this.context.general_buttons === "get_general_buttons") {
this._rpc({
model: this.modelName,
method: "get_general_buttons",
args: [this.context.active_id],
context: this.context,
}).then(function (result) {
self.headerGeneralButtons = result;
});
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
var self = this;
if (this.context.general_buttons === "get_general_buttons") {
this._rpc({
model: this.modelName,
method: "get_general_buttons",
args: [this.context.active_id],
context: this.context,
}).then(function (result) {
self.headerGeneralButtons = result;
});
}
if (this.context.general_buttons === "get_general_buttons") {
this._rpc({
model: this.modelName,
method: "get_general_buttons",
args: [this.context.active_id],
context: this.context,
}).then((result) => {
this.headerGeneralButtons = result;
});
}

Comment on lines +53 to +62
var el = event.target;
var self = this;
self._rpc({
model: $(el).attr("model"),
method: $(el).attr("action"),
args: [self.context.active_id],
context: self.context,
}).then(function (result) {
return self.do_action(result);
});
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
var el = event.target;
var self = this;
self._rpc({
model: $(el).attr("model"),
method: $(el).attr("action"),
args: [self.context.active_id],
context: self.context,
}).then(function (result) {
return self.do_action(result);
});
const $el = $(event.target);
self._rpc({
model: $el.attr("model"),
method: $el.attr("action"),
args: [this.context.active_id],
context: this.context,
}).then((result) => this.do_action(result));

@pedrobaeza
Copy link
Member

Module name shouldn't contain plurals

Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants