Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
10519 Visualizações

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.

Avatar
Cancelar
Melhor resposta

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

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
0
out. 18
4286
0
out. 16
2957
1
mar. 19
5410
4
ago. 18
4523
0
jan. 17
4498