The internal livechat loader should not be loading in a asynchronous way, since it depends on the other assets bundle included in a odoo website page. Sometime (depending on the browser cache), this triggered a 'TypeError' when executing 'new openerp.im_livechat.LiveSupport', since 'openerp' was 'undefined'. This was introduced with b03b7280b3.
The bus channel will still be public (using the uuid), but access to the message history and session information should be with the authenticated user and not the anonymous one. There is no anonymous name, and the request.session is used to identify the user.
Without it, the xml template are not refreshed when file is changed.
A better way will be to invalide cache when XML file is modified.
Same way that we restart the server when a python file is updated.
Fiscal year is created when a chart of account is installed on the company.
If no chart of account is installed, setting dates will have no effect in the
accounting configuration wizard.
Fixes#3547
When the session is closed, the date used is the date of the session start instead of the
system date. This is necessary when the server is not on the same timezone than the user,
opw: 631497
Redirect odoo.com/page//contactus ==> odoo.com/page/contactus
(only for get method)
Apache don't redirect but search for route with only one slash...
For SEO optimization, Odoo force a redirect permanently
Reasons:
- the currency conversion is done assuming that the cost price currency is the company currency
- we support only one price type per field. Defining several price types on the same field using
different price types is not supported.
Create a new stylesheet for IE9 and less custom css.
The issue #6198 and #6201 is present in IE9 since a div with height 100% inside
a table-cell (i.e: td tag) element only take the minimum height possible for the
content.
For issue #6198: in IE9 a kanban tile could not be moved to an empty kanban,
this fix sets a minimum height for a empty column (80px, the size of two empty
tiles) so now a tile can be moved in the 80px in the top of the column.
For issue #6201: graphs took the minimum height in IE9, this fix set a fixed
height to improve the situation.
For issue #6200: in IE9, the list view could wrongly not go the next line
even if its width is 100%. For the given case, the display CSS property of
these listview is set to value "block".
opw-632415 opw-632417 opw-632416
Before this rev.,
if you had two child categories with the same name, e.g.:
- Chocolates / Orange
- Fruits / Orange
In the product list, searching for category "Fruits / Orange"
also returned the products from category "Chocolates / Orange",
because it fetched all products which had "Orange" in the category.
This rev. corrects this (in the above example, it returns
only products from category "Fruits / Orange".
The code is particularly complex. A proper solution would be
to store the complete name field (but this cannot be done in
stable releases, such as 8.0).
Besides, it handles the fact a product category child can have
' / ' directly in its name (it's not only the category tree separator).
e.g., you could have a category name called 'Fruits / Orange' directly
not only in the complete name.
opw-628793
product_taxes_rel is the many2many table between
product.template and account.tax
product_id on the POS order line is a product.product.
Therefore, the join on product_taxes_rel should
be done using the product.template id of
the product on the pos order line, and
not directly the product.product id.
opw-632720
VAT error shouldn't be displayed as it doesn't look deep enough for information.
It is better to raise this kind of exception at the creation of a VAT than at its use.
opw:631769
On the Customer list, the request on `fields_view_get` takes 12 queries instead
of 62. Overall, it saves queries on every call to `fields_view_get`.
The cache is invalidated upon any creation/modification/deletion on models
'ir.values', 'ir.actions' and 'res.groups'.
* creating the huge builtins dict inline represents ~40% of safe_eval's
total cost according to line_profiler
* for the specific situation of opcodes, using a set difference is
apparently much faster than for+if. all(gencomp) is also faster than
for+if but not as much as letting Python do (almost) all of it
might be that returning a set from _get_opcodes would be even faster,
but didn't test it
When method `fields_view_get` retrieves the toolbar actions, let it `browse`
the actions to check instead of `read`ing them. This enables prefetching and
reuse of cached values.
On the list of Customers, `fields_view_get` takes 62 queries instead of 73.
During conversion to new API[1] the superuser bypass
was dropped in the computation of karma-based
permissions on forum posts.
The check still needs to be bypassed to avoid
blocking sudo() mode when the admin account
has a low karma.
sudo() mode is used for various actions done
by the system on behalf of the forum users,
and should not fail because the admin has less
karma than the user herself.
[1] See rev. 893d7fa864
Saves 2 requests per post, aka 20 requests on a full page (89 -> 68):
* don't create a new sudoed env and recordset for each post, create a
single one so prefetch can work
* don't do unnecessary sudoed access (.parent_id.create_uid without
reading any field)
* temp variables in template seems to save a few queries, not sure why
There's still a linear growth of requests wrt posts in the
page (single-post page has 56 queries), but it's a bit less terrible.
In previous versions the system would simply refuse to import
a bank statement if the corresponding journal/account did
not exist.
As of 9.0 the system can create them automatically, but
should not do that without asking for confirmation first,
to avoid user mistakes with dangerous consequences.
Closes#6023
_lang_data_get returns only numerical data, the website tends to need
date formatting stuff instead with one lang lookup for each date or
datetime formatting (via t-field).
Caching the id matching a lang code means one less query for each
date/datetime formatting on the website, that's 10 queries saved for the
default forum front page.
Added new field `event_based` for marking dynamic rules that need
to be re-evaluated even for leads that were checked previously
and did not match. (default: False)
If this field is not set to true, check only newer leads that
were never checked before, significantly speeding up the
check when there are hundreds of thousands of leads.
Closes#6019
Reduces the number of SQL queries needed to render a typical page.
Considering the low number of config parameters, we could probably cache
all the parameters for a user the first time one is requested (and not
in cache), really.
On the contact form with (almost) all website_* modules installed,
brings the number of queries from 21 back to the original 15 once caches
are warm.
The extra auth blows an environment and causes an extra query
of ``website`` before calling the controller.
The preceding two SQL queries likely can't be avoided: one uses uid1 to fetch
the current website's public user in order to set it, the other one
fetches the current website using the user set beforehand
By using get_object and not passing in the request's context, creates a
divergent environment from the one used in the rest of the request,
resulting to the cached menu items not being reused when displaying the
menu in the page (during qweb rendering), saves ~4 requests on the index
page (though probably nothing elsewhere)
date_open is not a required field of event.registration.
There is therefore very likely that this field could
not be defined. We should therefore not rely on the fact
it is always defined.
When trying to sent an event mail for an event registration
with a date_open not set (false), the email wasn't sent,
and it prevented the rest of the event mail queue to be
sent as well.
opw-632549
Backport of 8.0 code, rev f61339b
Create a new journal item with an tax included, the automatically created tax
line had the amount computed as tax excluded.
Fixes#3731, opw 618305