Odoo Help

Welcome!

This community 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.

0

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

By
Gael Torrecillas
on 1/22/16, 4:24 AM 522 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');
 DB.PosDB=DB.PosDB.extend({

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._super(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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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