Commit Graph
116301 Commits
Author SHA1 Message Date
Nicolas Martinelli 1fe119da3b [FIX] barcodes: nomenclature
Loads the barcode nomenclature only if one has been is defined. Indeed,
from commit 80e89c7a11, the POS config unset the
`barcode_nomenclature_id` field if the barcode support is not activated.

opw-1859928
2018-06-21 10:40:59 +02:00
Nicolas Martinelli 0aa2bc0acf [FIX] point_of_sale, sale_mrp, sale_stock: sort moves
`sorted` returns a new sorted recordset, but doesn't modify the actual
one. Therefore, the current code doesn't work as expected.

opw-1824734
2018-06-21 10:31:06 +02:00
Lucas Perais (lpe) 5f105d144d [FIX] account: aged balance shouldn't display fully reconciled on a period
Commit 45c5a07d89 deals with displaying on the aged balance reports
the lines that zero out each other: an invoice and a payment of the same amount for the same partner
However, that commit overlooked that when there is a chain of reconciliation
that puts the report line to zero, it was displayed as well.

This present commit corrects this by making sure there are amls that detail the report lines

OPW 1858963

closes #25359
2018-06-21 09:36:58 +02:00
Nicolas Martinelli dd2354a1ab [FIX] sale_timesheet: SO line on subtask
- Activate sub-stasks on projects
- Create a product A:
  Product Type: Service
  Invoice based on: Timesheets on tasks
  Service Tracking: Create a task in an existing project
- Create a SO with A, validate
- In the project view, open the created task
- Click on the stat button 'Sub-tasks'
- Create a task from the kanban view

The SO line is not copied on the sub-task.

The `name_create` method doesn't send the `parent_id` key in the values.
Therefore, the SO line is not retrieved.

We fallback on the context key `default_parent_id`.

opw-1857560
2018-06-21 09:33:15 +02:00
Nicolas Martinelli f90434b96c [FIX] resource: 24h shift
Create a resource working 24 hours / day.
If we record it as:
- From 00:00 ; To 24:00 => crash
- From 00:00 ; To 23:59 => 1 minute lost

The `float_time` widget doesn't allow to be more accurate than 1 minute,
therefore it is not possible to record an end time of 23:59:59.999999.
We allow a value of 24:00 which is automatically interpreted as
23:59:59.999999. Only 1 microsecond is lost for such use case, which
should be acceptable for our level of accuracy.

opw-1856943
2018-06-21 09:20:33 +02:00
Christophe Matthieu ab85e95946 [FIX] ir_qweb: remove browse records from context
The context is send to qweb as option, the options are converted into a
frozen dict, the browse records can have a closer cursor, takes the place
in the cache, and raise and exception in qweb (because contact try to
json.dumps options for multi-edition feature in web_editor.

opw-1859848
2018-06-20 14:14:36 +02:00
Martin Trigaux 8439202915 [FIX] account: initial balance has a 0 amount_currency
amount_currency is a field that is expected in multi-currency
The general ledger report has a line
    <span t-esc="line['amount_currency'] if line['amount_currency'] > 0.00 else ''"/>
which crashes if amount_currency is None

opw-1859122

Replaces and closes #25240
2018-06-20 13:18:16 +02:00
Wolfgang Taferner 46b8c07249 [FIX] product: bring back description in product views
Somehow the internal description got lost in the product views in
https://github.com/odoo/odoo/commit/af9d21b379f1dd42e83dcfa164af489c9261542d.
As the field is still used for demo data and is highly needed to
describe the product without exposing in one of the other new fields, it
is brought back.

Closes #24164
2018-06-20 13:05:34 +02:00
Denis Ledoux e75c0bd2b9 [FIX] calendar: ensure the recurring dates is inside the limit defined
by datetime

The library `datetime` defines a MINYEAR and MAXYEAR limit.
If you try to play with dates outside of these years limits,
it crashes.

In the case of the opw, the date within its timezone was
within the limit (year 9999), but in the UTC timezone
it was no longer the case (year 10000).

Actually the condition should use `<=` instead of strict `<`,
and check the year *in utc*
is not outside the limit, but as soon as you try
to compute the date within UTC, datetime crashes :).

However we can assume nobody will need a event in the year 9999
any time soon, or by that time if Odoo still exists,
we should have refactored this module about 3333 times and somebody
would probably have removed this limitation by oversight anyway.

opw-1850024
2018-06-20 12:32:29 +02:00
Christophe Matthieu cf15030ed0 [FIX] web_editor: convert link to send by email
Don't convert in table btn-link, and center the button
2018-06-19 16:57:04 +02:00
Toufik Benjaa f3298859eb [FIX] sale_payment: Do not create payment token when not logged-in
- When paying a sale order with a payment acquirer that saves tokens
after each payments (S2S mode or save token to "ask" or "always") and
while not connected.
   The payment token is saved as either the sale order's partner (when the
acquirer is in form mode) or as the public user's partner (for S2S
acquirers).

   To fix this issue, if the customer is not connected and pays the sale
order using a form acquirer, we do not create a token.
   If the customer pays the sale order using a S2S acquirer, the created
token is then linked to the invoice's partner.
2018-06-19 16:05:05 +02:00
Goffin Simon 98be03860d [FIX] stock: issue with full package transfer
Steps to reproduce the bug:
-activate the pick-pack-ship route on the main warehouse
-activate the delivery packages option in Inventory > Configuration > Settings
-create a stockable product
-make a quick inventory for 10 unit(s) of this product
-sell 2.30 unit(s) of this product & confirm the sale
-process the done qty in the PICK operation and click the button "put in pack"
-validate the PICK operation

Bug:

check the PACK operation and the full package was not being transferred

opw:1858316
2018-06-19 15:23:26 +02:00
Toufik Benjaa bae7cd9c46 [FIX] account_payment: Do not create payment token when not logged-in
- When paying an invoice with a payment acquirer that saves tokens after each payments (S2S mode or save token to "ask" or "always") and while not connected.
  The payment token is saved as either the invoice partner (when the acquirer is in form mode) or as the public user's partner (for S2S acquirers).
  This should not happen.

  To fix this issue, if the customer is not connected and pays the invoice using a form acquirer, we do not create a token.
  If the customer pays the invoice using a S2S acquirer the created token is then linked to the invoice's partner.
2018-06-19 14:51:28 +02:00
Nicolas Martinelli 4e20c2a49e [FIX] stock_account: inventory valuation
When the initial inventory adjustement is made after the accounting
openeing entry, no AML is created with the initial quantities. The
valuation report is therefore wrong.

Partial revert of 21099f3eaf. Although the existing solution
has also flaws, the fix highlights them even more.

opw-1859204
2018-06-19 13:14:44 +02:00
Nicolas Martinelli fc14ed6642 [FIX] stock_account, stock_dropshipping: do not change accounts
- Change the one of the following default account on a product category:
  Stock Input Account
  Stock Output Account
  Stock Valuation Account
- Upgrade stock_account

The account is changed back to the default value.

This was due to commit 1bf25fc018 which attempted to solve an error
in a test.

We fix the test by making sure we check the right accounts. We also make
sure to avoid creating 2 identical `ir.properties` (one `False`, the
other with a value). We only update the property if it is `False`.

opw-1859706
2018-06-19 13:11:40 +02:00
Jos De Graeve d65043c3c2 [CLA] Accomodata signs Odoo CCLA
Closes #25305
2018-06-19 09:06:16 +02:00
Odoo Translation Bot 94e49c251a [I18N] Update translation terms from Transifex 2018-06-17 04:40:39 +02:00
Alexandre Kühn c53b0ac188 [FIX] web: do no drop invalid record in list on discard
Revision on b09f0c99

The intent of the previous commit was to no drop records in a list
on discard in the following cases:

    - when they have been created from a `default_get`
    - when they have been created from an `onchange` that result
      from a `default_get`

Before the commit above, the kind of records that were abandoned
in those cases are stated as invalid, which happens when a record
has a required field that is empty.

The case of an `onchange` that is not involved in a `default_get`
was not considered in the fixes above. In fact, this is the intent
behaviour in most cases. However, if the items in the list are
created from such an `onchange`, we should not drop them.

This commit fixes the bug where records in a list that are created
from an `onchange` are wrongly abandoned. Here is the new logic to
abandon a record on discard in a list:

    - the record that is marked as "do not abandon" should not be
      abandoned;
    - a record that is registered as a "not new addition" in the
      list should not be dropped;
    - a record that is registered as a "new addition" in the list,
      and has been updated afterwards, should not be dropped;
    - a record that is not new should not be dropped;

opw-806650
2018-06-15 17:36:27 +02:00
Nicolas Martinelli b09b3d54d4 [FIX] base_address_extended: NL street format
The street format for Netherlands should be have the street name beforfe
the street number.

Closes #25204
opw-1859233
2018-06-15 16:54:46 +02:00
Jeremy Kersten d702e82b9c [FIX] web: fix ace editor when value is False
Avoid to crash the client web with setValue(false).
false.match, false.split, false.length... will not works.

Before this commit, _render call the setValue after comparing '' !== false
2018-06-15 12:12:26 +02:00
Jeremy Kersten c4f5b9f751 [FIX] website_sale_wishlist: avoid double click to avoid concurrent update
Before this commit, if you add 2 times the same item quickly, that raise concurrent update.

With side effect: quotation rollbacked and new one created, or if no concurrent
update 2 times the same product in the cart.

Now we avoid that the user click a second time on "Add to cart" before the end of the
first click which add or move the product to the cart.

Related to #24853
2018-06-15 12:12:26 +02:00
Jeremy Kersten d98b262398 [FIX] website, ir_qweb, *: improve cdn usage
- post process the attributes in widget html value
  (except if: data-no-post-process)
- apply cdn for python qweb widget image
- apply cdn for background-image (blog e.g.)
- use cdn for asset files

Now cdn is used (even if not public user) except if:
    - debug mode
    - editor
    - translator

External library added in asset now appear only one time.
Before this commit, t-js='false' and t-css='false' was returning remains
2018-06-15 10:36:46 +02:00
Christophe Matthieu eee1b39806 [FIX] ir_qweb: post process the attributes in widget html value
issue: Blog doe not use the cdn because the widget html value is not
compiled by the qweb and does not use the attribute post processing.
2018-06-15 08:42:15 +02:00
Christophe Matthieu ff3c494448 [FIX] web_editor: apply cdn for python qweb widget image
issue: widget image doe not pos processing the attributes
2018-06-15 08:42:15 +02:00
Christophe Matthieu e829c1af55 [FIX] website: apply cdn for background-image 2018-06-15 08:42:15 +02:00
Christophe Matthieu 9cd982bcc8 [FIX] qweb: use cdn for asset files
Refactoring of qweb to call _post_processing_att for each nodes. This
change remove the crappy ovewrite in website module. The website overwrite
only the _post_processing_att to add the cdn parameters.

The static node (without t- attributes) can stay static (remove overwrite
of _is_static_node), the cdn is applied at the compile time for this
nodes instead of at the running time like the dynamic node.
2018-06-15 08:42:15 +02:00
Christophe Simonis b05e4d5f95 [MERGE] forward port branch saas-15 up to a53bea49fe 2018-06-14 21:28:39 +02:00
Christophe Simonis a53bea49fe [MERGE] forward port branch saas-14 up to 7c8f335988 2018-06-14 19:19:14 +02:00
Christophe Simonis 7c8f335988 [FIX] sale: do not load non-existing file
Revert fd2b130428
2018-06-14 18:29:59 +02:00
Nicolas Martinelli 5ac40752a4 [FIX] mrp: register time on WO
When manually registering a time on a Work Order, an error is raised
because of an incorrect value for `workcenter_id`.

The field is added in the view.

opw-1851766
2018-06-14 18:20:52 +02:00
Nicolas Martinelli 7aef847585 [FIX] event: event stat button
Display stat button to groups who have read access to events.
2018-06-14 18:17:00 +02:00
Christophe Simonis 803df909b1 [MERGE] forward port branch saas-14 up to 804d68efe5 2018-06-14 18:05:38 +02:00
Christophe Simonis 804d68efe5 [MERGE] forward port branch 10.0 up to 23a1bce2a9 2018-06-14 18:03:26 +02:00
Christophe Simonis 23a1bce2a9 [MERGE] forward port branch 9.0 up to 90165e2d96 2018-06-14 17:29:56 +02:00
Christophe Simonis 90165e2d96 [FIX] WorkerCron: keep registry alive after job processing 2018-06-14 17:17:13 +02:00
Christophe Simonis 5233dbdb54 [FIX] core: do not clear cache when removing registry from pool
No need to force other workers to reset their cache.
2018-06-14 17:17:13 +02:00
Adrien Dieudonne 1aacc96262 [FIX] web: checks rpc responses in web.ajax
Before this commit, load_action and load_views were never resolved
in case of internet connection loss.
It's because the call is triggered by web.rpc direcly who uses
ajax.rpc without any response check.

Now the rpc response is checked in web.ajax.
Thereby all responses are handled whether they come from session.rpc
or rpc.query.
Plus, it was not the responsibility of the session to check the
rpc responses.

Steps to reproduce the issue:
(1) load_action:
- Go to the app switcher for the first time
- Force disconnected from the network
-> No notification appears and the user aren't notify
(2) load_views (mobile only):
- Go to Sales -> Quotation
(In this case, the first call is 'load_views' because we need to force
to load some views like kanban view)
- Force disconnected from the network
-> No notification appears and the user aren't notify

Note: It's now important to notify the user about connection loss
because a recent improvement in mobile app replaces the 'retry screen'
and lets the webclient handle connection issues by itself.
The single odoo mobile app is supposed to work with all databases
from 10.0.
2018-06-14 15:57:55 +02:00
Christophe Simonis c13d67dd25 [FIX] website: valid time zone guessed from GeoIP
The timezone returned by GeoIP may be unknown by `pytz` due to
incompatibilities between GeoIP and pytz databases (which may be outdated).
2018-06-14 15:49:16 +02:00
Christophe Simonis 45f2876694 [FIX] stock: remove invalid test
scrap test is irrelevant in version 11.0
2018-06-14 14:59:23 +02:00
RomainLibert ed47e3a546 [FIX] event: use groups to hide event count stat button
In order to avoid the access error when trying to view a partner form
view we should hide the event count stat button for the users who don't have
access to it (must be event_user or event_manager to read this field).

Closes #25225
2018-06-14 14:55:55 +02:00
RomainLibert 84acd427b8 [FIX] website_event: allow controller to read event.registration
The controller /event/<model("event.event"):event>/registration/confirm
was broken since the portal user cannot read event.registration objects.

In 9.0 this was not an issue as we browsed and sudoed the
event.registration, but since in 10.0 this line disapeared so did the
sudo which this commit reintroduces.
2018-06-14 14:14:50 +02:00
qsm-odoo 50418c4811 [FIX] web_editor: properly save media dialog without any image
When saving the media dialog without any selected image, a crash
occurred. Now, it properly closes the dialog.

opw-1858614
2018-06-14 10:47:38 +02:00
Simon LejeuneandNicolas Martinelli d42856f29d [FIX] stock: partial reserve in MTO
- Create a product with -4.0 Units in stock
- Set the Buy and MTO routes, assign a vendor
- Create a SO for 25 Units
- A PO of 25 Units is created => validate and receive products
- Check availability on the picking linked to the SO

Nothing is reserved, while 21 Units could be reserved.

opw-1850688

Co-authored-by: Nicolas Martinelli <nim@odoo.com>
2018-06-14 10:36:57 +02:00
Nicolas Martinelli 1bde9b1ec4 [FIX] event: do not use sudo to compute event_count
This reverts commit c0618d72d0.
2018-06-14 10:15:23 +02:00
celm1990 caadeeee62 [FIX] base_address_city: avoid unexpected write trigger
This sets the field country_enforce_cities readonly in order to skip inverse field's write on contact creation.

Was PR #24686. Courtesy of Carlos Lopez
2018-06-14 09:39:28 +02:00
Christophe Simonis d45c32baac [MERGE] forward port branch saas-15 up to bdd051bf78 2018-06-13 18:13:48 +02:00
Goffin Simon ab0b3a6217 [FIX] stock: Printing barcode on picking list
Inspired from 12b11c1e6f
Fixes #25214

opw:1849965
2018-06-13 17:21:56 +02:00
Nicolas Lempereur c4ddf55880 [FIX] web_editor: link don't duplicate child text
If we applied a link eg. on:

```
<span>hello <b>world</b></span>
```

The system actually gets the "label": hello worldworld because there is
3 nodes:

 text node: hello
 element node: `<b>world</b>`
 text node: world

Also since "hello worldworld" is different than "hello world",
instead of just keeping existing nodes and adding the link, the system
would replace the selected range by:

 `<span><a>hello worldworld</a></span>'

instead of:

 `<span><a>hello </a><b><a>world</a></b></span>`

This commit ignores element nodes when creating a new link, since when
getting the label of the link from the selection, only the text nodes
insides the element nodes have any interest.

There was a second issue because if we had:

```
<i><a href="hello">world</a></i>!
```

and tried to put a link over "world!", the code would decide: "world" is
inside a link so we will just update that link.

Thus we would get:

```
<i><a href="hello">world!</a></i>!
```

instead of:

```
<i><a href="hello">world</a></i><a href="hello">!</a>
```

opw-1848351
closes #25187
2018-06-13 16:20:40 +02:00
Aaron Bohy f03f2f7c8a [FIX] account: print move lines with no label
Field 'name' (Label) on account_move_line isn't required. When
following the usual flows, it is automatically set by the system.
However, one can manually create move lines without specifying it.

When this occurs, the Sale/Purchase Journal can't be printed
anymore because it causes a crash.

OPW~1857663
2018-06-13 15:51:35 +02:00
Miku Laitinen fd2b130428 [FIX] sale: Add missing import to 'account_config_settings_views.xml' in manifest
Coming from the migration of sale https://github.com/odoo/odoo/commit/f3d715ca94f24f86ce39a4bc6873fe7576ef1860#diff-7ca766af4bd53a0bc808dd3a4ead8317
2018-06-13 15:36:48 +02:00