Commit Graph
103218 Commits
Author SHA1 Message Date
Denis Ledoux dd8cbf49ac [MERGE] forward port of branch 7.0 up to d24fcd1 2015-11-06 16:04:21 +01:00
Atchuthan, Sodexis 38868d4991 [CLA] Added sodexis corporate cla 2015-11-06 12:54:55 +01:00
Denis Ledoux 384b8d496d [FIX] base_import_module: exception logger for module imports
When importing a module, if an error was raised
during the import, the traceback wasn't displayed
anywhere, making harder the debugging.

While it make sense to not display the entire traceback
to the user, in the web client, this is useful to
diplay the traceback in the logs, for debugging purposes.

opw-653882
2015-11-06 12:03:35 +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
Nicolas Martinelli ea2c80cad0 [FIX] web: Python-like rounding method
Javascript and Python handle the rounding of -x.5 differently.

In JS, `Math.round(-0.5)` is equal to `-0`.
In Python, `round(-0.5)` is equal to `-1`.

This will lead to inconsistencies between Python and Javascript, but it
can also lead to inconsistencies in the Javascript itself. Indeed, in
the POS, a refund to the client is entered as a negative number. For
example, `4.245` will be rounded to `4.25`, but a refund of `-4.245`
will be rounded to `-4.24`. The payment and the refund are not
consistent.

Sources:
- http://www.ecma-international.org/ecma-262/6.0/index.html#sec-math.round
- https://docs.python.org/2/library/functions.html#round
- https://en.wikipedia.org/wiki/Rounding#Round_half_up

Fixes #9249
opw-653034
2015-11-04 13:14:59 +01:00
Xavier ALT 2f35c40714 [FIX] web_calendar: date/datetime fields format in calendar views
As everywhere else, dates & datetimes must be formatted according
to the format defined in the `res.lang` of the user, and within
the timezone of the user.

Before this revision, when adding a datetime field to a calendar view,
the raw value of the date was displayed, for instance:
`2015-01-01 10:00:00`
instead of
`01/01/2015 11:00:00`
for a user in English(US), in UTC +1.

fixes #5324
opw-653625
2015-11-04 12:47:28 +01:00
Pedro M. Baeza 0ea130424d [FIX] sale_service: Allow a project user to close a task.
Closing a task associated to a sale order line requires
the write access to the according sale order line, that
a user who is only a Project > User does not have
by default.

Fixes #9286
Closes #9352
2015-11-04 12:09:30 +01:00
Goffin Simon 4324891529 [FIX] website_sale: add to cart with optional products
When clicking on button "add_to_cart" for a product with several options,
 the user must be redirected to the product page. In this way, the user can
 choose the options, he wants to buy with the product before adding the product
 in the cart.

 opw:653356
2015-11-04 09:44:11 +01:00
Olivier Dony 051b2ce539 [FIX] tools: ignore unknown entities while parsing 2015-11-03 21:38:53 +01:00
Olivier Dony e99358415a [FIX] tools: ignore unknown entities while parsing 2015-11-03 21:38:53 +01:00
Olivier Dony 245bcc61f6 [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
Olivier Dony 2ae6481233 [FIX] account, crm, l10n_fr: avoid exceptions when processing parameters 2015-11-03 21:38:53 +01:00
Jesús Alan Ramos Rodríguez 881a46a7ce [CLA] update signature to fix the github account
Closes #9202
2015-11-17 17:14:35 +01:00
Jesús Alan Ramos Rodríguez b6cade2c2d [CLA]: Fix typo and add another e-mail to CLA 2015-11-17 17:14:35 +01:00
michaelhwalther 751b6ba25a [CLA] michaelhwalther sign individual CLA
Closes #9013
2015-11-17 17:14:35 +01:00
Khwunchai Jaengsawang 2cdbd9b9bc [CLA] Khwunchai Jaengsawang sign individual CLA
Closes #8810
2015-11-17 17:14:35 +01:00
Alex Comba 0fd91cec1c [CLA] Alex Comba sign individual CLA
Closes #8523
2015-11-17 17:14:35 +01:00
Panagiotis Issaris 462af90df5 [CLA] Panagiotis Issaris sign individual CLA
Closes #8497
2015-11-17 17:14:35 +01:00
Nicolas Lempereur 9717afbbb7 [FIX] event: fix send mail to event registrant
Currently, the button "Send Email" next to the email address of an event
registration didn't work if a partner was not set.

This commit removes the button, thus removing the feature but partially
adds it back via the chatter suggested recipients in the same way it is
done for a lead.

It is still partially a feature regression since to work the viewing
user need more access rights (e.g read access right on res.partner)
than before.

closes #9486
opw-653127
2015-11-17 16:25:45 +01:00
Nicolas Martinelli f18399f721 [FIX] purchase: invoice state of PO
If the invoicing policy of a PO is set to "Based on incoming shipments"
and the PO contains a product of type "service", it is never considered
as invoiced, and therefore reach the state "Done".

The reason is that no stock move is linked to this PO line, and
therefore it is never considered as invoiced since we check the invoice
state of the associated sotck moves.

This fix assumes that in this specific case, a PO line for a service is
always invoiced, since there is anyway no incoming shipment linked to
it.

opw-654317
2015-11-17 13:40:37 +01:00
Olivier Dony a7e8ab363e [FIX] account, crm: avoid exceptions when processing parameters 2015-11-03 21:38:53 +01:00
Thibault Delavallée 3eb415b1fd [FIX] hr_holidays: my leaves on leaves summary
By default the Leaves Summary menu should display my leaves and allocations grouped
by type, for this year.
2015-11-17 17:21:27 +01:00
Cedric Le Brouster 72b76f8de5 [CLA] Corporate CLA for OpenFire
Closes #9104
2015-11-17 17:08:42 +01:00
Jared Kipe 25d5883af4 [CLA] Hibou Corp sign corporate CLA
Closes #9167
2015-11-17 17:08:42 +01:00
Nils Hamerlinck 700787309c [CLA] Nils Hamerlinck sign individual CLA
Closes #9547
2015-11-17 17:08:42 +01:00
Denis Ledoux 2b1b0e6d13 [FIX] web: editable list validation with several pages
This revision is related to a9d20d9fa0.

`dataset.cache` contains an item for each records, even
if the records hasn't been loaded in the cache. If a record
has not been loaded, only the record id is available, not
the other values. Thefore, this isn't possible to validate
the record values of records that have not been loaded
in the dataset cache.

opw-654013
2015-11-17 17:07:31 +01:00
Eneldo Serrata 9325cd054a [CLA] Eneldo Serrata sign individual CLA
Closes #9516
2015-11-17 17:01:13 +01:00
Raphael Collet 9687eb3d84 [FIX] translate: fix xml_translate to use an HTML parser as a fallback
When terms are translated in the website, their values are sent as HTML (with
text entities escaped).  The function `xml_translate` is used to sanitize those
values, and sometimes crashes because of non-closed entities like `<br>`.  Fix
it by using an HTML parser as a fallback.

This is a partial revert of 6c8e53a087.
2015-11-17 16:18:05 +01:00
Raphael Collet 69db2f537b [FIX] website: avoid looking up key in context=None 2015-11-17 16:18:05 +01:00
Simon Lejeune 7fcc79da21 [FIX] packaging: bundle doc and pdf files
so that demo data of hr_recruitment and website_slides are complete.
2015-11-17 15:56:43 +01:00
Damien Bouvy d18441d348 [FIX] web: longer delay for module load warning
Warning messages are automatically displayed if a module takes more than 1000ms to load, but this delay is a bit short if you make multiple rpc calls (sorry for all the dead kittens)
2015-11-17 15:54:50 +01:00
Aaron Bohy 0cd10f9af8 [FIX] mail: chatter: undefined variable 'event' on firefox
Variable 'event' is magically defined on some browsers like chrome, but not on
firefox. Anyway, those preventDefault() were useless as they are performed
beforehand.
2015-11-17 15:49:43 +01:00
Goffin Simon b27333919a [FIX] crm; probability of a crm.lead record
When creating a crm.lead record, the default probability of this record
must be the the probability of its default stage.

opw:654284
2015-11-17 15:20:35 +01:00
Maxime Chambreuil 58f06d6a9c [ADD] l10n_ca: fr_CA translation
Make the chart of account compatible with l10n_multilang to be translated in
French (Canada)

Closes #9398
2015-11-17 15:19:14 +01:00
Thibault Delavallée 6543554b95 [FIX] hr_holidays: Year filter
This filter filters requests for this year. However allocation requests do not
have date_from and date_to. For requests not having those dates the filter
takes requests whose type (holiday_status_id) is active. This was the old
Year filter, that is applied only to allocation requests now. Leave request
are still based on date_from and date_to.
2015-11-17 14:45:50 +01:00
Thibault Delavallée 32edde6bcf [FIX] hr_holidays: duplicate filter My Leaves 2015-11-17 14:45:50 +01:00
Thibault Delavallée ef1c8385a1 [FIX] hr_holidays: allocation by tag
Revision 1e90257e58 removed hierarchy in
hr.employee.category model. Indeed they are used and displayed like tags
and not like hierarchical categories anymore.

However the allocation by tag was still using the childof operator
to go through hierarchy. No need to do that anymore.
2015-11-17 14:45:50 +01:00
qsm-odoo 0a830c5b1a [FIX] website_sale: product grid layout (saas & css)
Product grid layout is made with a table with colspans and rowspans
alongside fixed height cells (according to rowspan values). The fixed
height for cells was required because of chrome, which cannot have
fixed height rows to work properly. However, for some reasons, fixed
height cells combined with rowspan does not work everytime on firefox.

Solution is to combine the right solution (fixed height row and let the
cells compute their height according to rowspan values) and the fixed
height cell hack for the system to work on chrome.

This commit also corrects changes made in some previous commits in
website_sale.css without going through the .sass file.
2015-11-17 14:08:18 +01:00
Martin Geubelle 94d9658c78 [IMP] web_settings_dashboard: add panel for Odoo Enterprise
This panel fetches the number of active users and redirects to our server with the correct parameters to begin the 'buy' process.
2015-11-17 13:01:09 +01:00
Damien Bouvy 07fe5afc87 [IMP] web: distinction between community and enterprise version in the js framework
It was bound to happen: some functionnality need to be triggered depending on the current edition of Odoo. To do this, we add a property 'version' on the global odoo object.

This change is mirrored on the enterprise repo.
2015-11-17 13:01:09 +01:00
Adrien Dieudonné 22e94f5254 [IMP] web: better 'Odoo Enterprise' settings popup
The popup is now a bit more styled and needs less info to call our servers.
2015-11-17 13:01:09 +01:00
Damien Bouvy 608b2f7fba [IMP] mail: update notifications sends/receove Odoo Enterprise information
Our servers now accept contract codes and answers with expiration date and expiration reason.
2015-11-17 13:01:09 +01:00
Martin Geubelle 65d0faca4d [IMP] auth_signup: reset password form
* Hide 'back to login' when there is a token
* Hide the form when the token is invalid
2015-11-17 13:01:08 +01:00
Nicolas Martinelli 53d064716b [FIX] purchase: UoM in anglo saxon accounting
The call to _compute_price is wrongly done, and therefore the parameters
of the method do not correspond. This leads to a valuation_price_unit
which is incorrect.

opw-653694
2015-11-17 12:31:53 +01:00
Nicolas Martinelli 63d17e4840 [FIX] purchase: price in anglo saxon accounting
The price difference was wrongly calculated since we subtracted a
unit price with a total price (price_unit - price_line).

opw-653694
2015-11-17 12:31:53 +01:00
Thibault Delavallée 4753cd410c [FIX] mail: template form view
Issue with last field (report_name) on a page, was not displayed
completely.
2015-11-17 10:49:43 +01:00
Thibault Delavallée 69ed801979 [FIX] mail: internal note recipients
In some cases internal notes could be sent to more people than expected.
The correct list of recipients was computed but not assigned. Doo.
2015-11-17 10:49:20 +01:00