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
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
1
Odpowiedz
1926
Widoki
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) {});
}
}
});
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się