Odoo Help


how to extend the db.js point of sale? odoo v9.0

Gael Torrecillas
on 1/22/16, 4:24 AM 606 views

I want to add functions and define init but I don't know what is ahead of js.

with the others inheritances, I used for this inheritance :

odoo.define('pos_modification.DB', function (require) { 
"use strict";
var DB = require('point_of_sale.DB');
 DB= DB.extend({

and I tested :

odoo.define('pos_modification.DB', function (require) {
 "use strict"; var DB = require('point_of_sale.DB');

if I change the module point of sale by adding the changes (in init etc.) it works

edit :

I declared my function and added news variables (init) in this code  
 init: function (options) { 
; this.myvar = [];}
Myfunction: function(options){
return DB;
but I had :
self.bd.myfunction is not a function

but then what it's your issue?

Axel Mendoza
on 1/22/16, 5:25 PM

thanks you for your comment, I had informations

Gael Torrecillas
on 1/25/16, 5:46 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/22/16, 4:24 AM
Seen: 606 times
Last updated: 1/25/16, 5:45 AM