跳至内容
菜单
此问题已终结
1 回复
10603 查看

Hi, Everyone

A new javascript module system which inspired from requirejs has been deployed after Odoo version 8 system.

However, the Odoo version 10's developer document of "Building Interface Extensions"(http://www.odoo.com/documentation/10.0/howtos/web.html), which is the tutorial about how to code JavaScript module, still assume us develop a module on Odoo version 8, didn't tell how to code on this requirejs-version Odoo system.

So, are there anyone can give me some references about how to code javascript module on Odoo 10?

I am handling a task that require modify the POS's cashier page and need to learn how to extend exist javascript. unfortunately, I only have basic knowledge of JavaScript. I need some tutorials to learn.

Thanks.

形象
丢弃
最佳答案

here is an example to extend js files in odoo 10

odoo.define('your_module_name.some_name', function(require) {
"use strict";

var a_variable = require('name_of_file_to_extend_in_odoo.define'); // for this file 'your_module_name.some_name'

a_variable.include({

your_function_name: function(args) {
         // your code
},
});

});

this link may help you odoo js

形象
丢弃
相关帖文 回复 查看 活动
0
10月 18
4374
0
10月 16
3021
1
3月 19
5502
4
8月 18
4604
0
1月 17
4567