When an error occured server side, it was not properly displayed to the user.
A popup with "Your Internet connection is probably down." appeared and behing
it, a second, unstyled error contained the real error message.
Prevent the server error to be displayed.
Switch the order of parameters, the error data is contained in the first
argument (to be able to diplay the real error).
Fixes#25446Closes#25753
- transform odoo.py -> odoo-bin / recent branches + pip3 packages
- deactivate wpa_supplicant when starting dhcpcd automatically
- postgresql create clusters manually
- latest stretch raspbian image / add versatile-db.ptb for kernel-qemu
- ifconfig output change
- upgrade hw_-modules:
hw_escpos: to python3
hw_posbox_homepage: to v11: csrf does not work as it needs a database
hw_posbox_upgrade: to python3 decode utf-8
hw_scale: to python3
hw_proxy: to python3
With the commit, the posbox will also work on the new Raspberry Pi 3b+
It is possible in a dashboard item to open a form view of a record.
The view did not take into account the action used to display the item,
so for example: from a customer invoice clicking on a record would
display the "Vendor Bill" instead of "Customer Invoice" view.
With this fix, when a view is being loaded to be displayed in the
dashboard, we save a reference to a possible form view and if the form
view is displayed, we use this reference.
opw-1865454
closes#25718
When getting:
- product_variant_count,
- sales_count,
of a product.product, we would pollute the records to be prefetched by
all the variants when counting the number of variants.
Thus if this happened before sales_count, we would possibly compute the
sales_count for up to 1000 records when it could have been needed for
just one.
By using `.with_prefetch()`, a recordset will have its own records to be
prefetched list and will not pollute the original one.
opw-1865111
fixes#25649closes#23112 (PR with similar fix)
closes#25741
Before this fix, the attachments are don't save to the record and are
remove with the wizard. We can't add the attachments to mail.message
(like 'mail.compose.message') because it's auto_delete/unlink and the
attachments are removed before the recipient can read it.
Before this fix attachmentThumbnailToLinkImg is not called for
style-inline options. The mail received does not have thumbnail and the
user can't click on the invisible link.
opw-1863659
Before this commit, it was not possible to upload again a file on the
browser from the composer, when it was added then removed from the attachments.
When a file is uploaded on the browser, it writes on a special input
some data to identify this file. In order to detect a new upload,
the code listens on the JQuery event `change` on this input. Since the
value of this input was not cleared after an attachment removal, the
user couldn't reupload the same file, because the value of the input
will be unchanged.
This commit solves this issue by clearing the special input when removing
an attachment, so that adding the same file again will trigger a `change`
on this input.
Steps to reproduce the bug:
- A product is configured as a service + invoicing policy as "Timesheet on task" + Create a task in an existing project.
- Create a SO with this product and confirm it.
- Go to the task, and create a timesheet on it, the delivered quantity on the SO is correctly updated.
- Now, go to the Timesheets app and remove the task from the analytic line.
Bug:
The Delivered quantity on the Sale Order was not updated.
PS: The case where so_line is in the values is already taken into account by the overwrite of
function write in addons/sale/models/analytic.py
But as task implies so line (as explained in addons/sale_timesheet/models/account.py in function _timesheet_preprocess),
the delivered qty of a so line must be recomputed when its task is modified.
opw:1864313
If a user A deletes the res.users record of user B while B is connected,
the verification of the session token fails with a comparison of a boolean and
bytes values.
While the check should obviously fail, this patch gracefully inform the user B
its session has expired and redirect him to the login page.
Without the patch, the session is never invalidated in the user browser,
redirecting to a forbidden error page as long as the session has not been manually
cleared from the browser.
Fixes#25530Closes#25654Closes#25682
Have some delivery method that do not apply to the country of the customer
Before this commit, the customer could access the Pay now button and confirm the sale
In v10.0 this was impossible as the retrieval of errors in python wiped out the variables that would
make the xml element of the payment not to render
In v11.0 this has changed in a more modular manner
After this commit, we hide the element in html.
OPW 1864744
Two use cases are dealt with:
Should hide payment AND display errors when order contains deliverable product
Should show payment AND not display errors when order contains only services (event tickets)
Linked v10.0 PR #25692closes#25679
The Work+Sans font of google fonts was hotlinked and available in
reports since saas-14's 3d04e448.
There does not seem to be a reason to do it and:
- hotlinking may add resources usage / processing time,
- server need outside internet access or the font doesn't load,
- it has been reported to cause the header/footer of some pages to
disappear, probably because of a problem with loading the content in
a given delay to render it.
- it was always loaded for report, even if used only once among all the
reports of Odoo
For these reasons, this commit removes the hotlinking of this font.
The ISR report of l10n_ch that used this font will thus fall back on
'Verdana', 'Geneva' then the default sans-serif font which doesn't
seem to be a drawback over 'Work Sans' font.
If at one time we should reintroduce it, it should be contained in the
given report and possibly have the font locally and not externally.
opw-1861368
closes#25683
Before this commit, the widgets of website_gengo were not adapted to the new translate and web editor
After this commit, they are adapted
Although, gengo_sandbox of res.config would need to be redefined as related to company_id.gengo_sandbox. It has been done in saas-11.2
OPW 1862013
closes#25647
Before, the name given to the copy method was always 'the old name (copy)'
(even bypassing what might have been given to the default values dict).
opw 1862214
If the parameter ids is given to the process_mail_queue method, it is supposed
to only process the ids it was given, not all mails.
Commit https://github.com/odoo/odoo/commit/4b122ad41d873febe288ab1f8c6cdc078ca2a479
replaced ids by self.ids, and thus default filter was always applied.
fix suggested by @suganthikarunanithi, Sodexis team
opw 1860484
Before, the name given to the copy method was always 'the old name (copy)'
(even bypassing what might have been given to the default values dict).
opw 1862214
In a one2many, if the user clicked the trash button while editing another line,
the row was not unselected.
Thus the modal was not triggered, which entailed that the currently edited line
was always saved.
In particular, it allowed to give empty values to required fields.
opw 1834346
- Create 2 Companies A & B
- Set User B in Company B
- Record some `mail.activity` for User B on a lead belonging to Company
B.
- With a manager user in Company A, go to Kanban view of leads and
remove filters => all leads, including leads in Company B, are
displayed
An access error occurs.
`read_progress_bar` method, tries to access the field `activity_state`
which is: `states = record.activity_ids.mapped('state')`. The state of
a `mail.activity` is using the tz of the partner. To read the
`activity_state` of a lead, one needs to access
`record.activity_ids.user_id.partner_id.tz`
=> multi-company security rules raised
opw: 1850984, 1859470
Suppose there is a one2many field embedded in a one2many,
(say we are viewing record A with one2many field B itself with a one2many C).
Furthermore, there is a second page of the one2many field B.
If an onchange is applied on B, then the server replies with a 1 command for all
B records attached to the currently viewed object A.
This includes a list of commands [[5], [4, C_id]*] for each B record,
in particular B records that are on the second page.
Since they are on the second page, they might not have been fetched by the
frontend; in that case the corresponding C_ids are thus unknown.
As a consequence, on save the frontend sends a command 0 to create the records
for all unknown C_ids.
Since it doesn't have any value to give to the 0 command, the row creation
usually crash in the backend.
Another wrong behaviour is fixed at the same time: if the server sends an update
on the list of C ids with 4 commands.
In that case, if the record has not been prefetched, we have no way to know
if the list changed or not.
To solve this, when we receive the 4 commands by the server, we send back 4
commands.
coauthored by @aab-odoo
opw 1835936
Before this commit, there was a traceback in the following scenario:
Let's have a kanban view with groupby and a domain.
If we clear the domain then clear the groupby, there could be a crash.
This crash occurs because when we clear the groupby, it performs a `reload`,
and assumes that the datapoint contains grouped data. However, if this
computation takes some time, it is possible to overwrite the datapoint so that
there is no longer grouped data.
This commit fixes the issue by enforcing at most 1 execution of the method
`reload` active at any time. Consequently, successive reloads operations are
now much slower.
Note that it uses the single non-reentrant mutex on the basic_model to enforce
this rule, which means:
- No more concurrent `reload` and `save`.
- If an execution having the mutex in `reload` come accross the same mutex,
it is blocked forever. This is hopefully not the case at the moment,
however a reentrant mutex should be considered in the future.
The barcodes modules had documentation only available on apps.odoo.com,
following a recent change, odoo modules are not displayed on
apps.odoo.com anymore.
Thus this commit merges the documentation onto the module description so
it is available on the module page.
opw-1846035
closes#25621
Clicking outside the new content options should close the overlay.
Every options are triggering a JS event (mostly opening a modal) that works
fine.
But the 'New Job offer' options is simply a href link which is not going
through anymore since there was a call to `preventDefault`.
opw-1860196
The purpose of this commit is to hide the Create menu when the user click on
any area other than the link icons.
Note: It was already the case in V10.0 since the options were inside a modal.
Natively bootstrap would close the modal when clicking outside of it.
We lost that behavior while refactoring in V11.0 with 297297696 that
replaced the modal by a pseudo-dropdown
opw-1860196
Closes#25389
Have a view with a field as:
<field name="stuck_in_the_middle" attrs="{'readonly': [('with_you', '=', False)]}"/>
Before this commit, the contents of attrs were parsed and merged into the modifiers
and the attrs attribute of the node was deleted
which might cause divergence between reality and tests
After this commit, the mock server does what the server does in this case
closes#25583
Problem: create a bank statement with a line that has a positive amount
and a line that has a negative amount. Both line does not have a partner
Then click on reconcile to open the reconciliation widget, notice the
message stating that we have to select a partner or choose a counterpart.
Select a partner on both line, behavior is different for the line with
credit > 0, the message still says "select partner or choose counterpart"
This commit fixes this problem.
Steps to reproduce the bug:
- Create an invoice with positive lines and negative lines and with a total equal to zero
Bug:
In some cases total amount is equal to -0.0 and it raised:
"You cannot validate an invoice with a negative total amount"
The field amount_total is a monetary field, so it's computed in the precision
of the currency of the invoice.
opw:1862439
Steps to reproduce the bug:
- Go on a SO and click on "Send by email"
- Remove the attachment and click on "Add an attachment"
- Choose an attachment A and remove it by clicking on the cross
- Click on "Add an attachment" and choose the attachment A
Bug:
The attachment didn't appear in the modal.
opw:1862482
There is no reason to prevent creating a menu linked to a top menu
It does work to have only one parent level as a menu
Error reported during technical training
In stock.move.lots.form view, the field product_uom must be readonly like
the field product_uom_qty.
Fine tuning of this commit: 2ab3fa86fe
opw:1861321
In stock.move.lots.form view, the field product_uom must be readonly like
the field product_uom_qty.
When creating a raw material, it was not possible to add a stock move line
with a finished product for a product which is not tracked.
The consumed field must be readonly in mrp_production_form_view view to avoid
to send to the server wrong value manually set.
opw:1861321