Commit Graph

238 Commits

Author SHA1 Message Date
Thomas Groutars b665478fa7 [FIX] py.js: unhandled prefix `not`
closes #6129
2015-11-19 13:54:26 +01:00
Olivier Dony 0f06e5f54f [FIX] tests: outdated resource paths in manual test files 2015-09-18 15:52:11 +02:00
Denis Ledoux 84e10ad03b [FIX] web: translation of default M2O values in search bar
When a many2one field of a searchview was selected
by default, through a default_*_id within the context,
the many2one value name wasn't translated.

e.g. with Spanish loaded (and l10n_multilang installed),
translate a project.project name in Spanish.
Then, while being in Spanish, in the project.project kanban,
click on the Tasks link of a project (tareas),
then, notice the value of the project name in the
search bar.

opw-632818
2015-04-22 17:53:35 +02:00
Xavier Morel f64a2fa386 [ADD] js tests: more relativedelta tests
* add some more boundary tests and nudges
* add test for weekday

ref #5089
2015-03-03 11:55:18 +01:00
Xavier Morel 62fcce9054 [ADD] JS widgets reference documentation
Also fixed Widget#alive's behavior and tested it
2014-10-07 10:21:44 +02:00
Denis Ledoux 7aa5d397c8 [Revert] cb30783aba & 6349048ba0
[FIX] web: avoid force_reload in list editable
[FIX] web: force load record after reload page

These fixes prevent to open existing record form
2014-10-03 14:03:12 +02:00
Martin Trigaux cb30783aba [FIX] web: avoid force_reload in list editable
When creating a new record in list editable, due to previous commit 6349048, the load_record was called twice and the first record of the current list view (self.dataset.index) was used to fill the new record.
With this, we make sure a new record is indeed created.
Fix the web test to have a default_get call in mock models and increase the number of default_get assertions (for creations in list editable, the default_get is then called twice, not optimal but due to the absence of distinction between empty datarecord and filled with default values).
2014-10-03 11:41:00 +02:00
Géry Debongnie 2d81f2cfdd [FIX] update autocomplete test
Autocompletion of many2one fields only accepts domains in the form of
arrays, not as strings.
2014-09-18 11:52:38 +02:00
Denis Ledoux 82adba4714 [FIX] web: wait onchanges to be processed before save 2014-09-04 17:22:04 +02:00
Christophe Simonis 135962184d [FIX] web: make search by `id` possible.
+ correct tests
2014-08-06 17:27:27 +02:00
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +02:00
Olivier Dony 9132b1d306 [IMP] ir.filters: new filters are local to the menu/action by default
Allow binding an optional `action_id` to filters.
The web client will try to identify the specific
action ID when saving new filters. If no contextual
action exists, the filter is saved globally for
the model.

This will automatically keep filters within their
original menu when there are several menus/actions
leading to a given list of documents.
In some cases the action_id will not match the
filter model, which should be fine (e.g. when opening
a many2one completion popup for model `foo` within
a menu of model `bar`).

It is also still be possible to have a filter apply
to all actions/menus for a given model by manually
deleting the action_id value in the filter
(e.g. via the Manage Filters debug menu).

When updating a filter the action_id value is ignored
so that old global filters will be gradually replaced
by new "local" filters.

Also added an _order to ensure stable ordering of the
filters.
2014-07-01 03:29:05 +02:00
Géry Debongnie 88bb66e784 [FIX] fix tests in autocompletion 2014-06-30 16:13:02 +02:00
Géry Debongnie 0a4a7f3d20 [IMP] new autocomplete widget
Task #5009

This new autocomplete widget (the one used in the search bar) does not
do remote calls automatically, but on demand. In theory, it should lead
to a better user experience, not having the ui blocked every time long
remote calls are done.

It also has the benefits of bringing us one step closer to not
depending on jquery.ui. Bonus point: the code is quite short (< 200 loc
i believe)
2014-06-25 13:26:41 +02:00
Géry Debongnie bb8b659ce3 [FIX] adjust the tests after changes to the searchview
* oe_searchview_custom has been split in oe_searchview_custom and
oe_searchview_filter: a test need to take that into account
* in adjust_top, the parent might not have a $ method.
2014-05-26 16:43:04 +02:00
Géry Debongnie a24020e004 [FIX] update the searchview tests
to accomodate the fact that the searchview has been changed.
Two changes need to be accounted:
(1) the drawer html structure has changed (oe_selected class is
replaced by badge, some li tags are replaced by spans, ...) and
(2) the CustomFilters has been split into CustomReports and
SaveFilter, so there is an extra filter in the drawer inputs.

Also, the searchview need a parent to react to the switch_mode event,
so the tests add a fake parent to the view in make_search_view
2014-05-22 09:59:32 +02:00
Fabien Meghazi 9c58bd5538 [FIX] listview test shall not assume default color is black
bzr revid: fme@openerp.com-20140425093053-3644kvcz13481fxo
2014-04-25 11:30:53 +02:00
Christophe Simonis f1d3f2a0c4 [MERGE] forward port of branch saas-3 up to revid 3995 chs@openerp.com-20140407144625-jfimvsx4mgrkztqv
bzr revid: chs@openerp.com-20140407161728-ccudwnqo970ac8ay
2014-04-07 18:17:28 +02:00
Denis Ledoux f652402dd7 [FIX] web: read_ids of data.js use method search_read if check_access_rule option is true.
This fix is related to revision 3985 revid:dle@openerp.com-20140326142040-pls0dk2kd03z55ro, which did not worked for buffered dataset (virtual one2many line in view form
search_read is used instead of read to not return records for which we lose the access rights

bzr revid: dle@openerp.com-20140327112456-iyceuf9dnn07hwke
2014-03-27 12:24:56 +01:00
Olivier Dony e80a179d02 [FIX] search widgets: m2o autocompletion had been disabled when @operator or @filter_domain were set, but it was actually useful
Was disabled at rev 3878 revid:xmo@openerp.com-20131107111231-nkrllqv0afqdmix6

bzr revid: odo@openerp.com-20140326170818-sc5hqnmq89ayufso
2014-03-26 18:08:18 +01:00
Denis Ledoux 7acaaf5894 [FIX] web: use search_read instead of read on form reload and record reload in list, to check if the user can still read the record
bzr revid: dle@openerp.com-20140326142040-pls0dk2kd03z55ro
2014-03-26 15:20:40 +01:00
Antony Lesuisse 5cc7237f63 [REM] useless jsonrpc tests and controllers
bzr revid: al@openerp.com-20140316141228-0c35ymruttd5mx2j
2014-03-16 15:12:28 +01:00
Christophe Simonis c3827cb8f7 [MERGE] forward port of branch saas-3 up to revid 3967 jke@openerp.com-20140311093515-02xw8phrcqhgz6zx
bzr revid: chs@openerp.com-20140311132200-1bln6gaj80njyh18
2014-03-11 14:22:00 +01:00
Xavier Morel bb7eb52699 [REM] RPC from js/qunit tests
They're a pain in the ass, they never worked right and they're basically
useless. Screw it.

bzr revid: xmo@openerp.com-20140221143518-hv3rjkw2b00ughvh
2014-02-21 15:35:18 +01:00
Xavier Morel cdc83a0763 [FIX] dataset.read_ids should always return records in the order of the parameter ids
BufferedDataSet.read_ids assumes the input and output orders are the same, and
returns wonky results when not the case, which in turns fucks up its cache as
it associates ids and records incorrectly.

bzr revid: xmo@openerp.com-20140225162813-8ofxpiy1012eehgk
2014-02-25 17:28:13 +01:00
Xavier Morel e9a3d8bcec [FIX] enable jsonrpc-auth tests, remove stray log
bzr revid: xmo@openerp.com-20140131154147-oi30v8u8h3c3htx7
2014-01-31 16:41:47 +01:00
Antony Lesuisse f051043a26 [MERGE] trunk-website-al
bzr revid: al@openerp.com-20140131005202-sjsfy3tc8ys1a325
2014-01-31 01:52:02 +01:00
Antony Lesuisse 698d02e3b5 web disable jsonrpc test
bzr revid: al@openerp.com-20140131003956-jo9grgfizich2dlu
2014-01-31 01:39:56 +01:00
Martin Trigaux 802d64ca92 [MERGE] [ADD] ways to correctly handle local datetimes in e.g. domains
* Alter datetime.now(), generate a local datetime (add utcnow() which generates a UTC datetime)
* Implement datetime.replace() to manipulate local datetimes
* Implement date.today(), generates a local date
* Implement datetime.toJSON(), returns a javascript Date (assumes datetime attributes are local)
* Add conversion hook in JSON and JSONP handlers, automatically converts a Date object to a UTC datetime formatted according to server formats

Should allow the generation of correctly working (from the end-user's POV) [Today] filters, amongst other things.
Eg: a local expression in a domain for 'Today 00:00:00' would now be expressed as 'datetime.datetime.now().replace(hour=0, minute=0, second=0)' (no .strftime) and will be converted to UTC when sent to the server

bzr revid: mat@openerp.com-20140128133706-4yp610pp5w06tcia
2014-01-28 14:37:06 +01:00
Xavier Morel 5b7ade9db1 [ADD] ways to correctly handle local datetimes in e.g. domains
* change datetime.now() to generate user-local naive datetimes
* add datetime.utcnow() behaving as the old now()
* add date.today() generating a user-local date (for the current day)
* add datetime.replace() to replace any specific attribute of the
  datetime object (except tzinfo, for now)
* datetime.toJSON() now returns the equivalent javascript Date object
  (warning: uses the datetime attributes directly, since datetimes are
  naive if they were created with utcnow() the Date result is going to
  be complete nonsense). With the previous commit datetime.now()
  generates a user-local now() which is converted to the correct UTC
  datetime when sent to the server.

This means it becomes possible to generate datetime bounds for the
user's local today with either

    datetime.datetime.now().replace(hour=0, minute=0, second=0)

or

    datetime.datetime.combine(
        datetime.date.today(),
        datetime.time())

and once send over JSON-RPC the server will get the local datetime
in UTC to the server's format.

nb: user-local means "in the timezone of the user's browser" in this
context.

bzr revid: xmo@openerp.com-20140122151911-akn1nr6e739eg92s
2014-01-22 16:19:11 +01:00
Gery Debongnie c0c686cd15 [FIX] changes test definition to have the correct number of assertions (addon web)
bzr revid: ged@openerp.com-20140113080856-7h6cnlh675vgi8s2
2014-01-13 09:08:56 +01:00
Gery Debongnie 716d888aaf [IMP] separates a facet test into smaller tests to have better information (addon web)
bzr revid: ged@openerp.com-20140110150836-xgk11tcimhmgpl9z
2014-01-10 16:08:36 +01:00
Xavier Morel fb911b1d43 [FIX] don't provide autocompletion to m2o fields when a custom operator or filter_domain is provided
bzr revid: xmo@openerp.com-20131107111231-nkrllqv0afqdmix6
2013-11-07 12:12:31 +01:00
Christophe Simonis 88292396c7 [MERGE] forward port of branch saas-2 up to revid 3865 chs@openerp.com-20131031111945-u3wi11e4rykpslme
bzr revid: chs@openerp.com-20131030183314-d75tbpxjjk3u79er
bzr revid: chs@openerp.com-20131031144026-09f3eqfwfj2bcefs
2013-10-31 15:40:26 +01:00
Christophe Simonis 12e262e5c9 [FIX] web: correct "date(time) on 31" tests
bzr revid: chs@openerp.com-20131031111945-u3wi11e4rykpslme
2013-10-31 12:19:45 +01:00
Christophe Simonis d9ca536396 [FIX] web: correct date and datetime parsing at end of month.
As `new Date()` return the current date, when we are the 31,
setting the month to a month with less than 31 days will change
the date to next day (1st of next month). This result to a date(time)
object one month ahead of the wanted date(time).

bzr revid: chs@openerp.com-20131031103333-vt68132ptj9sbr04
2013-10-31 11:33:33 +01:00
Denis Ledoux 6bf5d02627 [MERGE] Forward-port of latest saas-2 bugfixes, up to rev. 3859 rev-id: dle@openerp.com-20131023110926-tc2n3oqg0l2ga138
bzr revid: dle@openerp.com-20131023113414-mlwppd4d7vyh1tyj
2013-10-23 13:34:14 +02:00
Denis Ledoux 3279b24128 [MERGE] Forward-port of latest saas-1 bugfixes, up to rev. 3748 rev-id: dle@openerp.com-20131023103308-18pj2gqq3imrcir7
bzr revid: dle@openerp.com-20131023110926-tc2n3oqg0l2ga138
2013-10-23 13:09:26 +02:00
Denis Ledoux 4e0530f16c [FIX]web: test testing the customer filter save was wrong, was using wrong method text() instead of val() to set the filter name
bzr revid: dle@openerp.com-20131022165318-2imkhgb6iecalbbi
2013-10-22 18:53:18 +02:00
niv-openerp 6475f3225d Removed jsonprpc2 test because it fails in phantomjs
bzr revid: nicolas.vanhoren@openerp.com-20131011133208-gjz0iprk63447qub
2013-10-11 15:32:08 +02:00
niv-openerp 083d3fc91e Added tests about timeouts and implemented it in jsonprpc2
bzr revid: nicolas.vanhoren@openerp.com-20131011133054-0dx3wxqcqbdocnlf
2013-10-11 15:30:54 +02:00
niv-openerp e059b1c5c0 Added test with openerp sessions
bzr revid: nicolas.vanhoren@openerp.com-20131011123416-wsfr0g1pusa0wftp
2013-10-11 14:34:16 +02:00
Olivier Dony a382a62555 [FIX] Revert data.js test that was not reverted along with the corresponding patch in previous commit
See also reverted commit revid:nicolas.vanhoren@openerp.com-20130805130458-21w806v9wc456oq4

bzr revid: odo@openerp.com-20130906154422-jkdf2v2stgcd6akx
2013-09-06 17:44:22 +02:00
niv-openerp 2e6d38f068 [IMP] Moved the date formatting functions in openerpframework.js
bzr revid: nicolas.vanhoren@openerp.com-20130808134520-v0n2b29vuffstyu0
2013-08-08 15:45:20 +02:00
niv-openerp c63a86c593 [IMP] Merged corelib.js and coresetup.js into core.js
bzr revid: nicolas.vanhoren@openerp.com-20130806122623-pq6bpkjk65jx0fnp
2013-08-06 14:26:23 +02:00
niv-openerp cb55e11c70 Put everything in the framework directly in the openerp namespace instead of the openerp.web namespace.
bzr revid: nicolas.vanhoren@openerp.com-20130806085812-ek8v8k0x4m7ocu4f
2013-08-06 10:58:12 +02:00
niv-openerp ab4d080450 Desactivated some tests that, once again, do not work in the runbot
bzr revid: nicolas.vanhoren@openerp.com-20130805140404-x15shdy1a4b3zqvk
2013-08-05 16:04:04 +02:00
niv-openerp 07617fef45 Added tests for the models
bzr revid: nicolas.vanhoren@openerp.com-20130805134548-n6j48iv7823u3eh7
2013-08-05 15:45:48 +02:00
niv-openerp 226b142ac6 Simplified a little the Query class by removing a reference to a controller and using call_kw instead
bzr revid: nicolas.vanhoren@openerp.com-20130805130458-21w806v9wc456oq4
2013-08-05 15:04:58 +02:00
niv-openerp 70e3af6312 Desactivated some tests because the phantomjs runner crashed
bzr revid: nicolas.vanhoren@openerp.com-20130805125045-q1x1bciwcdyabg8v
2013-08-05 14:50:45 +02:00