description and graph js udpated
This commit is contained in:
parent
a327a354f5
commit
767aa5e308
|
|
@ -7,6 +7,47 @@ odoo.define("project_report.GraphController", function(require) {
|
|||
this._super.apply(this, arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
* Makes sure that the buttons in the control panel matches the current
|
||||
* state (so, correct active buttons and stuff like that).
|
||||
*
|
||||
* @override
|
||||
*/
|
||||
updateButtons: function () {
|
||||
if (!this.$buttons) {
|
||||
return;
|
||||
}
|
||||
var state = this.model.get();
|
||||
this.$buttons.find('.o_graph_button').removeClass('active');
|
||||
this.$buttons
|
||||
.find('.o_graph_button[data-mode="' + state.mode + '"]')
|
||||
.addClass('active');
|
||||
this.$buttons
|
||||
.find('.o_graph_button[data-mode="stack"]')
|
||||
.data('stacked', state.stacked)
|
||||
.toggleClass('active', state.stacked)
|
||||
.toggleClass('o_hidden', state.mode !== 'bar' && state.mode !== 'horizontalBar');
|
||||
this.$buttons
|
||||
.find('.o_graph_button[data-order]')
|
||||
.toggleClass('o_hidden', state.mode === 'pie' || !!Object.keys(state.timeRanges).length)
|
||||
.filter('.o_graph_button[data-order="' + state.orderBy + '"]')
|
||||
.toggleClass('active', !!state.orderBy);
|
||||
|
||||
if (this.withButtons) {
|
||||
this._attachDropdownComponents();
|
||||
}
|
||||
},
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Handlers
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Do what need to be done when a button from the control panel is clicked.
|
||||
*
|
||||
* @private
|
||||
* @param {MouseEvent} ev
|
||||
*/
|
||||
_onButtonClick: function (ev) {
|
||||
var $target = $(ev.target);
|
||||
if ($target.hasClass('o_graph_button')) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from odoo import api, fields, models
|
|||
|
||||
class SubProject(models.Model):
|
||||
_inherit = "project.project"
|
||||
_description = "Sub Project"
|
||||
#_description = "Sub Project"
|
||||
|
||||
is_sub_project = fields.Boolean("Is Sub Project")
|
||||
sub_project = fields.Many2many('project.project', 'project_subproject_rel', 'project_id',
|
||||
|
|
|
|||
Loading…
Reference in New Issue