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
- Comptabilité
- Inventaire
- PoS
- Projet
- MRP
Cette question a été signalée
1
Répondre
2277
Vues
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) {});
}
}
});
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire