Commit Graph

1781 Commits

Author SHA1 Message Date
Olivier Dony e74c011a60 [FIX] ir.mail_server: SMTP user and pass should be passed as bytes to login()
Passing a unicode used to work in Python 2.5 but that
changed in 2.6 due to a change in the hmac module.
In any case the various RFCs that describe such
authentication mechanism do specify that UTF-8 encoded
values should be used, so we should be safe coercing
the user and passsword to UTF-8 bytes strings.
And of course it should not change anything for
the ASCII passwords out there anyway.

For references, see:
- Zope bug https://bugs.launchpad.net/zope.sendmail/+bug/597143
- Python issue http://bugs.python.org/issue5285
- http://tools.ietf.org/html/draft-ietf-sasl-crammd5-10#section-4

bzr revid: odo@openerp.com-20120312174348-iiqfa2toupn3udr3
2012-03-12 18:43:48 +01:00
Launchpad Translations on behalf of openerp 5ebc07237a Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120310052625-78n2341gtv2zrgwg
bzr revid: launchpad_translations_on_behalf_of_openerp-20120311050634-9ftgr94cy2tvp9y5
bzr revid: launchpad_translations_on_behalf_of_openerp-20120312051214-q1f14seqal4j8rn5
bzr revid: launchpad_translations_on_behalf_of_openerp-20120310052733-s24jj1qyoxy2j8lz
bzr revid: launchpad_translations_on_behalf_of_openerp-20120311050659-0ky4089nbil85weg
bzr revid: launchpad_translations_on_behalf_of_openerp-20120312051227-90mlbjgzqjyj8a8a
2012-03-12 05:12:27 +00:00
Olivier Dony 65c71111fb [FIX] ir.attachment: override _search instead of search() to make sure name_search() works
bzr revid: odo@openerp.com-20120309100429-nrfkmlec45z41yj9
2012-03-09 11:04:29 +01:00
olt@tinyerp.com 6aa9f06dae [FIX] 'create_instance' method: the check for parent_model existence need to be done before accessing that object attributes or methods
bzr revid: olt@tinyerp.com-20120309081929-g4b8d34e93at49wf
2012-03-09 09:19:29 +01:00
Launchpad Translations on behalf of openerp e08cb5e606 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120309052845-h3cd2tmjt6j9jvrz
bzr revid: launchpad_translations_on_behalf_of_openerp-20120309052917-cfjnvomj9mod6odf
2012-03-09 05:29:17 +00:00
Olivier Dony f093d9f8d3 [FIX] res.country: fix name for DRC, confuses Google map and similar services
bzr revid: odo@openerp.com-20120309020710-utf0ehkzytcd02ru
2012-03-09 03:07:10 +01:00
Launchpad Translations on behalf of openerp 3ee625d145 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120307060314-gaha062xllz5foin
bzr revid: launchpad_translations_on_behalf_of_openerp-20120308052427-ucgx2ytaxy4r27u2
2012-03-08 05:24:27 +00:00
Christophe Simonis 91b8829050 [FIX] tools.email_send: use correct kwarg
bzr revid: chs@openerp.com-20120306173319-6tmhco83w0we5hl6
2012-03-06 18:33:19 +01:00
Launchpad Translations on behalf of openerp e4459562f2 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120228063010-woxw61j13uqq1edo
bzr revid: launchpad_translations_on_behalf_of_openerp-20120229052656-iadyuga5sjaabrbl
bzr revid: launchpad_translations_on_behalf_of_openerp-20120301051832-k8w3h3ibfqmdieub
bzr revid: launchpad_translations_on_behalf_of_openerp-20120302052336-7jib6zk2efcivip1
bzr revid: launchpad_translations_on_behalf_of_openerp-20120304052133-o3zqfxzedgnq55f2
2012-03-04 05:21:33 +00:00
Olivier Dony 3e61e9d497 [FIX] drop_view_if_exists: simpler and CASCADING implementation for pg 8.3+
OpenERP depends on PostgreSQL 8.3 so we can now
use 'IF EXISTS'. It's also necessary to 'CASCADE'
the drop, otherwise depending views will prevent
the deletion and thus update of the view.
Depending views will automatically be updated
later and thus re-created, so this is safe.

bzr revid: odo@openerp.com-20120227165737-z5fgb6fle9g0cylw
2012-02-27 17:57:37 +01:00
Olivier Dony 506b274977 [FIX] ir.rule: rules should be cascade-deleted along with their model
bzr revid: odo@openerp.com-20120227152135-y3hukyoow0q0dkif
2012-02-27 16:21:35 +01:00
Olivier Dony a43f7940dc [FIX] ir.model: workaround for broken Python 2.6 implementations
Apparently on some RedHat/CentOS version certain
Python 2.6 version do not support more than
4 nested levels of boolean filters.

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

bzr revid: odo@openerp.com-20120227100953-2wgr0l621tpu1x4x
2012-02-27 11:09:53 +01:00
Launchpad Translations on behalf of openerp 3f2c207322 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120224053018-z4h7by0h8f5bov2x
bzr revid: launchpad_translations_on_behalf_of_openerp-20120225055158-gr639s6rzw1io33x
bzr revid: launchpad_translations_on_behalf_of_openerp-20120226052058-i6jsb4i97m78vftu
bzr revid: launchpad_translations_on_behalf_of_openerp-20120227055542-vz7rbngenr8ynd46
bzr revid: launchpad_translations_on_behalf_of_openerp-20120225055258-f5ufpgcomzlqmahr
bzr revid: launchpad_translations_on_behalf_of_openerp-20120227055623-0jhvbldsrq90jg22
2012-02-27 05:56:23 +00:00
Olivier Dony 769ea34281 [FIX] orm: model auto-init - better algorithm for detecting stale constraints during update
bzr revid: odo@openerp.com-20120223175851-bihxp0l0ax1xhf5g
2012-02-23 18:58:51 +01:00
Olivier Dony 819334f0aa [FIX] orm: inherited `active` fields should be used for the implicit filtering
This is for example used by hr.employee which
inherits from resource.resource, with the
`active` field located on the resource model.
Simplified some code too.

bzr revid: odo@openerp.com-20120223141635-p117b5wvvreuj40c
2012-02-23 15:16:35 +01:00
olt@tinyerp.com 3be394de8a [FIX] pep8: tab -> space
bzr revid: olt@tinyerp.com-20120223094355-ejsm256vn58bn4i2
2012-02-23 10:43:55 +01:00
Launchpad Translations on behalf of openerp cc193c268e Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120223052353-7wtilhl4ygsiebpm
bzr revid: launchpad_translations_on_behalf_of_openerp-20120223052405-zjntmml4s0tldteu
bzr revid: launchpad_translations_on_behalf_of_openerp-20120223052409-078hdbrd4l8060cr
2012-02-23 05:24:09 +00:00
Antony Lesuisse 7ac41ee582 [REL] 6.1.1
bzr revid: al@openerp.com-20120222113007-tdi482n17x1j74l4
2012-02-22 12:30:07 +01:00
Olivier Dony b5db852b3a [FIX] fields.binary: allow writing base64 unicode string values
The fields.binary type allows storing arbitrary
byte arrays, but it has been used historically
to store base64-encoded versions of the binaries.
This was partially related to the way these binary
values are serialized when transferred using the
standard XML-RPC protocol.
With the introduction of JSON-based RPC calls
alongside the 6.1 web client, these base64-encoded
binaries may now be deserialized as unicode ASCII
strings instead of 8-bit strings. That seems like
an acceptable behavior and we can simply coerce
these unicode strings to bytes strings as we know
they will be pure ASCII. Any non-ASCII unicode
value for binary field makes no sense and should
be passed as a byte string directly.

Thanks to Rui Barreiros for providing the final
hint in bug 919982 comments that lead to the
identification of this bug.

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

bzr revid: odo@openerp.com-20120222093937-quifmtsfc9gaa9ar
2012-02-22 10:39:37 +01:00
Launchpad Translations on behalf of openerp 9b0c341975 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120222065619-wdj17h21k8iuy3w6
bzr revid: launchpad_translations_on_behalf_of_openerp-20120222065704-3l8az0alwzd2mrmk
bzr revid: launchpad_translations_on_behalf_of_openerp-20120222065707-hp0u1vljdfgyjqxf
2012-02-22 06:57:07 +00:00
Christophe Simonis 688e788cef [FIX] proxy-mode is now really active
bzr revid: chs@openerp.com-20120221185247-ywuthx4v7oz0baty
2012-02-21 19:52:47 +01:00
Olivier Dony 3f6524a6e2 [FIX] Correct remaining SQL now() calls, must use UTC
This is essential to have the proper behavior for
timestamps: on the database side we exclusively 
store UTC data (no DST issues, etc.) as naive
timestamps (to prevent Postgres from messing with them).
Inside OpenERP server/addons we work again with
pure UTC data (much simpler), and only render
them according to the user's timezone when they
are displayed in the user interface or rendered
in a PDF report.

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

bzr revid: odo@openerp.com-20120220105943-v3m0i50phrurt8x6
2012-02-20 11:59:43 +01:00
Launchpad Translations on behalf of openerp dfa5449f02 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120218060208-gvsm4rrkca7yv031
2012-02-18 06:02:08 +00:00
Xavier Morel 8c2922a537 [FIX] base.module.upgrade: fix fields_view_get overload
lp bug: https://launchpad.net/bugs/928280 fixed

bzr revid: xmo@openerp.com-20120217091554-x1d0qvcvmj8z2oju
2012-02-17 10:15:54 +01:00
Antony Lesuisse 675aa4a549 [REL] OpenERP 6.1
bzr revid: al@openerp.com-20120216185110-gkoqaj3ncdy52hd3
2012-02-16 19:51:10 +01:00
Launchpad Translations on behalf of openerp 2094148de5 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120216050419-fgzhvlogc71u42qe
bzr revid: launchpad_translations_on_behalf_of_openerp-20120216050718-lf9hgvr1p33jpm2h
bzr revid: launchpad_translations_on_behalf_of_openerp-20120216052148-ta5bwtqg3bzmvp3i
2012-02-16 05:21:48 +00:00
Olivier Dony 0e97ec4a12 [MERGE] Fix bug 932170 - formatLang() should render using context timezone
bzr revid: odo@openerp.com-20120215144727-4vtoxdz7dk9si3wn
2012-02-15 15:47:27 +01:00
Olivier Dony e9143a0ba8 [FIX] reports: formatLang() should render datetime values in appropriate timezone
lp bug: https://launchpad.net/bugs/932170 fixed

bzr revid: odo@openerp.com-20120215133748-2iodxq0z1vqhyz13
2012-02-15 14:37:48 +01:00
Vo Minh Thu 64ba0da663 [FIX] fields: duplicate float fields per registry (because they are stateful).
lp bug: https://launchpad.net/bugs/929483 fixed

bzr revid: vmt@openerp.com-20120215101714-zjsdcizzb1m2x6k5
2012-02-15 11:17:14 +01:00
Launchpad Translations on behalf of openerp ee8cc0a459 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120215052652-i9y75rm42kvbvlx7
2012-02-15 05:26:52 +00:00
Antony Lesuisse c6ad066b59 [FIX] database restore dont prepend a space before the tempfile
lp bug: https://launchpad.net/bugs/859720 fixed

bzr revid: al@openerp.com-20120214193030-uhqyuo70l527ypsn
2012-02-14 20:30:30 +01:00
Olivier Dony 04849550aa [FIX] ir.module.module: `demo` field should be readonly
lp bug: https://launchpad.net/bugs/928431 fixed

bzr revid: odo@openerp.com-20120214151846-1fsbc225bz1x5ujp
2012-02-14 16:18:46 +01:00
Olivier Dony 79ac080fb2 [MERGE] Minor bugfixes (missing imports, etc.) courtesy of Florent Xicluna
bzr revid: odo@openerp.com-20120214150022-yx6zi0j4fr2d48uc
2012-02-14 16:00:22 +01:00
Olivier Dony 7d84dbc118 [MERGE] More consistent widget for res.partner.event, courtesy of Serpent CS
Note that res.partner.event is deprecated and the
mass mailing wizard is replaced as soon as the
mail module is installed.

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

bzr revid: odo@openerp.com-20120214142607-vp6k09139rumhmpt
2012-02-14 15:26:07 +01:00
Olivier Dony 7deee635b2 [MERGE] Make <report> tag extensible for extra report engines, courtesy of Nicolas Bessi (Camptocamp)
The processing of <report> tags during XML file
processing is not modular or extensible, which
means that extra reporting engines cannot easily
add custom behavior for <report> records of their
type. By returning the newly created ID in
the tag_report() method we at least allow them
to hook up a monkey-patch without need to copy-
paste the original code.
This patch also allows an extra XML attribute
for webkit headers, because the original @header
attribute is reserved for a boolean value.

bzr revid: odo@openerp.com-20120214135255-a7hyxsoif4jhg6ro
2012-02-14 14:52:55 +01:00
Olivier Dony 3d637db6d0 [FIX] fields.sparse: fix multiple relational sparse fields on same model, courtesy of Guewen Baconnier (Camptocamp)
lp bug: https://launchpad.net/bugs/912203 fixed

bzr revid: odo@openerp.com-20120214125725-p2ayh1lckr50vebi
2012-02-14 13:57:25 +01:00
Olivier Dony aa658124a6 [FIX] fields.date.context_today: proper signature for call by default_get()
The ORM automatically passes a Model instance
as the first argument to _default callables,
historically provided to give lambda functions
access to the Model instance.
context_today() does not need it but takes it
for compatibility purposes.
This also means that when called explicitly
within business code we should now pass a
Model instance as first argument, typically 'self'

bzr revid: odo@openerp.com-20120214122413-rznpdyqajrzswk4o
2012-02-14 13:24:13 +01:00
Olivier Dony ed677bbfae [IMP] fields.date.context_today: actually use the optional timestamp + better naming
- optional datetime was not being used
- parameter renamed to timestamp to better
  indicate that it must be a datetime, not
  a simple date

bzr revid: odo@openerp.com-20120214085044-unpa77hork25gtif
2012-02-14 09:50:44 +01:00
Launchpad Translations on behalf of openerp 74b3b0bc69 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120214054303-2gawtr1s4zulhhhs
bzr revid: launchpad_translations_on_behalf_of_openerp-20120214054630-925y7kotw7axa7z4
bzr revid: launchpad_translations_on_behalf_of_openerp-20120214061906-2g5kxwe0xle5u54c
2012-02-14 06:19:06 +00:00
Olivier Dony 3520cc25aa [MERGE] Added fields.date.context_today method for bug 925361
lp bug: https://launchpad.net/bugs/925361 fixed

bzr revid: odo@openerp.com-20120213184802-gm6mqd8tk2kkswwn
2012-02-13 19:48:02 +01:00
Olivier Dony f87324e93e [FIX] res.users: don't delay login() if user row is currently locked
Any running transaction that has created or altered
a record that contains a FK to the user is automatically
holding an SharedRowLock that prevents login() from
updating the last login date. As we cannot delay the
login() until all such transactions are finished,
it's simpler to try to get the lock and if that
fails, we skip the login date update for once,
no big deal.
A typical candidate for this situation is the
Admin user, locked out by long running cron
jobs that touch rows as Admin, hence holding
a ShareRowLock to res.users ID 1 because of the
many create_uid/write_uid foreign keys.

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

bzr revid: odo@openerp.com-20120213183207-45ptopqm0szritgx
2012-02-13 19:32:07 +01:00
Olivier Dony 2b8a0616c7 [ADD] field.date.context_today: added function to use as _defaults for date fields
As discussed on bug 925361, in order to have
a consistent behavior everywhere we need default
values to be using the client's timezone, just
as if the user had set the value themselves
using their local clock.
Because fields.date values are timezone
agnostic by design, they must be correctly
initialized from the start, no conversion
happens later.
The new context_today method is mean to be
easily usable as _defaults initialize, i.e.:
 'date_field': fields.date.context_today
is all that is needed.
It also avoids the classical mistake of
forgetting to make the default value
dynamic and directly passing the result of
a time.strftime() call.

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

bzr revid: odo@openerp.com-20120213180355-ruyw5j2w7r06kyue
2012-02-13 19:03:55 +01:00
Vo Minh Thu 1cf8f5680a [IMP] tests: expose an explicit list of test sub-modules.
bzr revid: vmt@openerp.com-20120213162058-e7u9jap679z4hep5
2012-02-13 17:20:58 +01:00
Olivier Dony c658241072 [IMP] res.partner.bank: swap state/country fields in vertical layout
Users need to fill in country to see the
list of states, so it must be first in the
form, even if that does not feel very
natural in a vertical layout.

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

bzr revid: odo@openerp.com-20120213145904-i731wr9msex3fmx6
2012-02-13 15:59:04 +01:00
Vo Minh Thu 8e2134981d [FIX] ir_rule: disallow ir_rules on ir_rule.
bzr revid: vmt@openerp.com-20120213110144-p5wrxccl39vrkwjy
2012-02-13 12:01:44 +01:00
Olivier Dony a60edc90da [ADD] base: missing post-1995 ISO3166 countries
lp bug: https://launchpad.net/bugs/930242 fixed

bzr revid: odo@openerp.com-20120213105901-hx9qh1hqvqz8h2h0
2012-02-13 11:59:01 +01:00
Xavier Morel 48645fe412 [IMP] remove nonsensical attributes on tree and search, tighten tree/@toolbar
bzr revid: xmo@openerp.com-20120213101758-i20p214w21u0ik5r
2012-02-13 11:17:58 +01:00
Launchpad Translations on behalf of openerp 769e8fc3a7 Launchpad automatic translations update.
bzr revid: launchpad_translations_on_behalf_of_openerp-20120211050703-tr5u3ccsyn3nr4a3
bzr revid: launchpad_translations_on_behalf_of_openerp-20120212044214-22i3b1p1odzszfm8
bzr revid: launchpad_translations_on_behalf_of_openerp-20120213044933-drlzxl0ds3vw5pct
2012-02-13 04:49:33 +00:00
Vo Minh Thu 4890c95447 [FIX] wsgi: use wsgi.core instead of wsgi, remove unused variable.
bzr revid: vmt@openerp.com-20120210151715-5vei5cbpdlimlqj5
2012-02-10 16:17:15 +01:00
Vo Minh Thu db7e1f37a5 [IMP] typo.
bzr revid: vmt@openerp.com-20120210150615-3ywm0le30niofxy3
2012-02-10 16:06:15 +01:00