Commit Graph
114496 Commits
Author SHA1 Message Date
Aaron Bohy f7ddaf4de9 [FIX] mail: activate test of Discuss in mobile
This test couldn't be executed within the classic JS web suite,
because it relies on mobile specific files that are rejected in
desktop. Now that a second web suite (for mobile) has been
introduced (see 9bc500948), we can activate this test.
2018-01-16 09:16:29 +01:00
Nicolas Martinelli 6139840796 [FIX] product_expiry: date on lot
- Create a product tracked by lot with some date values != 0
- Create a MO for this product, click on 'Produce'
- Create a new lot.

The various dates are not registered on the lot.

The product ID is located in the context in this case, not in the
values.

opw-803790
2018-01-16 09:09:28 +01:00
Nicolas Martinelli d20c74dd65 [FIX] stock_picking_batch: no edit
- Select several pickings
- Click 'Add to Batch'
- Create a new batch and do 'Create and Edit'

The selected picking do not appear in the list.

The wizard was not really designed to handle such use cases. Hide the
possibility to 'Create and Edit', since this is just confusing for an
end user.

opw-804359
2018-01-16 08:16:27 +01:00
Rémi Rahir 6135e82d73 [IMP] doc: iap new functionality
Added documentation related to the new 'charge' in IAP that allows one
to capture a smaller amount of credit than authorized if needed.
related to 73ef4b0374ab40e2e02168adc74137a6795d20fe
2018-01-15 18:09:53 +01:00
Rémi Rahir 1bbee97e3c [IMP] iap: support flexible credit capture
Added a possibility to authorize a certain credit amount and capture another (smaller or equal) at the end of the transaction.
For instance, you want to print 2 jobs and one of them fails, you will be able to only print the one that succeeded.
2018-01-15 18:09:53 +01:00
Nicolas Lempereur 06ebd7d6e5 [FIX] website_slides: display date in locale
In 10.0 since 52f268d0 some parts such as the date/datetime widget are
adapted to the current locale and not just displayed in english.

But the dates in the slides module are always in english because they
don't wait for the locale to be loaded.

To wait for the locale, this commit add a wait for WebsiteRoot.instance
ensuring that locale and other WebsiteRoot widgets are ready.

This may have been preferred to create a dummy child widget to
WebsiteRoot, this way only WebsiteRoot would need to be ready and this
would have been more extensible but this is a bigger change.

note: this fix is for 11.0, for previous version the fix is ef8cd11a6b

opw-804555
closes #22241
2018-01-15 17:00:12 +01:00
Martin Trigaux c591e4e6c1 [FIX] mail: translate model names
In the activities, the name of the models were not translated
This is only the server side of the fix.
The context needs to be added in the JS call in another commit

opw-805431
2018-01-15 16:34:39 +01:00
jem-odoo 1d9c3a0bda [FIX] sale: reinvoice policy
When reinvoicing, an SO line should only be
incremented if the product policy is sales prices,
and in delivered qty. Otherwise, a new SO line is
created.
2018-01-15 15:17:04 +01:00
jem-odoo 10a4c36054 [FIX] account: avoid regenerating analytic entries when validate invoice
When validate and invoice with analytic account on
some invoice lines, analytic entries are created
with the account move creation, after that the move
is posted (still in the invoice validation) and the
analytic entries are regenerated (meaning deleted
and recreated).
As consequence, performance are bad, but also, since
in vendor bills flow, the creation of AAL can create
a new sale order line, we will get 2 SOL (one empty).

This commit avoid creating the first analytic entries
(the ones deleted on move posting) when validating
an invoice.
2018-01-15 15:17:04 +01:00
Nicolas Martinelli 25eacbf900 [FIX] stock: unset warehouses
warehouse_ids may contain values even if the field is not ticked.
Better fix will come in master.

This reverts commit 6d5c2d0bea.
2018-01-15 10:59:48 +01:00
Alexandre Kühn 2a5488619d [FIX] web: disable {bin_size: true} on binary fields
Revision on 41fe7f9d11

This commit intended to reduce the network load when reading records with
binary fields. This was made possible by enforcing the contextual key
`bin_size` to be set for records with binary fields.

However, it is causing some issues (see #22222, #22231) which are:
    - write with bin_size:true generates a traceback
    - read/search_read with bin_size:true breaks some images
      on some views (e.g. base.view_partner_form)

Since the problems outweight the gain of these changes, we revert them.
2018-01-15 10:03:14 +01:00
Odoo Translation Bot 2a244e3e66 [I18N] Update translation terms from Transifex 2018-01-14 04:22:50 +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
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
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
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
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
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