hi, I want to add custom_id: this.customViewID ? this.customViewID : "", in js file to remove the erroredit_custom() missing 1 required positional argument: 'custom_id' how can i add the code in _saveDashboard function,
here is my code but its not working
odoo.define('module.pos', function (require) {
"use strict";
var BoardController = require('board.BoardView');
var core = require('web.core');
var _t = core._t;
var _lt = core._lt;
var QWeb = core.qweb;
console.log('dff')
//var BoardController = FormController.extend({
//var LineRenderer =FormController.extend({
BoardController.include({
_saveDashboard: function () {
var board = this.renderer.getBoard();
var arch = QWeb.render('DashBoard.xml', _.extend({}, board));
return this._rpc({
route: '/web/view/edit_custom',
params: {
custom_id: this.customViewID ? this.customViewID : "",
arch: arch,
}
}).then(dataManager.invalidate.bind(dataManager));
},
});
});
Thank you very much in advance
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
ar
BoardView
= require('board.BoardView');
var
viewRegistry
= require('web.view_registry');
var
FormRenderer
= require('web.FormRenderer');
var
BoardView
= BoardView.extend({
config: _.extend({}, BoardView.prototype.config, {
}),
init: function
()
{
this._super.apply(this,
arguments);
this.controllerParams.customViewID
= '';
},
});
viewRegistry.add('board',
BoardView);
Hello Neethu,
Please find code in comment.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
I want to changed some condition please you can check this code.
odoo.define('module.pos', function (require) {
"use strict";
var BoardController = require('board.BoardView');
var core = require('web.core');
var _t = core._t;
var _lt = core._lt;
var QWeb = core.qweb;
console.log('dff')
//var BoardController = FormController.extend({
//var LineRenderer =FormController.extend({
BoardController.include({
_saveDashboard: function () {
var board = this.renderer.getBoard();
var arch = QWeb.render('DashBoard.xml', _.extend({}, board));
return this._rpc({
route: '/web/view/edit_custom',
params: {
custom_id: this.customViewID !=null ? this.customViewID : '',
arch: arch,
}
}).then(dataManager.invalidate.bind(dataManager));
},
});
});
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