In multi-company:
- Create 2 companies A and B
- Set the superuser on company B
- Set the website on company A
When a SO is generated from the eCommerce, it is defined on company B,
while it should be on company A.
opw-695253
With Company A (Warehouse Wa) and Company B (Warehouse Wb)
When making inventory adjustments for Warehouse Wb in company A,
the inventory lines displayed must only be the lines of the company A in
the Wb.
In this way, the user avoids confusion with the adjustments he is creating.
opw:697182
When making an inventory adjustments in multi company, the company field
must be set according to the location_id set. In this case, it avoids creating
by default different inventories for the same warehouse.
opw:697182
This is related to revision dfcc0c40b1
If the invoice line provided the amount currency, but
set to False, the amount_currency must be computed anyway
opw-702045
When selling in a foreign currency,
A double currency rate change, one in each way, was applied when creating the good cost
move line of the invoice, which leaded to some precision loss when the decimal accuracy was
set with a number of digits greater than the currencies digits rounding
e.g.
Product cost price: 52.56422
CAD to USD rate: 0.7383
The product cost price is always in the company currency
while `_anglo_saxon_sale_move_lines` always returned the price
in the currency of the invoice. A first conversion rate was applied
from the company currency to the invoice currency.
52.56422 * 0.7383 = 38.808163625999995, rounded to 38.81
Then, when validating the invoice, and creating the move line,
the price was then converted again, to the company currency,
as the debit/credit of a move line is always in the company currency:
38.81 / 0.7383 = 52.566707300555336, rounded to 52.57
The cost price of the product in the good cost move line was therefore
set to 52.57, insteaf of 52.56, because of this precision loss.
With this revision, we avoid to do the currency rate conversion
two times, in both ways, to avoid the precision loss.
opw-702045
If website_sale_delivery is installed, when we choose same invoice
address as shipping or another one, a new set of country/state are
displayed.
It is done since if we are using the invoicing address as shipping, the
address must be in the allowed shipping countries and states.
This was solved for some instances with 164b8ed01a but failed in other
instances.
With this fix the two state select tags have references to their own
options which allow us to have it alright for the several possibilities.
opw-693127
The product quantity in Orders Analysis must be expressed in the uom
of the product like in the Sales Analysis. In a POS order line, the uom
is always expressed in the uom of the product.
Closes#14599
opw:696927
The where_clause needed a "AND" to work.
The where_clause didn't contain allias for "account_move_line" so when
injecting a condition with "account_move_line" it crashed.
opw:702538
The tree view of the stock locations displayes the field
`complete_name`, which is not translated. This is disturbing since
everywhere else, the `display_name` (translated) is used.
opw-693723
- When opening a mass mailing
- Editing it and making a change (e.g. add a block)
- Click on the breadcrumb
- Click "OK" on the warning popup telling your changes will be discarded
- Choose another mass mailing
A crash occured. This is basically the same case than in the revision
7bf80d22dd
but for Firefox, for which `window` is still there
`!window` returns False
but is `closed`
opw-702211
The company currency is EUR, and GBP rates are:
- 0.8414 at day 1
- 0.8389 at day 2
Then:
- Create a SO in GBP at day 1 and confirm
- Create an expense in GBP at day 2 and choose the analytic account of
the SO
- Validate the expense and post the journal entries
Problem:
- The amount of the expense is 93 GBP
- The amount of the sale order line is 93.28 GBP
opw-696375
The revision
8f48baeda6
broke the ability to search pages in the dialog
allowing to add a menu to the website from the website
(From the website, Content > Edit menu)
as `request.website` was not defined in this case
opw-702020
Currently when someone is added as follow to a document default subtypes
are computed if no specific subtypes are given to the subscription. However
if internal subtypes are set as default those are added to all new
followers. It should take into account customers and shared users and avoid
adding them internal subtypes.
Customers and shared users are not notified of messages using an internal
subtype. So currently there is no information leak. However with this fix
we ensure internal subtypes are not followed by external people even if
no notification is created.
From #14704, backport of 03ac47b9
The amount (=credit - debit) of the first line must be equal to the total included
to reconcile balanced entries.
Before the fix, it just worked with included taxes because the amount of
the first line was already equal to the total included.
But with excluded taxes, it didn't work because in this case the amount was equal
to the total excluded. Then it raised: "Cannot create unbalanced journal entry"
due to the second line which includes all the taxes.
opw:697129
The default value for the optional parameter `date` was evaluated at server
launch while it should have been at method execution.
The bug was not detected as it is always called with a date value in standard
modules.
Noticed at #11413
In the payslip name, the month name was set
within the server locale, rather than the
user language.
Therefore, if you had your server default locale
in English but your user in French, the
month name was displayed in English anyway.
opw-692590
When editing the website, adding a gallery, choosing the grid mode
and then adding images, an extra, empty, image was
added to the grid, in the first position, making it looking weird
or at least not aligned.
This was due to the `start` method of the widget, which
is trying to focus the image in the images browser when
you double click on an image (in the big image building block
for instance) and set an image without url in the case
where `o.url` was undefined, and the url of one of the records
was also undefined.
opw-692205
For example l10n_ch has default included purchase tax on products. This
would impact the valuation of the product and fail the tests.
This commit removes these taxes in the purchase test (they are tested
elsewhere anyway) and also use python to change the company currency
(since the current way didn't seem to work).
opw-691996
It has been done outside of the previous commit
to give the possibility to point the comment
to the according revision, as this is a really tricky
case.
opw-687201
On an invoice, when registering a payment in a foreign currency
for which the payment pays entirely the invoice,
and even more thanks to the change gain(write off),
but for which the foreign currency rate to the company currency is higher than 100,
(higher than the currency decimal precision of 2 digts),
e.g. Invoice in CDF, Payment in USD (1 USD = 948 CDF),
and choosing the option "Mark invoice as fully paid" for the difference handling,
the invoice could not be marked as paid, according to the result
of the currency rate rounding.
This is because the debit or credit of the writeoff was computed
from the payment difference, in the foreign currency,
to the company currency, which lead to two currency rate computation,
one in each way,
company currency to foreign currency,
then foreign currency to company currency,
and some precision was lost in the process.
Instead of computing the debit or credit of the writeoff from
the payment difference, we now compute it from the
payment amount in the company currency minus the
invoice residual amount in the company currency,
to avoid the double currency computation rate,
so the precision is not lost in the process,
and the invoice move is finally fully reconciled
e.g.:
Invoice of 247590.40 FC
Payment of 267 USD (1 USD = 948 FC)
Payment difference: (247590,40 / 948) - 267 = -5.83 (Gain of 5.83 USD)
Before the revision, the credit of the writeoff was computed as:
`((247590,40 FC / 948) - 267 USD) * 948 = 5526,84`
After the revision, the credit of the writeoff is computed:
`247590.40 - (267 * 948) = 5525.6`
Notice in the first formula that the rate computation is performed two
times, once in each way (`/948` then `*948`), while only once
in the second, and this avoid the loss of 1.24 FC in the process.
Without this precise debit/credit of the writeoff, the invoice
could not be marked as fully paid, as the move was not fully
reconciled.
opw-687201
Due to the following revision:
bdf630f9b8
When creating an invoice from a purchase order with an
analytic account set, the analytic account was no longer
copied on the invoice, as the analytic account that was added
thanks to
https://github.com/odoo/odoo/blob/9.0/addons/purchase/invoice.py#L53
was overwritten with `False` as `rec` was False
or if `rec` was True, it was overwritten with the analytic account
of `rec`.
opw-697702
The pos loading crashes in the following scenario.
1. start selling a product (order line the localstorage)
2. archive or delete the product in backend
3. reload the pos session
The POS is interrupted with not much information.
Give an error a bit more meaningful.