Commit Graph

97 Commits

Author SHA1 Message Date
Leonardo Rochael Almeida 1005299955 [FIX] YAML: `!menuitem` tag handling
The fetched ID was the one of the parent instead of the ID of the imported menu.
2015-09-28 17:15:38 +02:00
Leonardo Rochael Almeida 39745a4290 [FIX] YAML: Add support for `reference` fields in YAML
YAML import was missing support for loading values into fields
where `field.type == 'reference'`.
2015-09-28 17:15:38 +02:00
Leonardo Rochael Almeida 11886f4d9f [FIX] YAML: typos 2015-09-28 17:15:37 +02:00
Leonardo Rochael Almeida 5760a5d547 [IMP] YAML: Better Error message for bad xml_id
Use the original xml_id, which is present in the file, instead of the
checked one.
2015-09-28 17:15:37 +02:00
Christophe Simonis 00afd776fd [MERGE] forward port of branch saas-3 up to dbe60c7 2015-07-07 15:42:58 +02:00
Christophe Simonis dbe60c7bce [MERGE] forward port of branch 7.0 up to 3add4f6 2015-07-07 15:40:31 +02:00
Martin Trigaux 3add4f665c [FIX] tools: accept multilines on_change
Allow to write on_change on several lines (accepted by view parser but was not
by yaml parser, making false positive at 595216b)
2015-07-07 15:36:15 +02:00
Xavier Morel f5b88f6309 [IMP] minor perf improvement during tests
During tests, some creation of user records would unnecessarily trigger
password reset or set a password, both of which would trigger password
hashing which takes some time (for good reasons).

Fix by:
* passing no_reset_password in YAML tests and some Python tests still
  missing it (a number of Python tests already used it)
* removing passwords from YAML records as they're never necessary, the
  test user records are not expected to ever log in
2015-06-26 14:22:29 +02:00
Denis Ledoux a175ed6b2f [MERGE] forward port of branch saas-3 up to 30674c3 2014-12-23 14:03:38 +01:00
Denis Ledoux 30674c3ed6 [MERGE] forward port of branch 7.0 up to e151e8f 2014-12-23 13:50:25 +01:00
Raphael Collet f2e4a10e1a [IMP] use model._fields instead of model._all_columns to cover all fields
The old-api model._all_columns contains information about model._columns and
inherited columns.  This dictionary is missing new-api computed non-stored
fields, and the new field objects provide a more readable api...

This commit contains the following changes:

 - adapt several methods of BaseModel to use fields instead of columns and
   _all_columns

 - copy all semantic-free attributes of related fields from their source

 - add attribute 'group_operator' on integer and float fields

 - base, base_action_rule, crm, edi, hr, mail, mass_mailing, pad,
   payment_acquirer, share, website, website_crm, website_mail: simply use
   _fields instead of _all_columns

 - base, decimal_precision, website: adapt qweb rendering methods to use fields
   instead of columns
2014-11-04 13:47:57 +01:00
Leonardo Pistone 9b78f06e47 yaml: use selected user and not admin for defaults 2014-09-05 17:31:59 +02:00
Leonardo Pistone 0edfc3fbc9 yaml: use selected user and not admin for onchange
Fixes: #1885
2014-09-05 17:31:47 +02:00
Denis Ledoux ae65be2b2a [MERGE] forward port of branch saas-5 up to 0739bc4 2014-08-11 15:58:02 +02:00
Denis Ledoux 7ecaab9fe2 [MERGE] forward port of branch saas-3 up to 2f4be42 2014-08-11 15:30:37 +02:00
Denis Ledoux 2f4be42d8c [MERGE] forward port of branch 7.0 up to 3632949 2014-08-11 15:28:54 +02:00
Denis Ledoux 2b0487113a [FIX] yaml tests: Set on_change keys not in view logger as debug instead of warning
This is related to commit d31faceb67
(This is to avoid the runbot being yellow if on_change methods have extra keys in the returned value, this is not wrong, the web client will simply ignore them).
2014-08-11 11:11:36 +02:00
Denis Ledoux 0a1e4a05b2 [MERGE] forward port of branch saas-3 up to 81a902a 2014-08-08 17:06:39 +02:00
Denis Ledoux 81a902a07d [MERGE] forward port of branch 7.0 up to 5f696ba 2014-08-08 16:18:35 +02:00
Denis Ledoux d31faceb67 [FIX] yaml tests: extra key in on_change result isn't that bad.
In the return result of an on_change, having keys which are not ine the view is not that bad, it is not an actual problem.

Display warning instead of asserting all the keys are in the views.
2014-08-08 11:40:30 +02:00
Wolfgang Taferner b09a766f0a [IMP] workflow: add sequence for ordering workflow transitions (split/join mode especially for XOR)
Makes ordering transitions easier and more deterministic.

(Rebase of #1564)
2014-08-05 12:26:28 +02:00
Xavier Morel 29a6dad803 [REM] threaded yaml import (useless and unused) 2014-07-15 13:21:57 +02: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
Antony Lesuisse 82372e6a02 move tests
move test modules
remove xml test
add phantomjs test
readd remove uninstall test (currently disabled because of cr.commit)

bzr revid: al@openerp.com-20140209003745-ehrx8ikwkmusa644
2014-02-09 01:37:45 +01:00
Christophe Simonis eb091de615 [FIX] yaml import: not all views have a name
bzr revid: chs@openerp.com-20140127180230-eybz2dlc7qdjy1yh
2014-01-27 19:02:30 +01:00
Xavier Morel 6aa79d8cb3 [IMP] attempt to improve yaml test message in order to make its errors somewhat less cryptic
and make it easier to understand why it's whining.

bzr revid: xmo@openerp.com-20140108133722-9ac9l3w7wij0pl1i
2014-01-08 14:37:22 +01:00
Christophe Simonis 84fd6ea4f1 [FIX] yaml import: for record tags, do not shadow values explicitly set in yaml.
bzr revid: chs@openerp.com-20131124115235-13sc11q51v95hxfr
2013-11-24 12:52:35 +01:00
Raphael Collet 09be864f1d [IMP] replace all tests like 'registry.get(X)' by 'X in registry' where X is non static
bzr revid: rco@openerp.com-20130329140723-dnrl02saky570xg0
2013-03-29 15:07:23 +01:00
Vo Minh Thu 4ed7ec95b7 [MERGE] removed LocalService("workflow"), Logger class, and TEST log level.
bzr revid: vmt@openerp.com-20130327170639-uamgg7shlmtxgpxv
2013-03-27 18:06:39 +01:00
Vo Minh Thu d6ea526e36 [MERGE] openerp.pooler is deprecated.
bzr revid: vmt@openerp.com-20130327164045-ziw4lj50owdvmfbw
2013-03-27 17:40:45 +01:00
Vo Minh Thu ce58e16138 [REF] yaml_import: removed nested import openerp.
bzr revid: vmt@openerp.com-20130327154425-uu1fa01tdhrjt8kn
2013-03-27 16:44:25 +01:00
Vo Minh Thu 1e7e2ca753 [REF] no longer use openerp.pooler.
Either use openerp.modules.registry.RegistryManager when the full
new() signature is needed, or use openerp.registry().

Replaced also some pool.get() with pool[] because KeyErrors
are better than AttributeErrors on None.

bzr revid: vmt@openerp.com-20130327111014-2i0hlvpy5y5ku7hm
2013-03-27 12:10:14 +01:00
Vo Minh Thu a4fbd26541 [REF]: use openerp.workflow instead of LocalService("workflow").
bzr revid: vmt@openerp.com-20130326162040-kkq46wrur3pgn6eh
2013-03-26 17:20:40 +01:00
Vo Minh Thu c313b4073a [REF] logging: removed pseudo log-level TEST.
When --test-enable is used, it is expected that test output is visible,
thus using log-level INFO is natural.

On the down side you lose the nice blue hint that tests did actually
run when --log-level test was given.

bzr revid: vmt@openerp.com-20130326155844-83e2tcqokvblr0ln
2013-03-26 16:58:44 +01:00
Vo Minh Thu 385491f46e [IMP] yaml_import: add openerp in the evaluation context.
bzr revid: vmt@openerp.com-20130325144833-aos5t6x5bc8vi0ss
2013-03-25 15:48:33 +01:00
Fabien Pinckaers 0a933f44e5 [IMP] small fix in YAML XML import
bzr revid: fp@openerp.com-20121201113524-8n94vnpxt3g21b1b
2012-12-01 12:35:24 +01:00
Olivier Dony 7f5ad72429 [MERGE] Forward-port 6.1 bugfixes up to rev. 4307
rev.4307 = rev-id launchpad_translations_on_behalf_of_openerp-20121125065030-g5if5pybr61la4yj

bzr revid: odo@openerp.com-20121126160320-t2suuik6lhk6wl0x
bzr revid: odo@openerp.com-20121126161836-mv8yymzgbnmif4ve
bzr revid: odo@openerp.com-20121126162023-ejvsapwouyudw6c6
bzr revid: odo@openerp.com-20121126181527-d4yx15372bis77qj
2012-11-26 19:15:27 +01:00
Vo Minh Thu 7d1c5ac4ff [FIX] yaml_import: why the hell is False not iterable.
bzr revid: vmt@openerp.com-20121031164512-qegyw1q865neivgt
2012-10-31 17:45:12 +01:00
Vo Minh Thu e44f673e61 [FIX] tools.yaml_import: change w.r.t. etree FutureWarning, which was:
FutureWarning: The behavior of this method will change in future versions. Use
specific 'len(elem)' or 'elem is not None' test instead.

bzr revid: vmt@openerp.com-20121031161437-pzz2czkaq6rw5t31
2012-10-31 17:14:37 +01:00
Odowan Kenobi 55f8e0485b [IMP] yaml_import: allow to use a view from another module when creating a record in yaml by prefixing it with <module_name> + '.' (e.g: account.supplier_invoice_form_view). A great patch from odony. Hooray
bzr revid: qdp-launchpad@openerp.com-20121030152824-0n2gazacag2hzkbj
2012-10-30 16:28:24 +01:00
Quentin (OpenERP) 820c2551bb [IMP] tools, yaml_import: the values given to the creation should only include the fields that aren't readonly in the view. Because that's what clients do
bzr revid: qdp-launchpad@openerp.com-20121019110604-1gvfcgqvwd1izh71
2012-10-19 13:06:04 +02:00
Quentin (OpenERP) 536cb8775c [TEST] removing values at record creation in yaml
bzr revid: qdp-launchpad@openerp.com-20121018184323-5kq9fb54slij3ioo
2012-10-18 20:43:23 +02:00
Quentin (OpenERP) 6046f9f226 [REF] yaml_import: comments refactoring
bzr revid: qdp-launchpad@openerp.com-20121005120653-jyq8352trvki24uc
2012-10-05 14:06:53 +02:00
Quentin (OpenERP) e143ca2a5b [FIX] yaml_import: on _create_record, when we gather the default values on the object we can't use base.main_company´ in the yaml file and it's not compatible with the function)
bzr revid: qdp-launchpad@openerp.com-20121004154032-qyq5gdur383bfxl9
2012-10-04 17:40:32 +02:00
Quentin (OpenERP) 9255d5d3ef [REF] yaml_import.py: some doc and error messagse improved
bzr revid: qdp-launchpad@openerp.com-20121004122418-a93kll1v7kqfrfc2
2012-10-04 14:24:18 +02:00
Quentin (OpenERP) 74f061ebee [IMP] yaml_import.py: comments and documentation improved for _create_record()
bzr revid: qdp-launchpad@openerp.com-20121004121522-ytttm7xulvo8i1wz
2012-10-04 14:15:22 +02:00
Quentin (OpenERP) 3d1b4398bf [REf] yaml_import.py: refactoring of _create_record()
bzr revid: qdp-launchpad@openerp.com-20121004115617-ihb4j3tdeco68vob
2012-10-04 13:56:17 +02:00
Quentin (OpenERP) bcf6dccf2d [MERGE] trunk
bzr revid: qdp-launchpad@openerp.com-20121004084807-i3vh4fw8sk7nz7ek
2012-10-04 10:48:07 +02:00
Quentin (OpenERP) bc0e25938a [FIX] yaml import: if a field has a default value, we must call its on_change()
bzr revid: qdp-launchpad@openerp.com-20121003082306-ml0nodz6ubriwtpi
2012-10-03 10:23:06 +02:00
Quentin (OpenERP) 261e33f740 [FIX] yaml_import: the parent default values must be complete before calling the onchanges()
bzr revid: qdp-launchpad@openerp.com-20121002160055-ew4377e7jcqlgzv7
2012-10-02 18:00:55 +02:00