- Main currency: USD
- Create a PO in EUR
- Create an invoice from the PO
- The invoice is in USD and the exchange rate is applied
- Change the currency to EUR
The conversion is not applied anymore.
The original issue was that changing the date would overwrite any amount
modified in the invoice. Actually, the dependency on the date is not
really necessary. Indeed, this is supposed to help enconding invoices,
but it is likely that:
- If the PO is issued in a currency A, the bill received is in currency
A.
=> no conversion necessary (solved from 11.1).
- If the PO is issued in a currency A and the bill received is in
currency B, the exchange rate used by the vendor is different from
ours.
=> manual corrections are necessary
Therefore, we remove the dependency on the date for the amount
recomputation. However, we still use it in the onchange. This way:
- the amount estimated should be close to the amount requested
- we avoid unexpected recomputation of amounts
Introduced with d8112b0238.
opw-805926
$('web_editor.base').ready() returns a deferred that:
- wait at least for $(document).ready()
- wait at least for require('web.ajax').loadXML()
- at most once starts translations configuration
But there is an issue since there is unexpectedly no reference to the
translations, whilst it should have also been ready when ready was
resolved.
This commit keep the reference so translations can be used after
$('web_editor.base').ready() is resolved as it was before 7dfdfa0103.
note: in 11.0 it should be solved with 29729769 (so fix is for [10,11[)
opw-804148
closes#22522
Sometimes the formatting buttons had no effect or formatted more than
they should (like a whole column when triple clicking on a paragraph
only). This was because of the `listBetween` function implementation.
This is supposed to return all the nodes between one element and another
one... but the logic is wrong without saying from which *point* to start
and which *point* to end. For example, when asking the list between an
element and its parent, the result is very wrong as there is no way to
go from the beginning of an element to the beginning of its parent using
the `walkPoint` function as the `listBetween` function is doing.
Ideally, the function should be entirely fixed but this can be tricky.
For now, the function is just extended to allow to specify points
instead of nodes, and those are used by the `formatBlock` function to
solve the current problem.
... hopefully.
This *must* be forward-ported.
Depending on the browser, the triple-click behavior is different. This
is especially problematic on Chrome, where blank characters at the start
of the neighbor of the clicked element are selected.
A weak attempt to solve that was made by commit https://github.com/odoo/odoo/commit/b85bd358234684974f9af63bc5f28cfabb527767
This commit hopes to solve all the issues once and for all by fully
reimplementing the triple-click for all browsers. The concept is simple:
when a triple-click occurs, select the whole *inner* content of the
deepest DOM *element* that was clicked.
For some unknown reasons, the editor sometimes crashes when dropping a
snippet. As a temporary fix, the non-critical line that causes the
problem is try/catch protected by this commit.
In the case where:
create an invoice with payment terms that contains at least 2 term lines
Validate
create a refund by clicking cancel and reconcile
Before this commit, the refund move lines were wrongly created and reconciled with the invoice's move lines
After this commit, since payment terms are irrelevant on refunds, we set it to false and the problem doesn't raise
OPW 804752
The case: create an invoice of 2000 euros. Payment terms have been configured as:
1) fixed amount 150, 0 days after invoice date.
2) fixed amount 200, 10 days after invoice date.
3) fixed amount 200, 20 days after invoice date.
4) balance, 30 days after invoice date
Before this commit, when issuing a payment of 150 at day 0, that payment got reconciled with the balance line.
After this commit, the payment is reconciled with the right payment term line
OPW 805006
On the payment confirmation page, when the payment is still pending.
Before this commit:
the user friendly message disappeared and a warning icon took its place
After this commit, the warning icon is prepended to the message.
OPW 787799
Step to reproduce:
- Go to 'Blog' > 'Blog Posts' in the 'Website Admin' module
- Select several blog.post on the list view
- Click on 'Archive' in the 'Action' dropdown
This will throw a server error since write() is overriden for blog.post and
do an ensure_one()
This commit closes#22208
- Set the OS to a GMT- timezone (e.g. 'America/Los Angeles')
- Set the format of the date to '%d/%m/%Y'
- Go to 'Account > Adviser > Journal Entries'
- Type '02-01-2018'
The suggested date is 31/01/2018.
Setting the moment object as UTC will lead to a conversion of the date
to the OS timezone when calling `toDate`, e.g.:
Mon Jan 31 2018 16:00:00 GMT-0800 (PST)
UTC should only be used in case of datetime, not date.
opw-803466
In any piece of code, execute the following:
```
self.env['account.config.settings'].create({})
```
It overwrites the values of `fiscalyear_last_day` and
`fiscalyear_last_month` to 31 and 12.
Setting a default value on a related field will automatically write
these values on the related.
opw-805205
In the case where:
1- Do an order on the pos selling a product A (amount = 10)
2- Do another order returning a certain quantity of A (with a quantity < 0)
3- Do a third order selling something else (amount = 5)
Before this commit, the account move lines of the payment move and of the sale move of operation 2 weren't reconciled
This was because the credit to the receivable account of the return was reconciled with the debit of the first operation,
leaving the debit of the payment of the return alone
(i. e. the lines number 1 & 3 & 5 were reconciled together, instead of 1 & 2 & 5, and 3 & 4)
We end up in a situation like this (at validation time)
RECEIVABLE
D | C || OPERATION | Line Number
----------------------------------------------------------------------------
15 | || (1 & 3-Engaging Sale) | 1
| 10 || (1-Payment) | 2
| 10 || (2-Engaging Return) | 3
10 | || (2-Payment Return) | 4
| 5 || (3-Payment) | 5
After this commit, we reconcile the returns for each order before reconciling other transaction chains
The fix is limited in its scope as the automatic reconciliation for the pos transaction is fairly recent
and a "nice to have"
OPW 787298
Depending on the location, on the website different timezone were used
to display tracks:
- in `Agenda` day date (as of saas-14): the current user timezone
- in `Agenda` track times: the event timezone
- in `Talks` subtitle: the event timezone
- in `Talks` tracks: the current user timezone
- in a track page: the first user (admin) timezone
With this change in all those instance the event timezone is used.
There is still a usability hindrance in the backend: the timezone used
when encoding track or event datetime is the browser timezone.
So if the browser is GMT+2 and the event is GMT+6, encoding a 4h00 time
would save it as 2h00 (in UTC) and display it on the website as 8h00.
This would make sense to encode these datetime in user timezone but
currently there is no framework option to do it.
opw-805358
closes#22427
Changing the `deleteContents` method of the editor is tricky. This
commit however dares to add a behavior: if the range does not
represent a selection but only the cursor position and is then asked
to delete its content... it should not do anything as nothing is
selected.
Before this commit, users had only access to messages if they were
recipients. However, you can still be notified for messages your are not
a recipient; leaving you with notifications (needaction) on unreachable
message.
This commit display only 'Invoicing' if cart have only service.
Set website_sale_order variable to get right context of order.
This commit closes 22259
Issue: when the qWeb compress rendered HTML for a better Google PageSpeed
result, some text fields are missing spacebar between fa icons and text,
and between some fields.
The function action_payslip_done has been overwritten in module hr_payroll_account.
Due to this overwrite, the function compute_sheet which creates the payslip lines
was called after the creation of the entries.
Then creating a refund payslip didn't create any entries.
opw:785033
The "Mark all read" button either set all messages as read, or if a
domain is given, filter messages on it.
But this filtering is also dependent on not doing sudo so odd
notification to which we would somehow not have any access would never
disappear in the unread number.
Adding a sudo is risky, so this changeset just modify the test on domain
since in most instance the domain is just an empty list (so: []).
The added test before this change would fail at the last assert ("mark
all read should conclude all needactions even inacessible ones").
opw-805185
closes#22277
In 9.0, an "Human Resources / Employee" see only hr.equipment for which
they are set as the "Employee".
But the code automatically subscribed the "Technician" because the field
name was named technically "user_id" which is automatically subscribed
by the system.
This led to a possible issue with read / unread message because of
feature that just happen by coincidence.
For 9.0 only (in 10.0 the field has been renamed technician_user_id and
access rules have been changed).
opw-805185
closes#22273
In 10.0 since 52f268d0 some parts such as the date/datetime widget are
adapted to the current locale and not just displayed in english.
But the dates in the slides module are always in english because they
don't wait for the locale to be loaded.
To wait for the locale, this commit also adds a reference localeDef on
the website.website module.
note: this fix is only for [10.0,11.0[, another fix must be done in 11.0
opw-804555
closes#22241