I need to modify a function in model.js. I couldn't inherit the .js file in odoo9. How can I inherit the .js file odoo?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
1
回复
3102
查看
You should first import the models using this statement:
var models = require('point_of_sale.models');
Then you can alter a specific function using:
models.TheWidgetThatContainsTheFunction.include({
the_function_to_modify: function(){ //don't forget to include function vars!
this.super();
// ... do stuff here
// return if necessary
},
});
Thank you Pieter