Before this fix, inconsistencies arise in the prices displayed in a
multi-currency environment. For example, let's consider these 2
pricelists:
- Public Pricelist, in USD
- Benelux Pricelist, in EUR with 10 % discount
When the Benelux Pricelist is selected, the strikethrough price is in
USD, the price is in EUR, and the currency displayed is $. The reason
is that the pricelist used is stored in request.session, but the
templates are still using the pricelist linked to the partner.
We link website.pricelist_id to the currency stored in request.session,
which is more logical. We also use the currency related to this
pricelist in the templates, which avoids the inconsistencies mentioned.
The function _onchange_partner_id must be triggered when the field 'company_id'
is modified like with function _onchange_partner_id in addons/account/models/account_invoice.py
In this way, the account_id is set in 'account.invoice when the 'company_id' is changed.
opw:652918
Non-trivial port because 9.0 has rescue sessions that kind of try to
solve the same problems, however:
- they do not automatically put orders into a compatible, newly opened
session because it explicitly searches for rescue sessions. So if
you open a new session and create a new order in a POS associated to
a closed session you will end up with two open sessions (one rescue,
one regular).
- they throw exceptions with cash control enabled
- they're a bit more complicated because they introduce the idea of
'rescue' sessions, which the 8.0 fix does not (it just uses regular
sessions).
So this reverts bed409322d without
changing the database and while still ensuring that databases with
existing POS rescue sessions don't break.
The `parent_id` field was mis-aligned in the `res.company`
form view, making the input away for its label.
We moved the field to the General information tab, to not
overcrowd the headers.
opw-653373
* when getting the src of an uploaded attachment we have to use src which
is by default url,
* in a MediaDialog the pager is shared between the document and image
dialog, but when changing page, it was done for both (even if not
displayed),
* select the image after uploading it in the ImageDialog.
closes#9284
opw-653061
opw-653167
The issue occurs for example in the Sale dashboard, when the user
changes the target amount. If the user changes the value, then directly
clicks outside of the field, the method on_change_input will be called
twice: the first time because of the event 'change input', the second
time because of the event 'blur input'. This makes an unnecessary write,
which can cause an error due to concurrent access.
This prevents the execution of the write related to the event 'change
input' in this case. If the user changes the value but clicks on
'Enter', the focus is still on the field so the update is done
correctly.
Courtesy of Quentin Smetz (qsm@odoo.com)
opw-653086
When several accesskey with the same key, are defined on elements, the
last one (even if not displayed) is the one which will be actioned and
the key sequence is pressed.
This caused an issue since the "Pager" template is shared between all
elements, even the x2many relational widgets.
Also there was shortcut for Create/Save/Discard on the form view, but
those shortcuts should also be enabled in the list and kanban view.
closes#9267
opw-652888
Commit 7636b51 modifies the route from JSON to HTTP by mistake. Indeed,
the route /quote/accept is called from an ajax.jsonRpc request, not from
the `method="POST" t-attf-action="/quote/accept` which can be found in
website_quotation.xml.
The t-attf-action is actually only used to recover the order_id and the
token in website_quotation.js.
opw-652874
Closes#9227Fixes#9226
Assets are now split in multiple files and there is not a route which
always leads to the last version of an asset. This commit adapts theme
customization (without reloading) to these new features.
The method `compute_all` of `account.tax` in api.v8
expects a currency browse record, not a currency id.
It's the `compute_all` of api.v7
that expects a currency id.
opw-653106
`vals[tax_ids]` can be a command triplet,
see:
https://www.odoo.com/documentation/master/reference/orm.html#openerp.models.Model.write
Doing
`tax_ids = map(lambda tax: tax[1], vals['tax_ids'])`
to resolve the command doesn't work for all triplet types,
for instance it doesn't work for triplet `(6, 0, [...])`
To resolve properly a 2many commands, `resolve_2many_commands`
should be used.
opw-653106
The two above revisions had to be adapted between 8.0 and 9.0:
- There is no longer any `draft` state on `account.bank.statement`,
it's now `open` or `confirm`.
- There is no longer two views, for bank statement & cash regiters.
There is only one. No need to duplicate the inherited views to add
the cancelling buttons.
opw-653106
Complements b99ef3b125.
The index definitions have changed, so we need distinct names
and existence tests to make sure they get properly created/altered
on older databases.
The below revision:
275234c067
Makes the multi-companies record rule disabled by default,
meaning the user can see contacts from other company than
his current company.
Nevertheless, to read the computed field `currency_id` on
the `res.partner` model, the user need the read access
on the contact `company_id` field, that the user does not have
if the partner company is not a child of the user current company.
opw-653103
The method _webiste_product_id_change now properly browses the product
as it is done in the method product_id_change of the sale module. Prices
are now updated according to the pricelist.
o2m editable list open a form view and can put command as default value (record[this.name] for o2m in a o2m) for the editable fields.
When the onchange is triggered, get_value create a wrong command of command.
step to reproduce issue:
* edit a quotation with at least on sale order line
* change the pricelist
* change the quantity of the sale order line
todo : remove _on_load_record in version > 9.0 and use new dataset implementation with to_delete attribute
These two rules were used to restrict livechat users
to the read access to their own messages,
and allow livechat managers to see all messages.
Since 9.0, livechat messages are no longer
`im.chat.message` records (8.0),
they are now `mail.message` records, and this model
already implements its own security rules.
See `check_access_rule` of `mail.message` to know
more about the access rules of this model.
Therefore, these security rules are no longer necessary in 9.0.
Besides, it had as side-effect to restrict the access of
livechat managers for `mail.message` records.
For instance,
livechat users were no longer able to create customers.
opw-651958
When reversing entries in Journal Entry, each entry(account.move.line)
must be copied with its own 'tax_line_id'. In this way, the action window
"act_account_tax_tax" can find all the entries linked to a specific tax
(active_id) to compute the Tax Report.
opw:652598
In IE11, when adding a range to a selection that can fail if this range
is not displayed (display non on itself or an ancestor) or is not already
inserted in the dom.
e.g: IE fails in the following situation: http://jsfiddle.net/7cmf2tt9/7/
The feature causing this situation is minimal : it only set the cursor
at the end of a FieldTextHtmlSimple widget (the default widget for
fields.Html). This commit thus only ignore that error.
note: this is not an issue on IE Edge.
closes#9216
opw-652347
The method evict_record calls _update_cache with an empty dictionary,
which will not replace any cached value. Therefore, the cache is never
cleaned.
opw-652393
The mention mechanism of the chat composer first proposes partners that are
registered to the current channel or followers of the current document, then
users, and finally partners.
Also reduces the mention detection delay to 200ms.