Odoo Help

17
1
Nhomar Hernandez
On 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.

backbone:

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

Openerp

originalObject.include({})

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?:

https://github.com/jashkenas/backbone/blob/master/LICENSE

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!)

Regards.

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)

Michel Meyer
on 11/10/13, 10:50 PM
0
David Arnold
On 11/28/14, 6:39 PM

Ping on this very intersting and complete discussion input.

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

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

6 follower(s)

Stats

Asked: 8/13/13, 4:53 AM
Seen: 9216 times
Last updated: 12/17/16, 7:54 PM