Commit Graph
117172 Commits
Author SHA1 Message Date
William Henrotin 939b022ebf [FIX] mrp: done workorder on multiple reserved move lines
Producing a manufacturing order on components with more than one unit
could leads to multiple move line reserved on this component. Marking the
workorder as done, in that case, will trigger an error saying "Cannot set
the done quantity from this stock move, work directly with the move
lines". Instead of setting the quantity done directly, this commit
uses the magical function _set_quantity_done() that manage the case
of more than one move lines.

OPW-1888780

closes odoo/odoo#27773
2018-10-15 13:20:52 +00:00
Christophe Simonis 900db95457 [MERGE] forward port branch saas-15 up to f026255f12
closes odoo/odoo#27792
2018-10-15 12:21:50 +00:00
Christophe Simonis f026255f12 [MERGE] forward port branch saas-14 up to 5f3739aebd 2018-10-15 11:40:20 +02:00
Christophe Simonis 5f3739aebd [MERGE] forward port branch 10.0 up to 8fb61cd830 2018-10-15 11:03:34 +02:00
Lucas Perais (lpe) 8fb61cd830 [FIX] product_margin: sales and purchase in invoice's currency
Invoice price should be adapted to the invoice currency
Before this commit, it was not.

OPW 1889997

closes #27710
2018-10-15 09:24:20 +02:00
Simon Lejeune 0b414cb814 [FIX] sale_stock: return of return and delivered quantity
The code ignored return of return when computing the delivered quantity
of a so line (in this part of the code, if a move has a destination
location set a customer, it'd be a return of return of a delivery).

We now update the delivered quantity is the return of return as the
`to_refund` flag enabled, meaning the user ticked the option to update
the quantity on the so line.

opw-1884683
2018-10-12 10:21:14 +02:00
Joseph CaburnayandNicolas Martinelli 3df584f5a6 [FIX] website_sale: click first image in carousel does not work
- Activate the `group_website_multiimage` in the website settings
- Add several images on a product
- On the eCommerce, click on the second image, then the first one

The click on the first image doesn't work.

This is because `t-att-data-slide-to="0"` is removed from the attributes
(probably because evaluated as falsy).

opw-1884368

Co-authored-by: Nicolas Martinelli <nim@odoo.com>
2018-10-11 14:25:05 +02:00
Christophe Simonis 93c22558f3 [MERGE] forward port branch saas-14 up to 77286e4296 2018-10-11 12:15:02 +02:00
Christophe Simonis 77286e4296 [MERGE] forward port branch 10.0 up to c2688e45f3 2018-10-11 10:34:48 +02:00
tutran81 c2688e45f3 [FIX] maintenance: make write override multi-compliant
The write method called self.stage_id which caused singleton error when
self contains more than one record
2018-10-11 10:02:27 +02:00
Kishan Gajjar 227fc6408d [FIX] web_editor: properly allow to reset bg color
If resetting a background color was the only edition that was done on a
page and that this page was saved, the change was not properly saved
as the page was not marked as dirty.

Closes https://github.com/odoo/odoo/pull/27625
task-1879524
2018-10-10 17:22:37 +02:00
Simone Rubino ba09b8989e [FIX] stock_account: group on empty field
65;5401;1c
Line contains the value returned by a select clause on inventory lines.
postgresql result returns None instead of False when no value is set.

Avoid having a stock_histories_by_group dict with a key to None

Having a None value is problematic as the key is used based on the read_group
result returned by the super call above.

e.g. grouping the inventory history by lot numbers, while some moves have no
inventory, used to produce a KeyError

Closes #27591
2018-10-10 16:33:59 +02:00
Sébastien Theys 80d363cd31 [FIX] tools: expand user and vars for data_dir 2018-10-10 14:03:59 +02:00
Nicolas Martinelli 5b594dea43 [FIX] delivery: translate delivery name
Somehow a backport of fce72f902e

opw-1886904
2018-10-10 11:18:17 +02:00
Goffin Simon 782e437061 [FIX] web_editor: Not possible to edit a link on safari
On Safari, when editing the template of a mail.mass_mailing,
clicking the "Read more" button (or any button that can
have a link to the website) didn't open pop up to set
the URL of the website.

PS: inspired from https://github.com/textAngular/textAngular/issues/762

opw:1889643
2018-10-10 09:48:34 +02:00
Christophe Simonis a5772d4338 [MERGE] forward port branch 9.0 up to 75388edd9c 2018-10-09 16:23:35 +02:00
Alexandre Kühn 5c12a664d5 [FIX] web: click on href inside kanban record
Before this commit, when clicking on a link in a kanban
record having `href` that is set, it was opening the record
and accessing the `href`.

The intended behaviour is to not open a record if any children
component of the record contains either a click event or is
a link with `href`. The former was correctly handled, but not
the latter.

This commit fixes the issue by preventing opening the record
when clicking on a inner link with href from a kanban record.

Closes #24664

closes odoo/odoo#27529
2018-10-09 08:39:50 +00:00
Lucas Perais (lpe) 62cbc5f240 [FIX] board: translate custom views according to current user
Have a user in English, put a sale report as "favorite" (pinned to dashboard app)
Change the user's language

Before this commit, the pinned view was in English (because it was recorded that way)

After this commit, the pinned view is in the user's language.

OPW 1890664

closes odoo/odoo#27574
2018-10-12 08:36:19 +00:00
Odoo Translation Bot 44069cc4bd [I18N] Update translation terms from Transifex 2018-10-14 03:21:07 +02:00
Sébastien Theys 57ae9428b4 [FIX] web: prevent URL click from opening a record
If we click on a link, we only want to open the URL,
and not the record when the button is on a list.

PR: #27230
2018-10-12 12:45:38 +00:00
Robot Odoo 04eda06cb2 [FIX] web: do not create partner from calendar's sidebar
Fixes #27666

closes odoo/odoo#27720
2018-10-12 15:13:02 +02:00
Benoît Fontaine 347a3bd948 [FIX] web: use correct context attribue
Disable the possibility to create partner from calendar's sidebar
The option "can_create: false" was present but badly referred

Fixes odoo/odoo#27666
2018-10-12 11:58:19 +00:00
Benoît Fontaine a9c5da180f [CLA] signature for Linekio 2018-10-12 11:58:12 +00:00
len-odoo ad79cc09c6 [FIX] web: don't allow reference widget to be set on char fields
The reference widget is expecting a models list as selection attribute
in the field declaration.
It does not exist in the case of the char field.
Support for char fields was added to allow for external identifiers,
but it only works in readonly.
As a consequence, it tracebacks in Edit mode when used in studio.

We thusly remove char field from the list of supported fields.

opw 1892602

closes odoo/odoo#27708
2018-10-12 10:13:50 +00:00
Nicolas Martinelli fc1ba68c6a [FIX] sale_timesheet: zero timesheet
1. Create a SO with a product that creates a task on a new project
2. Create a timesheet on the task, with time = 0:00
3. Open the project overview from the projects dashboard or from the SO

A crash occurs because of a division by zero.

opw-1893397

closes odoo/odoo#27712
2018-10-12 09:54:04 +00:00
len-odoo 52d779007d [FIX] web: use read to update record values after resequence
Commit:
https://github.com/odoo/odoo/commit/818c18e55d0718286ff5bf332186a10f4d7a58ef
Updated the resequence logic in a way that was almost falser than before.
The added test however did work by coincidence, as index values were equal to
the sequence field values.
To be sure that we synchronize with what happens on the server, we do a read
after the resequence.
Additionnally, we take into account the result of the server resequence return;
if it is false, it means no resequencing happened, so we should not do a read.

opw 1867049

closes odoo/odoo#27184
2018-10-12 07:51:12 +00:00
Lucas Perais (lpe) 1ab53c27ff [FIX] website_[sale,delivery]: update freeshipping on delivery change
Since those two modules do not have a bridge, there was no support for changing the freeshipping line
when changing the delivery carrier

Now it has, at the price of ugly code

OPW 1871526

closes odoo/odoo#26935
2018-10-10 14:26:23 +00:00
Lucas Perais (lpe) 721260d2a7 [FIX] account: retrieve bank statement for process_reconciliation
Multicurrency is ON
Your company in USD

Make a bank journal in EUR
Create a statement and push reconcile

In the widget, create a line with a tax and hit reconcile

Before this commit, the amount_currency field of the tax move line was not filled

After this commit it is

OPW 1885014

closes odoo/odoo#27592
2018-10-10 14:56:56 +00:00
Christophe Simonis 717f458394 [MERGE] forward port branch saas-15 up to 93c22558f3 2018-10-11 14:48:49 +02:00
Nicolas Martinelli 3c4f853365 [FIX] account: aged partner report
Let's consider an aged partner balance with a period of 30 days as of
2019-02-08. The specific dates used in the report are:

``` python
bisou = datetime.strptime('2019-02-08', "%Y-%m-%d").date()
for x in [0, 1, 30, 31, 60, 61, 90, 91, 120, 121]:
    print(x, bisou + relativedelta(days=-x))

0   2019-02-08
1   2019-02-07
30  2019-01-09
31  2019-01-08
60  2018-12-10
61  2018-12-09
90  2018-11-10
91  2018-11-09
120 2018-10-11
121 2018-10-10
```

However, the current periods generated are incorrect:

```
{'name': '0-30', 'stop': '2019-02-08', 'start': '2019-01-09'}
{'name': '30-60', 'stop': '2019-01-08', 'start': '2018-12-09'}
{'name': '60-90', 'stop': '2018-12-08', 'start': '2018-11-08'}
{'name': '90-120', 'stop': '2018-11-07', 'start': '2018-10-08'}
{'name': '+120', 'stop': '2018-10-07', 'start': False}
```

There is a clear inconsistency between the name of the period and the
date used. Moreover, the name is misleading: 0-30 includes the -0 date,
while 30-60 doesn't include the -30 date.

After the fix, the name and the periods are consistent. We also change
the first period to 1-30 since including 0 would mean to include amounts
which are not due yet.

```
{'name': '1-30', 'stop': '2019-02-07', 'start': '2019-01-09'}
{'name': '31-60', 'stop': '2019-01-08', 'start': '2018-12-10'}
{'name': '61-90', 'stop': '2018-12-09', 'start': '2018-11-10'}
{'name': '91-120', 'stop': '2018-11-09', 'start': '2018-10-11'}
{'name': '+120', 'stop': '2018-10-10', 'start': False}
```

opw-1886633

closes odoo/odoo#27294
2018-10-10 15:21:24 +00:00
William Henrotin 37d20240a9 [FIX] stock: add forgotten note field
The stock refactoring between version 10.0 and 11.0 changes lots of views
in the inventory app. The picking form view lost in the refactoring the
'note' field.
This commit put it back in the view under the 'Additionnal info'. It was
not been removed from the pdf reports

closes odoo/odoo#27658
2018-10-11 08:01:01 +00:00
Martin Geubelle f249c5ef2a [FIX] web: restore broken datepicker input behavior
In Firefox, the input behavior and visual representation (navigation, caret
placement, value selection, etc.) was broken when using a datepicker (easily
reproductible on date and datetime widgets).

This was due to the `focus` event being stopped on the input, which doesn't
seem to be correctly supported by Firefox.

The deleted code was supposed to toggle the picker when the field was clicked
(see odoo/odoo@89093a1) (toggle on click and disable focus) but the lib
correctly supports on focus without extra code.

This also fixes the fact that the datepicker was not open on focus (only on
clicked). In some tests where the field was the first in the form view, it is
now correctly autofocused.

Forward-port: not useful from 12.0 because the code has changed with BS4 and
this has already been applied in odoo/odoo@6692919 and odoo/odoo@c63630d.

Closes #23438

closes odoo/odoo#27657
2018-10-11 08:41:48 +00:00
len-odoo 12a795a7a0 [FIX] website_links: unreadable axis labels on statistics graphs
When there are many values, the axis would be unreadable.
We also added a margin so that the values would be displayed entirely,
as opposed to cropped in the middle of a word.

opw 1890109

closes odoo/odoo#27656
2018-10-11 08:05:08 +00:00
Goffin Simon d211ea5f7c [FIX] purchase_mrp: Received Quantity in Purchase Order remains '0'
Steps to reproduce the bug:

- Create Product P: with BOM type - Kit and BOM components > Set - Invoicing: on delivered quantity
- Create PO with P and confirm - shipment 1 will be generated
- Cancel the PO - shipment 1 - will also get canceled
- Reset the canceled PO to quotation and confirm it - new shipment 2 will be generated
- Validate the shipment and receive product KIT

Bug:

Check PO - 'Received Qty' was not updated

Inspired from: https://github.com/odoo/odoo/commit/c2dfdc3081764a492a94024f1fb57e15636b04c9

opw:1889303

closes odoo/odoo#27622
2018-10-10 11:34:37 +00:00
Stijn Houben 26d67991c2 [FIX] base: allow admin to modify paperformats
If a user creates a paperformat, he should be able to modify it too.
Employees have no reason to modify the paperformat though (nor create).
Having a malicious employee modifying an existing report may be dangerous.

[CLA] signature for stijnh92

Fixes #26292

closes odoo/odoo#27444
2018-10-10 13:13:19 +00:00
Odoo Translation Bot 75388edd9c [I18N] Update translation terms from Transifex 2018-10-09 10:13:22 +02:00
Christophe Simonis 0ef5cedebb [MERGE] forward port branch saas-14 up to 637e4c68fc 2018-10-08 17:29:03 +02:00
Christophe Simonis 637e4c68fc [MERGE] forward port branch 10.0 up to e88c5c1ece 2018-10-08 17:28:08 +02:00
len-odoo e88c5c1ece [FIX] mail: sudo on user name
Suppose user A creates a sale order S in company X. He then changes to company Y
Sales manager B, in company X, creates the invoice for sale order S.
Bug: the compilation of the report fails because of the user.name in the
template. Then the tracking update fails, making it impossible to validate the
invoice.

opw 1884915
2018-10-08 15:59:30 +02:00
Christophe Simonis 0efe62d63d [MERGE] forward port branch 10.0 up to 085d504561 2018-10-08 14:51:52 +02:00
Duc Dao 085d504561 [FIX] base: use correct field for Vietnamese
There is no name field but a state_name one
Closes #27512
2018-10-08 12:13:32 +02:00
Aaron Bohy a69f117bbf [FIX] board: handle actions with no view_mode
The view_mode attribute is automatically set to the 'action' nodes
when the action is added to the dashboard using the 'Add to
dashboard' button in the searchview. However, other dashboard views
can be written by hand (see openacademy tutorial), and in this
case, we don't want to hardcode action's params (like context or
domain), as the dashboard can directly retrieve them from the
action. Same applies for the view_type, as the first view of the
action can be used, by default.

Before this rev., the second usecase wasn't handled, and it crashed
when no view_mode was specified. This rev. also ensure that the
context and domain are correctly retrieved from the action.

Closes #24088

closes odoo/odoo#27517
2018-10-08 09:19:21 +00:00
svs-odoo 078b31dc7f [FIX] web: Make datetimepicker configurable in datetime fields
The datetimepicker option was introduced to be able to customize the
datetime picker widget in date/datetime fields. However, due to the way
the _makeDatePicker function was coded, it did not work in datetime
fields.

Thank to Yajo for the initial fix

closes odoo/odoo#27541
2018-10-09 12:34:23 +00:00
Nicolas Martinelli 48a7dbf27f [FIX] stock_account: return dropship
Backport of commit 2e6c1aa5d1

opw-1885628
2018-10-08 09:35:06 +02:00
Odoo Translation Bot fd228ccda4 [I18N] Update translation terms from Transifex 2018-10-07 00:29:41 +02:00
celm1990 d91ae02302 [FIX] base: Ecuador's money is UDS no ECS (change on year 2000) 2018-10-03 19:17:41 +02:00
Christophe Simonis 6cb75dc3d6 [MERGE] forward port branch saas-14 up to 1929448412 2018-10-03 12:15:33 +02:00
Christophe Simonis 1929448412 [MERGE] forward port branch 10.0 up to 695050dd10 2018-10-03 12:14:41 +02:00
Nicolas Martinelli 695050dd10 [FIX] sale_crm: quotes count
- Create a SO from an opportunity, keep the status draft
  => the 'Quote(s)' number is 1 on the opportunity
- Confirm the SO

The 'Quote(s)' number is 0 on the opportunity, but when clicking on the
stat button 1 quote is displayed.

The `search_default_draft` (and the `search_default_sales` of the Orders
stat button) are not working since the action doesn't use the
appropriate search view.

opw-1888442
2018-10-02 12:13:52 +02:00
Goffin Simon 73b4abfcbc [FIX] sale_mrp: Updating delivered qty
Steps to reproduce the bug:

- Create three stockable products: Kit, C1 and C2
- Create a phantom BOM for Kit with C1 and C2 as components
- Set the invoicing policy of the kit based on delivered qty
- Create an SO for the kit and validate it
- On the delivery order, just deliver C1 and create a backorder for C2
- Cancel the backorder and duplicate it
- Deliver the duplicated backorder and validate it

Bug:

The delivered qty on the SO line has not been updated to 1.

opw:1886315
2018-10-02 11:19:55 +02:00