An issue occurs in the following situation. Several cash journal are
configured for a given PoS, and a user performs a refund (the
transaction contains only a refund). In this case, the wrong journal
might be selected. This is because a payment line of zero is not sent to
the backend, and therefore an arbitrary journal is selected.
opw-676229
Before this commit, in some cases, clicking on 'save' button, then on
other buttons (like 'validate' in invoices) had the unfortunate effect
of applying twice the changes in some cases.
More specifically the problem appears when:
1. an onchange is triggered (for example, taxes in invoices)
2. the user clicks on 'save', buttons are disabled
3. the 'save' actions is completed, the buttons are enabled, but
the on_button_save still does some work: triggering event, and
reloading the view
4. the user clicks on 'validate'
5. the onchange completes, this triggers some more work
Our only protection against such interactions is right now the fact that
buttons are disabled/enabled. In my opinion, there should be a way
to guarantee that actions are properly serialized (that is actually what
a mutex is for... just saying). But the code of the form view/list view is
too coupled, and such changes are quite dangerous. A real refactoring
of those is needed at some point in the future.
Before this revision, the installation instructions where
Community-centric, which led some customers to believe
that they had to install first Community then Enterprise.
This commit makes the instruction compatible for both editions.
purchase.order have been rewritten with cb01be2
It was not taken into account for intrastat who still used the now not
existing "location_id" on purchase order.
This commit use instead the method _get_destination_location which
should be equivalent.
opw-677497
The lang of the content of the "Share" widget was the one used when
inserting it in the view. Thus if someone see a page with it in another
language the title and url for sharing is not translated.
This commit use the current page language to set the widget data.
opw-676062
When dropping a record, it is updated and rerendered. The problem with
this behaviour is that if the record is redrag immediately after drop,
jquery-ui throws an error as the widget the user is trying to re-move
is being rerendered.
The solution provided by this commit is to block the draggable feature
while the record is being rerendered.
Commit 3ced0ff61 removed the support of Microsoft documents for
indexation. It makes sense for the old formats such as '.doc' since it
requires an external tool ('antiword'), which could lead to a security
issue. However, the new formats such '.docx' are simple xml files,
therefore they could be indexed with the usual XML parsing tools.
opw-677235
This reverts commit b0f02e31b2.
As pointed out by @nim-odoo [1], a similar patch has already been
uncommited few month ago [2].
Ref #11988
opw-676422
[1] https://git.io/vrYxY
[2] see a6badd2559
There are not cat... but you cannot know all the existing website in the world...
So, have faith in the user !
To do: allow to customize size or get it from iframe provided
The class modal-open on body tag allow to scroll on the modal content
which is useful if the content is taller than the window viewport.
When closing the modal, this class is removed but there may be another
modal open on which we will not be able to scroll to view
buttons/content if too big.
This commit check if a modal is still opened after closing an editor
modal and in the affirmative add back the modal-open class.
opw-674475
note : was already present in 8.0 with ec47493, it is also present for
web.Dialog (but the modal of the editor do not inherit from web.Dialog)
Steps to reproduce:
-go to runbot 8.0 and connect
-go into human ressources/job positions
-pass into list view and click on the first item
-click on the url to open this record into the website (website_published)
-go back (back into the browser)
-you're now into the form view again and then next step is to click on the button
"next" to access the following record
-click on the url of website_published
Before the fix:
wrong record, this is the previous one that is into the href
After the fix:
correct record with the correct id into the href
Closes#11800
opw:675832
In the report "Invoice Analysis", the view under the report is grouping
lines by invoice and also by product on this invoice.
Thus, quantities in the pivot view are not the real quantity of invoice
lines, but of invoice lines with different products.
eg:
invoice a:
- line 1: product X
- line 2: product Y
- line 3: product X
in the report there would appear to only be 2 invoice line, whilst there
is in realy three (this information is accessible via "# of Lines").
closes#11954
opw-676651
Used case:
-Configure admin as multi-company user
-Create 2 fiscal positions (one for company "Odoo BE" and one for company "Odoo US")
-Set admin on company "Odoo BE"
-On supplier (Asustek) configure fiscal position Odoo BE
-Set admin on company "Odoo US"
-On supplier (Asustek) configure fiscal position Odoo US
-Configure a product (Laptop E5023) with:
*route "Buy"
*supplier (Asustek) without company
*reordering rules (min qty: 20, max qty: 40)
-Set admin on company "Odoo BE"
-Run scheduler via the cron
Behavior before the fix:
-Fiscal position on the created PO is the fiscal position for "Odoo BE" (and PO is for the company "Odoo US")
Behavior after the fix:
-Fiscal position on the create PO is the fiscal position for "Odoo US".
Closes#11537
opw:673288
When recomputing stored function fields, the `write` may trigger a
cache invalidation which lead to a recompute of all the recordset
values, even the ones already saved in database.
- Only invalidate cache for fields and records we modify
- Rewrite query to be more efficient
- Avoid o2m commands to be more efficient; write directly on reverse m2o
With new api, this call is not wanted anymore. The cache is cleared
automatically, no need to clear the whole cache; that's a little bit
overkill and reduce performances.
Avoid that an invoice for 'SO042' matches with the invoices of 'SO04'.
The use of the like is required as it may contains more than one reference to an
invoice.
opw-676921
9f541d29bf made it so that date_order on
pos.order records is set using the creation_date of the clientside Order
record to avoid weird date_order values when syncing to the server is
not done immediately.
The downside of this approach is that creation_date is set during Order
creation on the client. A user that has an open POS will also have an
open order. So if it takes one hour before the first order can be made
then the date_order will reflect this.
To avoid this we will instead use a validation date, which will be set
when the user clicks on the green 'Validate' button.
Because this is a stable release we won't change the name of the key in
the JSON data that gets sent to the server. This means that from the
server point of view nothing changes.
Fixes#11933
"Depreciation Account" must be renamed in "Depreciation Expense Account"
Reason: This is the account that will be shown in the Profit and Loss, the original
label "Depreciation Account" is confusing because it could mean a depreciation asset
account.
"Asset Account" must be renamed in "Depreciation Asset Account"
Reason: This makes it clear that this is an asset account that will receive
depreciation entries, without this wording it could mean that we are simply
informing the Asset module which account is the asset account, but that depreciation
entries go elsewhere.
opw:672852