Odoo Help

2 Answers
Nhomar Hernandez
11/10/13, 5:34 PM

It should be really cool get an answer from al@openerp because IMHO i saw some especific things that really differenciate what is done in openerp-web than in backbone needs to be extended.

I think __exactly__ the same way you do, I just want to remark some important leaks in backbone than in OpenERP are by default.

1.- super:

Brief aside on super: JavaScript does not provide a simple way to call super — the function of the same name defined higher on the prototype chain. If you override a core function like set, or save, and you want to invoke the parent object's implementation, you'll have to explicitly call it, along these lines:

var Note = Backbone.Model.extend({
  set: function(attributes, options) {
    Backbone.Model.prototype.set.apply(this, arguments);

In openerp:

this._super(this, arguments);

2.- Include:

In backbone to overwrite just one attribute in the original object you need to use a little trick.


orignal.Object = original.Object.extend({})



With this little resume I need to ask with you to Anthony or Nicolas help us to understand this decistion.

IMHO, may be the release cycle of backbone is a problem too! because both tools have different approaches and objectives.

3.- May be, licence issues :-s?:


The licence is open but not comply with (A)GPL + private modules [Due to basic restrictions.], I am not sure of this, may be I am speculating.

Falling apart this 3 points, We can list "What backbone has that opener doesn't" but it is not the point, I think it should be great if the decide to use "Flask-tunning + Backbone-tunning" A lot of effort will be reduced, and we can have several benefits (they did already with bootstrap 3 in trunk.

But By far, if you know BackboneJS and read the code, you will be able to work with openerp-web (you are a good example), the big fail here from OpenERP side, is that they should say "We work something like backbone" and since the beginning we can read both documentations and it helps a lot ;-)

Hoping this questions are answered by OpenERP ASAP (because it is important to have documented the technical decistions too!)


1 Comment
Michel Meyer
11/10/13, 10:50 PM

About "important leaks", I just see _super and incude as some sugar... and they can be implemented in backbone too.

About the license, backbone is already included in openerp

"What backbone has that openerp doesn't": - documentation vs "read the code, you will be able to work with openerp-web" - unit tested (code coverage ~100%) - large community - framework like Marionette

I did web-unleashed specially because I want to be free from openerp-web code, I wrap core things I need (connector, qweb,..) and use openerp view just has an interface. (http://bit.ly/19TQiVA)

David Arnold
11/28/14, 6:39 PM

Ping on this very intersting and complete discussion input.

Ask a Question
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