Commit Graph
118853 Commits
Author SHA1 Message Date
Christophe Simonis d23ddbd6ee [FIX] account: add missing field to view
This field is required since 1a99d22f19
2018-10-16 18:47:20 +02:00
Christophe Simonis 41bf8ce6d9 [MERGE] forward port branch 11.0 up to b29b545fe8 2018-10-16 17:53:26 +02:00
qsm-odoo a9f11fb477 [FIX] web_editor: properly remove all bg when choosing a bg color
The code which removed the background image of a snippet when choosing a
background color worked kinda by chance. Indeed, on the final click on
the color option, the snippet background-image was reset... to the
current background-image, which is none thanks to the color preview.
Unfortunately, in some themes, the gradient color option interferes:
the current background-image at a color choice is equal to the current
gradient, and thus, that gradient is being moved as an inline style.

The bug was introduced with https://github.com/odoo/odoo/commit/285d95e946e5a15139c961e30dbe3598e0d99f6a
(as, before, the background reset was done by simulating a click on the
'background: none' option item, which was removed).

Closes https://github.com/odoo/odoo/pull/27808
2018-10-16 13:32:23 +02:00
Nicolas Martinelli b29b545fe8 [FIX] sale_timesheet: project overview
Complement of commit fc1ba68c6a

opw-1893397

closes odoo/odoo#27835
2018-10-16 08:31:56 +00:00
Lucas Perais (lpe) 6e28e4f26c [FIX] account: display partner.bank on journals
Before this commit, when accessing journals through the menu item
Bank Account, one was able to enter an partner.bank account number
But, in case the partner.bank already exsited, there was no way to select it
and a cryptic unicity constraint was raised

After this commit, one can select an account already existing

OPW 1884515

closes odoo/odoo#27840
2018-10-16 10:24:16 +00:00
Goffin Simon 84e3ae140e [FIX] purchase_requisition: System pick wrong operation type in Purchase Agreement
When creating a "purchase.requisition" record, the default Operation Type was
always the one defined in the company 1 even if the user was not in the company 1.

opw:1890190

closes odoo/odoo#27830
2018-10-16 07:55:56 +00:00
Goffin Simon 7bee068a0f [FIX] sale: Sale channels duplicate field
Steps to reproduce the bug:

- In CRM, create an new Sales Channel
- Go to Reporting/Sales Channels
- Click in the new channel on "Click to define a target"

Bug:

Two input fields called "Set an invoicing target" appeared in the new channel

opw:1889406

closes odoo/odoo#27781
2018-10-16 07:41:50 +00:00
Florent de Labarre 57d9f9ee32 [FIX] qty_invoiced is wrong if uom_id in invoice line is updated
closes odoo/odoo#27837
2018-10-16 08:34:56 +00:00
Lucas Perais (lpe) a7732bb839 [FIX] board: translate custom views according to current user
forward port of 62cbc5f

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 #27799
2018-10-16 08:12:48 +02:00
William Henrotin f652c8d1da [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
Joren Van Onder 6c42ca8a7b [FIX] point_of_sale: make card readers work again on payment screen
Swiping a credit card through pos_mercury no longer worked on the
payment screen.

3a74afd21e introduced some special code
in BarcodeEvents for mobile Chrome. This code relies on an invisible
input being filled in by barcode device. On the payment screen the POS
uses a keypress event handler on body to manage input. This handler
preventsDefault which stops the input from being filled in.

It's worth noting that this new approach in
3a74afd21e is not fully equivalent to
the original barcode events handler. Events are not redispatched, so
this effectively disables keyboard input on the payment screen (or
anywhere where it is used).

opw-1888466

closes odoo/odoo#27820
2018-10-15 21:05:17 +00:00
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
Nicolas Martinelli 121fb6f1e7 [FIX] stock: incorrect translation
The translation was not ported in saas-11.3 by Transifex.

opw-1889820
opw-1893527
2018-10-15 15:20:37 +02:00
Arnold Moyaux dd501bbe37 [FIX] stock: replenish infinite loop with production
Usecase to reproduce:
- Create a BoM for a product with route Manufacture
- Use replenish wizard in order to fill your stock

It traceback due to an infinite loop.
It happens because when the production order creates the raw
moves, it does not set a product template. However a default_product
template is in the context and is used as default value. So it creates
a raw move with the component as product.product and the production product
as template. Since they are related it will modify the product_tmpl_id
of the product.product. It result by having a component with the
finished product as template and it will use the same stock rules and
bom again and again.

This commit clean the context before running procurement rules.

opw-1890661
2018-10-15 15:05:56 +02: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
Arnold Moyaux 17b6256955 [FIX] mrp: bom structure in batch
Usecase to reproduce:
- Create a BoM that create more than 1 finished product
- Use a routing
- Open the BoM structure report

The operations time from the routing are multiplied by the quantity show
on the report.

It should not happen since routing's operations are not by unit.
If a user create a BoM that produce 50 finished products then the
operation time is always the same when the user produce between 1-50
units. It then double from 51-100,... (workorder use the same process
for the expected duration).

This commit fix this behavior by using a rounding up on the
quantity asked on the report / BoM product quantity.
It also take care of the workcenter capacity.

opw-1890005
2018-10-15 13:04:49 +02: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
Christophe Simonis 1ade6675c3 [MERGE] forward port branch 11.0 up to 717f458394 2018-10-11 16:29:46 +02:00
Christophe Simonis 717f458394 [MERGE] forward port branch saas-15 up to 93c22558f3 2018-10-11 14:48:49 +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
Christophe Simonis 32b19115e9 [FIX] web,mrp: move test to adequate module 2018-10-10 18:50:37 +02:00
Christophe Simonis c8633bcc16 [FIX] board: correct test definition
Oversight of previous forward-port.
2018-10-10 18:05:22 +02:00
Julien (juc) Castiaux e6580e59a3 [I18N] calendar: correct bad email template translation
Complement 4558ca95cd

opw-1891825
2018-10-10 17:36:36 +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
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
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
Christophe Simonis 7415f40fbd [MERGE] forward port branch 11.0 up to a69f117bbf 2018-10-10 14:40:01 +02:00
Sébastien Theys 80d363cd31 [FIX] tools: expand user and vars for data_dir 2018-10-10 14:03:59 +02: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
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 61df7749cc [FIX] test_mail: bump expected query count
e88c5c1ece uses `sudo()` to get user name,
which lead to more queries due to cache miss.
2018-10-09 19:04:59 +02:00
Christophe Simonis a5772d4338 [MERGE] forward port branch 9.0 up to 75388edd9c 2018-10-09 16:23:35 +02:00
Lucas Perais (lpe) cba5f7a98f [FIX] web: fetch dependency fields in x2many
Image field widget need the __last_update field alongside them
for caching purposes, though that field should never be present explicitly
in the views

Before this commit, the dependencies of field widgets were not merged into
the model's fields definition, creating a traceback when adding an image field widget
into a x2many list

After this commit, there is no traceback and the image field works properly

closes #27545
2018-10-09 14:16:56 +02:00
Christophe Simonis f6ea6ce951 [MERGE] forward port branch 11.0 up to c576800813 2018-10-09 13:55:53 +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