Commit Graph
94570 Commits
Author SHA1 Message Date
Xavier Morel aa25670c69 [FIX] forum: optimize vote metadata queries
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.
2015-04-10 18:23:32 +02:00
Arthur Maniet bc33b8dd04 [IMP] account_bank_statement_import: ask for confirmation before creating a journal
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
2015-04-10 18:23:32 +02:00
Xavier Morel 8c65573885 [IMP] res.lang: ormcache the lookup of a lang based on a lang code
_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.
2015-04-10 18:23:32 +02:00
Jeremy Kersten 7fecbc91eb [IMP] website_crm_score: optimize computation of static rules
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
2015-04-10 18:23:32 +02:00
Olivier Dony fd73263c51 [FIX] tests: clear ormcache at teardown, to avoid side-effects between tests 2015-04-10 18:23:32 +02:00
Xavier Morel aa6224117f [IMP] ir.config.parameter: cache ir.config_parameter values
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.
2015-04-10 18:23:31 +02:00
Xavier Morel 64a72d3780 [FIX] ir.http: avoid re-authing when not needed
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
2015-04-10 18:23:31 +02:00
Xavier Morel 298ef06b98 [IMP] website: use env.ref to ensure main_menu is fetched w/ correct environment
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)
2015-04-10 18:23:31 +02:00
Jeremy Kersten b03b7280b3 [IMP] base: allow to load bundle js in async mode
+ Import live support and editor en async

m
2015-04-10 18:04:37 +02:00
Jeremy Kersten 1971b987ad [FIX] website_forum: fix template to support html minifier 2015-04-10 18:02:54 +02:00
Jeremy Kersten 99ab640499 [FIX] website: no left strip at minimize html
<b>2</b><p> comments</p>  ==> need to keep the space
2015-04-10 18:02:54 +02:00
Frédéric van der Essen 9fe4457c43 [FIX] point_of_sale: fixing various issues with the list selection and password popup 2015-04-10 17:53:53 +02:00
Frédéric van der Essen 9041d6e0ff [FIX] point_of_sale: make sure user security PIN only contains digits 2015-04-10 17:53:52 +02:00
Frédéric van der Essen 3b33e5c36a [FIX] point_of_sale: there is no need to restrict customer barcode to ean13 anymore 2015-04-10 17:53:52 +02:00
Denis Ledoux 54eff11470 [FIX] event: send event mails for registration without date_open
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
2015-04-10 17:31:47 +02:00
Jeremy Kersten efbe6ae880 [IMP] website: Split loading of asset to load css before js
"An external CSS files were included after an external JavaScript file in the document head.
To ensure CSS files are downloaded in parallel, always include external CSS before external JavaScript."
-- Chrome analyzer --
2015-04-10 11:43:46 +02:00
Jeremy Kersten 67c40a50fa [FIX] assets : clean typo and useless script 2015-04-10 10:55:58 +02:00
Christophe Matthieu 368ea9d614 [FIX] website: summernote: don't need to add a white space when delete a selection if the string is not fully erase 2015-04-09 16:09:07 +02:00
Christophe Matthieu c35f8a7b48 [FIX] summernote: when the editor create a link, we need to use deleteContents with the flag to_write as true to insert the link at the same place. 2015-04-09 16:07:12 +02:00
Christophe Matthieu 3d8ac2e3df [FIX] website: snippet editor: if a snippet is dropped near a text node with a previous click, need to get the parent node to trigger the history 2015-04-09 15:14:20 +02:00
Denis Ledoux 2ec254549c [FIX] website_event_sale: there is not self.pool in controllers
There is no such thing. request.registry must be used instead
of self.pool.

opw-632408
2015-04-08 16:40:32 +02:00
Jeremy Kersten 4aa2e52b3d [FIX] website: allow to rename a website page.
Code from delete_page has been spliited (functions, templates, ...)
to be re-usable by rename_page

Change default input type from website.prompt.
Old default value 'text' had no sense, there are no tag <text>.
2015-04-08 13:40:11 +02:00
Aaron Bohy d1056939ad [FIX] Web: pager for ListView in One2Many fields
The pager was not displayed in One2Many List views. This fix applies the
same behavior as in One2Many Kanban views, which is probably not the
best way to do it, but which works fine.

The issue was caused by 2 things:
   - The One2Many.FormView template removes the condition around  the
     buttons/pager divs of the FormView template. However, it was using a
     selector that does not seem to be used anymore. We thus removed it
     and the buttons/pager divs are now in the rendered One2Many List View
   - The rendered pager was appended to this.options.$pager whereas it
     should be appended to the corresponding div in its own template.

This commit should not be forwardported
2015-04-08 10:48:50 +02:00
Denis Ledoux 2661a6c0cd [REVERT] e089f296d2
This revision completely breaks the reports
having long content in cells

To reproduce, just create a sale order with a long
line description, and print the sale.order report
before and after this revision, then see the difference.

opw-632317
2015-04-07 17:23:50 +02:00
Christophe Matthieu c2c093d6b8 [FIX] website.editor: remove javascript exception when the user close the modal after add a question in website_forum 2015-04-07 16:28:19 +02:00
Frédéric van der Essen 10f5001c25 [IMP] pos_restaurant: allow to print bill with web printing 2015-04-03 18:12:41 +02:00
Frédéric van der Essen 6f451d99ad [IMP] point_of_sale: receipt printing improvements:
- The receipt printing screen is shown both with the web and posbox
   printing
 - Both method can now reprint receipt
 - The Change is shown on the receipt screen to help the cashier give
   back the change after the cashbox is open.
2015-04-03 18:12:40 +02:00
Samus CTO 752a07c503 [FIX] res.partner.find_or_create() should match using =like
Otherwise john@connor.com may match sarah.john@connor.com
2015-04-03 17:24:49 +02:00
Josse Colpaert 421a5b3ce5 [IMP] stock: two different reports for picking with move lines and picking with pack operations instead of one
It is confusing to show once pack operations and once move lines without the user being aware.
As sometimes the pack operations don't get updated the report would not show all the products available for example.
2015-04-03 13:52:20 +02:00
Jeremy Kersten 018450752d [FIX] utm* - Allow to customize the cookies name 2015-04-02 22:50:41 +02:00
Samus CTO 55a569e970 [FIX] prevent exception to be raised during exception handling
Prevent this kind of exception to happen:

  File "/odoo_src/saas-6/openerp/service/wsgi_server.py", line 123, in xmlrpc_handle_exception_string
    fault = xmlrpclib.Fault('warning -- ' + e.name + '\n\n' + e.value, '')
TypeError: cannot concatenate 'str' and 'NoneType' objects
2015-04-02 14:28:36 +02:00
Thibault Delavallée f4f9ab5062 [FIX][IMP] website_event_sale: if the user buys only free tickets
redirect directly to the website_event confirmation view and confirm
the sale order instead of going to the checkout process.
2015-04-02 11:56:58 +02:00
Thibault Delavallée 49f7cc231c [FIX][IMP] website_event, website_event_sale: register process
- email is now required when buying tickets, to avois having subscription
that we cannot email with event information
- 'not yet started' message should be linked to the event state, not to the
fact that the event has tickets or not. A confirmed event without configured
tickets is just displayed on the website, but not set as unconfigured.
2015-04-02 11:29:43 +02:00
Christophe Simonis 16f23dd43a [MERGE] forward port of branch 8.0 up to 8ad1105 2015-04-01 19:31:22 +02:00
Christophe Simonis 8ad11055bb [MERGE] forward port of branch saas-3 up to 12f600c 2015-04-01 19:13:25 +02:00
Christophe Simonis 12f600cec9 [MERGE] forward port of branch 7.0 up to 35077af 2015-04-01 19:07:59 +02:00
Rucha Dave cb3034bdb0 [FIX] stock: prevent deleting lot linked to existing quant
Fixes #4458
2015-04-01 18:01:07 +02:00
Martin 46ad2ac70f [IMP] point_of_sale : display change amount after print if not 0 2015-04-01 16:55:23 +02:00
Nicolas Lempereur 35077af57d [FIX] opportunity: salesperson not in followers
Previously, when updating subscribers of a mail.thread, the default_{key}
arguments could override a {key} in the values.

e.g: for an new opportunity, the salesperson was overrided by the default user_id

This fix gives the priority to the values over the default_ in context.

opw-631741
2015-04-01 16:37:01 +02:00
Rucha Dave 2596f39eef [FIX] crm: meeting time in user timezone
With UTC in <time> element in bonus.
opw 621772
2015-04-01 15:53:09 +02:00
Denis Ledoux 433feb5a38 [FIX] account: partner ledger with currency.
In the partner ledger wizard, you can check
a boolean to display the amount within the
currency the amount has been invoiced.

This feature was simply no more working
in Odoo 8.0.

opw-630268
2015-04-01 15:36:40 +02:00
Nicolas Lempereur 32bc9fcb3a [FIX] customer: sale order number with child
The number of sale order on a partner form view only counted the given customer
and not the ones of eventuals child_ids. Hence when clicking on the widget, the
result sale order tree view (which take account of child_ids sale order) is
inconsistent.

This fix adds the sale order of a child company to the sale_order_count.

opw-630249
2015-04-01 15:29:21 +02:00
Martin 974c340993 Merge branch 'saas-6-pos-display-change-and-full-note-mdo' into saas-6 2015-04-01 15:28:50 +02:00
Martin 7862013245 [IMP] point_of_sale : display full note on receipt and display change after print 2015-04-01 15:26:34 +02:00
Christophe Simonis f18b46fcde [FIX] base_import: ignore stripped empty lines
Better fix for commit dab37df04d
2015-04-01 13:22:11 +02:00
Christophe Matthieu 734060f5b1 [FIX] website: can apply color picker to multi-selected areas
Port of commit 4912176a1b9ea1c59babb4d519d03692ad9a6ab2 from website_less
2015-04-01 11:23:02 +02:00
Christophe Matthieu 5c6b175b64 [FIX] website: fixed t-oe cleaning
Port of commit 86c2939dd71b7de711f79f2c2dbb486f86c2e760 from website_less
2015-04-01 11:23:02 +02:00
David Monjoie 286308155c [IMP] website: added routes to resize image attachments
You can already resize the image from the field of a model, why not a field from an xmlid object or an xmlid object itself ?
2015-04-01 11:23:02 +02:00
David Monjoie 67ff2eb92b [FIX] website: fixed element should have a position
Otherwise, it is fixed according to the other elements, here, the wrapwrap element.
So if we add a margin to wrapwrap, the margin is also added to the navbar, which
means it is not really fixed on the top.
This fix avoids this issue so the navbar is always fixed at the top of the page.
2015-04-01 11:23:02 +02:00
Christophe Matthieu 0af0738841 [FIX] website: selection of active background option
Port of commit 91d6af1dcd774e16f72375012288f5fab7574a4d from website_less
2015-04-01 11:23:01 +02:00