Commit Graph

5122 Commits

Author SHA1 Message Date
Raphael Collet 3adbb49ec0 [FIX] ir_model: fix create/update/delete custom fields
Creating custom fields would crash on a model that has a related field without
string.  The crash was caused by the field not being set up, and method
BaseModel._field_create() violating a non-null constraint on the field string.
This has been fixed by setting up fields before updating ir_model_fields.

Deleting a custom field could also cause trouble when that field is inherited
in a child model.  In that case, the registry was simply no longer consistent.
The fix is to reload completely the registry.

The modification of custom fields was not reflected on field objects.  The fix
applies changes on fields before updating columns accordingly.
2014-11-04 14:52:13 +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
Xavier Morel 4d2b24adcb [ADD] Stripe-style APIDoc: content 2014-10-27 17:23:16 +01:00
Jeremy Kersten cd8bd872e8 [IMP] res_country: add relation from country to group_country. The purpose of this patch is to allow in domain (model.country_id.country_group_ids, '=', 'Europe') 2014-10-24 15:19:34 +02:00
Christophe Simonis 562272d9a0 [MERGE] forward port of branch saas-3 up to c89d1a0 2014-10-23 13:08:44 +02:00
Denis Ledoux adf18765f6 [FIX] base: typo during forward port 0e4216361b 2014-10-22 19:27:00 +02:00
Denis Ledoux 0e4216361b [MERGE] forward port of branch 7.0 up to 3a0af6a 2014-10-22 19:26:27 +02:00
Jeremy Kersten add28795fb [FIX] ir_action: update context to get the real binary, else we have a traceback when we edit/view an ir_action_client where param is a binary field. Because we do safe_eval from the length and not from the binary 2014-10-22 16:20:05 +02:00
Martin Trigaux 7705f883d2 [FIX] base: support float rounding with rounding_method=UP (ceiling)
Add rounding_method parameter on float_round method to offer
HALF-UP (default, usual round) or UP (ceiling) rounding method.
Use the second method instead of math.ceil() for product
reservations.

For UP, the python math.ceil() method uses "torwards infinity"
rounding method while we want "away from zero".
Therefore we use the absolute value of normalized_value to make
sure than -1.8 is rounded to -2.0 and not -1.

Fixes #1125 #2793

This is a cherry-pick of d4972ff which was reverted at 333852e due
to remaining issue with negative values.
2014-10-22 14:28:22 +02:00
Christophe Simonis 262eb662de [MERGE] forward port of branch 8.0 up to d80376a 2014-10-21 14:33:36 +02:00
Christophe Simonis 22c390285f [MERGE] forward port of branch 7.0 up to 78a29b3 2014-10-21 13:06:27 +02:00
Julien Legros b00122ad99 [FIX] res_partner: add parent_name related field
In some cases (e.g. with record rules), the name_get might not have access
to the parent name. Therefore a parent_name related field solves the
issue (as it read with as superuser).
2014-10-20 15:50:49 +02:00
Arthur Maniet 6c61d3c800 [FIX] account: the partner of a bank account can only be a company or an individual not related to a company 2014-10-20 15:02:36 +02:00
Fabien Meghazi 088f9e5b12 [FIX] Do not lose session.db on authentication error 2014-10-17 17:09:01 +02:00
Raphael Collet 83b8e413ff [IMP] test_new_api, test_inherit: improve code of tests 2014-10-16 12:32:23 +02:00
Christophe Simonis 2e3f59181d [MERGE] forward port of branch saas-3 up to db75994 2014-10-14 15:13:14 +02:00
Raphael Collet 5db84cb07e [IMP] models: do not use compute methods to determine default values anymore
Compute methods could give results that should not be considered as default
values.  For instance, a related field usually defaults to a null value, which
is then set to the field with its inverse method by create().  This may violate
a non-null constraint if the original field is required.  Therefore, compute
methods are no longer used to determine default values.
2014-10-13 13:44:07 +02:00
Olivier Dony edd94b623e [MERGE] Forward-port 7.0 up to 1b49a87 2014-10-10 19:21:18 +02:00
Olivier Dony 1b49a87619 [FIX] ir.mail.server: restore parsing of multiple RFC2822 addresses including non-ASCII chars
Rev f2cf6ced1 modified RFC2822 parsing in order to better support
unicode characters inside the Name part of an address header.
However the patch broke handling of multiple addresses (comma
separated) - silently discarding all recipients except the
first one, as soon as any non-ASCII character was present.

This patch restores the functionality while preserving the
fix from f2cf6ced1, and simplifies the code using email.utils
utility functions.

Fixes (again) lp:1272610, OPW 607683
2014-10-10 18:32:00 +02:00
Jeremy Kersten fc47823ab2 [IMP] ir_qweb: remove the option 'only_date' introducted in cefc9ad8e3. Now we can use widget='date' to do the same thing. That keeps the same behaviour that in the backend.
<span t-field=model.datetime_field t-field-options="{'widget': 'date'}"/>
2014-10-10 16:20:10 +02:00
Denis Ledoux eeb1f0355c [FIX] res.users: exactly match login when operator in ilike, equal 2014-10-09 18:57:37 +02:00
Xavier Morel bc59cfce61 [IMP] doc: add testing reference and improve docstrings 2014-10-09 15:38:36 +02:00
Raphael Collet 36174fcc6e [IMP] fields: set the default value to the closest field.default or _defaults
This solves a subtle issue: in the following case, the class Bar should
override the default value set by Foo.  But in practice it was not working,
because _defaults is looked up before field.default.

    class Foo(models.Model):
        _name = 'foo'
        _columns = {
            'foo': fields.char('Foo'),
        }
        _defaults = {
            'foo': "Foo",
        }

    class Bar(models.Model):
        _inherit = 'foo'
        foo = fields.Char(default="Bar")

The change makes field.default and the model's _defaults consistent with each
other.
2014-10-09 09:18:02 +02:00
Raphael Collet 3f31081bc2 [IMP] fields: make attribute 'default' callable 2014-10-09 09:18:02 +02:00
Olivier Dony 7439421ad2 [I18N] Update translations from Launchpad 8.0 branches 2014-10-08 17:52:25 +02:00
Xavier Morel 99d740ad7d [IMP] new-api-ify 'trigger' server action 2014-10-08 17:30:16 +02:00
Xavier Morel 8cfe731f76 [FIX] actions: match the behavior of multi actions with its help text
also fix the corresponding text and add explicit sequence number because I
don't understand what the bloody hell it does without that, except that it's
not the right thing. At all.
2014-10-08 17:29:36 +02:00
Raphael Collet 619a844428 [FIX] fields: in to_column(), returning self.column is generally not correct
Consider the following example:

    class Foo(models.Model):
        _name = 'foo'
        _columns = {
            'state': fields.selection([('a', 'A')]),
        }

    class Bar(models.Model):
        _inherit = 'foo'
        state = fields.Selection(selection_add=[('b', 'B')])

The attribute 'column' of the field does not have the full selection list,
therefore the column object cannot not be reused, even a copy of it.  The
solution is to systematically recreate the column from the field's final
specification, except for function fields that have no sensible way for being
recreated.
2014-10-08 16:39:59 +02:00
Denis Ledoux c741d45ac1 [FIX] ir_actions: ids of unlink method can either be an ID list or one ID 2014-10-07 16:07:46 +02:00
Olivier Dony 4202ea7c19 [FIX] ir.ui.view: creating custom views in backend did not compute view type
When creating new records in backend all field values are
sent to the server, including empty fields.
2014-10-07 13:12:38 +02:00
Xavier Morel 5954335222 [ADD] pyqweb-specific stuff, pyqweb APIDoc 2014-10-06 19:13:46 +02:00
Xavier Morel c5dca416da [IMP] qweb: foreach handling
* fix mapping handling to match JS impl: current value set as _value instead
  of being lost
* add handling of integer parameter
* only set _size and _last if current iterable is sized
2014-10-06 19:13:45 +02:00
Xavier Morel 2ffcff8fa9 [ADD] qweb: handling of t-att=mapping
Changed render_att_att to return an iterable of pairs instead of a pair, and
dispatched t-att on whether its result is a Mapping.

Also changed qweb test runner so it uses ordereddict for JSON mapping in
params, otherwise iteration order (and thus order of attributes in output) is
unpredictable and results don't/can't match expectations (as both are
strings).

Note that this relies on JS implementation details wrt iteration order of
mappings. Tests would probably be somewhat less brittle if rendering output
was parsed to XML... if that's possible (?)
2014-10-06 19:13:44 +02:00
Xavier Morel 14a677090b [ADD] running of XML cases to python qweb 2014-10-06 19:13:43 +02:00
Xavier Morel 494dcbd0e3 [IMP] qweb doc, tests
* document qweb based (mostly) on JS version
* convert JS qweb tests to (mostly) language-independent XML so they can be
  used for JS and Python implementations
* add some more tests (e.g. precedence between t-value and body in t-set)
* remove ``t-import``
* fix parity in foreach(dict) (and rename some variables to make array and
  object versions more similar)
2014-10-06 19:13:43 +02:00
Martin Trigaux 8843974d04 Forward port of branch saas-3 up to fc9fc3e 2014-10-06 15:52:23 +02:00
Denis Ledoux cd6dba5257 [MERGE] forward port of branch 7.0 up to 9066da3 2014-10-03 12:13:07 +02:00
Denis Ledoux 7cbd524448 [FIX] ir_translation: apply tools.ustr on the trad itself
tools.ustr(None) returns u'None', res[0] can be None.
2014-10-03 12:08:49 +02:00
Denis Ledoux 76fdbec3bb [MERGE] forward port of branch 7.0 up to 6d4e1cc 2014-10-03 11:22:47 +02:00
Denis Ledoux 6d4e1cc73e [FIX] ir_translation: remove control characters from translations
This is possible that control characters (such as line returns) are inserted wrongly in translations
These should not influence on the web interface
2014-10-03 11:20:19 +02:00
Denis Ledoux 1c6c289f7b [FIX] api: clear environments on module installation 2014-10-02 17:46:25 +02:00
Denis Ledoux 40c8dd9a28 [FIX] ir_qweb: search assets as superuser
A security has been introduce in eb9113c04d to restrict access to orphan attachments to employees only

Assets need to be build and accessed as superuser, thus
2014-10-02 16:36:17 +02:00
Denis Ledoux 14f3085776 [MERGE] forward port of branch saas-3 up to 77500e5 2014-10-02 15:36:58 +02:00
Denis Ledoux 77500e54ec [MERGE] forward port of branch 7.0 up to eb9113c 2014-10-02 15:34:02 +02:00
Denis Ledoux eb9113c04d [FIX] ir_attachment: restrict access to orphan attachments to employees 2014-10-02 15:17:48 +02:00
Jeremy Kersten cefc9ad8e3 [IMP] ir_qweb: allow to display a datetime like a date 2014-10-02 13:22:39 +02:00
Raphael Collet a69996b50c [IMP] fields: split multi-purpose '_origin' into 'column' and 'inherited'
This makes it easier to determine when a field interfaces a column, and when it
implements an inherited field (with _inherits).
2014-10-01 16:00:44 +02:00
Alexandre Fayolle 20267aa06c fix exception message in report seachr
when we get to the raise statement, `r` is `None`, so displaying it in the
exception message is useless. `name` is what we want to show.
2014-09-30 11:35:05 +02:00
Denis Ledoux edf679cfab [REVERT] tests added in forward port e2e60bf4eb
This is related to the revert 333852e19d
2014-09-26 22:23:46 +02:00
Denis Ledoux 07ee2a1de9 [MERGE] forward port of branch saas-3 up to 39bb45a 2014-09-26 21:58:06 +02:00
Denis Ledoux 39bb45a8ea [MERGE] forward port of branch 7.0 up to 333852e 2014-09-26 21:32:40 +02:00
Denis Ledoux 333852e19d Revert "[FIX] product,float_utils: perform ceiling via float_round with new rounding_method UP"
This reverts commit d4972ffdb6.

Seems to break some cases, at least in _product_reserve from stock/stock.py

Actual use case:

SELECT product_uom, sum(product_qty) AS product_qty FROM stock_move WHERE location_dest_id=%s AND location_id<>%s AND product_id=3645 AND state='done' GROUP BY product_uom;
returning 1 | 6

SELECT product_uom,-sum(product_qty) AS product_qty FROM stock_move WHERE location_id=%s AND location_dest_id<>%s AND product_id=%s AND state in ('done', 'assigned') GROUP BY product_uom;
returning 1 | -6

results += cr.dictfetchall()
    total = 0.0
    results2 = 0.0
    for r in results:
        amount = uom_obj._compute_qty(cr, uid, r['product_uom'], r['product_qty'], context.get('uom', False))
        results2 += amount
        total += amount
Total = 1, amount = -5

It should actually be
Total = 0, amount = -6
2014-09-26 21:21:06 +02:00
Christophe Matthieu 77c41cc5cb [FIX] website: 'Display Editor Bar on Website' group stopped working at commit a2ef044c47
The Edit button never appeared anymore for these users.
The idea was that they should see an edit button with
limited editing capabilities depending on their other
access rights.
For example, someone with only Sales Manager access and
'Display Editor Bar on Website'
would be able to edit online quotes from the website_quote
module, but not change the actual website pages or menus,
for instance.
2014-09-26 16:50:34 +02:00
Christophe Simonis a3704beefb [FIX] base: correct non-copy of `login_date` + adapt tests 2014-09-26 13:54:37 +02:00
Christophe Simonis e2e60bf4eb [MERGE] forward port of branch saas-3 up to fe8106f 2014-09-26 12:53:59 +02:00
Christophe Simonis fe8106fb85 [MERGE] forward port of branch 7.0 up to af37b30 2014-09-26 12:33:17 +02:00
Denis Ledoux af37b3022b [FIX] cron: doall false by default
As in most cases, we do not want this doall
2014-09-26 10:17:50 +02:00
Denis Ledoux 074c7b6c25 [FIX] res_users: do not copy login_date when duplicating users 2014-09-25 17:00:59 +02:00
Denis Ledoux 76067367b2 [MERGE] forward port of branch 7.0 up to 5f6d324 2014-09-25 15:10:37 +02:00
Cedric Snauwaert d4972ffdb6 [FIX] product,float_utils: perform ceiling via float_round with new rounding_method UP
Modified product ceiling() to use float_round() with special mode
for rounding UP (away from zero), avoiding pathological cases where
float representations errors were ceiling to the superior unit.

Also added correspding tests for rounding_method=UP

Fixes issue #1125, and replaces PR #1126.
2014-09-24 17:11:25 +02:00
Raphael Collet 24f26c0eeb [FIX] ir_models: fix registry when we add/remove/modify a custom model/field 2014-09-24 15:30:37 +02:00
Olivier Dony b74d830eb2 [I18N] Update translation templates with latest term changes 2014-09-23 19:13:50 +02:00
Olivier Dony 1c5b5e4290 [I18N] Update translations from Launchpad 8.0 branches
server: rev. 26 rev-id launchpad_translations_on_behalf_of_openerp-20140923072744-tkfs0yinu8msjh09
addons: rev. 39 rev-id launchpad_translations_on_behalf_of_openerp-20140923072715-5j7qvnuvmmb1zzy1
web: rev. 23 rev-id launchpad_translations_on_behalf_of_openerp-20140923072757-jvh9l6r2x0vfcyhb
2014-09-23 13:42:05 +02:00
Martin Trigaux 152c5c2b56 [IMP] base: safer locking at user login
When a users connects, a lock is taken on the res_user table to modify the last login date. If another running transaction uses a foreign key to res.users (e.g. write_uid column), postgres may detect the update as a concurrent update and rollback the transaction.
In pg 9.3, the lock_strength parameter 'NO KEY' allows a weaker lock which is less likely to break another transaction.
Fixes #552
2014-09-22 18:18:41 +02:00
Olivier Dony 53aa92d3c9 [I18N] Update translations from Launchpad branches 2014-09-18 11:47:16 +02:00
Martin Trigaux f0c3856be2 [IMP] gamification: allow to select fields of inherited models 2014-09-18 11:12:15 +02:00
Martin Trigaux 423a9f3011 [ADD] base: list of inherited models on a ir.model
This field is needed to retrieve the list of inherited fields (instead of only the fields of a current model) of a model using domain such as ('model_id', 'in', model.inherited_model_ids) on ir.model.fields
2014-09-18 11:12:15 +02:00
Fabien Meghazi 0084646475 [IMP] Refactor ir.ui.view's read_template cache invalidation 2014-09-17 15:52:47 +02:00
Olivier Dony 5bfad4dd52 [IMP] base: show local modules in Settings until apps.odoo.com is migrated for 8.0 2014-09-17 14:37:29 +02:00
Denis Ledoux 47c3205229 [FIX] ir_ui_view: Active (boolean) should not be required
If so, impossible to uncheck the box in the webclient
2014-09-17 13:55:00 +02:00
Fabien Meghazi 11d0970721 [FIX] double html escaping in qweb 2014-09-16 21:32:37 +02:00
Fabien Meghazi 7bc7757ec3 [IMP] add `url_for` hook to bundle urls 2014-09-16 19:55:00 +02:00
Fabien Meghazi 7893645d9c [ADD] ir.qweb render_attribute() hook for postprocessing 2014-09-16 19:55:00 +02:00
Olivier Dony 3caafac8c0 [FIX] ir.ui.view: match translated terms without heading/trailing whitespace
As the whitespace is stripped when exporting terms
to translate, it must be done as well when matching
translations at runtime.

Fixes issue #1755 partly
2014-09-16 17:46:25 +02:00
Olivier Dony b7a2cc13ba [FIX] ir.translation: translated terms within view definitions were not loaded
The changes for QWeb template translation have introduced
res_id values in PO comments for all `#: view:` terms, as
the real database id needs to be resolved when loading them.

For non-QWeb views this is not necessary and actually caused
the terms to be dropped when the res_id could not be resolved.

Rather than having a different PO comment format for QWeb and
non-QWeb views, we can extend the QWeb hack to force the
res_id to 0 for non-QWeb views.

Fixes issue #1755
2014-09-16 17:46:25 +02:00
Raphael Collet f2299749fe [FIX] models: make field inheritance work when source field is defined in old api 2014-09-16 16:03:16 +02:00
Raphael Collet 2cbdd7ab0e Merge branch 'acsone-8.0-onchange-one2many-test': add test for onchange on one2many field 2014-09-16 10:56:43 +02:00
Denis Ledoux 51e7e03502 [MERGE] forward port of branch saas-5 up to 163d7f5 2014-09-15 14:25:02 +02:00
Denis Ledoux 163d7f5a53 [MERGE] forward port of branch saas-3 up to b5b7dcc 2014-09-15 14:23:58 +02:00
Christophe Simonis 780dd9891f [MERGE] forward port of branch saas-5 up to 7eab880 2014-09-15 14:00:02 +02:00
Christophe Simonis 7eab880660 [FIX] orm: correct read_group() on models with `_group_by_full` (introduced by previous forward-port)
also add tests of `_group_by_full` functionality
2014-09-15 12:09:35 +02:00
Christophe Simonis 56f2b7ae0f [MERGE] forward port of branch saas-3 up to fdc6271 2014-09-12 18:53:48 +02:00
Olivier Dony ddc78626e1 [IMP] ir.model:.fields allow setting ondelete=restrict foncustom fields 2014-09-12 17:51:56 +02:00
Christophe Simonis fdc62713a5 [MERGE] forward port of branch 7.0 up to 9b1cdea 2014-09-12 17:28:55 +02:00
Martin Trigaux f2cf6ced17 [FIX] mail: encoding of sender name with unicode
When sending an email, both formats 'Name <email>' or '"Name" <email>' can be used for fields 'From', 'To' and others. If the name contains unicode characters, a regex only matching '"Name" <email>' was used to encode the name with RFC2047. That meant that the name was not encoded and eventually dropped, using only the email part.
Instead of using a limited regex, use the parseaddr method from email library.
Fixes lp:1272610, opw 607683
2014-09-10 17:36:00 +02:00
Simon Lejeune 2266a96420 [FIX] ir_qweb: contact widget: properly pass the context when browsing the contact
As the context was not transferred, it was never translated.
2014-09-09 18:16:21 +02:00
Denis Ledoux e447a46ec8 [MERGE] forward port of branch 7.0 up to 33e0910 2014-09-09 18:02:30 +02:00
Christophe Simonis ab6318e538 [FIX] base: ir.model.data.name_get() respect expected behavior.
name_get() must return a value for each ids and keep order of ids.
2014-09-09 13:28:47 +02:00
Xavier Morel c5fbb47abf [ADD] doc: model inheritance stuff 2014-09-09 09:19:32 +02:00
Olivier Dony fac96241df [I18N] Update 8.0 translations with latest changes from Launchpad 2014-09-08 19:04:25 +02:00
Olivier Dony d32d120a0a [MERGE] Forward-port of saas-5 up to 9ce08b7 2014-09-08 16:54:10 +02:00
Olivier Dony 491162e653 [FIX] ir.qweb: consider empty cached bundle as a cache miss
Sometimes a cached bundled could be missing in the
ir.attachment filestore (for example after copying
a database for test purposes without duplicating
the filestore as well).
When this happens ir.attachment will return an empty
file contents ; treat this as a cache miss.

This means empty bundles would not be cached, which
is not a big issue - there is little benefit in
caching them, and they should not be common nor
useful.
2014-09-08 16:52:42 +02:00
Olivier Dony a03dfefda9 [FIX] ir.attachment: less non-transactional side-effects during deletion
When deleting filesystem-backed attachements, the
deletion on the file-system is not transactional.
In the event of a transaction rollback, the file
deletion would not be rolled back, which is a
dangerous side-effect.

This can happen for example when several transactions
try to delete the same file(s) at the same time.
The duplicate deletions might be detected by the
database (being concurrent update errors), and rolled
back at the point of the DELETE query, to be retried.
If the files have already been deleted in the file
system it before the rollback, it leaves the system
in an inconsistent state, at least temporarily.

One case where we have seen it is when web bundles
are loaded by many web users at the same time, right
after being updated (and thus invalidated).
As they are currently cached as ir.attachment records,
this often causes a corruption of the cache.
2014-09-08 16:52:42 +02:00
Olivier Dony 46784659f9 [IMP] ir.attachment: include traceback when logging low-level filesystem errors 2014-09-08 16:52:41 +02:00
Xavier Morel 7558e2e786 [IMP] distribute branding on @groups instead of disabling edition
Avoids 2 rendering passes, and allows editing e.g. events detail page, which
couldn't be done (due to groups=public in a mail component)

fixes #1994
2014-09-08 11:16:06 +02:00
Denis Ledoux 1e374b4ad7 [FIX] ir_attachment: ignore if model uninstalled
if the model of an attachement no longer exists (the according module have been uninstalled, for instance), ignore the security check
2014-09-08 10:51:46 +02:00
Fabien Meghazi c981d068ab [FIX] Restore /login redirection on SessionExpired
The feature was broken due to an incompatibility
when forward porting 624f256 and a78e27f
2014-09-05 16:24:59 +02:00
Christophe Simonis 41afeec7f1 [MERGE] forward port of branch saas-5 up to 9363bc9 2014-09-04 18:03:24 +02:00
Christophe Simonis 9363bc9182 [MERGE] forward port of branch saas-3 up to 3d80dc2 2014-09-04 17:51:42 +02:00
Raphael Collet 68777c5860 [IMP] models: inherited fields are related fields read as the current user
Add an attribute 'related_sudo' (True by default) for related fields.
A related field is computed as superuser if related_sudo is True.

Add explicit related fields 'name' and 'email' on 'res.users', as these should
be readable by the public user with module website_forum.
2014-09-04 16:10:48 +02:00
Raphael Collet 070f28dce6 [FIX] base: remove test_ir_model, which causes bugs
The test in test_ir_model creates a custom model.  This causes a full reload of
the registry, which recursively installs the required modules while 'base' is
being tested.  As a side effect, it commits stuff from the database, so that
the effects of test_ir_model are actually not rolled back.
2014-09-04 14:59:45 +02:00
qdp-odoo f4e350ca36 [FIX] account: several fixes on the new bank statement reconciliation widget 2014-09-04 11:32:16 +02:00
Pedro M. Baeza a717c2a24a [FIX] Size for icon field of ir_module_module table in base.sql 2014-09-04 01:46:44 +02:00
Stéphane Wirtel 1ff7ed2758 [IMP] Optimize the schedulers of the calendar, fetchmail and base_action_rules modules
Disable the the crons when they'd have nothing to do, re-enable them when a
task is (probably) introduced
2014-09-02 18:32:27 +02:00
Cédric Pigeon 919869907d [ADD] add new test for onchange on one2many field 2014-09-02 16:11:37 +02:00
Yannick Vaucher bdfa970d3d fix typo on undeclared variable xml_id 2014-09-01 16:26:55 +02:00
Antony Lesuisse 2d296cb779 [MERGE] ir-ui-view split active and show_customize
Split the ternary field application in active and show_customize, all four
possible value are now needed for the customize theme popup.
2014-08-31 16:56:44 +02:00
Christophe Simonis 0c05a376d5 [FIX] base, mail: access to ir.config_parameter is now handled by by
record rules.

Partial revert of commit 80017b04c2.

Conflicts:
	addons/web/static/src/js/chrome.js
2014-08-29 12:01:50 +02:00
Christophe Simonis 1d2fe3330c [MERGE] forward port of branch saas-5 up to 24c25f5 2014-08-29 11:36:35 +02:00
Christophe Simonis 010dd70894 [MERGE] forward port of branch saas-3 up to c914893 2014-08-28 19:25:08 +02:00
Christophe Simonis 6f6197fb7c [MERGE] forward port of branch 7.0 up to f65c913 2014-08-28 18:15:10 +02:00
Christophe Simonis f65c913027 [FIX] base: security: employee must have access to res.groups 2014-08-28 18:14:08 +02:00
andreparames 0908376221 [FIX] Load translations for selection fields
Selection fields in the new QWeb reports aren't being translated, because the context with the language isn't being passed.
2014-08-28 16:41:45 +01:00
Christophe Simonis 8046b7367d [MERGE] forward port of branch saas-5 up to 7e117b1 2014-08-28 16:51:11 +02:00
Christophe Simonis 7e117b18a0 [MERGE] forward port of branch saas-3 up to ada9724 2014-08-28 16:21:27 +02:00
Christophe Simonis ada9724655 [MERGE] forward port of branch 7.0 up to 3509e15 2014-08-28 16:12:55 +02:00
Xavier Morel e6b56412a0 [ADD] views documentation 2014-08-28 15:02:33 +02:00
Denis Ledoux dd86d41eb4 [FIX] security: disallow read on ir.sequence for externals 2014-08-26 16:17:24 +02:00
Denis Ledoux 53582c2ea6 [FIX] security: res.groups should be readable by admins only 2014-08-26 13:31:41 +02:00
Denis Ledoux 72d3697fbc [FIX] security: externals should be able to read attachements
without having the rights to read ir.config_parameter
2014-08-26 12:55:48 +02:00
Denis Ledoux 80017b04c2 [FIX] security: ir.config_parameter should not be readable by externals 2014-08-26 12:50:04 +02:00
Raphael Collet 2ad092b5e5 [ADD] doc: new documentation, with training tutorials, and new scaffolding 2014-08-22 17:51:20 +02:00
Raphael Collet 775eaae930 [IMP] test_inherit: add test case, redefine Many2one field in inherited model 2014-08-22 10:01:41 +02:00
Martin Trigaux 80d8532370 Forward port of branch saas-5 up to rev 4895281e 2014-08-22 09:12:14 +02:00
Martin Trigaux 4895281e58 Forward port of branch saas-4 up to rev 15a3a2a 2014-08-21 18:17:35 +02:00
Martin Trigaux 15a3a2a63a Forward port of branch saas-3 up to 7bcefaf 2014-08-21 18:14:22 +02:00
Martin Trigaux 7bcefaf232 Forward port of branch 7.0 up to 0ab88f5 2014-08-21 17:57:57 +02:00
Martin Trigaux 0ab88f54f9 [FIX] ir_model: invalidate cache when adding new fields
When a new ir.model.field is created, add the new field in the fields_by_model (cache of custom fields). This is required as the __init__ method would not retrieve the new field if fields_by_model is already set.
Otherwise, the _columns would not contain the new fields and we could not access it without restarting the server (e.g. the installation of a module adds ir.model.fields and use it in the a view.
2014-08-21 17:24:45 +02:00
Martin Trigaux 768b3592c2 [FIX] base: wrong model change check
Comparing an id and a browse record will always fail so the exception would have always been raised when changing a model (e.g. updating a module with custom fields).
2014-08-21 14:30:10 +02:00
Thibault Delavallée 4c6dcd7fcb [FIX] ir_actions: server action: when creating or writing value on a record
through a server action, try to correctly set the value to write on a given
fields according to its type. For example many2one fields should receive an
int, not a unique containing the id of the new value.
2014-08-21 11:03:15 +02:00
Thibault Delavallée 43fe825870 [FIX] ir_actions: server action: check the validity of write_expresison only if defined. Also check for the related model only if set in the onchange. 2014-08-21 11:03:15 +02:00
Christophe Simonis 5dff035878 [MERGE] forward port of branch saas-5 up to 39bee35 2014-08-20 20:33:17 +02:00
Christophe Simonis 39bee35e25 [FIX] base: correct view branding tests after c013210 2014-08-20 18:23:12 +02:00
Christophe Simonis c3131317d7 [MERGE] forward port of branch saas-4 up to ddef2dd 2014-08-20 17:57:22 +02:00
Christophe Simonis ddef2dd10a [MERGE] forward port of branch saas-3 up to 8f13e83 2014-08-20 17:51:20 +02:00
xmo-odoo b8b947ffa4 [IMP] catch & warn about any TTFontFile exception
It turns out TTFontFile can throw not only TTFError (generic) and KeyError, but also ValueError (unknown cmap) and maybe others.

Just catch Exception, warn that the font couldn't be loaded and report why.
2014-08-21 03:51:20 +12:00
Christophe Simonis 8f13e8320e [MERGE] forward port of branch 7.0 up to d0a0b7d 2014-08-20 17:45:05 +02:00
Fabien Meghazi c0132100ce [FIX] website translation bug
Sometimes a node can't be translated using the website Translate
mode. The translation is added to the Application term list but
the id of the view is not correct.

This happen when a translatable node is a children of a inherited
node whose branding could not be kept. data-oe-source-id was left
over because it was not registered in MOVABLE_BRANDING
2014-08-20 17:16:29 +02:00
Thibault Delavallée 6c5cde609e [FIX] res_partner: fixed display of simplified partner form view (image and fields display was messy) 2014-08-20 14:39:52 +02:00
Thibault Delavallée a76de4595e [FIX] tools: mail: fixed read more link tha could be placed in a block to be removed, being considered as a quote 2014-08-20 14:10:20 +02:00
Christophe Simonis 81ce316ada [FIX] base: show "application" in view view 2014-08-19 17:13:10 +02:00
Fabien Meghazi 8402625f10 [IMP] Cache bundles in ir.attachments instead of LRU 2014-08-18 18:35:36 +02:00
Olivier Dony 50ef63881a [I18N] Update 8.0 translation with latest source code 2014-08-14 17:01:54 +02:00
Denis Ledoux 3eaa2f8371 [FIX] test_new_api: missing parent menu 2014-08-14 16:48:32 +02:00
Martin Trigaux deacba0ed6 [IMP] base: no default domain for partner's title
The title field should not have a domain by default.
When a new record is created or the 'is company' field is changed, the onchange_type is triggered to restrict the domain accordingly to is_company field.
When an existing record is modified, there will have no domain on title field. It's not ideal but at least companies will be able to change the title without the need to modify twice the field is_company.
Fixes #1713
2014-08-14 12:00:27 +02:00
Olivier Dony 85d2b45aaa [I18N] Update 7.0 translations with latest changes on Launchpad
See also https://github.com/odoo/odoo/wiki/GitHub-Transition#translations
2014-08-14 03:38:58 +02:00
Olivier Dony 96c36e895c [I18N] Update all 7.0 translation templates with latest terms and annotations
Total new terms: 168
Total deleted terms: 95
Total identical terms: 16329
(Some modules skipped, typically all l10n_* modules)
2014-08-14 02:24:24 +02:00
Olivier Dony e11eddf753 [MERGE] Forward-port of saas-5 up to 20cc18d 2014-08-13 20:46:47 +02:00
Olivier Dony 2a94d1d811 [MERGE] Forward-port saas-4 up to 2694ed1 2014-08-13 17:34:27 +02:00
Olivier Dony 2694ed1472 [MERGE] Forward-port saas-3 up to b9275da 2014-08-13 17:33:12 +02:00
Olivier Dony b9275da8a5 [MERGE] Forward-port 7.0 up to 23cffab 2014-08-13 17:30:06 +02:00
Martin Trigaux bceb278199 [FIX] base: revert 19e401a for title on res.partner form
The title of the partner is restricted with a context that will change in the onchange_type. Having twice the same field will not work well.
Remove the invisible attribute as the domain is handled by the domain.
2014-08-13 15:04:54 +02:00
Samus CTO 1a7c8953fe [IMP] calculating nextcall datetime of a cron SHOULD use the cron's user 2014-08-13 14:58:55 +02:00
Olivier Dony 868a77616d [FIX] ir.translation: export/import of QWeb terms
Fixes the translation term import/export logic to
support terms inside QWeb templates.

Refactored a bit the export code so the babel-based
QWeb terms extractor for ./static/src/*.xml files
uses the same logic as the regular extractor for
ir.ui.views with type QWeb.

Server-side QWeb rendering uses a mix of the native
 view inheritance mechanism and the template inclusion
(t-call) mechanism. During rendering the translations
are only applied at "template" level, *after* the
view inheritance has already been resolved.
As a result translations are local to a template,
not to the inherited view in which they are actually
written.
In terms of exporting PO[T] files, this is done by
resolving the "root" QWeb template a view belongs
to, and using it as the location of the translated term.

During import there is one extra quirk for QWeb
terms: they need to be linked to the `website` model
rather than the actual `ir.ui.view` model they
are really pointing to, so the rendering phase can
properly recognize them.
2014-08-13 11:08:02 +02:00
Fabien Meghazi bbbd1465e5 Merge pull request #1424 from odoo-dev/saas-5-handlemissingjs-nse
[FIX] Do not raise 500 error when an asset is missing

Note: those features are already present in master but could not be backported because the asset bundles are now completely different since the sass and less support where added.

If a forward porting occurs, you can drop this merge and keep master's version
2014-08-12 14:27:03 +02:00
Fabien Meghazi c68ba88563 Added stylesheet warning for missing css asset 2014-08-12 14:22:05 +02:00
Fabien Meghazi 228d422828 Use console.error 2014-08-12 14:14:31 +02:00
Christophe Simonis fda1e7d290 [FIX] ir_cron: typo introduced in commit a3d6b3a 2014-08-11 17:37:46 +02:00
Richard Mathot a3d6b3ae4b [FIX] ir_cron: typo introduced in fwdport
ae65be2b2a
2014-08-11 16:52:11 +02:00
Denis Ledoux 233670d681 [FIX] ir_cron: forgotten conflict from forward port ae65be2b2a 2014-08-11 16:03:41 +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 0739bc4eda [MERGE] forward port of branch saas-4 up to 7ecaab9 2014-08-11 15:31:04 +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
Samus CTO c16884364b [FIX] Calculate date interval using super user time zone
When you set the date of a cron the July 1st at midnight, if the user
time zone has a positive offset, then the converted UTC date is the
June 30th and adding 1 month will end up on July 30th translating to
July 31th instead of September 1st.

To solve this issue we use the super user time zone for the date
calculation.
2014-08-08 18:01:13 +02:00
Olivier Dony b41599e17c [FIX] base: tests: move test menu under correct root 2014-08-08 14:17:37 +02:00
Olivier Dony 2bbff57691 [IMP] hr,mail,product,project,base: use @auto_join=True on _inherits FK field
This can give a performance boost on large databases
and should not be a concern in terms of access control
as the inheritance already grants access to the parent
records.
2014-08-07 18:03:08 +02:00
Olivier Dony d837d4b497 [IMP] ir.qweb: avoid repeatedly searching the registry for nonexistant widget models 2014-08-07 18:03:08 +02:00
Thibault Delavallée f5688cd8fd [FIX] tools: html_sanitize: keep mako tags (<% ... %>), required for example in the portal sale quotation email. 2014-08-07 16:47:58 +02:00
Raphael Collet e95fc488db [IMP] fields: add mechanism to extend a selection field
If a selection field is defined by a list as selection, such as:

    state = fields.Selection([('a', 'A'), ('b', 'B')])

one can extend it by inheritance by redefining the field, as:

    state = fields.Selection(selection_add=[('c', 'C')])

The result is that the selection field will have the list
[('a', 'A'), ('b', 'B'), ('c', 'C')] as selection.
2014-08-06 15:20:07 +02:00
Raphael Collet 6a83425ba9 [FIX] base: fixes #1167, change password wizard (wrong default value)
The one2many field 'user_ids' was initialized with an incorrect value for the
inverse field 'wizard_id', using a res.users id. The latter was causing a
MissingError exception. The fix is simply to not define explicitly the inverse
field in the one2many.

Also did a small cleanup of the code of the wizard.
2014-08-06 11:24:37 +02:00
Raphael Collet 56c54a52df [IMP] base/res_users: improve reading/writing of reified group fields
- simplify the code by removing unused cases
- do not modify input argument 'value' of create/write
- do not call BaseModel.read() with reified group fields (this causes warnings)
2014-08-05 14:17:11 +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
Denis Ledoux 1bb219907f [MERGE] forward port of branch saas-5 up to 655a5b9 2014-08-04 16:56:10 +02:00
Denis Ledoux 655a5b948d [MERGE] forward port of branch saas-4 up to 8c0c743 2014-08-04 16:14:31 +02:00
Denis Ledoux 8c0c74300f [MERGE] forward port of branch saas-3 up to ebf317a 2014-08-04 16:14:05 +02:00
Denis Ledoux ebf317a3b0 [MERGE] forward port of branch 7.0 up to e07bc5d 2014-08-04 16:10:06 +02:00
Denis Ledoux e07bc5d845 [ADD] res_partner: test case for fix rev 4a27880974 2014-08-04 15:54:56 +02:00
Raphael Collet a1d0394ff4 [FIX] models: default_get() shall not return a dict as a many2one value
When a new record is returned as the value for a many2one on a new record, the
method Many2one.convert_to_write() now returns a NewID, and default_get() then
discards that value from its result. This makes it consistent with its former
behavior.

Manual rebase of #1547
2014-08-04 15:50:04 +02:00
Denis Ledoux 4a27880974 [FIX] res_partner: commercial partner sync
On child partner creation of a parent partner, the commercial_partner_id is not computed (and stored) in the create method.
Therefore, we should compute the commercial_partner_id before trying to sync his data
2014-08-04 14:34:08 +02:00
Olivier Dony d706adba11 [MERGE] Forward-port saas-5 up to 37ba23d 2014-08-04 01:44:30 +02:00
Olivier Dony b7814943c3 [MERGE] Forward-port saas-3 up to 7273474 2014-08-01 23:14:59 +02:00
Olivier Dony 7273474d65 [MERGE] Forward-port saas-3 up to fc92027 2014-08-01 23:10:29 +02:00
Olivier Dony 5a0a500994 [MERGE] Forward-port 7.0 up to 9411a2da 2014-08-01 23:01:57 +02:00
Martin Trigaux 19e401adf0 [IMP] base: show possible titles for companies (opw 608243) 2014-08-01 17:07:56 +02:00
Christophe Simonis fd4fd35e32 [MERGE] forward port of branch saas-5 up to e4cb520 2014-07-30 20:52:14 +02:00
Christophe Simonis e4cb5202a0 [MERGE] forward port of branch saas-4 up to fa07bc8 2014-07-30 20:30:14 +02:00
Olivier Dony 7b84dfb302 [FIX] ir.actions.server: ir.values ref (`More` menu entry) should not be copied 2014-07-30 18:56:56 +02:00
Christophe Combelles b64bd885b0 [FIX] base: ir.qweb: ensure element.tail is correctly encoded
element.{text,tail} are either ascii-compatible `str`, or `unicode`
when non-ascii-compatible. This could force the implicit decoding
of utf-8 encoded contents when joining template bits, breaking
the rendering.

Fixes #1085, and related to #1130
2014-07-30 11:41:15 +02:00
Nicolas Seinlet ee67d65801 handle missing JS files with a console log 2014-07-29 12:39:51 +02:00
Denis Ledoux 88c022dfc8 [MERGE] forward port of branch 7.0 up to bbb8d8f25a 2014-07-29 11:42:10 +02:00
Denis Ledoux 6b1a804b29 [MERGE] forward port of branch 7.0 up to b91a75f7ef
Conflicts:
	addons/base_vat/base_vat.py
	openerp/tools/safe_eval.py
2014-07-29 10:42:50 +02:00
Martin Trigaux 6dc94f0c4e Forward port of branch saas-5 up to eda2f06 2014-07-28 16:37:56 +02:00
Martin Trigaux cd013aa09a Revert 3dec090 "[FIX] ir_values: fallback when no condition"
An ir.value without condition should not match when searching with a condition.
When a field with change_default on it is modified, the method get_defaults is called with the new value. This means that manually modifying a field with this trigger would put back the default value (opw 611193).
2014-07-28 14:35:44 +02:00
Olivier Dony f90b29b938 [FIX] res.users: safer read() when computing default company value
The goal is to avoid any kind of prefetching
of other fields when copmuting the default
company, as this will sometimes happen in the
middle of a database update, when the default
company is used for setting the default value
of new columns. In that case the db schema
may not fully match the in-memory model, leading
to an SQL error.
2014-07-25 16:33:48 +02:00
Martin Trigaux f138aa2608 [FIX] models: display_name and name_get mismatch
- display_name uses name_get and not the other way around:
name_get should not call _compute_display_name, _compute_display_name should call name_get.
The previous behaviour was not backward-compatible with the old api.
All the models redefining name_get would have 2 different behaviors between name_get and display_name.

- Do not set an inverse function to display_name:
In most cases, writing on display_name writes on _rec_name (if any, not mandatory).
If the display_name computation is redefined, we need to redefine as well the inverse method to avoid unexpected behaviour
This required to also modify tests in base_import as readonly fields are avoided.

- Remove search method on display_name:
For the same reason as for the first point, it could be good that searching on display_name use name_search (and not the other way around).
However doing this would be very inefficiant (need to do the search, without limit, extract the ids of the name_get result just to generate
a subdomain ('id', 'in', [...]). As in most cases it would anyway mean to search on the _rec_name it's better to directly do so.

- Changing label to avoid mismatch:
In view displaying the list of fields or when a match is made on the label of a field (e.g. when importing csv file,
matching is made on both label and technical name), the fact that display_name field has '
Calling it 'Display Name' will avoid most errors.

- remove display_name definition from website_forum_doc,ir_model:
These fields are doing the same thing as the display_name of the new api, we can remove them.
We need to keep the one for res.partner as it's a stored field.
2014-07-25 13:58:59 +02:00
Denis Ledoux 133becd966 [FIX] ir_fields: allow accent on selection import
If the selection label (not value) had accents, it wasn't possible to import it using the label having accents
2014-07-25 11:53:30 +02:00
Olivier Dony 6be6a5a801 [IMP] ir.logging: add index on dbname/type, important with high number of log lines 2014-07-25 10:46:12 +02:00
Richard Mathot ee7a9c7621 [REF] Odooification 2014-07-24 16:22:52 +02:00
Denis Ledoux b4ef87f1ec [FIX] ir_attachment: _filestore cache ignore uid
replace ormcache_context by ormcache: use the context in the cache key is useless
set skiparg=3 (default skiparg=2) so the uid is not used in the cache key: the filestore path is the same for all database users
2014-07-24 11:53:57 +02:00
Olivier Dony ef53a831c6 [MERGE] Forward-port saas-5 up to a5f7891 2014-07-23 16:58:00 +02:00
Olivier Dony a23994e0ed [FIX] ir.module.module: create module xml id also when auto-discovered
It was only being created during database initialization
2014-07-23 14:42:04 +02:00
Denis Ledoux a5f7891b68 [MERGE] forward port of branch saas-4 up to 5739aebfb1 2014-07-23 13:18:30 +02:00
Denis Ledoux 5739aebfb1 [MERGE] forward port of branch saas-3 up to 474eae9a43 2014-07-23 12:14:14 +02:00
Martin Trigaux 1f878f152a [MERGE] forward port of branch 7.0 up to 680f955 2014-07-22 13:39:15 +02:00
Richard Mathot 6f1b820d33 [REF] OpenERP --> Odoo in various UI texts (2)
Some things missed by commit 8b67a7202d
2014-07-18 14:59:38 +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 15174e9a70 [IMP] base, mail: cache user.has_group() + ir.ui.menu.load*()
Loading the menus is the most expensive
operation for an average page load, and
the result does not change often.
The menu filtering already uses a separate
cache based on groups, but the rest of the
loading includes reading actions and
translating menu names, which is also
expensive.

Added a cache keyed on user + user
lang, plus relevant cache invalidation
when any of the following are touched:
access rights, user data including
groups and language, menus or mail.group
subscriptions.

The menu filtering cache is still
useful in parallel has it is invalidated
under different conditions.

User.has_group() is cheap but still
called very often, so it is an easy
win as well, and also frequently
used when rendering page templates.
2014-07-17 18:46:10 +02:00
Christophe Matthieu fe64988ae2 [FIX] res.users: use read method to compute default values to don't create browse record and fetch all fields, browse record crash for install or update module 2014-07-17 18:46:09 +02:00
Martin Trigaux 3dec09079e [FIX] ir_values: fallback when no condition
When searching for default values, if we set a condition (e.g. 'type=out_invoice'), fetch also the default values without any condition set. Thanks to the order by clause, the one with a condition have an higher priority than the one without and will not affect existing result.
This fixes default journal/currency on an invoice where the journal is retrieved in the onchange_company_id method (domain is forced). Without this patch only ir.values with a domain set will match, opw 610645
2014-07-17 15:07:58 +02:00
Olivier Dony 562d8129f2 [FIX] mail: less confusing To: header for mailing-list posts
Many mail clients will replace the name in the To:
header with Me if the To: email matches the email
of the user. These users will see To: Me instead of
"Followers of ..." and usually believe this was a
private email from the sender to them.
But when replying they would reply to the whole list.

Fix this by explicitly forcing the To: to be the
mailing list address.
2014-07-17 00:16:12 +02:00
xmo-odoo 16d67445da Merge pull request #1076 from xmo-odoo/8.0-shop-fix-xmo
Fix access rights issues in new API for the shop home page
2014-07-16 10:28:51 +02:00
xmo-odoo 511efddd02 Merge pull request #1160 from xmo-odoo/8.0-custom-models-xmo
Handling of custom models initialisation
2014-07-15 12:40:35 +02:00
Christophe Simonis a5419ca800 [MERGE] forward port of branch saas-5 up to e0759c1 2014-07-15 11:21:59 +02:00
Christophe Simonis e0759c1350 [MERGE] forward port of branch saas-4 up to de696f1 2014-07-15 10:39:08 +02:00
Xavier Morel b2ddda47e5 [FIX] missing part of initialization in ir.model and ir.model.fields 2014-07-15 08:56:58 +02:00
Xavier Morel 7a2961da76 [FIX] ensure all g_inner content is correctly encoded
fixes #1130

* provided `inner` data may or may not have been encoded
* `element.text` is either ascii-compatible `str` or `unicode` when
  non-ascii-compatible, which could force the decoding of utf8-encoded content
  during g_inner's join
2014-07-14 13:44:37 +02:00
Xavier Morel 7c540bc4ee [FIX] exception rendering with pretty printed XML
had not been migrated to lxml
2014-07-14 13:44:37 +02:00
Xavier Morel 7d732b1011 [FIX] broken translation cache for absent translation of 'false' 2014-07-11 15:46:12 +02:00
Christophe Simonis 182acc9274 [FIX] base: make ir_attachment._filestore callable with kwargs 2014-07-11 14:58:32 +02:00
Xavier Morel d5eda984c9 [ADD] demonstrate broken handling of rules access denial in new API 2014-07-11 13:54:01 +02:00
Christophe Simonis f654a7719b [MERGE] forward port of branch saas-5 up to 73d39a0 2014-07-10 22:49:53 +02:00
Christophe Simonis 73d39a0c8c [MERGE] forward port of branch saas-4 up to a361947 2014-07-10 22:12:16 +02:00
Christophe Simonis a361947143 [MERGE] forward port of branch saas-3 up to a35aec2 2014-07-10 22:02:58 +02:00
Christophe Simonis a35aec2a0b [MERGE] forward port of branch 7.0 up to 6e96ffd 2014-07-10 22:02:01 +02:00
Xavier Morel 19c7380951 [FIX] small potential encoding issue in custom models 2014-07-10 17:34:48 +02:00
Christophe Combelles 0050a3f797 [FIX] #1065 display_name does not display the address 2014-07-10 14:26:38 +03:00
Xavier Morel 4ac8682b52 [FIX] False module description blows up in docutils
fixes issue 1005
2014-07-09 08:47:37 +02:00
Martin Trigaux 84e9a67cdf [FIX] orm: better removal of custom m2m fields
orm: do not try to create ir.model.relation for custom m2m as self._module is either empty (for custom models), either the one of the last inheriting module (which is wrong). The field should be removed manually and should not be impacted by the uninstallation of modules. The removal of the relation table can be done when removing manually the custom field (see rev 6af3193).

ir.model: when removing a model, drop the table with the CASCADE instruction. This will remove left constraints from remaining m2m tables.
This means that dropping a table (either manually removing a custom model or uninstalling a module) will not drop the relation table for a custom m2m field. This is not ideal but better than the previous behaviour (which was to fail the DROP TABLE instruction and keep the table with a few columns and unconsistent data).
2014-07-08 15:56:24 +02:00
Xavier Morel 2f3aa63617 [FIX] compile of rst module descriptions to HTML
lxml (used by the html sanitizer) really does not like documents as unicode
strings with an encoding declaration (which doesn't make sense indeed), yet
docutils with output_encoding=unicode generates one (a stupid one too, says
"encoding=unicode").

Disable the xml declaration altogether when compiling rST module declarations
to HTML.
2014-07-08 14:39:24 +02:00
Martin Trigaux 6af3193d17 [FIX] ir.model.fields: better unlink
When droping a column, remove also the relation table in case of custom m2m field.
The relation table needs to be dropped otherwise an unremovable constraint to the targetted table is kept (and anyway is not needed anymore).
2014-07-08 13:55:48 +02:00
Christophe Combelles 740d5c6cd3 [FIX] Fix broken translation cache for absent translation of 'false' 2014-07-07 17:29:11 +03:00
Raphael Collet 130f890215 Merge pull request #964 from odoo-dev/8.0-remove-getattr-rco
[REM] models: remove the magic methods signal_XXX()
2014-07-07 14:49:49 +02:00
krnkris ccc211fa51 [I18N] base: fix Hungarian translations
(Manual rebase of #956, pending update in Launchpad translations)
2014-07-07 14:36:55 +02:00
Raphael Collet 33eb3dffb2 [REM] models: remove the magic methods signal_XXX() 2014-07-07 11:50:30 +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
Olivier Dony 34bfa1b44f [MERGE] Forward-port saas-5 up to d9cda97 2014-07-05 01:45:45 +02:00
Olivier Dony d9cda97cf4 [MERGE] Forward-port saas-4 up to 5ceded9 2014-07-05 01:28:19 +02:00
Olivier Dony 5ceded9d69 [MERGE] Forward-port saas-3 up to 4fa30f5 2014-07-05 01:04:19 +02:00
Olivier Dony f3880a8a09 [MERGE] Forward-port of 7.0 up to 64ac1b0 2014-07-04 17:07:53 +02:00
Xavier Morel 40f7175172 [IMP] replace a manual & eager concat by chain.from_iterable(iter) -> iter 2014-07-04 10:58:41 +02:00
Martin Trigaux bf353998f2 [FIX] res_partner: backport of rev 37bf72a
Correctly take the 'use parent address' into account in the onchange. Slightly updated the view that was weird with this parameter. opw 609344
2014-07-03 12:30:48 +02:00
Fabien Pinckaers 0c702bdfa7 Merge pull request #885 from odoo-dev/master-shop-fp
Fixes for perf issues /shop + cleaning pricelists & currencies
2014-07-02 20:34:21 +02:00
xmo-odoo 2c23b0020b Merge pull request #881 from xmo-odoo/master-qweb-lxml-xmo
Convert qweb (Python) to use lxml
2014-07-02 19:28:24 +02:00
Fabien Pinckaers 1ce0b70a02 Speed Improvements 2014-07-02 19:03:10 +02:00
Fabien Pinckaers 5cc81dd64f Fixes 2014-07-02 18:18:29 +02:00
Xavier Morel ce80ad2960 [FIX] don't call render_node on comments (or PIs) 2014-07-02 18:00:03 +02:00
Xavier Morel b18d83c0e0 [IMP] convert qweb to use lxml instead of minidom
should be >20x faster at parsing document strings and gain close to 40s on crawling
2014-07-02 16:01:36 +02:00
Olivier Dony c887e53b32 [FIX] web: force seession context reload when reloading client
The goal is to ensure that HTTP requests
done while reloading the client (e.g. the
menu bar, etc.) do not use a deprecated
session context.

Also undo the previous fix from a0ee2b5
as it would cause other issues (e.g.
prevent setting the admin password/lang
when creating a new db using the db manager)
This logic does not belong in the business
methods of res.users.
2014-07-02 15:18:56 +02:00
Fabien Meghazi 54a7e9665a [IMP] join stdout and stderr in error report when sass returncode>0 2014-07-01 18:38:01 +02:00
sle-odoo a0ee2b5a5e Merge pull request #848 from odoo-dev/master-fix-session-reset-sle
[FIX] correct context resetting when changing user lang
2014-07-01 17:22:41 +02:00
Fabien Meghazi 0be5fb7d91 Fix sass attribute recognition 2014-07-01 15:21:36 +02:00
Fabien Meghazi 4042135bc4 Merge remote-tracking branch 'odoo/master' into master-sass-in-bundles-fme 2014-07-01 14:26:40 +02:00
Fabien Meghazi a49ebae676 [IMP] Lazy module_boot() loading
Removed 'modules' item in ir.ui.view rendering context.
Replaced by lazy helper get_modules_order
2014-07-01 14:22:56 +02:00
Fabien Meghazi 861e272823 Create and write ir.attachments with superuserid 2014-07-01 14:22:04 +02:00
Olivier Dony 5b83e88c25 [MERGE] Fwd-port of 7.0 up to 3d31341 2014-07-01 12:28:55 +02:00
Fabien Meghazi 79195f1800 Add support for the @media attribut in css bundles 2014-07-01 10:02:55 +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
Fekete Mihai aa768850c9 [IMP] l10n_ro: Update Romanian Localization
(Manual rebase+cleanup of PR #720 at 7e9faa6)
2014-07-01 00:45:43 +02:00
Simon Lejeune f8e9fde25b [FIX] correct context resetting when changing user lang 2014-06-30 21:10:15 +02:00
Simon Lejeune 2870af3b49 [FIX] navbar cache: do not use ormcache as it does not handle kwargs. instead, only get the root menu_ids in rendering context 2014-06-30 19:45:12 +02:00
Fabien Meghazi 7990caaf02 Fix another encoding issue 2014-06-30 19:26:14 +02:00
Fabien Meghazi 4f2b5f12fc Fix typo 2014-06-30 19:17:47 +02:00
Fabien Meghazi 45215a231d Fix indentation normalization 2014-06-30 18:41:29 +02:00
Simon Lejeune 959caf2596 [IMP] cache the load_menus method to improve website performances 2014-06-30 15:32:53 +02:00
Fabien Meghazi 74e0b948fa Better error management, proper feedback on encoding errors 2014-06-30 14:45:41 +02:00
Fabien Meghazi 499fd91924 Merge remote-tracking branch 'odoo/master' into master-sass-in-bundles-fme 2014-06-30 10:17:44 +02:00
Antony Lesuisse 22f4c315a3 [IMP] automatic fiscal positions for simple cases
Add group of countries res.country.group
Add get_fiscal_position method a method to compute a fiscal position based on company_id, partner_id, delivery_id
The meaning of res.partner.fiscal_position is now a forced a fiscal position.
The default implementation should handle simple cases, like VAT in UE and sales
tax in the US, but the method can be overriden to handle more complex ficals
rules.
2014-06-30 02:12:41 +02:00
Antony Lesuisse 4ff1c333d9 [IMP] menuitems cleanups
Remove Tools
Move cron, action rules and subscription to Automation
Move and rename ir_property models to Parameters
2014-06-28 17:32:01 +02:00
Fabien Meghazi 9fa77980d7 Merge remote-tracking branch 'odoo/master' into master-sass-in-bundles-fme 2014-06-27 19:40:02 +02:00
Jacques-Etienne Baudoux df40926d2a [IMP] res_partner: more fault tolerant name_create
In case of invalid format such as 'name email@server' (missing chevrons), the parsing would be failing due to a strict behaviour of getaddresses (returns nameemail@server).
With the patch this format is accepted.
opw 607312
2014-06-27 16:48:40 +02:00
Amit Vora b592f9e13a [MERGE][IMP] Enable HTML in emails signature
Closes #801
2014-06-27 11:31:24 +02:00
Simon Lejeune 195fa93168 [MERGE] backend front end integration
Render the top-menu (backend menu or frontend editbar) server-side.
Use Fontawesome icons (mail, timezone, chat).
Refactor website widgets, split Website.editorBarin editorbar, ace, editorbar- content, editorbarCustomize.
2014-06-27 11:03:34 +02:00
Fabien Meghazi d7a7ac404d Support for Sass in debug mode 2014-06-26 18:51:55 +02:00
Fabien Meghazi 0d1d225249 Remove ir.ui.view last_update collection and use checksum on rendered bundle 2014-06-26 18:18:12 +02:00
Fabien Meghazi 36e5b418d8 Sass: pull up @imports and remove file imports 2014-06-26 17:40:30 +02:00
Fabien Meghazi 653113094f [ADD] Sass support in bundles 2014-06-26 16:49:51 +02:00
Jeremy Kersten f337bcaa1d [IMP] ir.config.parameters: support group-based access control 2014-06-26 16:27:24 +02:00
Antony Lesuisse 893aace122 [MERGE] website_sale optional-products 2014-06-26 12:31:15 +02:00
Jaydeep Barot 026e38b48f [REM] Unnecessary `size` parameters on char fields 2014-06-25 17:13:43 +02:00
Mansi Kariya 714037ce7c [FIX] Update of default currencies on some CoA's 2014-06-25 14:17:24 +02:00
Christophe Simonis 1eaa69d342 [MERGE] forward port of branch saas-5 up to 9e8e365 2014-06-25 12:44:13 +02:00
Christophe Simonis 9e8e3653f2 [MERGE] forward port of branch saas-4 up to f68c835 2014-06-25 12:43:41 +02:00
Christophe Simonis f68c83545a [MERGE] forward port of branch saas-3 up to a66f3dd 2014-06-25 12:33:17 +02:00
Fabien Meghazi aa97aaa9d7 [ADD] Assets Bundle versioning and better cache handling
An asset bundle is now versionned with the dates of the
ir.ui.views that compose it and also with the dates of
the files and ir.attachments linked inside the bundle.

This new behavior is reflected in the bundle's lru cache
managment.
2014-06-24 18:52:38 +02:00
Denis Ledoux 8e83dbff5d [MERGE] Forward-port of 7.0 bugfixes up to 7d3453d119 2014-06-24 12:27:09 +02:00
Christophe Matthieu 34815021b8 merge upstream 2014-06-24 10:13:11 +02:00
Martin Trigaux d0b3e3b8c6 [IMP] module: when uninstalling a module, do not redirect to a useless screen 2014-06-23 13:09:36 +02:00
Jeremy Kersten 2b44ac2cd6 [MERGE] Gengo - Merge saas-4-gengo-jke - Fix gengo to make it working 2014-06-23 12:22:25 +02:00
Commandant Custo 05373b3532 [IMP] Change tab name to keep it simple
As odony advised.
2014-06-23 12:18:09 +02:00
Commandant Custo ae6730e53b [IMP] Display 'Direct inheritants' ir.ui.view form
This way, it's easier to create an inherited view 'on-the-fly' from the developer mode.
And it's even more handy if you want to inspect or modify an existing inherited view.
2014-06-23 11:12:08 +02:00
Fabien Meghazi 0e9aca1013 Merge remote-tracking branch 'odoo/master' into master-sass-in-bundles-fme 2014-06-23 10:00:34 +02:00
Christophe Simonis e862ff7033 [MERGE] forward port of branch saas-5 up to 4cb5381
Conflicts:
	openerp/addons/base/module/wizard/base_module_upgrade_view.xml
2014-06-22 15:36:10 +02:00
Christophe Simonis 4cb5381dee [MERGE] forward port of branch saas-4 up to 1f20f61 2014-06-22 15:33:22 +02:00
Christophe Simonis 1f20f61ab4 [MERGE] forward port of branch saas-3 up to 75884c3 2014-06-22 15:30:57 +02:00
Christophe Simonis 75884c3e1a [MERGE] forward port of branch 7.0 up to 7e85786 2014-06-22 13:44:30 +02:00
Ruchir Shukla 86c2426555 [IMP] module: warning when uninstalling modules
When a module is uninstalled, this will also uninstall modules depending of it. To avoid unexpected loss of data, this patch list the modules that will get impacted during the installation.
This also affects the configuration pages with on change warnings.
2014-06-20 17:36:26 +02:00
Jeremy Kersten 18bb52ee88 [FIX] Gengo - Update modoel ir_translation for gengo and make it working. Works with order and not job, because when you send a batch to translate, you don't know all the job but only the order. 2014-06-20 17:33:09 +02:00
qdp-odoo af5ad37486 Merge pull request #666 from odoo-dev/master-statement-fixes-alot-qdp
evil pull request with fixes on the new bank statement reconciliation widget
2014-06-20 11:22:29 +02:00
Christophe Matthieu e75d9525bb merge upstream 2014-06-20 10:09:16 +02:00
qdp-odoo 5e7e7cef41 [IMP] account: learn the res.partner.bank of partners in reconciliation process on bank statement + adapted l10n_be 2014-06-20 09:58:42 +02:00
Fabien Meghazi 52ee6c52bd Merge remote-tracking branch 'odoo/master' into master-sass-in-bundles-fme 2014-06-19 18:39:56 +02:00
Fabien Meghazi 146d7b2886 [IMP] refactor assets bundle for future features 2014-06-19 18:09:01 +02:00
Christophe Simonis eef6330c55 [MERGE] forward port of branch saas-5 up to adf07a9 2014-06-19 16:23:32 +02:00
Christophe Simonis adf07a9490 [MERGE] forward port of branch saas-4 up to 5087612 2014-06-19 16:13:35 +02:00
Christophe Simonis 5087612d1d [MERGE] forward port of branch saas-3 up to bf53aed 2014-06-19 15:44:07 +02:00
Christophe Simonis 5206eb16d5 merge upstream 2014-06-19 13:13:27 +02:00
Christophe Matthieu a6185caa18 [FIX] website_sale: display in currency of the user 2014-06-19 13:12:06 +02:00
Richard Mathot 6a4047f47b [REV] ir_actions: Partial revert of 7d4df0b6b2 2014-06-19 11:49:49 +02:00
Richard Mathot 7d4df0b6b2 Merge pull request #581 from odoo-dev/master-ir-actions-context-rim
[IMP] base: use current context when evaluating ir_actions' context
2014-06-19 10:17:38 +02:00
Fabien Meghazi fef8077df3 git commit -a -mm 2014-06-18 16:56:46 +02:00
Fabien Meghazi 4c785069bc Bring back exception conversion to Forbidden 2014-06-18 15:40:09 +02:00
Fabien Meghazi 624f256f61 Changed as per the recommandation of Sir Odo 2014-06-18 14:31:16 +02:00
Fabien Meghazi 9b0d8c0503 [FIX] Session Expired message in backend 2014-06-18 10:24:37 +02:00
xmo-odoo 3160eb74c4 Merge pull request #584 from xmo-odoo/master-qweb-groups-xmo
`@groups` attribute in qweb views
2014-06-18 09:37:02 +02:00
Amit Vora b0a5e9286d [IMP]rename project_mrp to sale_service 2014-06-17 17:12:49 +02:00
xmo-odoo c949509b5e Merge pull request #463 from xmo-odoo/qweb-foreach
Qweb foreach
2014-06-17 15:56:09 +02:00
Jeremy Kersten 481c64e077 [IMP] Ir Action Server - Fix the domain for the field 'Link Using field'. 2014-06-17 15:20:52 +02:00
Xavier Morel dda18249c0 [FIX] @groups attribute should not disappear when editing
The @groups attribute in qweb views was not rendered (even when matched by the
user), so editing a template with an @groups would either remove the whole
section (if the user didn't have the groups, fixed in previous commit) or only
removed the attribute itself making it visible to everybody (which ought be
fixed-ish by this commit).
2014-06-17 12:22:15 +02:00
Xavier Morel 79e10200d5 [IMP] prevent edition of page if groups which current user doesn't have
If the current view uses @groups attributes (possibly in called templates),
the corresponding elements are rendered to a void (empty string in qweb). If
said user can edit the page, does so and saves a view section in which there's
a @groups to which he has no access, the element[@groups] is completely
removed from the template once saved, losing it.

If QWeb encounters an @groups to which the current user has no right during
rendering, have it request a no-RTE page, so the user can not RTE-edit the
page (or drop snippets in it).
2014-06-17 12:01:52 +02:00
Richard Mathot 7ad2eb354d [IMP] base: use current context when evaluation ir_actions' context 2014-06-17 11:59:14 +02:00
Fabien Meghazi daf8bdf688 [ADD] support for multiple value query args in keep_query() 2014-06-17 11:35:29 +02:00
Thibault Delavallée 8dc02ebb6f Merge pull request #90 from odoo-dev/master-uninstall-module-tpa
[FIX] issues when uninstalling modules: unlink ir.action.todo which are related to actions which will be deleted (fix issues when uninstalling modules) + check for menu existence before displaying need action
2014-06-16 10:08:36 +02:00
Olivier Dony 0f01df42ea [MERGE] Forward-port saas-5 up to f15cbd6 2014-06-12 18:59:15 +02:00
Olivier Dony f15cbd6520 [MERGE] Forward-port saas-4 bugfixes up to ad4c6ca 2014-06-12 18:54:36 +02:00
ged-odoo 74168c4e9d Merge pull request #272 from odoo-dev/master-inline-searchview-ged
[MERGP] Inline Searchview

This task split the searchview in two parts: SearchView and SearchViewDrawer. The drawer is displayed inside the main view and the searchview stays in place.  It also changes the scrolling behavior of the web client: the main view area can scroll without affecting the UI (so the various menus stays in place)

Because of this, other large changes have been made:

the drawer has been redesigned,
the Custom Filter widget has been split in two (Custom Report and SaveCurrentFilter),
the main view is now scrollable, so the UI stays in place and only the view can change
The text 'Group By...' has been changed into 'Group By' (most addons had to be modified)
bootstrap classes are used when it makes sense (for example, badge)
the left menu is also scrollable (separately from the main view)

It is likely that some stupid bugs have been introduced.  Please don't hurt me.
2014-06-12 16:27:11 +02:00
Fabien Meghazi 64b78b34d6 Merge pull request #505 from odoo-dev/master-form-views-default-version-fme
[IMP] Form views default version is now 7.0
2014-06-12 15:27:24 +02:00
Fabien Meghazi 87378aac26 Convert form views @version="6.1" 2014-06-12 13:55:40 +02:00
Fabien Meghazi b76c4e248c Add form@version in rng 2014-06-12 10:17:36 +02:00
Fabien Meghazi faa09da325 Removed version="7.0" from form views 2014-06-12 09:09:59 +02:00
Géry Debongnie fe209f9e7a [MERGE] merge from master 2014-06-11 15:53:45 +02:00
Fabien Meghazi 1ac928af05 Set old form views as explicit @version="6.1" 2014-06-11 14:04:02 +02:00
Fabien Meghazi ba3ce4753b Set form views default @version="7.0" 2014-06-11 14:03:20 +02:00
sve-odoo 6ed133d86d [IMP] Add filters in ir.model.fields search view.
Add "Custom" and "Base" filters in ir.model.fields search view.
2014-06-11 11:16:17 +02:00
Géry Debongnie af58bc5914 Merge remote-tracking branch 'odoo/master' into master-inline-searchview-ged 2014-06-11 10:10:58 +02:00
Thibault Delavallée 222e26628a [FIX] crm, crm_partner_assign, res_partner, mail, project: removed deprecated fields, deprecated methods + references to it; also removed deprecated tags on things that are not deprecated anymore. Everything is under control. 2014-06-11 08:44:40 +02:00
Olivier Dony 6b85d80f23 [FIX] Wrap werkzeug.utils.escape() to accomodate signature change in 0.9
We always want to escape quotes (") as part of the process of
generating HTML output. This option (quote=True) turned into
an implicit flag with a DeprecationWarning in werkzeug 0.9.0
It is likely to disappear in a future release of werkzeug too.
A wrapper avoids this warning without loss of compatibility
2014-06-10 18:46:40 +02:00
Christophe Simonis ccdae747a0 [MERGE] forward port of branch saas-5 up to a7c2125 2014-06-10 13:19:55 +02:00
Christophe Simonis a7c2125735 [MERGE] forward port of branch saas-4 up to 6b8e972 2014-06-10 13:15:46 +02:00
Christophe Simonis 6b8e9727e5 [MERGE] forward port of branch saas-3 up to 4601d85 2014-06-10 12:29:47 +02:00
Christophe Simonis 4601d85944 [MERGE] forward port of branch 7.0 up to 6fdb783 2014-06-10 11:49:14 +02:00
Géry Debongnie 8202561511 Merge remote-tracking branch 'odoo/master' into master-inline-searchview-ged 2014-06-10 11:43:17 +02:00
Laurent Mignon 6788edcdd0 [FIX] ir_cron: use the same search criteria as when listing job to excecyte when acquiring the ock on the job before its execution to prevent running already executed job
Backport of fix made in trunk
2014-06-05 18:59:03 +02:00
Xavier Morel e5560a2785 [REM] test for removed 'feature' of refusing always -> disabled writes on views 2014-06-05 16:08:42 +02:00
Martin Trigaux 426993e06d uninstall: avoid errors during uninstall
When uninstalling a module, remove the ir.model.constraint after removing the non-model records and before fields and model definition.
Without this fix, some constraint would be removed too early allowing to have broken relations and data left from removed module.
2014-06-05 12:52:11 +02:00
Xavier Morel b973e27da5 [IMP] views: don't prevent always -> disabled writes in views, is confusing and not very useful 2014-06-05 12:22:37 +02:00
Xavier Morel 0de6710c3c [IMP] guard for None enum, remove 1 level of indent 2014-06-05 12:05:24 +02:00
Xavier Morel 7f0db3c257 [IMP] use Sized for iterable size and remove support for count 2014-06-05 12:03:16 +02:00
Xavier Morel 03b75477ec [IMP] use enumerate instead of explicit index thing 2014-06-05 12:01:44 +02:00
Xavier Morel 0b3abaf4ce [FIX] _even/_odd were reversed, also some reformatting thing 2014-06-05 12:01:04 +02:00