Commit Graph

72397 Commits

Author SHA1 Message Date
Odoo Translation Bot ff31e0381a [I18N] Update translation terms from Transifex 2016-07-01 00:28:27 +02:00
Odoo Translation Bot 0ae392c9e3 [I18N] Update translation terms from Transifex 2016-06-01 00:27:50 +02:00
Joren Van Onder 49b1742477 [FIX] point_of_sale: respect user timezone for all data in Sale Details
9f0120d73b solved this issue already, but
it was only applied to POS orderlines. There is other data on the
report (eg. payments, taxes, ...) that should also correctly respect the
user time zone as well.

opw-678748
2016-05-27 09:52:20 +02:00
Nicolas Lempereur ae9d57bc1e [IMP] web: multi-click on save on view form (no fp)
When clicking on save several time when editing a view form it can be
saved several times which can be an issue for one to many.

The normal happenstance when saving should be as follow:

-> save (click)
-> wait write result
-> received write result
-> reload the form with updated data and updates buttons

But when clicking several time, it could become:

-> save (click)
-> wait write result
-> received write result
-> save (click)
-> wait write result
-> received write result
-> reload the form with updated data and updates buttons

This commit only reinstate the saving feature once the form is reloaded.

related to opw-671793
backport of 8.0's dd714ac

note: no need to forward-port
2016-05-18 17:37:14 +02:00
Sylvain GARANCHER f4cb884cdc [FIX] base: Add missing return values
The _auto_init method was overriden without keeping the return value of
the super on some models.
This break the new stored computed fields computation at field creation.

Closes #11985
opw-677232
2016-05-17 10:39:54 +02:00
Olivier Dony a0484cbe45 [FIX] import: broken translation cache for absent translation of 'false'
Backport of 7d732b1011

Fixes #979
2016-05-05 03:39:54 +02:00
Olivier Dony 7cafe6a9c1 [FIX] account: set reconciliation date as admin
The user performing reconciliations may not always
have the right to update the corresponding partners,
for example if a partner is also a system user.

Doing it as super-user after verifying that the
user is indeed allowed to reconcile journal items
works around the problem.

Fixes #11931
2016-05-05 03:37:08 +02:00
Odoo Translation Bot 534b7c5553 [I18N] Update translation terms from Transifex 2016-05-01 00:28:37 +02:00
Raphael Collet c7baab6789 [FIX] expression: fix missing results in direct search on many2many fields
This case corresponds to searches like `[(field, 'ilike', name)]` where `field`
is a many2many field.  The domain processing performs a `name_search` on the
field's comodel, then makes the relation match the returned record ids.

Problem: the call to `name_search` uses the default limit (100), and this makes
the search return less results than expected.  Make the search complete by
forcing `limit=None`.
2016-04-29 15:45:21 +02:00
Denis Ledoux e1a17b433d [FIX] audittrail: prevent loop between models having *2m between each other
When setting rules on models having o2m/m2m relationship
between each other
e.g.
- `res.partner`:
  o2m `sale_order_ids` to `sale.order`
- `sale.order`
  o2m `message_follower_ids` to `res.partner`

an infinite loop could occur if records
of these models referenced records of the
other models in their o2m relationships
e.g.
 - `res.partner` ID 68:
   `sale.order` ID 9 in its `sale_order_ids`
 - `sale.order` ID 9:
   `res.partner` ID 68 in its `message_partner_ids`

This revision solves this use case, by passing the already
treated records in the context and checking that the records
haven't yet be treated before making the recursive call.

This revision makes sure to not break the API of methods
`get_data_context` and `prepare_audittrail_log_line`
(a new parameter had to be introduced for the above purpose)

opw-670904
2016-04-19 16:56:20 +02:00
Joren Van Onder 09a9e4aeb5 [FIX] point_of_sale: deal with Chrome 50's new height inheritance
Chrome 50 treats percent-height divs inside of auto-height cells as
auto [1]. So from now on it's important that an explicit 'height: 100%' CSS
property is set on parent tds, otherwise you'll end up with elements
with a height of 0.

DO NOT FORWARD-PORT!

[1] 8876584335
2016-04-18 16:42:09 +02:00
Olivier Dony 605b94e64c [FIX] point_of_sale: do not hide transactional errors
Catching and hiding database transactional errors can
sometimes cause a POS order to be entirely lost.

When it occurs, the transaction won't be committed
into the database, and if there is only one order
in the batch, the server won't return any error to
the frontend POS which will consider the order saved.
2016-04-15 10:03:55 +02:00
Olivier Dony 38905d686f [FIX] res.partner: relax condition in 3ab436fb7b
Users may sometimes need to edit their own partner records directly,
although indirect access by writing on `res.users` directly works
fine in most cases.
2016-04-11 13:33:49 +02:00
Olivier Dony 7546123a6b [FIX] base_import: avoid JS error in callback 2016-04-01 20:28:13 +02:00
Olivier Dony 97a96bc96b [FIX] base: require wizard for passwd change 2016-04-01 20:28:00 +02:00
Olivier Dony 3ab436fb7b [FIX] res.partner: modifying users requires extra access 2016-04-01 20:16:11 +02:00
Odoo Translation Bot 6aa601da2a [I18N] Update translation terms from Transifex 2016-04-01 00:28:28 +02:00
Goffin Simon 214231fbce [FIX] purchase: _get_price_unit_invoice
If the costing method of the product is "average", the price unit
of the stock move is set in the currency of the field "price_currency_id"
with the function "do_partial" (addons/stock/stock.py).

opw:672552
2016-03-31 14:05:19 +02:00
Nicolas Martinelli f1b9b301da [FIX] web: clear filename if image error
When the user chooses as product image a file which is not an image, the
message "Could not display the selected image" is displayed. However, at
saving, a traceback is thrown since the file chosen is uploaded anyway.

If the image cannot be displayed, the image field is cleared.

opw-672206
2016-03-24 11:18:14 +01:00
Denis Ledoux 3bc7ea6bcf [FIX] stock: stock valuation user timezone date
When delivering a delivery order (`stock.picking.out`),
which generates accounting entries
e.g. thanks to the real-time stock valuation,
the date of the move set was the UTC today date, while it must
be the user's today date, using the timezone passed in the
context.

This prevented the delivery of the `stock.picking.out`
when the `Check date in period` boolean was checked
in the stock journal, and the user date is in the previous
month compared to the UTC date, as the date set on the move
entries were not in the selected period for these move entries.
e.g. When the user timezone is UTC -8, and his current time is
2016-02-29 18:00:00, the UTC date is 2016-03-01 02:00:00, the
period chosen is February (correct), but the date on the move
entries were set to 2016-03-01.

opw-670820
2016-02-29 18:33:55 -07:00
Odoo Translation Bot 8c278a4e4a [I18N] Update translation terms from Transifex 2016-03-01 00:29:04 +01:00
Denis Ledoux 479f6ff48e [FIX] point_of_sale: tz fallback
The user timezone fallback in case the user
has no timezone wasn't set at the right place.

This is an oversight of the revision
9f0120d73b

opw-670778
2016-02-29 16:56:29 +01:00
Denis Ledoux 9f0120d73b [FIX] point_of_sale: Sales Details timezone
The Sales Details report wizard gives the possibility
to print the details of the POS orders between two dates.

The fields in the wizard are of type `date`,
while the orders dates are of type `datetime`.

`00:00:00` and `23:59:59` were naively added
to the `date_start` and `date_end` (respectively) to
handle the case.

But, this doesn't take care of the user time zone:
When a user choose between February 24th and February 25th,
it's within his time zone, and therefore, for the search,
where the datetime are in UTC, adding `00:00:00` isn't enough,
the dates have to be converted from the user time zone
to UTC.

opw-6698831
2016-02-24 18:26:08 +01:00
Denis Ledoux ce38582907 [FIX] mrp: update production quantity wizard factor
Use the same factor than the one used when
computing the products to consume at confirm.

Before, the quantity of products to consume was wrong
when using a different unit of measure in the BOM
than in the production order.

e.g.
 - BoM defined as:
   - 1 dozen of milk
   - BoM lines: 1 cow
 - Production order:
   - 1 unit of milk
   - BoM: The above one
At confirm, the quantity to consume is 0,083 cow (1 cow / 12, this is correct)
But, when updating the quantity to 2.0,
it updated the quantity of cow to 24.0, instead of 0,16.

opw-669447
2016-02-15 11:34:16 +01:00
Cedric Snauwaert 4de3f4c4ba [FIX] expression: fix search for o2m with non existing id
The result of searching on a o2m field for a missing ID was
the whole set of records which do not have any lines in the
o2m fields. This is definitely not the desired behavior,
and could lead to disatrous performance, because the
returned set could be extremely large.

One example of such behavior is for recomputing fields
in the env cache in 8.0+. When a o2m line gets deleted,
it triggers the recompute of any dependent fields.

In order to locate the records to recompute, the ORM
searches for the 'parent' records in the comodel table.
When this operation is done by 2 users concurrently
the o2m line may not exist anymore, and the bug
is triggered: dependent fields are recomputed on a possibly
very large set of records that did not need any recompute!
2016-02-04 17:10:08 +01:00
Denis Leemann 5b4d303d05 [FIX] kanban: 180 in Firefox 43+ and Chrome 48+
The kanban CSS applies both a 90 degree rotation and a top-bottom rtl
writing mode to folded kanban group titles. This was initially fine
because browsers didn't support the (SVG) "tb-rl" value for writing-mode
and the property was thus ignored. Firefox 43 (December 2015) and Chrome
48 (January 2016) added support for this value, and thus now end up with
a 180 degree rotation on the title.

Issue #7955 fixed it in 8.0 due to MSIE impact, this is essentially a
backport to 7.0.

close #10687
2016-02-03 15:03:43 +01:00
Olivier Dony cb609bd425 [FIX] tools.misc: log errors when parsing fails 2016-02-03 02:25:09 +01:00
Olivier Dony bdbcbea285 [FIX] marketing_campaign: incorrect field accessor 2016-02-02 22:43:39 +01:00
Olivier Dony cc724c2e61 [FIX] base: centralize custom data serialization for builtin types only 2016-02-02 22:42:31 +01:00
Olivier Dony 000c681f1e [FIX] ir.values: remove redundant deduplication logic
Handling update/create of existing values is already
handled by ir.values.set() itself.
2016-02-02 19:49:09 +01:00
Odoo Translation Bot 72983cac8e [I18N] Update translation terms from Transifex 2016-02-01 00:29:03 +01:00
Yuriy A. Apollov 098c084eae [FIX] orm: iteration on `browse_null` object lasts forever 2016-01-26 17:34:39 +01:00
Raphael Collet 152d9de6cf [FIX] fields: in many2many fields, command `5` removes accessible records only 2016-01-08 16:56:02 +01:00
Raphael Collet ece592dbf7 [FIX] fields: in many2many fields, avoid inserting duplicate entries in table 2016-01-08 16:55:43 +01:00
Odoo Translation Bot 4f1bd899ef [I18N] Update translation terms from Transifex 2016-01-01 00:25:46 +01:00
Nicolas Martinelli 8a7394a550 [FIX] auth_ldap: filter format
The LDAP method filter_format(filter_template,assertion_values) requires
that the length of assertion_values matches the count of %s in
filter_template. If not, a TypeError exception is thrown.

This fix catches the exception and displays an understandable error
message instead.

opw-608126
opw-657370
2015-12-08 14:23:28 +01:00
Jeremy Kersten 3a1c693259 [FIX] osv: fix boolean in domain for custom field
When a new column has been added after that some data already exists,
the old lines will keep an empty/null value. So when we search is the new field
is equals to False or if it is different of True, we need to match the null
values.

Backport of de3b64018a
2015-12-04 18:22:32 +01:00
Odoo Translation Bot cc82f7518f [I18N] Update translation terms from Transifex 2015-12-01 00:28:25 +01:00
Denis Ledoux 31e8bb8e9d [FIX] mail: better signature detection
This revision back-ports revisions
983d5eb9fa
&
ccbb8e09a6
regarding this signature regex.

Besides, it adds the fact the dashes have to
be at the beginning of the line
to make them detected as a signature.

opw-655834
2015-11-30 14:48:59 +01:00
Cedric Snauwaert d179a94da6 [FIX] web: list_view, context when doing name_get call in m2m was not compute correctly
this is a backport of commit fd56268c6ca4e8a6f94f16de9129bd12be87303f
2015-11-26 10:25:15 +01:00
Olivier Dony 051b2ce539 [FIX] tools: ignore unknown entities while parsing 2015-11-03 21:38:53 +01:00
Olivier Dony 789a86901a [FIX] account, l10n_fr: avoid exceptions when processing parameters 2015-11-03 21:38:53 +01:00
Denis Ledoux df91cb5a9a [FIX] mrp: Product Cost Structure decimal precisions
The decimal precisions for the quantities, cost/supplier price
per unit of measure were not respected. It was always
set to 2 digits, whatever the configuration in the database
decimal precisions.

opw-653143
2015-11-17 12:56:28 +01:00
Nicolas Lempereur d24fcd1d2e [IMP] base: test for expression distribute_not
Testing the use case of c28a28e, in which distribute_not was refactored
with iteration instead of recursion.
2015-11-05 17:13:55 +01:00
Raphael Collet c28a28e69e [IMP] osv: use iteration for expression negating
The current code when applying negative operator on an expression used
recursion which in extreme case is not best friend with python.

e.g: on instance with a lot of wharehouse, some simple action could lead
to a domain with lot of elements which could easiliy go over the python
maximum recursion limit.

This commit fixes this by replacing recursion with iteration.

We have a stack of negation flags and loop on each token of the domain
as follow :

- when we iterate on a leaf, it consumes the top negation flag,

- after a '!' operator, the top token negation is inversed,

- after an '&' or '|' operator, the top negation flag is duplicated on
  the top of the stack.

closes #9433
opw-653802
2015-11-05 17:13:28 +01:00
Denis Ledoux a23468c845 [FIX] hr_timesheet_sheet: total attendances & timesheets performances
For these function fields, bypassing the ORM, using a SQL query,
improves the execution time by 100 for a set of 80 timesheets
in a database with
 - 250K `hr.analytic.timesheet`
&
 - 250K `hr.attendance`.

These function fields depends on a one2many field which use
the SQL view `hr_timesheet_sheet_sheet_day`.

When performing `sheet.period_ids`, two SQL requests are performed,
 - the first just to know the ids in the sql view matching this sheet
 - the second to read the fields `total_attendance` & `total_timesheet`
and the request is performed on the entire set of lines of this view
(~250K lines in the observed use case)

while, when replaced by this SQL request, only one request is performed,
on a restricted set of lines, speeding up significantly the computation
of these computed fields for smaller sets of sheets.

opw-653447
2015-11-05 16:23:48 +01:00
Odoo Translation Bot 80c7209d2e [I18N] Update translation terms from Transifex 2015-11-01 00:31:46 +01:00
Raphael Collet 845c10fef2 [FIX] res_lang: fix confusion between class variable and local variable 2015-10-26 17:27:01 +01:00
Raphael Collet d5f35bf37d [FIX] res_lang: prevent modification of language code 2015-10-26 12:09:26 +01:00
Nicolas Lempereur b0a4dd0127 [FIX] workflow: don't process workitem several times
In some complex use case of a workflow instance with several workitems,
a given workitem processing could itself somewhat recursively process
one of the following workitems.

This situation was currently not taken into account, so in that given
case, the already processed workitems would be processed again.

opw-647580
2015-10-14 17:37:13 +02:00