Commit Graph
114942 Commits
Author SHA1 Message Date
RomainLibert 8aa27eeefd [IMP] Base: Forwarding missing model context
This change allows us to get the model context in order to know if we
have a lead or an opportunity which is important to display the right
word.
2018-01-15 10:23:13 +01:00
Christophe Simonis 03a36a9bba [MERGE] forward port branch saas-11.1 up to 56974322f8 2018-01-12 19:13:10 +01:00
Christophe Simonis 56974322f8 [MERGE] forward port branch 11.0 up to 3b80a059ff 2018-01-12 19:03:00 +01:00
Christophe Simonis 3b80a059ff [FIX] base: python3 compatible code (from forward-port) 2018-01-12 18:26:04 +01:00
Christophe Simonis b42b9c936b [MERGE] forward port branch saas-16 up to 3b7bf3a4b8 2018-01-12 18:15:23 +01:00
Odoo Translation Bot d6e3463dcd [I18N] Update translation terms from Transifex 2018-01-12 17:48:53 +01:00
Christophe Simonis 3b7bf3a4b8 [MERGE] forward port branch saas-15 up to 8962b8ecc2 2018-01-12 17:23:10 +01:00
Christophe Simonis 8962b8ecc2 [MERGE] forward port branch saas-14 up to d35a76ee17 2018-01-12 16:47:12 +01:00
Christophe Simonis d35a76ee17 [MERGE] forward port branch 10.0 up to d76237e038 2018-01-12 16:16:51 +01:00
Alexandre Kühn 41fe7f9d11 [FIX] web: contexts on field widgets + enforce bin_size for binary
Field widgets now have a key 'context' that let them
extend the context of the dataPoint (e.g. list).

In particular, widgets on binary fields enforce the contextual
item {bin_size: True}, so that the server gives the size of the
binary field as its value, instead of its content.

This change on binary fields reduces network load when accessing
a view with binary fields.
2018-01-12 16:12:49 +01:00
Alexandre Kühn 7813a8e714 [FIX] web: binaryfile field in list views
Revert partially 255e8ca3d9

Removed widget 'download_link', as it was a sub-version of widget 'binary':
it did the exact same thing (representation of binary fields by means of a download link)
in a much better-looking way (download icon + filename as text of the download link,
instead of just a download link with text "Download").

Also, the values of binary fields might be already a human-readable binsize (e.g. 2.52 MBs),
instead of its plain textual string representation in base64:
The contextual parameter 'bin_size', when set to true, does not download the data of binary fields.
As a consequence, the server provides the sizes of the binary, instead of their value.
2018-01-12 16:12:49 +01:00
celm1990 c3e3770f06 [FIX] account: state cancelled not exist on invoice
The domain was using a wrong 'cancelled' state
Bonus: avoid code redundency

Closes #22121
2018-01-12 15:47:39 +01:00
Christophe Simonis d76237e038 [MERGE] forward port branch 9.0 up to 26d3b77a1d 2018-01-12 15:32:15 +01:00
Randall Castro aea2cafd18 [CLA] signature for rcastro-tyc
Done at #22184
2018-01-12 15:19:50 +01:00
Guillaume Masson 26d3b77a1d [CLA] update CCLA for META IT
To add github username
Closes #22185
2018-01-12 15:17:17 +01:00
Raphael Collet 2304edd46c [IMP] *: avoid non-stored dependencies 2018-01-12 15:00:01 +01:00
Christophe Matthieu 05fe5384fe [FIX] account: manual reconciliation open the first line when validate
the opening is done even when there is still an open line
2018-01-12 14:28:45 +01:00
Christophe Matthieu d0a545df78 [FIX] account: hide 'Write-off' button if the currency balance is null
Issue: display the 'Write-off' button is very confusing for the user,
because in the bill, the amount is null but not in the converted value.
2018-01-12 14:28:45 +01:00
Martin Trigaux f166a3b69a [FIX] website_blog: correct RSS feed
Order blogs by post_date
write_date is changed each time a new visitor reach the page (number of visit)

Fixes tw:legalsylvain/status/951559451399671808
Closes #22198
2018-01-12 14:16:05 +01:00
Raphael Collet ca9d2b3006 [IMP] fields: log when a stored field depends on a non-stored field
Log an info when a field is computed and stored, but not all its dependencies
are stored.  Also allow to set explicitly `depends` on a field; this is useful
to restrict the dependencies of a related field.
2018-01-12 14:13:37 +01:00
Nicolas Martinelli d0dbd570b6 [FIX] mrp: digits in move.production.lots
Add decimal precision to quantitites in stock.production.lots.
Otherwise, if the UoM uses a DP larger than 2, inconsistencies may arise
since the field is automatically rounded to 2 decimals in the interface.

For example, if the DP of the UoM is 4:
- Set Qty Done to 1.234567
- Save => qty recorded in DB is 1.234567
- Edit, change nothing and save => qty recorded in DB is 1.23

This happens since the web client parses the value in the DOM and
detects a value change.

opw-788078
2018-01-12 13:48:38 +01:00
Raphael Collet 3fbd86bcbe [IMP] field: compute transitive dependencies over non-stored fields
In other words, when a field F depends on a non-stored field G, it also depends
on G's dependencies.  This guarantees that whenever a dependency of G is
modified, F will be invalidated and marked to recompute (if necessary).

The transitive closure of dependencies is not computed over stored fields.
Anyway stored fields already trigger the recomputation of their dependent
fields during their recomputation.  The performance impact on the loading of a
registry is negligible (less than 1%), and the increase of recomputation
triggers is small (less than 10%).
2018-01-12 13:42:05 +01:00
odoo 9f4c1646bc [IMP] point_of_sale: setting typo 2018-01-12 13:39:41 +01:00
William Henrotin e9b09d4778 [FIX] account, crm, website_sale: wrong link to sale settings
After sepration of CRM and Sales, The xml_id of sales settings action
changed. This patch update old links in web_planner to the new settings.

opw-804426
2018-01-12 13:18:47 +01:00
tbe-odoo d5e97eab8b [FIX] web: Kanban image not showing in some languages
- In some languages the kanban images are not displayed because of a bug in human_size method in JS.

This method translates the Unit Size for data and strip with the string with a comma as separator.
When the translatation contains spaces after the commas (like in the French translation), there is extra spaces in the final result.
This then cause an issue with the method is_bin_size that expects a unique space between the value and its unit.
Resulting in a bug in the method 'kanban_image'.

opw #804973 #804970 #804648
2018-01-12 12:05:56 +01:00
qsm-odoo 4357783a58 [FIX] mass_mailing: width of main layout in editor
Commit https://github.com/odoo/odoo/commit/bee3253b44850c0d563ee8973556ece33376781b
changed the main layout width computation so that it is compatible with
mail clients but broke the preview in the editor.
2018-01-12 11:48:35 +01:00
Martin Trigaux ea8cf1b7a2 [FIX] doc: escape code 2018-01-12 11:31:26 +01:00
Christophe Simonis 4eaef03df3 [MERGE] forward port branch 9.0 up to 330f84f211 2018-01-12 11:25:58 +01:00
Romain Derie bd00fa8dd1 [FIX] web_editor: dbclick a video open MediaDialog with wrong media
Before this commit:
In the web editor, if you double clicked on a video iframe to edit it, it would
open the MediaDialog(media) with the wrong media element.
Media would be ' ' instead of '.media_iframe_video' (which is its grand
parent):

  div.media_iframe_video
    div.css_editable_mode_display
      '& nbsp;'

Then, if you changed the media by another one (Image or Video), the media would
be wrongly inserted into the DOM, in the already existing iframe, eg:

  (1) div.media_iframe_video
    (2) div.css_editable_mode_display
      (3) div.media_iframe_video
        (4) div.css_editable_mode_display
          (5) '  '

Since the new media (3) is wrongly instered into (2) instead of replacing (1),
the bug it would not be visible on normal mode (you would still see the
old media) because (2) is not displayed on normal mode.
Then on edit mode you would see both media one over the other.

Note: This only happened when you opened MediaDialog thought double click
directly (not 'Edit 'in navbar) and without clicking somewhere else after you
entered edit mode.

Now, if the media has an iframe parent, we use that parent as the correct media

This closes #22109, closes #22179

Courtesy of QSM for the help
2018-01-12 10:48:42 +01:00
Jerther 270b2ebf81 [FIX] service, web: memory error on large DB
Fixes MemoryError when restoring large database archive.

Closes #17663
opw-788273
2018-01-12 10:17:42 +01:00
fda-odoo a4d0b0b44d [IMP] hr_recruitment: onboarding ux fixs
- rename module to Recruitment instead of Recruitment process.
    - add a tour on the "create" button of hr_job
    - change wizard for the creation of a job position (change text + remove "create & edit" button)
    - change the design of job positions cards and applicant cards
    - prefill the db with 5 states for applicants (Initial qualification, First interview, Second interview, Recruited and Contract signed)
    - add an activity widget on the kanban view for jobs applicants.
    - change hr_recruitment survey module (xpaths) according to changes in hr_recruitment
    - delete tooltips on kanban cards of applicants
    - show recruitment stage in green or red on kanban cards of job positions.
2018-01-12 10:04:58 +01:00
Nicolas Martinelli b3088532f2 [FIX] account: save due date
Complement of e832fbfd7a

opw-803939
2018-01-12 09:55:40 +01:00
Fabien Meghazi d080f8c047 [IMP] ir_cron: use 'info' loglevel instead of 'debug' when starting job
This information is important for `ir.cron` troubleshooting hence
deserves a little more love.
2018-01-12 09:34:37 +01:00
Fabien Meghazi 65b41eb291 [IMP] ir_cron: use 'info' loglevel instead of 'debug' when starting job
This information is important for `ir.cron` troubleshooting hence
deserves a little more love.
2018-01-12 09:34:08 +01:00
Nicolas Martinelli 6d5c2d0bea [FIX] stock: unset warehouses
When 'Applicable on Warehouse' is set to `False`, the list of warehouses
should be emptied.

opw-803678
2018-01-12 08:39:07 +01:00
Nicolas Martinelli 8ab2b099fb [FIX] sale_stock: unecessary dependency 2018-01-12 08:39:07 +01:00
Aaron Bohy 90279c70eb [FIX] web: quick create in empty grouped kanban views
For kanban views with attribute 'on_create="quick_create' set on
their root node, clicking on 'Create' in the control panel should
open the quick create widget in the first column if the view is
grouped and if there is at least one column displayed.

It was working as expected, except when there were no record yet.

This was because the kanban controller used the 'state.count'
attribute of the state (which indicates the total number of records
in the group), whereas it should have used 'state.data.length'
(which is the number of columns).
2018-01-12 08:13:15 +01:00
Aaron Bohy 25b101f15b [FIX] web: Kanban: quick create several records in a row
Before this rev., when quick creating a record in a grouped kanban
view, the quick create widget wasn't automatically re-opened, which
didn't allow the user to quickly create several records in a row
(without clicking each time on the '+').

This desired behavior had been broken by rev. 1d34e26, which aimed
to properly reload the kanban column when a record was created
(e.g. column counter, progress bar...).
2018-01-12 08:13:15 +01:00
Simon Lejeune b7b38ed141 [FIX] stock: remove superfluous track visibility messages
`_run_move` creates the move, calls `_assign_picking` and then confirms it. The
result is that a draft move is added to a picking and then its state is changed to
confirmed. As the state of the picking is computed across its moves and a manual
call to `message_track` is done when any of its move changes its state, there was
a lot of tracking messages in the picking chatter, especially when you confirm a sale
order (a lot of calls to _run_move).

The thing is that this is unnecessary as stock.move’s `_action_confirm` will call
`_assign_picking` later on AND after having changed its state to “confirmed”. Now
a confirmed move is added to a confirmed picking and no message are posted. This
improves considerably the validation of a massive SO.
2018-01-11 16:33:14 +01:00
Géry Debongnie 27dd19c0b9 [FIX] web: prevent crash in some rare cases
When we have a form view with a one2many with an onchange, and with
lines which contains a x2many, and more lines that the limit (so more
than one page), and the read is not in the same order as what is
displayed because we have a widget=handle, then we might have a problem
when we delete one of the lines, if the onchanges tries to change the
x2many.

This is due to the fact that the order of the basicmodel datapoint is
not preserved by the various operations going around.  I think that we
may still have a few other issues of this type, but it is actually quite
difficult to establish.

In any case, this situation is now properly handled.

opw 804530
2018-01-11 16:30:34 +01:00
Nicolas Martinelli 8dcee7f17e [FIX] product: price digits
Complement of cf32a23b92

Closes #21686
opw-800279
2018-01-11 16:10:09 +01:00
Denis Ledoux 78d0a32470 [FIX] web: force a determinist installed modules order for the assets
The backend assets includes a list of the installed modules with:
```
odoo._modules = <t t-raw="get_modules_order()"/>;
```

Because of the randomization of Python 3.5 in the dict keys,
the order of the installed modules could change from time to
time, therefore making the assets being regenerated unnecessarily

This revision is a bit linked to the below one:
f3bb9ae679

In addition to have the dict keys always in the same
order, it's important for the values to always be
the same, and it was not the case for this list
which was in the content of the backend assets,
in various order.

opw-804747
2018-01-11 15:48:08 +01:00
Nicolas Martinelli bc1c72f9af [FIX] sale_stock: test error
`sale_stock.tour` requires `sale.tour` which is defined in
`sale_management`.

Aside from the test failing, this is more logical to add the 'Sales'
menu once the set-up is past a simple 'eCommerce' configuration. Note
that it was intended in the original commit 5dfd342d08, but was
later changed back to avoid issues.

We need to depend both on `sale` and `sale_management` explicitly, to
make sure installing `sale` and `stock` separately will also install
`sale_stock`.

opw-804621
2018-01-11 15:34:06 +01:00
Romain Derie 3ec98ae6b0 [FIX] website_sale: can't send coupon code after an ajax request
Before this commit, an user could only use the coupon form if he didn't perform
any ajax request (eg: change quantity, already sent a code..).
Since the cart html would be reinjected with theses ajax requests, the click
event would not work afterward until the page got fully reload.

Now, we changed the jquery click binding to work with dynamically injected DOM
2018-01-11 15:28:31 +01:00
Nicolas Martinelli 411a9fa326 [FIX] web: autofocus
Support autofocus on notebook pages:
```
<page autofocus="autofocus">
```

This was supported before the web client refactoring.

opw-801259
2018-01-11 15:19:52 +01:00
Christophe Simonis dde619a9ac [REL] master is back as 12.0 alpha 2018-01-11 15:18:03 +01:00
Raphael Collet 309b6b8e5a [FIX] api: optimize odoo.api.Cache.get_records()
Assuming that `field.cache_key(record)` is independent from `record.id`,
compute the cache key once for all records, and avoid using `browse` on all
record ids.  This makes `get_records` about 20 times faster.

This has a good performance impact on `field.modified_draft()`, which is used
during onchanges for invalidating fields.
2018-01-11 13:52:16 +01:00
Romain Derie 0474de44c0 [FIX] website: unpublished homepage read error + first menu fallback
Before this commit:
1. If the website's homepage is unpublished and a public user naviguate on it,
it will log an access read error in the server. The user won't see the error
though.

2. If the user can't access '/', we serve the first menu's page instead.
This first menu's page can be an unpublished page, resulting in a 403, which is
not convenient.

3. Menus are sorted by sequence, then the ORM sort them by write_date.
Menu with same sequence will be sorted differently every time you edit one of
them. (This issue get hidden/solved if user edit and save the menus with
"Edit Menu" since it will recompute every sequence.)
  - Create 3 pages 'A', 'B', 'C', with 'Add page in menu' enabled
  - Menu is now 'A B C'
  - Edit website.page B (in property dialog), it will write on the page's menu
    aswell
  - Menu is now 'A C B'

Now:
1. We prevent this error by ensuring the page is published and so can be read
by anyone before accessing its properties.

2. We serve the first menu's page that is published

3. We sort menu by id after sequence to keep original order

This closes #21259
2018-01-11 13:33:30 +01:00
Romain Derie bf8519853f [FIX] website: hide menu if related to an unpublished page
Before this commit, if there was a menu entry linked to an unpublished
website.page, the menu would be shown. For restricted users, they would land on
a 403 forbidden.

Now, we dont show website.page's menu if user can't access it.

This closes #21328
2018-01-11 13:30:12 +01:00
Nicolas Lempereur 491404f053 [FIX] website_event_track: day separation and tz
An agenda for an event separates tracks by days and display them taking
into account the event timezone.

But when separating by day the timezone is not taken into account and a
track could be displayed on the wrong day.

opw-803610
closes #22170
2018-01-11 12:51:54 +01:00