Commit Graph
130693 Commits
Author SHA1 Message Date
Julien Mougenot d99e80f92a [FIX] web: column resize trying to freeze the list
Before this commit, resizing a column would cause the
list to develop a mind of its own and to grow/shrink random
columns according to its own will.

Now, resizing a column does not "freeze" the list anymore and simply
gives a static width to the resized column.
2019-09-25 06:16:54 +00:00
Julien Mougenot d2f024d254 [FIX] web: allow line return in textareas
Before this commit, textareas in x2many would not allow line return
when pressing enter.

Now, it does.
2019-09-25 06:16:54 +00:00
Aaron Bohy 104a86f1c8 [FIX] web: limit autocomplete dropdowns width
When the content of an autocomplete dropdown (e.g. many2one field)
was long, the dropdown could overflow the page. For instance, this
was the case of the intrastat_id many2one.

Task 2068261
2019-09-25 06:16:54 +00:00
Aaron Bohy be222b795e [FIX] web: list: keep widths when editing records
Let's assume an editable list view with at least two rows. Before
this rev., the column widths were re-computed and frozen each time
a record was switched into 'edit' mode. As a consequence, if the
user clicked on a row, and then on another one, column widths might
slightly change.

Task 2068261
2019-09-25 06:16:54 +00:00
Aaron Bohy 22d43f1540 [FIX] web: list: increase width of boolean columns
Task 2068261
2019-09-25 06:16:53 +00:00
Aaron Bohy 7e72471552 [FIX] web: correctly handle 'oe_read|edit_only' in lists
ClassNames 'oe_read_only' (resp. 'oe_edit_only') can be used in
x2many lists to hide columns in 'edit' (resp. 'readonly') modes.

However, before this rev., there were two issues:
 1) Having such a className on a <button> tag didn't work well as
    the 'display: none' rule didn't apply on the body cell (it only
    applied on the button). Same could be observed on <widget>
    nodes.
 2) Having more than one invisible column (with those classNames)
    didn't work either, because the footer cells weren't hidden.
    We didn't notice it with one invisible column, because the
    footer contained one cell less than the header and the body.

Those two issues could be observed on the mrp.bom form view.

Task 2068261
2019-09-25 06:16:53 +00:00
Laurent Smet 6b8acd0257 [IMP] account: Improve lock dates
The tax lock date no longer blocks the user when creating a journal entry priors to it.
Instead, the accounting date is moved automatically during the validation to the next
available date.

This commit also brings more flexibility when dealing with the tax lock date. Indeed,
the error is now shown only when adding something impacting the tax report that was not
always the case before (e.g. adding a new line not affecting the tax report must not
raise something).

Others check has been also refactored to be more consistent with the "fully editable" mindset.

closes odoo/odoo#36304

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-25 11:26:02 +00:00
Laurent Smet 7aa90628ac [REM] l10n_fr_sale_closing: This module is squashed into l10n_fr.
Task ID: 2039160
2019-09-25 11:26:02 +00:00
Florian Gilbert 429263af7d [IMP] account_lock: _check_lock_date is move into account_lock module.
This method is also renamed "_autorise_lock_date_changes" and check
tax_lock_date.

Task ID: 2039160
2019-09-25 11:26:02 +00:00
Florian Gilbert ab483a3a66 [IMP] account: Add restrict mode and normal mode for account move.
This commit deletes account_cancel module and squash it into account.
The 'update_posted' field is changed by 'restrict_mode_hash_table' field.

If 'restrict_mode_hash_table' is true, you have a hash chain on your account journal.
These hash chains prove the inalterability of your accounting.

l10n_fr_certification module is deleted and all hashing method are moved in account module.
Now, you can download a PDF report about your inalterability in the company settings.

If you have l10n_fr or l10n_post_cert installed you have more information on this report
like the inalterability of pos orders, etc.

Task ID: 2039160
2019-09-25 11:26:02 +00:00
Arnold Moyaux 02dfe1e8e7 [FIX] mrp: mobile byproduct BoM form view
On Mobile the byproduct One2many only empty line.
It's due to default kanban view using the _rec_name
in order to display the byproduct name. On byproduct the
_rec_name is not defined nor the field name so the kanban
is empty.

closes odoo/odoo#37403

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-09-25 08:11:20 +00:00
Simon Lejeune e75ea301f6 [FIX] mrp: workorder operations and kit
When a BoM was composed of a phantom BoM, there was mutliple bugs:
- if not routing was set on the phantom BoM, the components were never
  consumed
- if no operation was set on the BoM, its components were to be consumed
  on the last workorder of the BoM and of the phantom BoM.

closes odoo/odoo#37304

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-25 08:05:03 +00:00
Florent Lejoly 8ea761824d [FIX] website_slides: leave course
Currently there is a traceback when trying to leave a course (unsubscribe)
from the frontend on the homepage of a specific course. (when clicking on
"You're enrolled")
This fixes the traceback.

closes odoo/odoo#37384

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-24 13:43:18 +00:00
William Henrotin a25c84b9cb [FIX] mrp: ensure all quantities are filled up
Computing quantities of a kit product made only of consumable
failed as the quantities are not initialized.

This commit makes sure this kind of products don't have their quantities set up
in mrp and so are set to 0 in stock

closes odoo/odoo#37382

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-24 14:17:45 +00:00
Denis Vermylen adc3ed5c4a [FIX] website_sale: add missing step
if website_animate is installed.

Website_animate suggests to animate the image when it's selected and
hides the blocks. So we add a click on "Blocks" to ensure we're in
the right menu before continuing.

If website_animate isn't installed, this extra step doesn't alter the
current behaviour.

Technically this should be done in a bridge module depending on
website_sale and website_animate but none exists and it's not worth
creating one for this tiny fix alone.

closes odoo/odoo#37377

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-24 15:16:42 +00:00
Simon Lejeune 895fb09b74 [FIX] stock: put away on parent locations
oversight of bad6db2483

Closes #37289

closes odoo/odoo#37361

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-24 15:01:36 +00:00
RomainLibert 04c98c3ef1 [FIX] hr_recruitment: fix layout issues
Make the kanban ribbon smaller and purple
Move categ_ids

closes odoo/odoo#37349

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-24 09:42:02 +00:00
David Beguin 03c2f101bd [IMP] website : set kanban view as default for website visitors
Task ID: 2074582

closes odoo/odoo#37340

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-24 14:05:54 +00:00
David Beguin 4a37beeff6 [FIX] website_livechat : fix history in discuss visitor banner
Adding a string element to a list with += is not adding the element to the list
but is instead adding every single character of the string as an element to the list.
Building a string using a join method was resulting to an recent history displayed like
H > O > M > E > ( > 8 > : > 4 > 2 > )
--> Should be : HOME (8:42) > Contact Us (8:45)

Apart from that, since the tracking is now ordered by visit_datetime DESC,
to have a chronological order, we need to reverse the list of last visited pages
to have something like :
    Home (12:43) > About us (12:45) > Contact Us (12:52)
instead of :
    Contact Us (12:52) > About us (12:45) > Home (12:43)

Task ID: 2076190
PR #37340
2019-09-24 13:25:50 +00:00
David Beguin 33f5bbc7d0 [FIX] website_livechat, im_livechat : use visitor display name instead of name
As since 5b9a81a2c6
website.visitor.name can be null
if the visitor is not linked to a lead or a res.partner,
we cannot use the name anymore to build the name of the mail.channel, etc..
Using display_name will always return the correct value,
and will include the numbering of the visitor,
in order to identify easily the chat windows
(if operator is speaking with multi visitor at the same time)

Task ID: 2076190
PR #37340
2019-09-24 13:25:50 +00:00
David Beguin 013128699d [FIX] im_livechat : fix send feedback from livechatter.
This commit fixes the send feedback by creating explicitely the
rating.
Before, we gave to the mail channel the rating values.
But as rating uses res_id and res_model, creating the rating
directly with correct values in res_id and res_model makes the magic.
The rating is correctly linked to the mail channel.

Task ID: 2076190
PR #37340
2019-09-24 13:25:50 +00:00
mcm-odoo 69800419f8 [FIX] res_partner: make address column wider
Before: the address column was 50% wide because of a span in the labels
column which causes its column to be 50% wide.

Now: replaced the span by a label, the columns have the right sizes.

task-2075905

closes odoo/odoo#37331

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-24 07:55:26 +00:00
William Henrotin 6b49fcb6aa [FIX] stock_account: always show update cost button on product
With this commit, the 'update cost' button is always displayed on product.product
whatever the variant count

closes odoo/odoo#37328

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-24 13:05:17 +00:00
Simon Lejeune fe1b52971f [REF] product: group_expand for categories
closes odoo/odoo#37308

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-09-23 15:11:49 +00:00
Arnold Moyaux 6cdaea7223 [FIX] mrp_subcontracting: Initial demand in a BO
Usecase to reproduce:
- Create a receipt with a quantity of 2
- Receive 1 and create a back order
- Receive 2 in the BO

It will only require the components for 2 units and not 3.

closes odoo/odoo#37305

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-09-24 07:45:31 +00:00
Arnold Moyaux 49aa98ab99 [FIX] mrp: update quantity after post inventory 2019-09-24 07:45:31 +00:00
Arnold Moyaux 21e11c1e32 [FIX] mrp: reorder file in order to be coherent
test_update_quantity is in the middle of product_produce test and
due to previous commit test_product_produce_11 is between 6 and 7.

Reorder file for a better future.
2019-09-24 07:45:31 +00:00
Arnold Moyaux c993829d22 [FIX] mrp: same test name
commit ccbd6712f6
commit f3f9dd8cd7

Introduced both test_product_produce_6.
2019-09-24 07:45:31 +00:00
qsm-odoo 67dabea1dd [IMP] website: use preconnect for faster google fonts loading
With the PR this commit is from, websites now always use a google font.
Adding a preconnect to the google fonts cdn allows to increase page
loading speed.

Part of https://github.com/odoo/odoo/pull/37293
task-2069043

closes odoo/odoo#37293

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-09-24 08:44:28 +00:00
qsm-odoo 87b05cf224 [REF] website, *: improve use of unicode support font
* web, theme_bootswatch

Improvement of https://github.com/odoo/odoo/commit/02a321cffb2da60a86b960e75c445e37094567b4

- Clarify the name of the support font (to distinguish it from standard
  and google fonts and avoid confusion with Noto Sans and Noto Serif).

- Make sure the support font is added and can be added for all font
  definitions in odoo scss files thanks to a scss function.

Could be backported in 12.0 if judged necessary.

Part of https://github.com/odoo/odoo/pull/37293
2019-09-24 08:44:28 +00:00
qsm-odoo cf60a783fc [REF] website: make the google font "Roboto" the default website font
Before this commit, the default font for the website was the bootstrap
one, which is a series of many fonts which should at least contain one
which is present on every user system.

The problem is that commit https://github.com/odoo/odoo/commit/ed18095127b20da516fa5ada943b2dd6d5c84652
added the definition of a Roboto font, available in all assets... and
Roboto is part of the bootstrap font. This added a new font loading on
page load and that loading is not optimized at the moment. This thus
broke our work to improve google pagespeed ratings.

This commit replaces the bootstrap font with a forced Roboto font whose
loading is handled by an optimized loading of the related google font.
This also improves the very default font of the website by making it
more stable accross different browser (we will always use the loaded
Roboto font instead of relying on the user system fonts).

Part of https://github.com/odoo/odoo/pull/37293
2019-09-24 08:44:28 +00:00
Martin Trigaux c667e95224 [I18N] *: export saas-12.5 source terms
Still without demo data

closes odoo/odoo#37274

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-24 07:33:09 +00:00
Martin Trigaux 35a9150d79 [FIX] *: add missing model description
Some models did not specified a _description
2019-09-24 07:33:09 +00:00
Martin Trigaux d7a4085b00 [FIX] base: improve model description verification
When a model inherit from another, it still must have a _description
specified if the _name is different

Before this commit, mail.test.cc inherited from mail.thread.cc without
specifying a _description but this was not raising any issue
2019-09-24 07:33:09 +00:00
Martin Trigaux 272638b1ac [FIX] project: do not translate html
No need to be able to translate html element
2019-09-24 07:33:09 +00:00
oco-odoo ac17e36987 [IMP] account: allow currency and amount currency on bank statement lines as an optional field
So that people encoding their statements manually can directly encode the exchange rate data on their lines.

closes odoo/odoo#37262

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-09-23 10:25:44 +00:00
RomainLibert 57a24dacaa [FIX] web: avoid passing buttons as export field
The new export feature forgot to filter out the action buttons that can
be displayed in the list view. (see odoo/odoo@5c4544f)
This lead to javascript trying to get fields on the model like
`action_validate` which obviously doesn't exist.

closes odoo/odoo#37261

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-09-23 14:41:54 +00:00
Sébastien Theys d0c852f50e [FIX] web: introduce format for many2one_reference
The format of `many2one_reference` was not introduced when the new field type
was created, which leads to errors when the web client is trying to display the
value of such fields.

Since the value of this field is an ID, it is decided to display it like an
integer, which is consistent with previous behavior: the fields that are now
`many2one_reference` are still stored as integer and they were already displayed
as integer before.

closes odoo/odoo#37216

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-09-23 20:55:39 +00:00
Raphael Collet 5d97c47e54 [IMP] base: use many2one_reference for res_id on ir.attachment
This helps for updating inverse fields without making queries.

Due to this change, a `flush` has to be added in the portal attachment test to
actually compute the inverse after the change of `res_id`.
2019-09-23 20:55:39 +00:00
Raphael Collet afdfdbfa5b [IMP] base: inverse datas of ir.attachment during create
Before this commit, the inverse of `datas` would be computed after the `create`,
which would lead to unnecessary queries, not only for writing the new values,
but also because of the re-computation of fields that depend on these values.
2019-09-23 20:55:39 +00:00
Raphael Collet f047425b82 [IMP] models, fields: initialize cache to None for related fields
This makes sense because in `create` the "previous" value of a field is
obviously non-existent.

This avoids having to fetch pre-existing attachments when they are known to be
inexistent, which optimizes stored related binary that are computed post-insert.
2019-09-23 20:55:39 +00:00
Sébastien TheysandAdrian Torres 9112972e15 [IMP] fields: write only once per Image field
Before this commit, flushing a model that uses the `image.mixin` would generate
twice as many queries as it should.

This is because `_compute_related` is not meant to be overridden. In the
override of `Image` we call `super()` then post process the records by
reassigning each record's relevant image field with `_image_process`.

The `super()` will assign the field of the records once which
will in turn trigger a `write` (and thus, will generate queries) then
after the `super()` call we reassign them which will re-trigger the same
`write` and the same queries.

With this commit, instead of overriding `_compute_related` we extract the
processing to a method that can be overridden, so that the `write` is called
simply once.

The result, obviously, is that queries related to the `write` are cut in half.

Related PR: #36683 & #36288

Co-authored-by: Adrian Torres <adt@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2019-09-23 20:55:39 +00:00
Raphael Collet 50c7941fa6 [FIX] fields: set model_field on related many2one_reference fields
This fixes an issue when a Model A with a `many2one_reference` is inherited in
Model B with `_inherits`, and another Model C defines a `one2many` having as
inverse the inherited `many2one_reference` in Model B.

Without this commit, the value of `model_field` is `False` by default for the
field in B, which would lead to incorrect queries when building
`get_domain_list` for the `one2many`.
2019-09-23 20:55:39 +00:00
jbm-odoo 97cee756cc [IMP] utm: More generic medium data
closes odoo/odoo#37299

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-24 13:29:19 +00:00
jbm-odoo bafecade5f [IMP] hr_recruitment: Put company_id based on job_id 2019-09-24 13:29:19 +00:00
Martin Trigaux 2471ee506f [FIX] web: translate html fields
This commit fixes:
- body of a email.template in a small field
- translation of website_description of a product does not show the
  source of the translation
- translation of website_description of a product shows the full
  content for the current language

HTML fields are typically fields with longer of content.
If the field is an HTML field, it should be displayed in a textarea,
like the text fields.

Most of HTML fields are split in meaningful chunks of content (using
xml_translate or html_translate method).
For these fields, the source must be displayed.

Also sort the entries on the source to have a consistent order

closes odoo/odoo#37215

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-24 15:52:55 +00:00
Joseph Caburnay 5a9cb64414 [FIX] delivery: wrong delivery price for real cost policy
When real cost invoice policy is active in a delivery carrier, the
delivery price is set after validating the delivery. When there is
margin, the estimated price is calculated with margin but when the
delivery is validated, the price set in the delivery line does not
include the margin. This commit fixes this behavior by setting the price
of the delivery line with appropriate margin.

closes odoo/odoo#37178

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-09-20 08:32:44 +00:00
Romain Estievenart f88520280a [FIX] web_editor: make toolbar scrollable in mass_mailing on mobile
Before this commit, the web_editor toolbar wasn't horizontally scrollable
and part ot the items were not displayed.

To fix this, we have to revert back the initial position on some elements.

closes odoo/odoo#37076

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-09-24 10:05:47 +00:00
Romain Estievenart 65c8d33c29 [FIX] web_editor: make toolbar scrollable in note on mobile
Before this commit, the web_editor toolbar wasn't horizontally scrollable
and part ot the items were out of the screen area.

To fix this, we have to revert back the initial position on some elements.
2019-09-24 10:05:47 +00:00
Romain Estievenart 90e58efeba [FIX] web_editor: correctly display dialogs on mobile
Before this commit, web_editor dialog was opened inside an iframe and
not on the window.top. So dialogs didn't take all screen area.

To fix this, we open dialogs in full screen mode but we also put the
web editor in full screen to increase the size of the iframe.
Note that the initial state of the web editor (full screen or not) is
preserved when you close the modal.

We also add some fixes to make the "web_editor media dialog" responsive.
2019-09-24 10:05:39 +00:00