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
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
1
Reply
1893
Views
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) {});
}
}
});
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up