Commit Graph
111070 Commits
Author SHA1 Message Date
Christophe Simonis 295a377e5d [IMP] web: add test to ensure nobody will commit again unwanted QUnit.only 2017-09-11 18:14:16 +02:00
Martin Geubelle 7a87484856 [FIX] web: remove QUnit.only occurence 2017-09-11 16:54:09 +02:00
fwi-odoo 68d1e6d8b1 [FIX] web: evaluate the view context for the subviews not inline
Before this commit, the xml attributes defined with 'context.get(key)' in the
subviews not inline were not evaluated correctly. This was caused
by the loss of the one context in the '_loadSubviews' method.

This commit fixes this issue and modifies the mockserver in order to be able
to use the parameter 'viewOptions.context'.
2017-09-11 16:41:58 +02:00
fwi-odoo 268e6d9530 [FIX] web: calendar: set event without time as all day
Before this commit, when an event had only a date, the event
was set to midnight.
This commit sets the event as all day event if the field used as start date
is only a date and not a datetime.
2017-09-11 16:41:40 +02:00
Christophe Simonis 3ac2a1106c [MERGE] forward port branch saas-15 up to ec15765eec 2017-09-11 13:30:03 +02:00
Christophe Simonis ec15765eec [MERGE] forward port branch saas-14 up to 48f88992da 2017-09-11 12:35:49 +02:00
Christophe Simonis 48f88992da [MERGE] forward port branch 10.0 up to 7d7e94c6ef 2017-09-11 11:45:44 +02:00
Christophe Simonis 7d7e94c6ef [MERGE] forward port branch 9.0 up to 46e3e739c5 2017-09-11 11:37:46 +02:00
Christophe Simonis 46e3e739c5 [MERGE] forward port branch saas-6 up to ddbc2da847 2017-09-11 11:24:25 +02:00
Christophe Simonis ddbc2da847 [MERGE] forward port branch 8.0 up to 7805cf5fef 2017-09-11 11:22:33 +02:00
Odoo Translation Bot 2a0d62295e [I18N] Update translation terms from Transifex 2017-09-10 07:07:40 +02:00
Odoo Translation Bot c2866f17ff [I18N] Update translation terms from Transifex 2017-09-10 04:41:07 +02:00
Odoo Translation Bot 6740879407 [I18N] Update translation terms from Transifex 2017-09-10 00:30:05 +02:00
Fabien Meghazi 6fa705399b [FIX] http/db: handle case when db_filter is empty in the config file
In such a case the db filtering won't be applied on an empty regex so
we use the list of databases passed to `db_name` (--database) as
the database list (and we also avoid to list all the databases present
on the postgresql cluster)

As a side effect, this patch allows to strengthen the postgresql security
by preventing Odoo to list all the databases present on the cluster.
2017-09-08 18:29:26 +02:00
Martin Geubelle 3ae9a6b537 [FIX] web: Kanban: allow to resequence a record twice
Before this rev., it was not possible to move a record (in the same column)
at the top and then move another record above it.

There is special class `o_updating` added on record being edited to avoid
moving them. This class is normally removed afterwards when re-rendering the
record.

When resequencing, the record is re-rendered so the class won't be removed ;
this is why it shouldn't be added in the first place (same behaviour as saas-15).
2017-09-08 16:35:45 +02:00
Nicolas Martinelli cbee332bb1 [FIX] mrp_repair: default location in multi-company
1. Create a new company
2. Create a user with access to this company and with access to repair
3. Connect as the new user
4. Try to create a new repair and the stock.warehouse access error
   should appear

opw-769160
2017-09-08 13:14:36 +02:00
Martin Geubelle 14cb9af0d6 [FIX] web: only send changed fields on one2many after onchange
The server response to an `onchange` on a one2many is a list of
commands. In case of one2many update (command 1), the server
returns all fields (and not only the modified ones).
When saving the record, this is the client responsability to
specify which fields really changed.

Before this commit, all fields were sent at `write` and not only
the changed ones. This was causing issues when the user couldn't
write on the field ; an error was triggered even though the user
didn't change anything.

To fix this, we only tag as changed (in the datapoint `_changes`
attribute) the fields that have a different value after the onchange.
2017-09-08 12:27:43 +02:00
Moises Lopez - https://www.vauxoo.com/ 4e2db85f2e [FIX] base_address_extended: default to Null instead of empty string
for computed street fields.

Qweb reports delete the node if the value is Null but won't if the value is an empty string. And then, l10n_mx_edi module has errors because there are nodes with empty string and the minimum value is one char.

Courtesy of Vauxoo. Was PR #17169

Backport in Saas-14 from opw-770430
2017-09-08 10:13:30 +02:00
Lucas Perais (lpe) 825c7c1ed6 [FIX] website_forum: fix display of images in a post
Before this commit, the images were messing up the layout of the post, with text uglily lying on their right
This commit solves the issue at rendering of the post, to ensure that current posts on prods be affected in a reversible manner.
Also, we want this commit to have minimal impact

OPW 769721

closes #19322
2017-09-08 09:44:30 +02:00
Lucas Perais (lpe) 7805cf5fef [FIX] tools: fix amount to text in fr and nl
Correct rendering of 70 and 90 in french
And manage inversion [unit]-en-[tens] in nl

opw 757048

closes #19297
2017-09-08 09:40:56 +02:00
Yenthe V.G 1d769ad5a7 [FIX] web: Don't show buttons when model has readonly access
PR #19314
2017-09-08 09:23:44 +02:00
Goffin Simon 55b8a454c9 [FIX] mrp: Unbuild order with serial number
When unbuilding an order with serial number, the quant with the right
serial number must be found in the system either it raises an UserError
explaining  what's the problem.

PS: A problem was found when we tried to unbuild two times the same MO.
After the first unbuild, we deleted it and recreated the same one.

opw:748472
2017-09-07 16:39:58 +02:00
Nicolas Martinelli 6879409723 [FIX] im_livechat: unsupported locale
- Set the browser to language 'Spanish (Latin America)' ('es-419')
- As a public user, open a livechat session.

The session doesn't open.

The root cause is the creation of a mail channel which contains
translatable fields (e.g. name). This attempts to create translations
in the 'es_419' language. However, this locale doesn't exist in Odoo,
and it triggers the constraint 'lang_fkey_res_lang'.

In this specific case, there is no real reason to translate the channel
name. Therefore, we simply avoid it thanks to a context key.

opw-766489
2017-09-07 15:54:26 +02:00
Martin Geubelle b2c916de83 [FIX] web: correctly display no content helper in dashboards
The no content helper was displayed next to some dashboards instead of below.
2017-09-07 11:21:43 +02:00
Nicolas Lempereur 73edebc371 [FIX] web_editor: enter remove or duplicate node
There is some odd behavior especially inside a editable containing
newlines.

For example in the sale description on an ecommerce item, lines could
contain newline (it is editable from backend) but as an effect of other
use case, pressing enter could have a range of unwanted side effects:

- removing all the content,
- duplicating the editable (should never happen, if we have one field
  "description_sale" we don't want to duplicate it, this has no sense)

In a product name which is in the same use case, there is no newline so
the problem is not apparent, and ENTER do nothing. This is the behavior
we should want in every instance.

If we still want a newline, we have to force it with SHIFT + ENTER key,
also this is regarding field that may or could be present in the backend
views, so it could also be edited in backend.

This change make ENTER ignored when we are editing a node directly child
of an node being edited.

A second part of the issue was that dom.removeBetween (used to remove
content inside a range) could remove the ancestor node that was an
editable. This is not wanted.

For example if we did CTRL + A inside a field with `<br />` then ENTER
or pasting something, the field would be removed and not just emptied
and could not be gotten back without editing the template manually.

This was sometimes mitigated because if a `<br />` was at the end of an
element, it would stay in this use case avoiding the issue.

note: not necessary after saas-16

fixes #17445
opw-751360
closes #19313
2017-09-07 09:38:56 +02:00
Nicolas Martinelli 18d63d4717 [FIX] delivery: zip code comparison
Some countries, such as Canada, are using letters in their zip code.
When we check if the zip code is within the accepted range, we should
make sure to normalize it by making it case insensitive.

opw-767866
2017-09-06 17:31:02 +02:00
Nicolas Martinelli 60dbf05750 [FIX] stock: performance issue
Commit 6a366b216b introduces a subquery when fetching translations in
order to avoid fetching duplicates. On large a `ir.translation` table
(~500000 records), this can cause a major performance degradation when
the user is not using the English language.

A typical example is a `read_group` call such as:
```
self.env['stock.quant'].with_context(lang='fr_BE').read_group([
    ('location_id', 'child_of', self.env.ref('stock.stock_location_stock').id)],
    ['product_id', 'qty'], ['product_id'], limit=80)
```

When no `orderby` parameter is used, the `groupby` fields are
implicitly used for ordering. While this makes sense for direct calls
from the web client, this implicit order might be problematic for
programmatic calls (such as computed fields). Indeed, in case of
grouping by product, the subquery mentioned earlier is used to sort by
product name. This is costly, and in most of the cases useless.

The workaround is to explicitely order by `id`, to avoid the use of the
subquery. For the upcoming version, a cleaner fix should be made in
order to prevent duplicated translations, and get rid of the subquery.

opw-767532
2017-09-06 17:14:45 +02:00
Martin Geubelle bae4aacad8 [FIX] web: edit x2many editable list view after resequence
In an embedded editable list view with the widget `handle`, resequencing a
record and try to edit it afterwards won't work. The selected record isn't the
correct one, as if the resequencing had no impact.

To make this work, the list datapoint needs to be ordered by the field with the
widget `handle` ; if it isn't, resequencing the records won't change the x2many
data order but the list view expects the same order.
2017-09-06 16:34:18 +02:00
Martin Geubelle 3052a43494 [FIX] web: edit editable list view after resequence
In an editable list view with the widget `handle`, resequencing a record
and try to edit it afterwards won't work. The selected record isn't the
correct one, as if the resequencing had no impact.

A small refactoring has been done to fix this because the resequence logic
was placed in the ListController (but should logically be placed in the model).
Several views are using the resequencing ; the code is thus now placed in the
BasicModel.

The list renderer state is then updated after the resequence.

The resequencing and the line edition have been placed in a common mutex to
avoid problems when the user tries to edit a record while the resequence rpc
isn't finished yet.
2017-09-06 16:34:18 +02:00
Goffin Simon ce9bbf6c10 [FIX] web: Setting ir.values for computed fields
Setting ir.values for computed fields is useless as the function onchange
in models.py will set to False all the computed fields with a modified dependence.

opw:767942
2017-09-06 16:30:05 +02:00
Lucas Perais (lpe) 45e0cd564a [FIX] web_editor, website_forum: allow to post videos on the forum
The commit 8749410b10 corrected the way the iframe was rendered to display a video in v9.0.
In v10 though, the html sanitizer is a bit more severe and cleans data-src attributes, preventing the iframe to have a src

This commit works around that and allows the src of the video to be saved in db

OPW 761424

closes #19125
2017-09-06 13:52:03 +02:00
Goffin Simon 8fd5951fbe [FIX] base_import: Specified Date Format in Import Statment is not recognized
Steps to reproduce the bug:

1. Import a bank statement with the shown dateformad DDMMYYYY (without headers)
2. Specify this date format in the advanced options
3. Try to find the date column to assign.

Bug:

The date format is not suggested for the fields with format DDMMYYYY.

opw:769118
2017-09-06 13:45:16 +02:00
Christophe Simonis 64d56995e0 [MERGE] forward port branch saas-15 up to ef5ac872b8 2017-09-06 12:26:36 +02:00
Christophe Simonis ef5ac872b8 [MERGE] forward port branch saas-14 up to ec0d51f20e 2017-09-06 11:28:11 +02:00
fwi-odoo 5563168fe7 [FIX] web: calendar: keep scroll after an event quick creation
Before this commit, the scroll was reset to the top of the calendar after
an event quick create.
This commit fixes this by defining the get/set localState for the calendar
renderer in order to keep the scroll and calling 'reinitView' from the
fullCalendar lib instead of always calling 'render'.
2017-09-06 11:17:29 +02:00
Christophe Simonis ec0d51f20e [MERGE] forward port branch 10.0 up to a4bcb66bfc 2017-09-06 10:59:06 +02:00
Nicolas Martinelli a4bcb66bfc [FIX] base_import: headerless import
- Import a CSV file without header
- Untick the option 'The first row contains the label of the column'

An error is reported.

If no header, the method `_match_headers` should return consistent
object types.

opw-769117
2017-09-05 16:37:48 +02:00
Nicolas Martinelli d522a796d3 [FIX] calendar: all day event
- Set the TZ as 'America/Martinique'
- In the calendar (month view), click on a date D.
- Fill in the topic, then click on "Edit"

The date is set to D-1.

Commit 09066fbbd5 makes the date consistent when the user sets an
event as an all day event by taking into account the appropriate
timezone.

However, in the case of an event created from the month view, this TZ
modification should not be applied.

opw-766638
2017-09-05 16:33:04 +02:00
Géry Debongnie 983c7ae22f [FIX] web: proper x2m edition with pagination
Before this commit, we did not really handle gracefully editing a
one2many with many records. The main issue is that if the user was not
on the last page, creating a new record added it to the last page, which
is confusing and actually a bad idea for records with required fields.

This fix requires a way to track the current changes (because we do not
display the current state of the form view: the new record is displayed
in the first page, but is actually added at the end of the dataset).

Note that this probably does not solve all issues with pagination. This
is a quite delicate problem. We will add tests and fixes as needed.
2017-09-05 15:41:28 +02:00
Géry Debongnie fef645fcc5 [FIX] web: increase timeout for js tests
We have a new runbot server which is quite slow.  Because of this, it
takes too much time to run this unit test suite (for comparison, one of
the last build by the main runbot takes 126s).

This is necessary for now, until we use chrome headless or something...
2017-09-05 15:41:26 +02:00
Christophe Simonis 80ca45b161 [MERGE] forward port branch 9.0 up to e300a587b3 2017-09-05 12:14:05 +02:00
Christophe Simonis e300a587b3 [MERGE] forward port branch saas-6 up to 0099074ab2 2017-09-05 11:27:58 +02:00
Christophe Simonis 0099074ab2 [MERGE] forward port branch 8.0 up to ce12a7397f 2017-09-05 11:26:19 +02:00
Lucas Perais (lpe) e14ab69772 [FIX] point_of_sale: control if a cashier is in localstorage
Before this commit, we could temporarily change cashier from A to B, and back to A seamlessly just by refreshing the page.
This could be a security issue for a cashier is held responsible for its sales.

This commit stores the cashier in localstorage, and with the right sets of methods, corrects the issue.

OPW 767827

closes #19207
2017-09-05 08:41:33 +02:00
Olivier Dony ce12a7397f [FIX] base: remove early size limit on author field
The default size limits set in base.sql are eventually superseded by the
actual limits (or absence of) when the DB schema is synchronized with
the Python model definitions.

However the list of modules (name, authors, descriptions, dependencies)
is loaded before this can happen. The length of the author field is one
case that can easily crash the database bootstrap process at that point,
should a module with a long author name be present in the addons path.

After schema sync, that size limit is lifted entirely (although Odoo Apps
does limit the max author name length to 512 at the moment, to prevent
abuse).

Fixes #5850
2017-09-05 01:46:47 +02:00
Olivier Dony 53bd1266b6 [FIX] doc: mention psycogreen dependency for gevent worker 2017-09-05 01:45:26 +02:00
Christophe Simonis a9991e8082 [MERGE] forward port branch 10.0 up to abb726d4df 2017-09-04 18:47:40 +02:00
Christophe Simonis abb726d4df [MERGE] forward port branch saas-11 up to 431b30b478 2017-09-04 18:46:46 +02:00
Christophe Simonis 431b30b478 [MERGE] forward port branch saas-10 up to aab6bdd54a 2017-09-04 18:38:25 +02:00
Christophe Simonis 3ff4feafd2 [MERGE] forward port branch saas-15 up to 4d4d75709d 2017-09-04 18:12:00 +02:00