[IMP] : black, isort, prettier

This commit is contained in:
Pedro M. Baeza
2020-07-13 18:28:03 +02:00
committed by Francisco Ivan Anton Prieto
parent 15423b63cd
commit a2f71595bf
46 changed files with 2703 additions and 2811 deletions

View File

@@ -2,37 +2,37 @@
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
*/
/*
If in the sub-tree view where the sections and notes are to be used
there are fields that have defined in the XML attrs = {'invisible': ....}
and this condition is met, then an extra space appears in the rows
If in the sub-tree view where the sections and notes are to be used
there are fields that have defined in the XML attrs = {'invisible': ....}
and this condition is met, then an extra space appears in the rows
corresponding to the sections and lines.
This js was written to deal with that problem, but a solution based on
This js was written to deal with that problem, but a solution based on
this can be applied directly to Odoo*/
odoo.define('contract.section_and_note_backend', function (require) {
odoo.define("contract.section_and_note_backend", function(require) {
"use strict";
var fieldRegistry = require('web.field_registry');
var section_and_note_one2many = fieldRegistry.get('section_and_note_one2many');
var fieldRegistry = require("web.field_registry");
var section_and_note_one2many = fieldRegistry.get("section_and_note_one2many");
section_and_note_one2many.include({
_getRenderer: function () {
_getRenderer: function() {
var result = this._super.apply(this, arguments);
if (this.view.arch.tag === 'tree') {
if (this.view.arch.tag === "tree") {
result.include({
_renderBodyCell: function (record, node, index, options) {
_renderBodyCell: function(record, node, index, options) {
var $cell = this._super.apply(this, arguments);
var isSection = record.data.display_type === 'line_section';
var isNote = record.data.display_type === 'line_note';
var isSection = record.data.display_type === "line_section";
var isNote = record.data.display_type === "line_note";
if (isSection || isNote) {
$cell.removeClass('o_invisible_modifier');
$cell.removeClass("o_invisible_modifier");
}
return $cell;
}
})
},
});
}
return result
return result;
},
});
});