Commit Graph

1268 Commits

Author SHA1 Message Date
Vo Minh Thu ec3ea4197e [FIX] tools.translate: release.support_email has been removed, so we no longer set the Report-Msgid-Bugs-To value in .po files.
lp bug: https://launchpad.net/bugs/873959 fixed

bzr revid: vmt@openerp.com-20111014150210-qs7n58cocvnjputl
2011-10-14 17:02:10 +02:00
Christophe Simonis 952e4cf602 [IMP] command line: move the option "addons-path" to the right group
bzr revid: chs@openerp.com-20111014093626-4ndm6kzgxd2idmjn
2011-10-14 11:36:26 +02:00
Christophe Simonis a760d1f75a [IMP] do no hardcode the port for the default value of ir.config_parameter web.base.url
bzr revid: chs@openerp.com-20111014093328-lztmfdnekti62i43
2011-10-14 11:33:28 +02:00
Olivier Dony 462f808500 [IMP] ir.model.data: sanity check to help prevent external IDs conflict between models
bzr revid: odo@openerp.com-20111013163316-gjct0pyrxfz9bm45
2011-10-13 18:33:16 +02:00
Olivier Dony 8d994ad625 [MERGE] added authenticate() API method for checking credentials w/ UA environment
bzr revid: odo@openerp.com-20111013152007-xj780k9r7j9roipx
2011-10-13 17:20:07 +02:00
Christophe Simonis bd7c5ee6f8 [IMP] base: authenticate: use "base_location" key instead on "host"
bzr revid: chs@openerp.com-20111013143245-vrcs89hennc2beu4
2011-10-13 16:32:45 +02:00
Olivier Dony 97ba7be42d [IMP] res.users,web_services: new authenticate() API method for testing credentials
Provides a way to login for a given environment, passing
      user agent environment parameters.
      Currently used to initialize the web.base.url config
      parameter based on the web host whenever the admin user
      logs in.

bzr revid: odo@openerp.com-20111013104750-y0natm9v3wapn10l
2011-10-13 12:47:50 +02:00
Quentin (OpenERP) 2be7586c54 [FIX] fields.related: fix example in docstring
bzr revid: qdp-launchpad@openerp.com-20111013093423-lynuxoan01327jv9
2011-10-13 11:34:23 +02:00
Olivier Dony c18e1fc203 [FIX] res.users: last login time should use UTC like all server-side timestamps
bzr revid: odo@openerp.com-20111012162927-iq83m08vuwj43syz
2011-10-12 18:29:27 +02:00
Olivier Dony 0d2bc8f3ae [FIX] modules.graph: avoid crash when a module has been deleted from the filesystem
bzr revid: odo@openerp.com-20111012155818-u07arzkokf9zshr0
2011-10-12 17:58:18 +02:00
Olivier Dony abf626b644 [IMP] ir.config.parameter: move all default params together
bzr revid: odo@openerp.com-20111012155707-fgb0pn8dj2l0ukiu
2011-10-12 17:57:07 +02:00
Vo Minh Thu bfbfbc4ac6 [FIX] orm.copy(): corrected return value in docstring.
bzr revid: vmt@openerp.com-20111012090357-2lt8md5s37qp2vm1
2011-10-12 11:03:57 +02:00
Olivier Dony 76c702ca3c [FIX] Model.import_data docstring: cleanup + clear RST warnings for autodoc
The pipe character is taken as an inline substitution
marker, and is easy to avoid in most cases except within
literal blocks.

bzr revid: odo@openerp.com-20111011171148-rluwokcsx7i38i6e
2011-10-11 19:11:48 +02:00
Olivier Dony 4140e3546a [FIX] expression: proper handling of empty string in m2o domain criterions
Also fixed incorrect name_search() implementations in
res.partner and res.currency, and added corresponding
tests.

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

bzr revid: odo@openerp.com-20111011163435-szj9vm6x9x8nryn8
2011-10-11 18:34:35 +02:00
Olivier Dony 7f34a19db6 [MERGE] new ORM method for converting o2m commands sequences to record dicts, useful for addons (by Xavier Morel)
bzr revid: odo@openerp.com-20111011144927-mch6uy11z347fcku
2011-10-11 16:49:27 +02:00
Olivier Dony c16befa983 [IMP] orm: resolve_o2m_commands_...: simplify assert, remove context doc following guidelines
bzr revid: odo@openerp.com-20111011144146-b9rt5kc9sb5lj0dr
2011-10-11 16:41:46 +02:00
Xavier Morel 34fcc08a1f [IMP] docstring for resolve_o2m_commands_...
bzr revid: xmo@openerp.com-20111011094551-vr27on7iibdd9tv6
2011-10-11 11:45:51 +02:00
Xavier Morel 8507ceddcf [IMP] make resolve_o2m_commands_to_record_dicts's result eager as per vmt's suggestion
bzr revid: xmo@openerp.com-20111011085715-cvcficcy4di9q29i
2011-10-11 10:57:15 +02:00
Xavier Morel 2646a34cf0 [ADD] don't blow up on a singleton DELETE_ALL command (that command takes no parameters, so can have just (5,))
bzr revid: xmo@openerp.com-20111011084852-hborz317ru5pbzux
2011-10-11 10:48:52 +02:00
Xavier Morel 8734ffb6c2 [IMP] raise assertion error if an o2m command is not one of CREATE, UPDATE or LINK_TO
bzr revid: xmo@openerp.com-20111011083824-4g0ros6f3xgslkq4
2011-10-11 10:38:24 +02:00
Xavier Morel 4d0a189796 [IMP] handle case where o2m commands are pairs instead of triplets
bzr revid: xmo@openerp.com-20111011081202-y1ou74u038o2kl58
2011-10-11 10:12:02 +02:00
Xavier Morel b5ee13a845 [IMP] rename serialize_o2m_commands to resolve_o2m_commands_to_record_dicts
bzr revid: xmo@openerp.com-20111011080338-hup42vivlvk4dly0
2011-10-11 10:03:38 +02:00
Launchpad Translations on behalf of openerp 9ceaf4fdf3 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20111011052920-un4k47tkwv7djqt2
bzr revid: launchpad_translations_on_behalf_of_openerp-20111011053536-w0rdhuhwp04uxnpd
bzr revid: launchpad_translations_on_behalf_of_openerp-20111011054224-cr2q9q3picqoasam
2011-10-11 05:42:24 +00:00
Quentin (OpenERP) d2e0d0fc41 [MERGE] added lempiria currency (HNL) used in Honduras
bzr revid: qdp-launchpad@openerp.com-20111010164823-n8snd4ghwa16jens
2011-10-10 18:48:23 +02:00
Quentin (OpenERP) 8ee01638a5 [IMP] base, res.currency data: added HNL currency (from Honduras) and rate
bzr revid: qdp-launchpad@openerp.com-20111010155809-2k3tp80n8cfn8hx0
2011-10-10 17:58:09 +02:00
Olivier Dony 0c9e9a7643 [IMP] rng,convert: add support for report `usage` attribute
The `usage` attribute may indicate a special purpose
of this report. For instance, the "default" usage
is used to identify the report to include along with
a record for EDI exports.

bzr revid: odo@openerp.com-20111010142226-ceradf4acsbr3r5l
2011-10-10 16:22:26 +02:00
Xavier Morel d5accc0fae [ADD] method to correctly serialize o2m commands into a sequence of record-dicts for e.g. onchanges
also alters res.partner.bank _default_value to use it with res.partner addresses, and adds a few tests to ensure behavior is correct

bzr revid: xmo@openerp.com-20111010135157-dafgcwwcni5gkeom
2011-10-10 15:51:57 +02:00
Xavier Morel 8a5314b15e [FIX] context usage (context may be None in _default_value), dict.get (no need for a False default value in a conditional)
bzr revid: xmo@openerp.com-20111010081021-ijcuchd53dbdr9lc
2011-10-10 10:10:21 +02:00
Xavier Morel 26140ce8f4 [IMP] further improve reading of o2m commands, first read the record itself if an id was provided then update it with the record data if any
bzr revid: xmo@openerp.com-20111010080911-ykosbh8kp3tljyri
2011-10-10 10:09:11 +02:00
Xavier Morel fc28192527 [IMP] if no address value is provided for res.partner.bank default_get context, try to read the address from its id
the web client currently does not send all record data when an o2m is used as a context value, it only sends the ids (at least when the o2m records have not been locally modified)

bzr revid: xmo@openerp.com-20111007131052-4qqo027b2mp16nd6
2011-10-07 15:10:52 +02:00
Olivier Dony f3cf4c359a [IMP] ir.sequence: tone down get_id() deprecation WARNING to DEBUG
For 6.1 we will still support get_id(), but should start phasing it
out for 6.2, so we will switch it back to WARNING after 6.1

bzr revid: odo@openerp.com-20111007145406-9rmfowimthedvoni
2011-10-07 16:54:06 +02:00
Olivier Dony d86c283434 [FIX] orm.browse_record: avoid printing unrelated traceback upon KeyError
bzr revid: odo@openerp.com-20111007144944-j4obwcbvx9awkj30
2011-10-07 16:49:44 +02:00
Olivier Dony 5aca6a91fa [IMP] tools.ustr: fix possible stack overflow for exception_to_unicode + tabs->spaces
bzr revid: odo@openerp.com-20111007144806-lodke0woag32sin5
2011-10-07 16:48:06 +02:00
Stephane Wirtel 33963719aa [FIX] base: set the right xml_id for the hidden/link category
bzr revid: stw@openerp.com-20111006142946-qebop8c2gs620ma7
2011-10-06 16:29:46 +02:00
Xavier Morel 65456808bc [ADD] wrapper to the modifiers setup process to simplify its call by third parties
bzr revid: xmo@openerp.com-20111006142727-spfj8foiln6m2jb9
2011-10-06 16:27:27 +02:00
Vo Minh Thu 9990d8126e [IMP] orm: added small comment.
bzr revid: vmt@openerp.com-20111006114444-4llzirnl4tg4p5qy
2011-10-06 13:44:44 +02:00
Vo Minh Thu 4dc26443d1 [MERGE] orm: cleand get_pg_type(). Changes as written in the merge prop.:
* Extracted creation of VARCHAR pg_type into a separate function, make missing 
  size (or size 0) create an unlimited VARCHAR field (effectively limited by
  postgres to 1GB data)
* Extracted fields to pg_types mapping outside of get_pg_type
* Made fields.function recursively forward to get_pg_type (via a type overload) 
  instead of reimplementing half get_pg_type in itself
* Simplified some get_pg_type cases

Note: if this is merged, it might be nice to convert fields.selection to use an 
API similar to fields.function: default to VARCHAR storage, if there's a type
attribute override use that type. Currently, fields.selection is handled the
following way:

* If the selection is a list and the type of the first half of the first item 
  is an integer, use type int4
* If the field has a __size=-1__ attribute, use type int4
* Else use type varchar (with size specified on the field, if any)

One change from previous version is that if type of the first half of the first 
item of the selection was str or unicode, it tried to find the longest string
and used that as the field's size. This meant silent loss of data if new,
longer items were added to the selection without recreating the whole db (or at
least manually altering the relevant fields). It also used the field's size or
*16* as a minimum default, for some reason, and if there was no size specified
on the selection (or size=0) it just hardcoded the size to 16.

bzr revid: vmt@openerp.com-20111006081336-uka6srvdmvs0s4lm
2011-10-06 10:13:36 +02:00
Vo Minh Thu 3606959a1a [MERGE] expression: no active_test when rewriting the main query.
bzr revid: vmt@openerp.com-20111006075655-gl444vgzcbu1j887
2011-10-06 09:56:55 +02:00
Vo Minh Thu f8e797ea28 [MERGE] fields.property: correctly tests for many2one/relative fields.
bzr revid: vmt@openerp.com-20111006074753-e505g95tcz8js5ju
2011-10-06 09:47:53 +02:00
Antony Lesuisse 21ebf62d23 [MERGE] base_setup dynamic category defintions
bzr revid: al@openerp.com-20111005165259-2xbmw8vo5k1neikn
2011-10-05 18:52:59 +02:00
Vo Minh Thu 491dc693d6 [IMP] fields.property: be more explicit when testing if something is a browse_record.
bzr revid: vmt@openerp.com-20111005154857-ic3yzb3dead33us3
2011-10-05 17:48:57 +02:00
Stephane Wirtel 61c65fc0a0 [FIX] base: set the right category for base
bzr revid: stw@openerp.com-20111005144249-p46i4up2omsuymqj
2011-10-05 16:42:49 +02:00
Stephane Wirtel 54fcb73fc1 [FIX] base: Add the visible field in the ir.module.category, this field will be used by the new base.setup.installer
bzr revid: stw@openerp.com-20111005142315-r9ypz1jeqbi8rfpo
2011-10-05 16:23:15 +02:00
Vo Minh Thu c629763a0f [FIX] two loops one loop (a previous commit) was wrongly done :(.
bzr revid: vmt@openerp.com-20111005135549-xvhtt57fl1ib7o6e
2011-10-05 15:55:49 +02:00
Vo Minh Thu 25a883b2aa [FIX] expression: we dont add any restriction on the main ids
as the possible active=True/False is already present in the main domain.

bzr revid: vmt@openerp.com-20111005133337-p8nvv26tlii7x253
2011-10-05 15:33:37 +02:00
Vo Minh Thu 478854aac0 [FIX] fields.reference: post-process reference fields to test if the referenced record exists.
bzr revid: vmt@openerp.com-20111005113434-itjuj0u3d6fhryn8
2011-10-05 13:34:34 +02:00
Xavier Morel 5eeeb67e6d [IMP] raise error when iterating over browse_record
Python has an iteration fallback protocol: when iterating over an
object which does not define __iter__, if the object defines
__getitem__ it considers that it's a list, and invokes __getitem__
from index `0`.

This can be a problem in openerp in methods which expect an list of
ids but are only given a single id (not a singleton list), in that
case self.browse() will return a single browse_record (instea of a
list) and the method tries to iterate over it by calling
browse_record.__getitem__.

Problem is that browse_record.__getitem__ is pretty deep and does
little validation, so the error appears 3 frames below where the
actual issue is with a completely cryptic message of "KeyError: 0",
which makes the actual harder to track.

By raising an error immediately in browse_record.__iter__, this kind
of issues is much easier to handle, the stack points precisely to the
frame in error with a clearer message.

bzr revid: xmo@openerp.com-20111005112444-jcp9fw6pa36ahpsd
2011-10-05 13:24:44 +02:00
Vo Minh Thu 7ccc7f388f [IMP] fields.reference: two loops one loop.
bzr revid: vmt@openerp.com-20111005105103-cutnuvfkgsjej3vc
2011-10-05 12:51:03 +02:00
Vo Minh Thu cab4e9c4a5 [FIX] orm: allow negative varchar size (meaning no limit) as used in some addons.
bzr revid: vmt@openerp.com-20111005101401-7jweikyl9ztibe4q
2011-10-05 12:14:01 +02:00
Olivier Dony d13fb7fe7e [MERGE] various bugfixes/improvements (coming from EDI development)
- _original_module is now available on model/browse_records
 - context usage in res.partner.*
 - proper name_search() + default values for res.currency
 - active_model in wkf exec context
 - safe_eval allows try/except/finally
 - yaml_import: !ref {id: xml_id} works
 - ir_mail_server: support for alternative body/subtype
 - default value for web.base.url config parameter
 - consistency rename: Model.*get_xml_id* -> *get_external_id*

bzr revid: odo@openerp.com-20111005100954-c8mbd4kz6kkqaj84
2011-10-05 12:09:54 +02:00