Commit Graph
117156 Commits
Author SHA1 Message Date
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
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
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
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 a5772d4338 [MERGE] forward port branch 9.0 up to 75388edd9c 2018-10-09 16:23:35 +02: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
Goffin Simon e764739d0d [FIX] sale_mrp: price unit of kit
- Create the following products in FIFO costing method and real-time
  valuation:
  Prod Final (F); Invoiced on Delivered Quantity
  Prod Comp1 (C1); Cost = 20
  Prod Comp2 (C2); Cost = 10
- Create the BOM Kit for F:
  2 Unit(s) of C1
  1 Unit(s) of C2
- Create a SO for 3 Unit(s) of F
- Validate SO and picking
- Create the invoice and validate

The price unit taken into account for F in the anglo-saxon accounting
entry is:
20 + 10 = 30
=> entry in Stock Output Account is 3 * 30 = 90

while it should be:
(2 * 20) + (1 * 10) = 50
=> entry in Stock Output Account is 3 * 50 = 150

This should finally fix issues corrected with:
9a7ed7c: price unit multiplied by the qty sold (*)
f1fdb97: price unit taking into account only 1 unit of each
component

(*) In the use case solved, the price unit was:
(6 * 20) + (3 * 10) = 150
=> entry in Stock Output Account is 3 * 150 = 450

opw:1886216
2018-10-01 14:05:58 +02:00
Odoo Translation Bot 4d46569766 [I18N] Update translation terms from Transifex 2018-10-01 02:39:15 +02:00
Odoo Translation Bot 0a94a766e6 [I18N] Update translation terms from Transifex 2018-09-30 00:29:10 +02:00
Christophe Simonis 88fa382664 [MERGE] forward port branch saas-14 up to 503c7a3d65 2018-09-28 19:14:45 +02:00
Christophe Simonis 503c7a3d65 [MERGE] forward port branch 10.0 up to baf3c5712d 2018-09-28 19:10:04 +02:00
Christophe Simonis baf3c5712d [MERGE] forward port branch 9.0 up to 70028701b3 2018-09-28 18:06:03 +02:00
Olivier Colson 70028701b3 [IMP] l10n_lu: make 9.0 fix match the one done by mat in 11.5 2018-09-28 12:16:25 +02:00
Stefan Rijnhart 22cd49bafb [IMP] l10n_jp: reintroduce account 製品 with correct account code 2018-09-28 12:08:47 +02:00
Olivier Colson 7c9a3840f8 [FIX] l10n_jp: remove duplicate account code
Two account had the same account code. Because of that, one of them always failed to be created and logged a psql error. To fix that, we totally remove this account, as it never got created anyway.
2018-09-28 10:38:01 +02:00
Olivier Colson 51b7168d1b [FIX] l10n_lu: rename duplicate tax xml id
The second tax with the same xml id was never created, and caused a psql error to be logged.
2018-09-28 10:30:58 +02:00
Christophe Simonis a0d832efdc [MERGE] forward port branch saas-14 up to 218eec5482 2018-09-26 12:09:18 +02:00
Jeremy Kersten b732ab3dc9 [FIX] base: fix dev mode for get_view_arch_from_file and inherits
Before this commits, dev mode crash in some case (see below) when you declare
a website_page without field name='arch'.
After this commit, we follow the view_id (limit: only into the same file)

Contactus works luckily before this commit, because compute field xml_id on
View return the first ir_model_data (order by name asc by default).

website.contactus
    is BEFORE
website.contactus_page_ir_ui_view

 -- while --

website.bs_debug_page_view
    is AFTER
website.contactus_page_ir_ui_view

closes odoo/odoo#27234
2018-09-26 09:32:11 +00:00
Goffin Simon 736f49baef [FIX] stock_account: float division by zero
Steps to reproduce:

- Create a stockable product P with 2 quantity on hand
- Choose a delivery order in state 'done', unlock it and add a line with P
- Try to set 2 as done quantity and confirm the wizard

Bug:

A ZeroDivisionError(float division by zero) was raised.

opw:1886735

closes odoo/odoo#27547
2018-10-09 07:45:59 +00:00
Lucas Perais (lpe) 798d21ee3f [FIX] website_sale_options: on webshop, display attributes
Before this commit, when the names and values of the attributes on an optional
product were too long (and it did not take that much)
The display was broken into lines

After this commit, the container of the attributes works in standalone and won't break
but, on very small devices, it is not ideal either

OPW 1888416

closes odoo/odoo#27279
2018-09-27 11:42:13 +00:00
Nicolas Lempereur 28d79fc939 [FIX] mrp: pdf preview shown before saved
In the current code, we only show a PDF previewer if a PDF is already
saved. When the PDF is changed we see the preview if it was previously
saved also.

This seems to be the expected behavior, but this changeset changes it so
we could always show a preview.

opw-1888399
closes #27393
2018-10-09 11:27:27 +00:00
Nicolas Martinelli c576800813 [FIX] hr_expense: AccessError on product
- Install hr_expense and stock.
- Add enough products which can be expensed so that a 'Search More...'
  option is proposed.
- Restrict the rights of a user U to 'Employee' only.
- As U, create an expense, and click on the 'Search More...' option when
choosing the product

An AccessError is raised on `stock.move`.

The error is due to fields `qty_available` and `virtual_quantity`.

These fields are not necessary in that context, so we define a specific
tree view for this use case.

opw-1891399

closes odoo/odoo#27561
2018-10-09 08:22:12 +00:00