Commit Graph

83357 Commits

Author SHA1 Message Date
Christophe Simonis 47b2f7ea9e [MERGE] forward port of branch 7.0 up to 3a1c693 2015-12-08 12:16:00 +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
Martin Trigaux 1660daf2fb [FIX] crm: avoid constraint errors when merging partners
As for the _update_foreign_keys, the _update_reference_fields method may raise an unique constraint when merging two partners.
In such case, the new record is not relevant and can be removed.

Backport of 8d23a3a86c.
OPW 657338, closes #9705.
2015-11-25 14:15:25 +01:00
Olivier Dony d117d6645e [MERGE] Forward-port 7.0 up to 051b2ce539 2015-11-17 17:55:17 +01:00
Denis Ledoux f69b0cade1 [MERGE] forward port of branch 7.0 up to df91cb5 2015-11-17 13:04:39 +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
Denis Ledoux dd8cbf49ac [MERGE] forward port of branch 7.0 up to d24fcd1 2015-11-06 16:04:21 +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
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
Christophe Simonis 2e9b33b793 [MERGE] forward port of branch 7.0 up to 80c7209 2015-11-03 11:40:01 +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
Raphael Collet 8ea17a8cc9 [FIX] orm: always save boolean function fields, even when they are false
Fixes #4292: searching for records when a related boolean field is `False`
always returns nothing.
2015-10-12 16:38:17 +02:00
Christophe Simonis a6b11a151e [MERGE] forward port of branch 7.0 up to f8b56e4 2015-10-10 14:25:35 +02:00
Mack f8b56e4f40 [FIX] hr_payroll: total_wage return format
Field removed in 9.0 at 04cebbd (because useless). This avoids an error if read.
cf #8781
2015-10-08 12:20:29 +02:00
Martin Trigaux 096fe8a05c [FIX] project: restrict access to dashboard only to project users
Users not belonging to the project user group can not access the model
project.task.history.cumulative
Hide the dashboard for them

Fixes #8606
Closes #8607
2015-10-07 11:19:58 +02:00
Martin Trigaux 35b9ff7146 [FIX] auth_signup: do not send email to duplicated user
When duplicating a user, an email was sent to a user at the email of the
previous user (as the create is called before changing the email).

Closes #8754
2015-10-02 16:32:55 +02:00
Nicolas Martinelli acb55e321d [FIX] mail: reload only in log after composer
Commit e0c1f54fd7 was supposed to prevent the message fetch in the
inbox view. However, self.is_log refers to the type of message: internal
note or message. This properly checks if the page displayed is the inbox
view before fetching the messages.

Related to #7596
opw-650208
2015-10-01 15:34:58 +02:00
Goffin Simon 2b13234661 [FIX] mrp_operarations: str time comparaison
Format error when comparing str time

opw:648349
2015-10-01 15:05:47 +02:00
Odoo Translation Bot 78450f2769 [I18N] Update translation terms from Transifex 2015-10-01 00:32:02 +02:00
Laetitia Gangloff f9859c510c [FIX] stock: compute stock valuation with right quantity
`qty` is the quantity in the product default uom.

`move.price_unit` is the price unit of the product
in this move, for the specific uom of this move.
The quantity to use is therefore the quantity
in the move uom, `move.product_qty`

Closes #4555
2015-09-30 14:47:53 +02:00
Ronald Portier (Therp BV) 65d4b25565 [FIX] tools: i18n_extra loading, backport of 7c2795ca
In case of different directory for stroing po and pot files than 'i18n'
(e.g. 'i18n_extra'), a po could be linked to a wrong pot file.
Use the same folder as the po file to look for pot.
Closes #4323
2015-09-28 15:38:39 +02:00
Christophe Simonis 504a04c823 [MERGE] forward port of branch 7.0 up to 117b636 2015-09-25 14:56:58 +02:00
Christophe Simonis 117b636d3f [FIX] mail: catch database errors when sending mails 2015-09-25 14:43:00 +02:00
Alexis de Lattre fc11b58239 [FIX] stock: service lines duplication when grouping DO invoices
This is possible that changes happen
during the loop in the multiple pickings:
an update in a picking could update another
picking. The browse must therefore be done
inside the loop to update the pickings with
the latest changes.

Fixes #4201
2015-09-25 12:25:52 +02:00
Pierre Verkest be33912a25 [FIX] report_webkit: get webkit path as SUPERUSER_ID
`ir.config_parameter` is readable by employees only.
It could happen to print a webkit report
as a portal / public user.

Closes #4181
2015-09-24 18:11:42 +02:00
Laetitia Gangloff 34f79f3de7 [FIX] purchase_double_validation: do not update limit on module update
In the module `purchase_double_validation`,
you can change the limit to require a second approval
in the purchase settings.

If the module was updated, the limit was re-set to
its default value.

Closes #4183
2015-09-24 17:59:52 +02:00
Laetitia Gangloff 273114204f [FIX] note: `Use fancy note` was re-checked on update
Set security group as not updatable. To be able to not use fancy note

Closes #4178
2015-09-24 16:41:10 +02:00
Christophe Simonis 24bcdb75fb [MERGE] forward port of branch 7.0 up to c2aff47 2015-09-22 15:30:22 +02:00
Valencia Rodrigues Sah c2aff4772e [FIX] product: default value on required field
The qty fields has become computed in 6.1, and the value set by the user is on
min_qty. Set default value as it is required.

Closes #8561
2015-09-17 17:45:20 +02:00
dufresnedavid cc9113f818 [IMP] Prevent unclosed cursor during tests
If an error happens in an overload of setUp, the already-open cursor
is likely not to get properly released before the next test,
deadlocking the db, because tearDown only runs if setUp has
succesfully completed.

Cleanups were added specifically to run every time, after tearDown has
(potentially) been executed.

closes #8327

Note: cleanups run in LIFO order (as they should).
2015-09-17 12:23:09 +02:00
Goffin Simon acf22b7bc8 [FIX] resource: current_hour in interval_get_multi
The minutes of dt_from(start date) must be taken into account by current_hour and not by
todo (hours).
2015-09-14 15:53:59 +02:00
Goffin Simon 2442fe2e4b [FIX] resource: hour_to and hour_from in interval_get_multi
The function interval_get_multi must take into account the minutes in
hour_from and hour_to. hour_to and hour_from are float fields in the model
"resource.calendar.attendance" and the decimal part of these two fields is
for the minutes.

opw:648349
2015-09-14 14:53:14 +02:00
Christophe Simonis 024177ebc4 [FIX] resource: get_working_intervals_of_day
Use patch from 8.0 (64e1c28e35) instead of
the one from 7.0 (bbd15cdca6).
2015-09-11 18:07:49 +02:00
Christophe Simonis d48aa27cce [MERGE] forward port of branch 7.0 up to a7ff110 2015-09-11 16:16:27 +02:00
Christophe Simonis a7ff1104bc [FIX] base: sanitize module description 2015-09-11 14:58:44 +02:00
Martin Trigaux 909e6e300a [FIX] email_template: use valid email_from content
Correctly use the email_from tag from template.
This partially reverts commit 0f82346167.
"[FIX] email_template: keep email_from and outgoing server"
Remove the email_from part that was incorrect, keeping the one on mail_server_id

Instead of assigning an non-evaulated email_from in the context, specify the
email_from in the onchange method. This way the created email has an evaulated
from value. This was an issue for templates using email_from like
"${(object.user_id.email or '')|safe}"

In the _notify method method, the email_from is partially respected as it will
be used a fallback only. However changing that would introduce a modification of
behaviour not suitable for 7.0 branch.

Fixes #8409
2015-09-08 14:30:37 +02:00
Goffin Simon bbd15cdca6 [FIX] resource: interval_get_multi
To compute the intervals of working time, the function interval_get_multi
used 'hour_to' and 'hour_from' from "resource.calendar.attendance" model. 'hour_to'
and 'hour_from' are not in UTC timezone. All the dates in odoo are compared in UTC.
Then 'hour_to' and 'hour_from' must be converted.
To take into account the minutes in this computation, the minutes from the start date
are added in the variable todo (number of working hours).

opw:648349
2015-09-08 10:08:45 +02:00
Olivier Dony 10e6ad1355 [MERGE] Forward-port 7.0 up to rev. 20f69bbce9 2015-09-07 11:12:57 +02:00
Paul Catinean 20f69bbce9 [FIX] res.users: remove check_super duplication
Closes #8403
2015-09-07 11:07:43 +02:00
Christophe Simonis 7ea9691e2a [MERGE] forward port of branch 7.0 up to 1cfe191 2015-09-04 17:09:43 +02:00
Matthieu Dietrich 1cfe1910db [FIX] account: Remove superfluous bracket for analytic account domain
With the bracket in place,
the domain does not consider the last part,
"('state','not in',('close','cancelled'))".

Closes #3714
2015-09-02 14:10:19 +02:00