summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorRobot Odoo <xmo+roboto@odoo.com>2019-01-18 16:17:07 +0100
committerGitHub <noreply@github.com>2019-01-18 16:17:07 +0100
commit19791d2f67422dff379cac34ef8d733bf01c5a67 (patch)
tree96ec45ac14e3686726012f89eb14968252bf4893 /addons/web/static/src
parent6772c6ce3428d637f259fce98cf55e29c7b39439 (diff)
parentad0c5768f0c1e302c0c87d961d39753e5ab81d76 (diff)
[IMP] hr_payroll: improve general usability
This commit improves general usability. Specification ============= Screens usability: 1/ Benefits 1.1/ Calendar - Add a sidebar filter to filter employees. The filters are saved per user. If no filter exists for the user the 'Everybody' filter should be true by default. - Generate benefits when clicking on the menu -> remove the wizard (popup): generate benefits for all running contracts - Once generated, don't show again the generate benefits button: only show the Validate button - Generate Payslips button: remove the wizard. It generates payslip of validated benefits and jumps to the payslip batch form view. 1.2/ Form: - rename: Start into "From" - rename: End into "To" - rename: Hours into "Period" (add 'hours' as unit on the right of the field) 2/ Payslip 2.1/ Form: - Remove Payslip stat button. - a computed payslip should be editable 2.2/ List: - show: Reference | Employee | Batch Name | From | To | Gross Salary | Net Salary | Status - In action buttons add a "Confirm" to confirm multiple payslips - add a quick search on contract - filters: rename 'draft' into "To Compute" - filter: add "To Confirm" Menus: 1/ Salary Computation - Benefits (object: hr.benefit ; view: calendar, list, form, pivot. Group: hr officer ; filters: group by employee in the view) - Payslips (objetc: hr.payslip ; Views: list, form, pivot. Group: hr officer ; filters: last batch ; Sort: employee name alphabetically) 2/ Employee Payslips - Batches (objetc: hr.payslip.run ; Views: list, form. Group: hr officer ; Sort: creation date (last one first) - All Payslips (objetc: hr.payslip ; Views: list, form, pivot. Group: hr officer ; filters: no filters; Sort: employee name alphabetically) 3/ Configuration - Settings ---Salary--- - Rules - Structure - Contributions Registers ---Benefits--- - Benefits Type ---Repository--- - Employees (list) - Contracts When a benefit linked to a leave is cancelled, it should refuse the leave. When a payslip batch is deleted, also delete associated payslips. + Refactoring of benefit js to use "Odoo style" event binding. TaskID: 1916136 closes odoo/odoo#30110
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/calendar/calendar_model.js2
-rw-r--r--addons/web/static/src/js/views/calendar/calendar_renderer.js4
2 files changed, 4 insertions, 2 deletions
diff --git a/addons/web/static/src/js/views/calendar/calendar_model.js b/addons/web/static/src/js/views/calendar/calendar_model.js
index 7c06a7d818d..aaf52057ad6 100644
--- a/addons/web/static/src/js/views/calendar/calendar_model.js
+++ b/addons/web/static/src/js/views/calendar/calendar_model.js
@@ -481,7 +481,7 @@ return AbstractModel.extend({
*/
_loadFilter: function (filter) {
if (!filter.write_model) {
- return;
+ return $.when();
}
var field = this.fields[filter.fieldName];
diff --git a/addons/web/static/src/js/views/calendar/calendar_renderer.js b/addons/web/static/src/js/views/calendar/calendar_renderer.js
index c2c90ea7e62..2720224fe39 100644
--- a/addons/web/static/src/js/views/calendar/calendar_renderer.js
+++ b/addons/web/static/src/js/views/calendar/calendar_renderer.js
@@ -112,11 +112,13 @@ var SidebarFilter = Widget.extend(FieldManagerMixin, {
_onFieldChanged: function (event) {
var self = this;
event.stopPropagation();
+ var createValues = {'user_id': session.uid};
var value = event.data.changes[this.write_field].id;
+ createValues[this.write_field] = value;
this._rpc({
model: this.write_model,
method: 'create',
- args: [{'user_id': session.uid,'partner_id': value,}],
+ args: [createValues],
})
.then(function () {
self.trigger_up('changeFilter', {