Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
10601 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
paź 18
4373
0
paź 16
3020
1
mar 19
5502
4
sie 18
4603
0
sty 17
4566