The settings view is supposed to open a new record on the model
res.config.settings, perform the default_get and onchange calls, then
display the result.
However, once this is done, if the user then clicked on some links
(which do save the current record and navigate to another action), then
click on the breadcrumbs to come back to the settings view, then the
settings view will reload the current record, which has an id, and this
also will update the url.
This could be a problem. For example, in a multicompany settings,
reloading a settings view from an id will reload the settings for a
given company, even if the user changed its current company.
To fix this issue, we make sure the basic model for the settings view
'forgets' the res_id key, so it will be compelled to actually reread a
new settings form record.
The initial rev. odoo/odoo@2d3ecf2 that was supposed to handle this use case
was in fact only dealing with one command as default value for nested x2m, not
more.
The basic model can now handle multiple commands.
Closes#24241
The css generates all the attributes separately and not in simplified form.
In order to have a better compatibility we simplify the css tags.
e.g. border-left-style: none; border-bottom-s .... will be simplified in border-style = none
We convert the link.btn into a table to have a good rendering in outlook, and revert the
change when the user edit the content.
- Stripe needs to have the amount in integer, so we have to multiply by 100 the amount.
Which sometimes create float representation errors and remove/add ~1 cent on some transactions (i.e 72.60€)
- Stripe needs to have the amount in integer, so we have to multiply by 100 the amount.
Which sometimes create float representation errors and remove/add ~1 cent on some transactions (i.e 72.60€)
When you pay multiple invoice with one payment, you need the write
permission on account.journal, this had been solved when registering a
payment for one invoice in 91ca84644
In this commit, the same logic is applied on account.register.payments
opw-1835888
opw-1834343
closes#24369
Steps to reproduce:
- Go to the Contact
- Create a new contact with an email address with an ascii character
Bug:
A traceback was raised.
Closes#19852
opw:1837714
In 41ffb503 the "Invoice Notification Email" and "Sale Order
Notification Email" were modified so the company used was the one of
the object if available or the sender otherwise.
This had not been done for the "Purchase Order Notification Email" which
was added in saas-14 which might be unexpected.
Also as in 7a03f9ce9 specify the company when displaying the logo.
opw-1838112
closes#24344
ConnectionError is raised when there is no internet connection
if case of timeout a ConnectTimeout or ReadTimeout is raised.
It was not catched.
requests.exceptions.Timeout catches both
- Create a user A with group `group_sale_salesman` but no Accounting &
Finance group set
- Create and validate a SO, create the invoice
- With another user B, pay the invoice
- Print the "Invoices" with A
An access error occurs.
The error is due to user A not having the rights to see the payments.
We set a group on the corresponding report to avoid a user without
proper rights to print it.
opw-1837845
Since 11.0, reports could not be edited at all anymore. This is due to
the fact the editor files were refactored but the report feature is not
correctly organized since it was merged with the 'web' app. Indeed, the
'web' app is still calling files and assets of the 'web_editor' app which
is not a dependency (but it is working as 'web_editor' is auto-installed
with 'web').
opw-1826599
opw-1834971
Closes https://github.com/odoo/odoo/issues/24034
The editor is performing text selection check when clicking on the
window. However, when clicking outside the iframe an editor is running
in, a crash may occur as the editor was trying to check a range outside
of its environment (the iframe).
Related to opw-1837818
Since new-api migration of `ir.ui.view`, the method that check views
raises exceptions instead of returning a boolean. Show them as warning.
Related to #14521
- Create a simple module, set version to 2.0
- Import the zip file
The 'Latest Version' (field `installed_version`) is set to 11.0.1.0,
while one would expect 11.0.2.0.
There are several reasons for this. First, the method
`get_values_from_terp` doesn't return the version, so at this point the
information is already lost. Then, the field `installed_version` is a
computed field which retrieves the version from the `__manifest__.py`
file. In the case of an imported module, there is no such file in which
we can look up for the value (even though the imported module contained
one).
To avoid this, we explicitly set the 'Installed Version' (field
`latest_version`) to the version retrieved at import. Since this field
refers to the version installed in the database, it makes sense to use
it this way. Moreover, in the case of imported modules, we use the value
of `latest_version` for `installed_version`.
Fixes#23988
opw-1833522
Steps to reproduce the bug:
- Set a multi company environment with two company A and B
- Set user admin in company A
- Set user demo in company B
- Create a PO with user demo
- Send a RFQ
Bug:
The company of the admin user was displayed in the footer of the email.
The function _notify called on res.parter model is called in sudo by
the function _notify on mail.message model.
The function render_template on mail.template model uses the user defined
on self.env to render the template. So the user admin was always used.
opw:1835647
Before this commit, when uploading a file as attachment in Safari,
The file icon kept on showing 'downloading' whereas the request was successful
This was because the return from the server had a different UTF-8 norm than Safari
After this commit, it works well
OPW 1836545
closes#24307
Assume a list view with a many2many field, and a record for which
that many2many contains a single value, whose nameget returns the
empty string (which is a falsy value in JS). Before this rev., it
triggered an infinite number of namegets, and the browser crashed.
It was because the cell was re-rendered when the nameget returned,
and in the rendering of the cell, it re-performed a nameget if
the value was falsy.
opw 1838255d
In V11 with automatic invoicing set in website settings, it's no longer
possible to confirm an online order paid with wire transfer without
registering the payment. A user might want to confirm the order and then
register the payment.
Deactivates the `Mark As Paid` button on the order. (by removing the
xpath)
Task #1819491Closes#24347
and keep all those filters at last. (PR#20463)
e.g. If field used in color attribute of calendar view does not have value then such sidebar filters will not have string besides filter checkbox
in such cases we should set Undefined string and put all those filters at last in filter list
Currently we can see issue in calendar of manufacturing orders in db with demo data
Related to Issue #1778360
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Scenario : Create a transfer on a product tracking by lot. Update the
operation type "Receipt" by unchecking the "show reserved" option.
Open the Register lots, pack, location wizard and set some lots with a
quantity done. The quantity done field is not updated in real time.
Issue :
The depends function on quantity_done is triggered only on move_line_ids
but "show reserverd" option replace move_line_ids by
move_line_nosuggest_ids in the wizard.
Transifex URLs have an original scheme using #lang, followed by the module or
'$' (for any module) and the searched text can be quoted
Before this commit the link was cut after
https://www.transifex.com/odoo/odoo-11/translate/#fr/, making the link not
clicable
Closes#24346
In some situations, it could happen that the action manager had a
rejected deferred representing the creation of a view, and was blocked
from doing any other interaction with that view.
For example, imagine that a read operation crashes for record 1 on the
model res.partner. If the user is on the kanban view and click on
record 1, there will be an error dialog informing him of the error.
However, if the user clicks then on another record, nothing will happen
because the action manager is blocked (only the form view in this case).
With this commit, whenever the view creation process failed, we also
remove the rejected deferred so the action manager will be allowed to
try again.
It was possible to edit a leave request in order to use a leave type
which had no more days left. This was due to a missing field in the
constrains call.
Closes#24320
Before this commit, when we have a notification in the messaging menu (systray)
that comes from a message in inbox which isn't linked to a document
(e.g. a task), clicking on it result in a crash.
This issue comes from a typo of a recent js mail refactoring [1]
Although this is only a 1-line fix, there are no tests on the messaging menu
widget in the systray. Therefore, this commit also introduces some basic tests
of this widget, in addition to the test related to the fixed issue.
[1] https://github.com/odoo/odoo/commit/02ec09cb1c3e2d7bc7968f40c18f2208d7f3f498
Revision of https://github.com/odoo/odoo/commit/c778de44c7cd9b7ef5a9a91738164ab0ebd0ca06
The commit above changed the composer in order to add colored text for mentions
(instead of textarea, it uses a div with contenteditable).
Some tweaks were made in order to preserve the css style of the composer, but
there were some leftovers:
- placeholder "Write Something" should be more transparent
- cursor hover on placeholder should be of type text
- text is not vertically centered with the input container
- there should be no focus border when the composer has the focus
- "Send" button is vertically misaligned by 1 pixel off in discuss
This commit solves all of the above problems.
As a result, the css style of the composer should look almost similarly to the
one in v11.
There's a certain configuration of UOM that is not correctly handled in
the v11 stock:
- create a move with an UOM having an higher factor than the product's
UOM
- this higher UOM has a rounding of 1.0, meaning it doesn't allow
partial reservation
- use the product's uom in this move and enter quantities that aren't
expressible in the move's uom
A practical example is to set the rounding of dozen at 1.0, set the uom
of a product to units, create a move for a dozen and create a new move
line with 8 units.
The first issue is the `quantity_done` field, that uses an half-up
rounding on the `qty_done` field of each move line and sum them. When
applying this logic to the previous example, `quantity_done` field would
be 1.0, meaning we won't make a backorder for the missing 4 units. We
fix these issue by summing a non rounded qty_done and afterwards
rounding this value to the general products'UOM. This mean
`quantity_done` is technically not be expressible in the move's uom, but
keeping this value close to the reality will allow to handle the
backorders and extra moves correctly.
The second issue is that the backorder is always expressed in the move's
uom. In the previous example, this would mean creating a backorder of 0
dozen. In v10, an error was throwed, saying this operation is
impossible.
The `_prepare_move_split_vals` previously always received the quantity
of the backordered move in the uom of the original move. This is a
remnant of the v10 implementation where, if the quantity to backorder is
not expressible in the original move's UOM, an error was throwed. We now
pass the used uom via a context key to not update the method signature,
as it is probably legitimately overidden by custom modules. This way, in
the previous example, a backorder of 4 units is created.
The last issue is in `_action_assign`. Let's say you have 8 units in
stock and you want to reserve a dozen, the system will reserve 8 units
and then convert back 8 units in dozen, meaning a dozen was reserved.
This resulted in awkward situation where more items than available were
reserved, and the famous "cannot unreserve more than what's available in
stock" was throwed at almost each operation. To solve this, we convert
the not-yet reserved quantities back and forth in both uom. This
prevents partial reservation when not allowed, which is good. We had to
adapt some lines of `_action_assgn` that expected
`_update_reserved_quantity` always at least partially reserved the move.
It is now possible that it doesn't reserve anything.
We also normalize the quantity with a greater decimal precision when
deciding if we open the immediate transfer wizard or not (in the
original exemple, if you enter a single unit the immediate transfer
wizard would be openned because 0 was done in the UOM of the dozen). We
also prevent to enter `qty_done` on the move line if the value doesn't
honour the rounding of the UOM.
We introduce two tests, a simple `_action_assign` in MTS and a more
complete MTO scenario with backorders, extra moves and invalid qty_done.
opw-1835186
opw-1835946