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:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
1
Trả lời
3087
Lượt xem
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
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký