Commit Graph
25 Commits
Author SHA1 Message Date
Aaron Bohy 74801feb0c [FIX] google_drive: tests: hasSidebar param
Rev. 5140d3d1 fixes the google_drive override of the Sidebar in
saas-16. The test specifies param 'sidebar: true', so that a
sidebar is instantiated by the FormView. This param has been
renamed to 'hasSidebar' by rev. 32b8cec in master, so the test
broke when rev. 5140d3d1 has been forwardported to master, and it
thus needed to be adapted.
2018-01-23 08:23:22 +01:00
Lucas Perais (lpe) 5140d3d10f [FIX] google_drive: adpating to new framework JS
The google_drive module has not been converted to the new Odoo Javascript framework, and hence was not even started.
This commit corrects that.

The logic is essentially the same as in previous versions

The test implemented contains an inevitable hack that makes sure no other test is affected,
in particular by the new route that the module calls (and that any Sidebar will call)

OPW 801145

closes #21993
2018-01-17 09:35:32 +01:00
Géry Debongnie 2106e3dd2e [REF] web, *: simplify our RPC system (in JS)
The RPC system was not completely satisfactory, we decided to prepare
the future and do it properly.  This commit introduces the new rpc
system, which replace the previous new one.  We now simply have a
method, this._rpc, which takes a dictionary of parameters.  The idea is
that depending on the parameters, it is able to add correct default
value when necessary.

For situations where we don't have the this._rpc method, we can use the
rpc.query method, which takes the same arguments, but directly calls
ajax.rpc instead of triggering up some events.
2017-04-11 19:44:38 +02:00
Géry Debongnie 86a87aa8b0 [REF] *: use _rpc method for all rpcs
The _rpc method is now the preferred method to do a rpc, so we need to
update all calls.
2017-04-11 19:44:38 +02:00
Géry Debongnie e574027056 [REF] web,*: remove 'web.model' and 'web.dataModel
Use this.rpc instead of Model object, with web.ajax if necessary.

nb: EventDispatcherMixin include now the custom_events managment instead
of widget
2017-04-11 19:44:38 +02:00
Christophe Simonis be0c9596c8 [MERGE] forward port branch 9.0 up to 8092ee8c6a 2017-03-06 12:21:27 +01:00
Christophe Simonis ea527cc3fc [MERGE] forward port branch saas-6 up to 9ff0eb0586 2017-03-06 11:29:04 +01:00
Christophe Simonis 9ff0eb0586 [MERGE] forward port branch 8.0 up to 1246680756 2017-03-06 11:24:16 +01:00
Christophe Simonis 2b8605c6e2 [FIX] google_drive: show icon via css instead of injecting html 2017-03-01 18:39:34 +01:00
Fabien Pinckaers 4c8e908b49 [IMP] Speed up app switcher loading: 645k --> 137k lossless compression for all icons 2016-02-26 11:39:38 +01:00
Christophe Matthieu 500c33b184 [IMP] web: split model.js into model.js and data_model.js. Web js modules must call web.DataModel. 2015-07-10 16:32:35 +02:00
Aaron Bohy 1280bf2513 [IMP] Web and all views: ControlPanel atomic update
Change the logic of rendering and displaying/hidding the control
elements (buttons, sidebar and pager) of all views. The views do no
more render automatically their elements as this is rather done
through the render_[element] function called by the ViewManager.
This function only appends the element to the $node given as argument.
If no argument is given, then it may appends it to the DOM directly,
within the adequate div of its template.
This allows the ViewManager to attach/detach all elements of the
ControlPanel in an atomic may, to prevent the ControlPanel from
flickering.
Also detach the contents of the ControlPanel in headless mode. Headless
means that the ControlPanel exists, but is hidden. Detaching its
contents permits to have a cleaner DOM.

Also remove the oe_form_dirty class on the buttons in the FormView, as
this class is only used on the view itself.

Side changes:
* base_import: import.js:
    Extend render_buttons function to be compliant with the new buttons
    rendering logic
* board: dashboard.js:
    Set flag search_view to True as the searchview is needed for the
    Views displayed in the Dashboard to retrieve the records to display.
    Necessary since we do no more construct the searchview when this
    is set to false
* google_drive: drive.js,
  share: share.js:
    Module extending the Sidebar widget often add their own buttons
    by extending the start(), which is called each time the Widget
    is appended to the DOM. With our new design, this could be done
    in start() anymore as it should be done only one. It is now done
    in init() instead.
2015-03-20 16:34:39 +01:00
Géry Debongnie 4fdf74fe21 [IMP] web+addons: improvement to module system
The module system needs to know the dependencies of a given module
before executing the function.  This is why the dependencies were
defined once in an array, and then were described one more times in the
call to require.

But a trick can simplify this: the boot function can parse the string
representation of the module and extract the calls to require from it.
It is more work for the processor, but it leads to simpler module
definitions.
2015-03-18 09:23:37 +01:00
Géry Debongnie 858e46e977 [REF] update various small addons to the new module system 2015-03-18 09:01:52 +01:00
Christophe Simonis aec02cb493 [MERGE] forward port of branch 8.0 up to d350f5b 2015-02-20 18:16:01 +01:00
Denis Michiels b8ecbe3191 [FIX] google_drive : translate the record
Pass the context, with the language setting, when the record is read to
fill the google drive template. That allows to translate the name of the
document and all the informations inside.

opw-626675
2015-02-20 16:08:10 +01:00
Géry Debongnie 240d71f9fa [IMP] various addons: add pivot views next to graph views
The graph view has been splitted into pivot/graph view.  This commit add
a pivot view whenever a graph view was defined.
2014-12-19 14:34:24 +01:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Olivier Dony fba0d3da9a [REM] google_drive: remove unused (but sourced) Goggle API JS lib
Should have been removed when Google Drive API was switched to
server-side Python at revid:pga@tinyerp.com-20130523104155-83gmp2gucvackppv

bzr revid: odo@openerp.com-20140403143448-vds7crizqed0l80a
2014-04-03 16:34:48 +02:00
Denis Ledoux d69046f327 [FIX]google_drive: add in more menu duplicate when clicking on form switch button
bzr revid: dle@openerp.com-20130723133055-evcyunmih9uma3k4
2013-07-23 15:30:55 +02:00
Antony Lesuisse fc70550ca2 [IMP] move html module description and icon
bzr revid: al@openerp.com-20130628100441-swpanf2jwcojygh4
2013-06-28 12:04:41 +02:00
Denis Ledoux 53358465b3 [REF]google_docs to google_drive, using oauth authentication
bzr revid: dle@openerp.com-20130627160715-ok7q82cyivirzri1
2013-06-27 18:07:15 +02:00
Denis Ledoux afa6ea8e4f [IMP]google_drive: cleanup
bzr revid: dle@openerp.com-20130626145213-37to2q3q9jh4lnsg
2013-06-26 16:52:13 +02:00
Denis Ledoux f694c37b83 tmp
bzr revid: dle@openerp.com-20130626133552-gtfhzvxsi1oj3pdm
2013-06-26 15:35:52 +02:00
Denis Ledoux c74517990f [RENAME]google_docs => google_drive
bzr revid: dle@openerp.com-20130626093019-krwt5eamagmd5amu
2013-06-26 11:30:19 +02:00