I noticed in the stage installation. Folded in pipeline with tooltip "This stage is folded in the kanban view when there are no records in that stage to display". but in fact even though the stage has no record, that stgae_id still folds. Can someone help me? Thank you
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Financeiro
- Inventário
- PoS
- Projeto
- MRP
Esta pergunta foi sinalizada
1
Responder
2278
Visualizações
I intervened in js. but the problem is to refresh the page to solve the problem, I need to do nothing to not manipulate the refresh but the view is still updated:
odoo.define('crn_js_custom.Fold', function (require) {
"use strict";
var KanbanColumn = require('web.KanbanColumn');
var KanBanRender = require('web.KanbanRenderer');
var KanbanController = require('web.KanbanController');
var rpc = require('web.rpc');
KanbanColumn.include({
start: function() {
this._setStageFold(this.id, this.modelName, this.data);
this._super.apply(this, arguments);
},
_setStageFold: function(id, modelName, data) {
if(modelName == 'crm.lead'){
var no_record = false;
if(data.count == 0){
no_record = true
}
rpc.query({
model: 'crm.stage',
method: 'write_stage_folded',
args: [{
'id': id,
'no_record': no_record,
}]
}).then(function (res) {});
}
}
});
Está gostando da discussão? Não fique apenas lendo, participe!
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscreva-se