Commit Graph
26 Commits
Author SHA1 Message Date
Olivier Dony 695716efb0 [FIX] P3: remove pycompat.{keys,items,values} helpers
Now that we're closer to switching to P3 for good, these helpers have
outlived their usefulness, and mostly add noise.

All remaining dict.iter*() or dict.view*() must be converted to the
normal keys(), values() or items() calls.

Whenever the result is likely to be used for more than the scope of a
loop, or when the dict needs to be modified during iteration, the calls
must be wrapped in a ``list()``, to protect the new P3 semantics.
Those cases are very exceptional.

Also removed some dead code or improved the API to remove unnecessary
conversions.
2017-08-20 23:25:54 +02:00
xmo-odoo fffaf735f5 [FIX] P3: list -> iterable builtins (#16811)
In Python 3:

* various builtins and dict methods were changed to return
  view/iterable objects rather than lists
* and the separate Python 2 view/iterable builtins and methods were
  removed altogether

This is problematic when using these items as list (which the happens
repeatedly in Odoo), but more viciously when iterating *multiple times*
over them (which also happens, which I've messed up multiple times while
writing this, and which is a pain to debug even when you've just created
the issue).

Convert all code using these to semantics-matching cross-version
helper functions to get the LCD behaviour between P2 and P3, and
forbid the builtins via lint.

issue #8530
2017-05-10 09:39:55 +02:00
Géry Debongnie 905e01921f [REF] web, *: redesign all JS views
This commit introduce a full redesign of all JS views.  We started
basically from scratch.  The goal was to unify all the various views
under a common framework, to make them testable, to make then usable in
different conditions (in studio, or in the frontend), and to make our
lives easier.

Some important points are:
- we introduced new coding guidelines (camelCase, 80 chars width, ...)
- we have a brand new testing framework (still QUnit based)
- kanban view moved to the web addon
- calendar view (formerly web_calender) moved to web as well
- the tree view was removed
- all new code should be documented

We hope that this code is the start of a new era for the Odoo web
client, we want to have a high quality codebase, well documented, well
tested, well designed.

Work done by the framework team: mostly aab, ged, chm, dmo, qsm
2017-04-11 19:44:38 +02:00
Raphael Collet 3649b7f359 [FIX] base: access rights of ir.model and ir.model.fields
This partially reverts commits 5d746d0ac6 and
73de86c768.

The tightening of access rights was too strong: regular users need to be able
to read models and fields (to create an email templace, for instance.)

[FIX] ir_values: in `get_actions`, exclude field `code`
2017-01-17 16:15:26 +01:00
Raphael Collet 73de86c768 [IMP] base: tighten ir.model.fields access rights 2017-01-03 16:52:49 +01:00
Raphael Collet 72afd28230 [FIX] remove or convert old-API calls 2016-08-31 17:21:55 +02:00
Raphael Collet bf668b64c1 [IMP] all: clean usage of safe_eval
Specifically: do not import `safe_eval` as `eval`, keep it explicit instead.
2016-08-11 15:36:56 +02:00
fwi-odoo 271ba327b4 [MOV][IMP] web_diagram: reorganize files, add license and clean imports 2016-08-03 13:42:06 +02:00
Srushti Patel 9994b74d6a [FIX] web_diagram: Fixed broken diagram view. 2016-08-01 17:34:36 +02:00
Olivier Dony 8d745f9f50 [FIX] account, mail, etc.: uniformize evaluated expressions
opw-626694
2015-05-21 15:26:35 +02:00
sebalix 8e7e6dfaa3 [FIX] web_diagram, unlink connectors/transitions between nodes from the diagram view (transitions IDs sent to the web client were strings instead of integers) 2014-10-11 21:49:44 +02:00
Antony Lesuisse 401099d358 [IMP] move http layer from openerp-web to openobject-server, convert controllers to the new route api
bzr revid: al@openerp.com-20131027171717-dzqx2264p152lq8y
2013-10-27 18:17:17 +01:00
Christophe Simonis 42ac45e290 [FIX] web_diagram: use new @route API to force auth of session
bzr revid: chs@openerp.com-20131015141254-xk1ot8uxkthbaub1
2013-10-15 16:12:54 +02:00
Fabien Meghazi 6637e05898 [FIX] Fixed diagram view
bzr revid: fme@openerp.com-20121206095123-4nybio4m9dtb9z9o
2012-12-06 10:51:23 +01:00
Antony Lesuisse ae6ff0764b web remove common, fix imports
bzr revid: al@openerp.com-20121010203753-azrcz3k2kd44ni24
2012-10-10 22:37:53 +02:00
Xavier Morel 8ec0fda0c3 [IMP] add diagram name (name_get) above 'new node' button, so user knows what he's looking at
bzr revid: xmo@openerp.com-20120229102948-jfl1pbbg3t1460il
2012-02-29 11:29:48 +01:00
Xavier Morel bd8f8c9be3 [FIX] handling of fields back to the diagram's main model while creating and editing nodes
lp bug: https://launchpad.net/bugs/932773 fixed
lp bug: https://launchpad.net/bugs/932805 fixed

bzr revid: xmo@openerp.com-20120216150434-bnrku6qj8r10sltj
2012-02-16 16:04:34 +01:00
Xavier Morel af8864d571 [FIX] imports to handle conflicts with e.g. web.py in embedded mode
bzr revid: xmo@openerp.com-20120210103426-b20ass3mwx2ay9c4
2012-02-10 11:34:26 +01:00
Xavier Morel 420ce20c23 [FIX] correctly implement transition labels in diagram view
transition labels were hardcoded to the 'signal' field of the transition object, even
though labels are returned by graph_get as long as graph_get is given the correct
'label' parameter (which should be the value of arrow/@label from the view)

lp bug: https://launchpad.net/bugs/911259 fixed

bzr revid: xmo@openerp.com-20120110105429-k1u66l205niu49e1
2012-01-10 11:54:29 +01:00
Xavier Morel 937fd7a14c [IMP] web_diagram: dict.update call, use kwargs instead of creating an immediately discarded dict in-place
bzr revid: xmo@openerp.com-20120110100103-h7gghm1lzg5h6a2l
2012-01-10 11:01:03 +01:00
Xavier Morel 4ba8ac9d3e [IMP] node shapes handling
bzr revid: xmo@openerp.com-20111026125742-7xpcn0jo75xrfuy1
2011-10-26 14:57:42 +02:00
Xavier Morel 73ef156a9f [REM] dead code in Python
bzr revid: xmo@openerp.com-20111026080152-triziaq8aqp4noi1
2011-10-26 10:01:52 +02:00
Antony Lesuisse 0d79dca93f [IMP] cleanup of web.common
bzr revid: al@openerp.com-20111005175826-7fzk3wesvz198kpm
2011-10-05 19:58:26 +02:00
Xavier Morel 38960ee912 [MERGE] diagram view
bzr revid: xmo@openerp.com-20110906082222-r0e0glqmr0hlub55
2011-09-06 10:22:22 +02:00
Antony Lesuisse d1d7dd6c87 renamse base to web part2
bzr revid: al@openerp.com-20110905122815-m99c0w1lkzxxjh8o
2011-09-05 14:28:15 +02:00
Antony Lesuisse bedfc48dcf rename base into web part1
bzr revid: al@openerp.com-20110905110309-egx167t1ni1fzho1
2011-09-05 13:03:09 +02:00