Forward-port of saas-6 77dae4c9c5.
Chrome 50 treats percent-height divs inside of auto-height cells as
auto [1]. So from now on it's important that an explicit 'height: 100%' CSS
property is set on parent tds, otherwise you'll end up with elements
with a height of 0.
An extra difficulty is that this new height property on
subwindow-container will result in the element being as high as his
parent table. So the collapsed trick doesn't work anymore in the
customer list.
This has to be done conditionally. The proposed workaround of adding
100% height to parents of affected elements causes issues in IE/Edge
because the effect of adding a height in percent to a table-{cell,row}
element is not defined by CSS [2].
[1] https://chromium.googlesource.com/chromium/src/+/8876584335b48c99cf8df552ef4d8efebb131041
[2] http://stackoverflow.com/a/27384730
Provide the possibility for the taxes
label on invoices to be translated.
In other words,
to give the possibility for the taxes labels
in the invoice report to be translated in the invoice
lines
(e.g. 21% VAT in English, 21% BTW in Dutch,
in the invoice lines)
opw-675038
The tax description in the taxes lines
(e.g. in invoices) is supposed
to be translated in the customer/supplier language,
as this is what is displayed in the printed reports
sent to the customer.
This is the behavior in place in Odoo 7.0 & 8.0.
(e.g. in invoices)
opw-675038
The "Due Date" is invisible in the tree view because in most cases, the
`journal_type` is not in the context. Since it was shown all the time in
v8, we show as well.
opw-674815
When an invoice is cancelled, the attachments (including the printed
invoice) are not deleted. If the users resets the invoice to draft,
modify it, then print it again, the previously generated document will
be used instead.
opw-674678
The `account.voucher` field `date` was twice in the view
`view_purchase_receipt_form`
Besides the fact the field was twice in the view,
this prevented to set a date in the past
for the resulting journal entries,
as the second field `date` input of the view
contained the date of today, while
only the first one was visible and editable
by the user, and it was the second field
value which was took into account when
passing the form values to the server,
most-likely because this second field was set
further in the view.
opw-674712
The method `create_exchange_rate_entry` is called
either if one of the two parameter
`amount_diff` or `diff_in_currency` is not equal to 0.0
(or, near to zero, `float_is_zero`):
```
if currency and aml_to_balance \
and (float_is_zero(total_amount_currency, precision_rounding=currency.rounding) \
or float_compare(total_debit, total_credit, precision_rounding=currency.rounding) == 0):
```
Nevertheless, the method is called with the amounts not rounded,
and, therefore, one could be considered to 0.0 (if
closed to 0.0) but not be exactly equal to 0.00,
and it should therefore be rounded before the entries
creation.
opw-673854
In non grouped mode, a recent fix (fixing race condition in do_search)
introduced a new bug, the dataset size is not correctly set.
This is a quick and dirty fix, I believe that changing the dataset
internals like this commit (and other) do is really not correct.
However, the correct fix (working on the dataset API) is more dangerous
in a stable release.
Rounding the unit price at that moment is a bad idea. Here is the use
case:
- Set the product 'Costing Method' to 'Real Price'
- Set the product 'Inventory Valuation' to 'Perpetual'
- Receive through a PO 9 products for a unit price of 115.80
- Receive through a PO 35 products for a unit price of 116.80
- Sell these 44 products thanks to a SO, generate and validate the
invoice
On the Stock Output Account, the following entries will be generated:
- First PO --> 1042.20 = 9 * 115.80
- Second PO --> 4088.00 = 35 * 116.80
- Invoice --> 5130.22 = 44 * 116.596
116.596 is the average price of the two POs, but rounded. The issue is
that there are 2 cents of difference... Nice ;-)
The fix is to avoid the rounding of the unit price, since we don't even
store it on the account move line anyway.
opw-673976
Following commit 8276fb585, the data exported should match the data
displayed on the list view. Therefore, we need to make sure that the
context used match the context of the list view.
When a filter is applied in the list view, the context is evaluated
thanks to pyeval (see the call to `/web/dataset/search_read`). The fix
is to evaluate the context in a similar way.
opw-674473
- Fix for status widget (b25c054c93) moved
to appropriate file: addons/web/static/src/js/views/form_widgets.js
even though the problem is less severe in 9.0 (no crash but triggers
form save, which is unnecessary)
- Fix for website_event_sale ignored (880e951f34)
because the problem does not exist anymore in 9.0, probably due to
refactoring 66871ee65b
When deleting the analytic account of an account move line(aml),
the analytic lines linked to this aml must be unlinked even if
the aml is not linked to another account analytic.
Used case:
Once a analytic account is removed from a journal line, the analytic line
created for this journal line has to be removed from this analytic account.
Inspired from 8.0
opw:673803
When the warning on form view is closed by cancel or OK button, all is
well. But if the modal is closed by any other way the def will stay pending
blocking next operations.
This commit set the deferred as dejected if not resolved when the modale
is closed.
closes#11688
opw-671371
When processing a payment transaction, double-check the
match between the amount of the transaction and the
amount of the SO, to be sure that we won't be validating
a SO that has been modified since the payment.
Such cases have to be double-checked manually.
Also add a bit of extra logging to make auditing ecommerce
transactions easier.
In addition to being mostly useless because Paypal's API
changes are supposed to be backwards-compatible, this
warning was using inconsistent version numbers.
Switched to a simple INFO line with IPN version.
/!\ This commit must not be forward-ported on saas-10 (the file that
is modified here does not exist anymore anyway).
Since the website/web_editor split, the mt/mb definitions were not
included in reports anymore. Those were not the only rules that
were forgotten.
As it would be tricky to add the whole files where those rules are
defined now in the assets of stables branches, this commit only
restores the missing css rules by adding them in the report.css file.
Note: after the assets refactoring that has been done in saas-10, this
problem will no longer appear.
The introduction of the new pos.config dashboard at
48ab50ed0d does not filter non-active
pos.configs. There are no constraints against opening sessions on
inactive or deprecated pos.configs so after deprecating/inactivating
users could still open new sessions through the dashboard.
opw-673020
When a lead is set to 'Won', the date_closed is defined. However, the
user might have clicked by mistake, and he might want to change the
state back. We need to take this into account, otherwise the lead is
considered as closed although it is not.
opw-674226
The POS generates journal entries for both the amount of money the
customer pays and the amount of money the POS user returns to the
customer (the 'change'). Whether or not this is the correct thing to do
is up for debate, but we can't change that in stable anyway.
One of the main issues is that in 9.0 accounting will propose
unreconciled payments belonging to the customer on open, unpaid
invoices. This does not work well with the account entries generated by
the POS. Accounting will propose the amount the customer paid, without
taking into account the change.
Example: a customer buys $7 worth of products and pays with a $10
bill. The customer gets $3 change. The invoice will propose the $10
payment.
When you add that payment to the invoice a residual amount ($3 in the
example) will remain on the paymentline, complicating everything even
more.
Although we cannot change how the POS does accounting in a stable
release, we at least want people to be able to easily handle invoices
generated through the POS. To achieve that this patch will make the
backend match the payment to the total amount of the invoice removing
any potential change.
opw-671486
From 94ed4ce8c8
The original issue is the following:
- Go to the journal item creation
- Choose a partner
- Add a line => the partner on the journal item is removed
This is because `partner_id` on the account move is a related to
`partner_id` on the account move lines. This is likely to cause errors
during the manual encoding of a journal item, since the relation will
link the partner of the account move to the partner of the first account
move line only.
opw:672354
For some reason this made it into a stable release. Although you can set
a background image on a floor this image never actually got displayed on
the floor in the POS. Only the background_color field is respected.
Something like this is always a bit tricky, because you would either
have to scale the image to fit on the floor (ugly if the user uploads a
low-res image or an image with the wrong aspect ratio), or you would
have to tile the image (also ugly in most cases).
Because of the above and because this has never worked and because I
don't consider it a particularly useful feature we will remove it
completely in master.
opw-674031