Commit Graph
127612 Commits
Author SHA1 Message Date
Florent de Labarre 71570e49ab [FIX] doc: add parent_of operator
closes odoo/odoo#32558

Signed-off-by: vfe <Feyensv@users.noreply.github.com>
2019-08-28 08:46:15 +00:00
Fanny He 48ee127a00 [FIX] stock: better consistency check in _action_done
When validating a picking from location A to B, location A's quant.quantity
may be updated to a quantity != 0 with _update_available_quantity.
This is because the quant value is written as quantity - float_round(quantity).

As a result, the consistency check would find two existing quants, and raise.
Therefore the picking cannot be validated.

opw 2040091

closes odoo/odoo#35913

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-28 07:27:45 +00:00
Alexandre Kühn 75e8342e81 [FIX] mail: composer in mass_mailing channel (mobile)
Before this commit, a channel in mobile with option "Send messages
by email" had no composer when opening in mobile.

This issue happened because channel views in mobile are in fact chat
windows. Chat windows with such channels do no display any composer,
which is intended in desktop.

This commit fixes the issue by enabling the extended composer for
chat windows with email channels, just for mobile.

opw-2059468

closes odoo/odoo#36120

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2019-08-27 14:51:28 +00:00
Nicolas Lempereur decd9968d3 [FIX] web_editor: bg-transparent filter=>no opaque
The color picker in snippet options has two way to set a color: have a
data-color attribute => it is used, or have a o_custom_color class and
the background-color is set directly on that color.

In the case where we select no background color (transparent), it would
work in preview, but when applied the opaque color of the transparent
button (since opacity is not copied) is set which is wrong and
unexpected.

opw-2053636
closes #36131

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-08-27 13:12:10 +00:00
Lucas Perais (lpe) a20b84d05a [FIX] account: reconcile invoice, refund in foreign; payment and writeoff in domestic
This reverts 0164c9dfcb

Have exchange rates:
Domestic - Domestic: 1.0
Domestic - Foreign : 1.113900

Make an invoice: 480 Foreign
Make a credit note: 140 Foreign
Make a payment: 287.20 Domestic

Reconcile all this with a writeoff: 18.04 Domestic

Before this commit, the first invoice was not fully paid
this was due to wrong summing of the partial lines that applies to it
account.partial.reconcile are made between only 2 move lines at a time
Whatever the amounts they hold, it has been computed at creation
and it makes no sense to aggregate their rounding error when computing
their impact on a move line (because, the information is already lost)

After this commit, the use case works, all invoices and payments are fully consumed and reconciled
Note that this is a simple use case, no dates or exchange rates involved

OPW 2057845

closes odoo/odoo#36087

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-26 13:41:21 +00:00
Romain Derie 0ff1933ba1 [FIX] website: restore sitemap lastmod and priority
Commit 54d30d5194 introduced `lastmod` and `priority` on sitemap locs.

This was broken with 4ecbacaf59 which introduced `website.page` model as it
removed the `PageConverter`.

Before website.page:
1. PageConverter returned records with `__lastmod`
2. `enumerate_pages` loop on converters would remove the prefixed `__`

After website.page:
1. code to remove `__` was still there but the pages would be found and looped
on after that code, making it useless.

With this commit:
1. The code to remove the `__` is moved after searching the pages.

Following #36090
Related to #35464

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-26 14:43:39 +00:00
Nans Lefebvre 75460e697a [FIX] mrp: block partial post inventory of MO with workorders and tracking
Enable work orders, routings, and track components by lot numbers or serial.
Create an MO for a certain X quantity of finished products and plan work orders.
Only complete a partial amount Y of the overall X amount.
Specify the lots for the consumed tracked materials equal to the Y amount.
Then, return to the MO and click "Post Inventory".
An error is raised because the lot is missing.
This is because when processing workorders temporary lines
are created without lot/serial for tracked component products.

This is a limitation that require a task to be removed;
in the meantime we remove the button, in true bugfix fashion.

opw 2049806

closes odoo/odoo#35731

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-08-26 07:24:28 +00:00
Harpritsinh SisodiyaandAaron Bohy fbbfa6ddca [FIX] web: datepicker: crash on invalid date
There is an open issue on the tempusdominus lib:
https://github.com/tempusdominus/bootstrap-4/issues/223

It occurs when there is a valid value in a date(time) field, and
the user unsets it by setting an invalid one.

This rev. fixes the issue in Odoo by preventing to reach the buggy
piece of code in the lib. In a few words, when the user sets an
invalid date, we reset the previous valid date (which is what the
lib tries to do anyway).

Task 2057009

closes odoo/odoo#36211

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>


Co-authored-by: Aaron Bohy <aab@odoo.com>
2019-09-03 12:14:05 +00:00
Odoo's Mergebot 85c5d0a4be [MERGE][FIX] bus, mail, web: several cross-tab communication fixes
### [FIX] bus: background slave tabs should not loose notifications

Slave tabs missed some notifications in case the local storage
event's `newValue` did not match actual value in local storage. This
happens when master tab overwrites a value that slave tabs did not
take the time to read. Slave tabs should now always handle all local
storage events.

Task-ID 2044231

### [FIX] bus, mail: correctly synchronize document chat windows

Cross-tab synchronization of document chat windows resulted sometimes
with an infinite loop. This happens due to tabs relying on actual
value in the local storage and all document chat windows state being
set as a single local storage entry. Cross-tab communication of
document chat windows now is relying on event's `newValue`, and each
document chat window has its own local storage entry. Changes from
local storage no longer writes again in the local storage, so that
it no longer makes an echo (= infinite loop).

Task-Id 2034997

closes odoo/odoo#36177

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2019-09-03 13:06:23 +02:00
Alexandre Kühn 40b57ca824 [FIX] bus, mail: correctly synchronize document chat windows
Before this commit, there could be an infinite loop when changing
the chat window state of a document chat window.

This is caused when mutiple tabs overwrite the chat window state
with a different value everytime, resulting to an infinite loop.
Accross multiple tabs, `setItem` and `onStorage` are not synchronous.
That's why tabs should communicate through local storage events
instead of actual value in the local storage.

To illustrate the issue, suppose there are 2 tabs (T1 and T2) with
one document chat windows (C) and the following user interactions:

     -  T1 and T2 both have C open
     -  on T1, user folds C
     -  on T2, user folds C

Now let's add an example of local storage (LS) logics that could
apply from above example:

     -  T1 and T2 both have C open
     -  on T1, user folds C
    [1] T1 writes 'C folded' in LS
     -  on T2, user folds C
    [2] T2 writes 'C folded' in LS
    [3] T2 detects 'C folded' in LS (from [1])
           => T2 writes 'C folded' in LS
    [4] T1 detects 'C folded' in LS (from [2])
           => T1 writes 'C folded' in LS
    [5] T1 detects 'C folded' in LS (from [3])
           => T1 writes 'C folded' in LS
    [6] T2 detects 'C folded' in LS (from [4])
           => T2 writes 'C folded' in LS
     etc...

This scenario could have been easily prevented by not writing on
local storage when the chat window state has not changed. However,
this wouldn't fix this scenario that also introduces an infinite
loop:

    -  T1 and T2 both have C open
    -  on T1, user folds C
   [1] T1 writes 'C folded' in LS
    -  on T2, user folds C
   [2] T2 writes 'C folded' in LS
   -   on T2, user unfolds C
   [3] T2 writes 'C unfolded' in LS
   [4] T2 detects 'C folded' in LS (from [1])
          => T2 writes 'C folded' in LS
   [5] T1 detects 'C unfolded' in LS (from [3])
          => T1 writes 'C unfolded' in LS
   [6] T2 detects 'C unfolded' in LS (from [5])
          => T2 writes 'C unfolded' in LS
   [7] T1 detects 'C folded' in LS (from [4])
          => T1 writes 'C folded' in LS
   [8] T2 detects 'C folded' in LS (from [7])
          => T2 writes 'C folded' in LS
   [9] T1 detects 'C unfolded' in LS (from [6])
          => T1 writes 'C folded' in LS
   etc...

This commit fixes the infinite loop issue:

  - by turning local storage read during cross-tab communication into
    local storage event read instead. This should prevent race
    conditions based on read/write operations in local, since their
    order is not guaranteed accros tabs.
  - by isolating document chat window state to their own local
    storage entry. This should prevent a tab from notifying a chat
    window state that it didn't change, which may also result in
    an infinite loop.

Some tests were adapted from the changes above. Also, some tests did
pass thanks to local storage being mocked by a ram storage: the
handler `_onStorage` should have been called, but it didn't because
it was registered on the actual local storage instead of the ram
storage. In order to make tests pass again, the following additional
changes were required:

  - Cross-tab bus service now exports the unique tab ID with
    `getTabId`.
  - document thread entries in local storage now track the tab ID, so
    that self-tab ignore their own local storage writes.

Task-Id 2034997

Closes #36177
2019-09-03 08:11:27 +00:00
Alexandre Kühn 7bdcef9c1c [FIX] web: add support for localStorage.key() and .length
These operations on local storage are necessary in order to
loop on all local storage keys.

Closes #36177
2019-09-02 21:37:13 +00:00
Alexandre Kühn 15f6170bed [FIX] bus: background slave tabs should not loose notifications
Before this commit, some notifications may be lost while forwarding
them between browser tabs by means of the local storage (i.e. from
the master tab to slave tabs).

This happened when some slave tabs are in the background and are
throttled by the browser: the master tab writes twice in the local
storage (to notify slave tabs of new notifications), and slave tabs
drops the 1st notification. This is caused by the mismatch between
the new value in the local storage event and the actual value in the
local storage. For example:

```
  t(0) - Master tab receives `message` notification;
  t(1) - Master tab writes notifications (= `message`) in local
         storage;
  t(2) - Master tab receives `message_seen` notification;
  t(3) - Master tab writes notifications (= `message_seen`) in
         local storage;
  t(4) - Slave tab detects new notifications (= `message`)
         from local storage event, but drops it since it does not
         match actual local storage value (= `message_seen`);
  t(5) - Slave tab detects new notifications (= `message_seen`)
         from local storage event, and handles it since it
         matches actual local storage value (= `message_seen`);
  => Notifications received + handled:
        - master tab: `message`, `message_seen`
        - slave tab:  `message_seen`
  => Slave tab lost "message" notification.
```

This commit fixes the issue by letting all tabs handle any local
storage events, regardless of the actual value in the local storage.
In the example above, this means the slave tab will not drop the
notification `message` at t(4).

Task-ID 2044231

Closes #36177
2019-09-02 21:27:13 +00:00
Jorge Pinna Puissant 832dc67678 [FIX] point_of_sale: automatic selection of customer pricelist when using barcode
Backport from 12.0 to 11.0

When using barcode to change the customer to a customer with a different
pricelist than the pos default, the customer pricelist was not
automatically selected.

This is a fine-tuning on 5603b778f6

opw-2047070

closes odoo/odoo#36050

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-26 07:16:05 +00:00
Varun RavalandMohammed Shekha 18f52a8ffa [FIX] mail: show attachment "uploading..." in chat window
When uploading an attachment from a chat window, the label
"Uploading..." was not visible. This comes from attachment preview
being too small, thus cutting entirely the filename and the upload
progress bar.

This commit fixes the issue by increasing the size of attachment
previews in chat window, so that it takes 50% width. It also provides
more space for labels on attachment preview while uploading, by
removing the right padding for the animated "unlink" feature that
works only for uploaded attachments anyway.

Note that this commit does not entirely solve the issue: half the
width of a chat window being enough to display the icon, the file
extension, and sometimes the label "Uploading..." completely. The
width of the icon and text extension combined is always the same,
but the label "Uploading..." changes with the locale. The extra space
from the padding removal makes this label fully visible in English,
but not necessarily in other languages. The proper fix requires
re-designing the style of attachment preview, which will be done in
master.

Task-Id: 1978640

closes odoo/odoo#33638

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>


Co-authored-by: Mohammed Shekha <msh@odoo.com>
2019-08-23 15:09:54 +00:00
Nicolas Martinelli 5d088e6a90 [FIX] account_tax_python: product is a template
- Create a new tax, using the 'Python Code' tax computation
- In 'Applicable Code' field, use a field only available on the
`product.product` model (e.g. `product.code`)
- Attach this new tax to a product that is available in the eCommerce
- Access the eCommerce, search for the product if not displayed.

The template `website_sale.products_item` crashes at rendering because
`code` is not available on a `product.template`.

`product` is supposed to be a `product.product` recordset. However, the
method `_get_combination_info` of `sale` is made in such a way that we
can fetch the information of a template, not a product. Utlimately,
methods `compute_all` and `_compute_amount` are called with the wrong
object.

We fall back on the first variant in this case.

opw-2056722

closes odoo/odoo#36134

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-27 13:30:41 +00:00
qsm-odoo db9a0a9fe1 [FIX] point_of_sale: restore customer_facing_display scss
When converting all LESS to SCSS, that file was not properly converted
(it was not tested properly as it is not part of an asset).

Also, commit https://github.com/odoo/odoo/commit/de61fc0c998acdfa29103b40ddc9424e66602158
modified the CSS without changing the corresponding SCSS...

closes odoo/odoo#36133

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-27 13:25:03 +00:00
Nicolas Lempereur c346e7af33 [FIX] l10n_*: translate COA on load without install
When a COA is installed being loaded for current company, the
translations of taxes, account name, ... (in l10n_be, l10n_ca, l10n_ch,
l10n_sa) are copied from the templates to the accounting records.

This is done in `post_init_hook` which is correct since then
translations are available to be copied.

But when an accounting localization is already installed and we set it
to a company, the translations are not copied.

eg. install l10n_be for company1: accounts name are translated in
french and dutch, set company2 to belgian accounting: only original
language is available.

With this changeset, the translation copy is also performed when an
accounting localization is loaded for a company after it has been
installed.

note: if we install language for first times after setting accounting
localizations, chart of account are translated in that language.

opw-2047013
closes #35985

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-08-27 11:19:10 +00:00
Arnold MoyauxandAndrea Grazioso 40487aca5c [FIX] stock, mrp: merge SFP for 2 different MO
usecase to reproduce:
- Set the warehouse with manufacturing 3 steps
- Create a BoM with a Components that use a Sub BoM
- Set Both product MTO + Manufacture
- Create a MO

You have only 2 picking for the first MO with the SFP
that contains both the finished product and the intermediate
component. However they are created and moved at two different times
since you could not create the finished product withtout the
component, so there is no meaning to put them both in the same picking.

It happens because the _assign_picking will merge moves with the same
procurement group. In our case, it's the wanted behavior to have the
2 differents SFP linked to the same MO. So the solution would be to
add a condition to _assign_picking and don't merge moves if they come
from different MO, at this point the field created_production_id would
fit. However this solution is not robust if a customer creates a
new rule that add a 4th steps to the production process.

opw-2055688

closes odoo/odoo#35915

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>


Co-authored-by: Andrea Grazioso (agr-odoo) <agr@odoo.com>
2019-08-27 11:32:54 +00:00
Aaron Bohy 906480093a [FIX] web: 'create' in context and non inline subviews
Let's assume an action with 'create': 0 in the context, and a non
inline subview in the form view. Before this rev., the 'create': 0
was applied to both the form view and the subview.

This rev. applies the same logic as what the server does for inline
subviews: the rule is applied to the subview iff its model is the
same as the one of the form view (with key 'base_model_name' set
in the context).

Task 2035653

closes odoo/odoo#36109

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-08-27 10:21:00 +00:00
Jorge Pinna Puissant 2899a9d1ed [FIX] stock_picking: wrong location in move_line
- In stock, create a new transfer (stock.picking);
- Enter a source location ('A'), a destination location ('B') and an
operation type;
- Add product (whit out packaging);
- Change the source ('C') and the destination ('D') location;
- Hit save.

Before this commit, when opening the details of the move, the source and
destination location where setted as 'A' and 'B', the locations that
were setted before adding the product.

Now, the source and destination location of the move line are 'C' and
'D', the current location at the time we save the picking.

opw-2058240

closes odoo/odoo#36089

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-26 13:55:51 +00:00
Lucas Perais (lpe) 90ab752c5f [FIX] base, web, website: force phone number in ltr
Display your website in Right To Left
Go see the phone number of the company
Make that number in the form
```
123[space]456[space]789
```

Before this commit, the blocks of that number were inverted
(intra-group order did not change)
Leaving us with
```
789[space]456[space]123
```

After this commit, we introduce a little class to force Left To Right
display

OPW 2059917

closes odoo/odoo#36115

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-27 10:02:27 +00:00
Nicolas Martinelli 0aaf7307de [FIX] stock_account: price_unit after edit
- Product category: FIFO (real_time) / Automatic
- Product: storable, nvoicing based on delivered quantity, FIFO category
- Receive 3 units @ 30
- Create and confirm a SO for 1 unit
- Deliver requested qty to customer
- Unlock the picking, update the qty done to 3, lock.
- Invoice delivered qty

In the journal entry of the customer invoice, the COGS entry is 180
instead of 90.

The root cause of this is the incorrect price unit on the modified stock
move, which equals to -60 instead of -30.

The price unit should compute the weigthed average of the already
delivered quantity with the extra quantity.

opw-2047719

closes odoo/odoo#36065

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-26 13:12:48 +00:00
Romain Derie cfbaba81c2 [FIX] website: correctly close dropdown menu on scroll
Before this commit, the code that was supposed to close the dropdown in the
navbar when scrolling was not working anymore.

Indeed, it would removes the `show` class from the `nav-item dropdown`
(dropdown menu entry) but not from the `dropdown-menu` (dropdown content).

Fixes #35320

closes odoo/odoo#36069

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-08-26 10:37:30 +00:00
Thomas Binsfeld 389bd53a0b [IMP] sale: split invoicing method for cleaner overrides
closes odoo/odoo#31529

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-08-26 08:59:46 +00:00
Odoo Translation Bot 5a18c8e71b [I18N] Update translation terms from Transifex 2019-08-25 01:16:15 +02:00
Nicolas Martinelli fb0d84b24a [FIX] portal: VAT modification
The route `/my/account` doesn't implement any restriction for the VAT
modification. This allows users to modify the VAT number although they
shouldn't.

We make the restriction consistent with the backend:

https://github.com/odoo/odoo/blob/e0c7a368580dfeac9af8dc3cb3a10fc33bf4b521/odoo/addons/base/res/res_partner_view.xml#L247

opw-2056727

closes odoo/odoo#36031

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-23 14:16:46 +00:00
Odoo Translation Bot 1dd73aa822 [I18N] Update translation terms from Transifex 2019-08-25 03:08:28 +02:00
Antoine Guenet 0ff1d5cd40 [FIX] web_editor: properly paste unwrapped text
When pasting from clipboard, the editor filters the nodes to paste.
Among other things, it removes `meta`, `style` and `script` nodes. It
did so using `jQuery`'s `not` method but that method has a side effect:
it removes text and comment nodes as well if you pass it a `jQuery`
selector. As a result, unwrapped text nodes could not be pasted. This
commit fixes that by using `each` to remove the targeted nodes instead
of using `not`.

closes odoo/odoo#36012

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2019-08-23 09:35:57 +00:00
Pierre Masereel b51ff07c23 [FIX] point_of_sale: apply tax repartition lines on amount
Since implementation of repartition lines on tax in accounting, the
amount on the tax is not always the effective amount to apply on price
of a product. You can have a tax with amount of 20% for example, and two
repartition lines of 100% and -100%, that will lead to have to apply 0%
on the tax.

So we are computing the effective amount on the tax by multiplying the
amount of tax by the sum of repartition lines factor.

closes odoo/odoo#36140

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-08-27 14:16:03 +00:00
Laurent Smet b6bf77ead7 [FIX] account: Fix taxes computation
1) Suppose a tax of 21% intracomm +100%, -100% applied on 100.0.
The computed price_excluded was 121.0 instead of 100.0 because the
assumption was made the sum of repartition lines factor was always 100.0%.

After this fix, the amounts are always multiplied by the sum of repartition lines factor
in order to reflect correctly the impact of each repartition lines.

2) The rounding is now working for any kind of repartition lines and the consistency
of tax amount regarding the repartition lines is always ensured.
See use cases described by the tests for more details.

closes odoo/odoo#36082

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2019-08-27 14:36:10 +00:00
Lucas Perais (lpe) d310cd4478 [FIX] web: selection: required, option present but disabled
Before this commit, a field selection which was required
did not have an empty option
ref: 4dfabb8f7a

This is fine, but overlooked the fact that modules can modify
the required attribute, or even views can do it
So, we may end up in a situation where the field is required but set to false
This configuration is problematic, at least for the timezone selection field
(see OPW)

After this commit, the empty option is just not visible
note that `disabled = True` would not work because val is not accessible

Because of commits:
- 4dfabb8f7a for the selection feature
- d77ce4c2a9 overriding the required attribute of tz in res.user form

OPW 2057913

closes odoo/odoo#35989

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-23 14:29:05 +00:00
Martin Trigaux f01c325e9a [FIX] gamification: always show the list of users
It is an important information as it is different that the domain.
The users computed with the domain are added to the list, never removed.

closes odoo/odoo#36033

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-26 10:03:54 +00:00
Martin Trigaux 6ca81cd868 [FIX] gamification: tolerate invalid definitions
If a goal definition with a target goal of 0 and "higher the better",
instead of dividing by 0, set a progress of 0% (it is not possible to
compute the progress)

Task id: 2057898
2019-08-26 10:03:54 +00:00
Martin Trigaux 712808581d [FIX] gamification: make kanban clickable
It should be possible to open the view form of a goal from the
"Related Goals" action. This is an easy way to set progress for manual
goals.

Task id: 2057898
2019-08-26 10:03:54 +00:00
Martin Trigaux 64fef75eef [FIX] gamification: initialize goals at 0
If a manual goal has a target of 10, it should not start at 9 but 0
If it has a target of 0, it should start at -1

Task id: 2057898
2019-08-26 09:41:36 +00:00
Martin Trigaux 15084109ef [FIX] gamification: allow to remove users
The users are always happened when matching a domain, never removed
(which is a feature, so you can manually add people).
If you made a mistake in your domain (e.g. start large and refine),
there was no way to remove them afterwards.

Task id: 2057898
2019-08-26 09:41:36 +00:00
Lucas Perais (lpe) 466b97c594 [FIX] lunch: lunch search panel right domain on start
Open the Lunch kanban view

Before this commit, the counts for each product were the counts
across all location
This was before the location domain from the lunch widget was not sent

After this commit, the counts displayed on startup are the ones
of the right user location

OPW 2053044

closes odoo/odoo#35976

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-23 14:42:44 +00:00
Aaron Bohy 6602e1cf2d [FIX] web: grouped list with <groupby> node and onchange
Let's assume an editable grouped list view with a <groupby>
node containing subfields, and an onchange. Edit a row to trigger
the onchange. Before this rev., it crashed because the onchange
specs was incorrect: it followed the relation of the many2one
and thus included its subfields (whereas it should only follow the
relation for x2many fields).

For example, go to Accounting > Accounting > Sales and edit the
label of a move line.

Task 2044187

closes odoo/odoo#36001

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2019-08-23 11:08:27 +00:00
Aaron Bohy edc710f758 [FIX] web: MockServer: correctly remove childNodes
Removing elements from a list while iterating over it isn't a good
idea. As a consequence, the MockServer didn't support list archs
with a <groupby> node containing several <field> nodes, or a
<field> node precedeed by a text node.
2019-08-23 11:08:27 +00:00
Pierre Masereel 9ae33dd50c [FIX] point_of_sale: offline with invoice
When you are offline, and you validate an order with an invoice, the
rejection of the Promise is not well handled and propagated which lead
to enter in a resolve even if it has failed.

We are now correctly propagting the rejection of the call to the server.

closes odoo/odoo#35974

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-22 13:14:30 +00:00
Nicolas Martinelli e0c7a36858 [FIX] account_check_printing: set the amount in words
- Create a vendor payment by check
- Remove the amount in words
- Confirm

It is impossible to set the amount to print the check.

We add an action button to recompute the amount in words. It is only
visible when the amount is not set.

opw-2046339

closes odoo/odoo#35968

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-08-22 12:14:18 +00:00
Julien Castiaux 1e914bc11e [FIX] l10n_it_edi: fetchmail.server.type renamed
Fine tuning of 529c1a2e

closes odoo/odoo#35962

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-22 11:37:28 +00:00
Nicolas Lempereur da474d0e87 [FIX] web_editor: parallax effect in sanitized field
A sanitize fields by default remove all attributes outside of a
whitelist (if sanitize_attributes on field is not set to false).

This prevent to use parallax widget in Html sanitized field since
attribute "data-scroll-background-ratio" define parallax effect speed
but was not in whitelist.

note: also keep data-interval for gallery widget

opw-2053983
closes #35961

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-08-22 10:30:47 +00:00
Lucas Perais (lpe) 4855b52c55 [FIX] web: graph: id not in groupby
Before this commit, when having the field "id" in the graph view
it was selected to group by on it.
This doesn't really make sense, and triggers an sql error anyway

After this commit, we filter out that field from the groupbys

OPW 2053444

closes odoo/odoo#35958

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-08-22 09:58:23 +00:00
Julien Mougenot 55feae2436 [FIX] web: searchbar: focus first item
Doesn't focus hovered option in the searchbar

Before this commit:
When typing in the searchbar while having the cursor right under it,
the selected option was automatically the one hovered by the cursor.

Now, the default option is the first one (typically name search) and the
cursor hovering only takes effect when moved for the first time.

Task 2058656

closes odoo/odoo#36099

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-08-27 14:27:41 +00:00
Luis 4109053388 [FIX] base: add js_class to calendar rnd
Fix missing js_class attribute on the calendar xml validation file
Make possible to create new custom views based on the calendar view

Was already done in master at 496920a8f5 but was not present in 11.0

Closes odoo/odoo#26750
Closes odoo/odoo#31679
Closes odoo/odoo#36156

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-28 07:22:39 +00:00
Mohammed Shekha 01f66151c0 [IMP] web: remove m2o from supportedTypes in selection widget
currently widget selection is not working in m2o in editable list view and
to fix this issue it need a lots of changes to make it work properly,
i.e. make '_fetchSpecialRelation' use correct domain for each record,
batch requests as much as possible, also make all '_fetchSpecial...'
work in the list case.

So to avoid major changes remove supportedTypes from selection widget
so user can not tempted to apply selection widget on many2one field.

task-1871698

closes odoo/odoo#33485

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-08-28 05:52:03 +00:00
Christophe Simonis 4833aeb960 [MERGE] forward port branch 11.0 up to ab8c564f44 2019-08-22 11:21:23 +02:00
Christophe Simonis cb5f8241af [MERGE] forward port branch saas-14 up to edf44cdaee 2019-08-22 11:12:39 +02:00
Christophe Simonis edf44cdaee [MERGE] forward port branch 10.0 up to 8443a74cd6 2019-08-22 11:12:08 +02:00