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
closesodoo/odoo#27184
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
closesodoo/odoo#26935
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
closesodoo/odoo#27592
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
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
closesodoo/odoo#27294
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
closesodoo/odoo#27658
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#23438closesodoo/odoo#27657
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
closesodoo/odoo#27656
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
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
closesodoo/odoo#27622
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#26292closesodoo/odoo#27444
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
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
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#24088closesodoo/odoo#27517
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
closesodoo/odoo#27541
- 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
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
- 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
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.
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
closesodoo/odoo#27234
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
closesodoo/odoo#27547
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
closesodoo/odoo#27279
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
- 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
closesodoo/odoo#27561