When a user validates an invoice linked to a SO, he might want to modify
it afterwards thanks to the 'Modify' option in the refund wizard. This
will create a refund, reconcile and create a draft invoice.
The issue is that the draft invoice is not linked with the SO.
The fix is to link, in this specific case only, the draft invoice to the
SO. At the same time, we have to make sure to:
- unlink the first invoice (to prevent counting the quantity as invoiced
in the SO)
- keep track of the first invoice/refund in the invoice list of the SO
opw-673446
Use 'display: none' instead of 'visible: hidden' for the config button in
columns' header so that the columns' title can take full width if that button
is hidden.
Bonus: if the config dropdown is open, the button remains visible.
When a PO is created from a reordering rule, we should make sure to use
the purchase UoM of the product. Any PO line automatically created or
modified will be a PO line in the purchase UoM.
opw-673309
For the partner ledger report, since LEFT JOIN are used in the request
we could get NULL values which broke the following code.
note: issue reported on 7c6c188
Commit 3b19fa426b fixed a bug where the column title of kanban group
was overflowing its area when too long. However, when the column is
folded, the title is now really small (width of the folded column)
and then stopped to add the "..." ellipsis.
The solution is to let the text overflow when the column is folded.
As noted in the csv module documentation*, up to python 2.7 it is best
to used UTF-8 as input (and worst to use UTF-16 csv).
closes#11792
opw-674756
* https://docs.python.org/2/library/csv.html
This fixes the case where the lines of a one2many field are modified several
times by onchange methods: instead of retrieving the most recent updates, we
merge them with former updates.
This solution was written as an improvement of a proposal made by Alexis
Delattre and Sébastien Beau as #11620.
When writting a value on a translatable field in a different language than
English, the submitted *raw* value was saved in the database.
This could cause the following issues:
- empty value (provided as `False` by the web client) saved as the string
'false' in the translations table
- no encoding or sanitization convertion
- ignore size parameter on the translatable field
Process the submitted translation through symbol_set method to clean it before
storing it blindly in the database.
This allows to convert `False` into `''` for empty value and fixes#10862
Before showing a chat notification, a check is performed to ensure that the browser does support
notifications. On browsers that do not support Notification (IE, android native,...), the check was wrong and
would eventually cause a traceback. This will no longer happen.
* It is always better to restrict the read to the fields that are actually needed
* In this particular case, since _get_task is called during the create() of an an analytic line with task_id set,
it would result in reading the analytic line being created, which will overwrite the cache for stored computed fields with wrong empty values.
Restricting the fields to read means that computed fields are not read and keep their appropriate values
'Write-Off' is not an appropriate label when the payment is reconciled.
A write off (aka. bad debt) is when I emitted an invoice, delivered a
service, and never got paid for it entirely.
opw-672716
This revision corrects a regression introduced by
8395f0d217:
the possibility to call
`ir.qweb.field.datetime`.`value_to_html` with
a datetime string directly, instead of calling
`ir.qweb.field.datetime`.`record_to_html`
(which call `value_to_html` as well).
opw-675427
The dates of an event on the website was always
within the user timezone. If not signed in,
it was within the public user timezone
(which is quite not user-friendly to change)
For this purpose, we weed get the context
from the record (the context used when using
`record.with_context`), and therefore
the QWeb field
`ir.qweb.field.datetime` is slightly altered,
to use the context from the record.
opw-675427
- The "From" should not be the administrator user but
the postmaster/system, and should be an address that
ignores double-bounces. Using the default bounce
email accomplishes both.
- The "To" recipient should be the "envelope from"
sender when available, usually as provided by
the "Return-Path" header set by the upstream MTA.
If not present, fall back to the "From" of
the original email.
- adapt tests to verify the behavior wrt Return-Path
When the stage name is too long, the column header is messed up: the
'Settings' and the 'Quick Add' icons are located outside of the column.
The fix is to truncate stage names when they are too long.
opw-672710
When clicking on the "Refunds" link of a
Sale / Purchase invoices journal,
creating a new invoice did not create
a new refund invoice, but a normal invoice.
opw-675408
The stock history doesn't take into account internal moves. For example,
in the following situation:
- Receive 1000 products to Internal Warehouse 1
- Move these 1000 products to Internal Warehouse 2
The 1000 products are still recorded on the Internal Warehouse 1.
opw-672277
The above revision allow to edit an event with a start date
greater than the stop date.
This issue was solved by the revision
6c78541978
that the above revision reverts.
The reason why the constraint on
`event.start` and `event.stop` was replaced
by a constraint on
`event.start_datetime` and `event.stop_datetime`
and
`event.start_date` and `event.stop_date` are explained
in 6c78541978:
Basically, `start` and `stop` are computed fields,
that are not recomputed in time, before the constraint is checked.
Besides, the revision b7e393a71a
re-set the constraint on `start` and `stop`, but forget
to replace the fields in the constraint definition:
```
(_check_closing_date, 'Error ! End date cannot be set before start date.',
['start_datetime', 'stop_datetime', 'start_date', 'stop_date'])
```
opw-673297
When creating an customer invoice with a product linked to a deferred revenue
category, the account used in the invoice line must be the account_asset_id.
When creating an vendor bill with a product linked to an asset
category, the account used in the invoice line must be the account_depreciation_id.
opw:22157
Previous forward-port (17b6191a02) includes
new tests (added by eb26694e0f) which are
now broken because quants with a cost of zero are forbidden.
Force a standard_price on created product to avoid this situation.
Adapt quants cost values.
Also change references of accounts and journals on records.
The read_slice method in dataset is problematic, because it alters the
dataset ids. So, if 2 consecutive read_slice are started, but the first
one ends after the second one, we don't have the correct ids in the
dataset.
This commit just make sure that previous read_slice do not alter the ids
of the next read_slice.