Odoo Help

0

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

By
Gael Torrecillas
on 1/22/16, 4:24 AM 838 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
0
Amarildo Golloshi
On 3/10/17, 6:55 AM

odoo.define('pos_modification.DB', function (require) {

    "use strict";

     var DB = require("point_of_sale.DB");

     DB.include({

        Myfunction: function(options){... } 

     });

     return DB;

});

   

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.

Register

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)

Stats

Asked: 1/22/16, 4:24 AM
Seen: 838 times
Last updated: 3/10/17, 6:55 AM