Skip to content
Snippets Groups Projects
  1. Dec 27, 2019
  2. Dec 23, 2019
    • Sébastien Theys's avatar
      [FIX] utm: prevent crash on /web/session/destroy · 16f2b380
      Sébastien Theys authored
      
      A similar fix was originally done in [1], where the access to `env` was done
      before the parent dispatch.
      
      The issue was then reintroduced with [2], where the `env` was possibly accessed
      again after the dispatch. This works most of the time, but in the rare case
      where the session is destroyed during dispatch, which is the case on
      `/web/session/destroy`, accessing the environment after that point will crash.
      
      This issue didn't manifest before [3], because the `env` was always initialized
      during `checked_call` when calling the `clear` method on it (since `env` is a
      magic property). After that commit, the `clear` is not called if not necessary,
      therefore it might happen that the `env` is never initialized. This leads to the
      crash when trying to initialize it for the first time after the `db` attribute
      has been cleared during the destroy, since a `db` is required to initialize it.
      
      The current fix aims to prevent the crash. As opposed to [1] that actually kept
      the tracking fields by fetching them before the dispatch, it is decided on this
      commit to voluntarily lose the tracking fields when destroying the session,
      because keeping them would require too much refactoring for a fix in stable, but
      we also feel that it makes sense functionally: those tracking fields were maybe
      used for a specific purpose in the original database, but they might mean
      something completely different on another database.
      
      [1] 6780597f
      [2] c78de22a
      [3] f6d56afb
      
      closes #42260
      
      closes odoo/odoo#42314
      
      X-original-commit: 2ac11ce7
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      16f2b380
    • Fabien Meghazi's avatar
      [FIX] server: limit concurrent http threads · 543a3ad2
      Fabien Meghazi authored
      
      Before this commit nothing prevented high concurrency on a threaded http
      server to consume too much resources, ending up failing requests either
      because the OS is unable to spawn that many threads
      (`RuntimeError: can't start new thread`), either because the Odoo db
      connection pool is full (`PoolError: The Connection Pool Is Full`).
      
      This commit adds the ODOO_MAX_HTTP_THREADS environment variable which
      allows to limit the amount of concurrent socket connections accepted by
      a threaded server, implicitly limiting the amount of concurrent threads
      running for http requests handling.
      
      Note that if a value has been provided to ODOO_MAX_HTTP_THREADS that cannot
      be parsed as an integer, a value will be automatically set to half the
      db connection pool size (which defaults to 64). This dynamic value is
      chosen because while most requests will borrow only one cursor
      concurrently, there are some exceptions where some controllers might
      allocate two or more cursors.
      
      closes odoo/odoo#42327
      
      X-original-commit: d42a9513
      Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
      543a3ad2
  3. Dec 27, 2019
  4. Dec 24, 2019
    • Denis Vermylen's avatar
      [FIX] sql_db: ignore PG views when verifying table type · cf014693
      Denis Vermylen authored
      Collisions in table names of ORM models with built-in PG structures such
      as "attributes", "domains", "routines", "parameters", ... could occur
      and render the result of `table_kind` meaningless.
      
      Based on what was done via https://github.com/odoo/odoo/pull/16651
      
       more
      than 2 years ago, it seems relying on our tables being in the 'public'
      schema is safe, even though it's only a default from PG. We reuse that
      same logic rather than the alternative of excluding
      ('information_schema', 'pg_catalog', ...), even though it looks safer at
      first. If we did the latter we'd have to change the other comparison for
      consistency, i.e. more risks.
      
      closes odoo/odoo#42358
      
      X-original-commit: d8e74eb1
      Signed-off-by: default avatarDenis Vermylen <Icallhimtest@users.noreply.github.com>
      cf014693
  5. Dec 26, 2019
  6. Dec 23, 2019
  7. Dec 24, 2019
  8. Dec 23, 2019
  9. Dec 24, 2019
    • Robin Heinz's avatar
      [FIX] pos_restaurant: double printing not allowed. · 99615ff6
      Robin Heinz authored
      
      Before this, when we printed a ticket for the kitchen, if we went back to the table management and go back to the order, we could re print the same product.
      Now, we can only reprint the order if there is something different.
      
      closes odoo/odoo#42208
      
      Task-id: 2123029
      X-original-commit: c8f60404
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      99615ff6
    • Thibault Delavallée's avatar
      [REF] crm: clean lead common test class · db540557
      Thibault Delavallée authored
      
      Purpose of this commit is to clean a bit crm tests, notably lessening data
      created in tests and removing / improving some low level tests. As we are
      about to remove onchange / default and replace them by editable computed
      fields it is easier to clean some tests and data beforehand.
      
      This commit is a preliminary cleaning coming from task 2088565 about CRM
      onchange to compute methods update.
      
      LINKS
      
      Task ID 2088565
      Community PR #42344
      Enterprise PR odoo/enterprise#7403
      
      Related: odoo/enterprise#7403
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      db540557
    • Thibault Delavallée's avatar
      [IMP] mail: slightly improve tool to call mail gateway in tests · de6e980f
      Thibault Delavallée authored
      We now also support formatting a return path when emulating incoming emails.
      Purpose is to integrate some more tests in a near future about incoming
      emails, notably in CRM.
      
      This commit is a preliminary cleaning coming from task 2088565 about CRM
      onchange to compute methods update.
      
      LINKS
      
      Task ID 2088565
      Community PR #42344
      Enterprise PR odoo/enterprise#7403
      de6e980f
    • Thibault Delavallée's avatar
      [FIX] website_slides: do not display links to unviewable slides · 9a0267ee
      Thibault Delavallée authored
      
      Channel allow to browse slides and a list of available slide is displayed
      as a left panel in the eLearning frontend. Even slides current user
      cannot see are displayed in order to give some information about course
      content. Accessible slides are clickable, other slides should be
      displayed as strings. However due to some sudo when computing slide
      informations all links are set as clickable.
      
      There is no security issue as when being redirected to a slide the
      user cannot access there is an acl error. However he should not have
      the links displayed, just strings. This commit fixes that behavior.
      
      closes odoo/odoo#42338
      
      X-original-commit: 04a957bb
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      9a0267ee
    • Samuel Degueldre's avatar
      [IMP] website, website_blog: change stretch option to add smaller size · 7511f34c
      Samuel Degueldre authored
      
      This commit adds the width of blog posts to the "Stretch" snippet option
      (previously, only full width aka container-fluid and regular container
      were allowed, hence the name), as such it has been renamed to width.
      Some code in website_blog has been adapted to reuse that class, such
      that the width of the small container can be adjusted and website and
      website blog will stay consistent with one another.
      
      task-2155513
      
      closes odoo/odoo#41844
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      7511f34c
    • Benjamin Vray's avatar
      [IMP] website: add new 'Product Catalog' snippet · 03c52a23
      Benjamin Vray authored
      
      Before this task, we had some menu snippets but they were not really
      perfect and there were theme specific.
      
      task-2091911
      
      closes odoo/odoo#40169
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      03c52a23
    • Patrick Hoste's avatar
      [IMP] website_slides: allow to download slide content and additional resources · 1894dc54
      Patrick Hoste authored
      
      PURPOSE
      
      Currently eLearning lacks feature of having downloadable resources on
      lessons. Indeed for example teachers would like to attach zip files or
      other resources linked to a given lesson.
      
      SPECIFICATIONS
      
      You can now allow the user to download the slide content for pdf and image
      slides. A new icon will be visible next to the fullscreen button on the pdf
      viewer.
      
      Course maintainers can also add additional resources to a slide which will be
      available to download for the user.
      
      Task ID 2066741
      PR #39890
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      1894dc54
  10. Dec 17, 2019
    • Jinal Patel's avatar
      [IMP] sale_product_configurator: 'Product Variant' field optionally visible · ef8457ca
      Jinal Patel authored
      
      -Product configurator applies to all a db. If need it for just a few products.
       If want to scan or type sku of variants of other products to quickly populate the order.
       it's time-consuming to go through product configurator.
      
      -In this commit, To overcome of this issue, 'Product Variant' field optionally
       visible when product_configurator is installed.
      
      task- 2082126
      closes- odoo#41979
      
      closes odoo/odoo#41979
      
      Signed-off-by: default avatarDamien Bouvy (dbo) <dbo@odoo.com>
      ef8457ca
  11. Dec 24, 2019
    • Patrick Hoste's avatar
      [IMP] website_slides: add comments on answers showed after answering a quiz · e42ee496
      Patrick Hoste authored
      
      PURPOSE :
      
      A quiz after a course content is a good way to check if the user gets the previous lesson.
      Despite, the user/student may not understand why his answer was wrong/correct.
      In this task we'll allow the teacher to add a comment next to the asnwer of a quiz.
      
      SPECIFICATION :
      
      The quiz creator will now be able to comment the answers to inform the frontend user why
      his answer is wrong/correct. He will be able to add the comments both in backend and frontend.
      
      Task ID : 2072566
      PR : #41188
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      e42ee496
  12. Dec 17, 2019
    • Florent Lejoly's avatar
      [FIX] crm: fix archive / restore PLS inconsistencies · 9b534649
      Florent Lejoly authored
      
      SPECIFICATIONS
      
      Fixes following issue: when a lead is marked as lost, the probability is
      correctly set to 0 but not the automatic one. If one clicks on the "Set to
      automatic", the probability is updated, which un-archives it without really
      restoring it, meaning we get in a very strange state outside the expected flow
      (no Won/Lost buttons, ...).
      
      With this commit the automated probability is set to 0 when setting as lost.
      Moreover restoring a lead recomputes its probabilities.
      
      LINKS
      
      Task ID 2092799
      Manual backport of PR odoo/odoo#42015 done in master
      PR odoo/odoo#42045
      
      closes odoo/odoo#42057
      
      X-original-commit: 9ac5f42c
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      9b534649
  13. Dec 23, 2019
    • fw-bot's avatar
      [FIX] stock: assign SN on move Lines · e72ae1aa
      fw-bot authored
      
      Before this commit, we can't use the Generate and Assign Serial Numbers
      on already existing move line. It always creates new one, even if the
      picking type use "Pre-fill Detailed Operations".
      Now, it will edit existing lines, except if we ask to generate more SN
      than we have unassigned move lines, or if the picking don't use the
      "Pre-fill Detailed Operations" option, in which cases it will still
      create new move line with the generated SN.
      
      Also, before this commit, paste a list of serial numbers to assign them
      on multiple move lines in once work only with creation of a new move
      line for each serial number.
      Now, it's also work with existing move lines.
      
      Finally, some code shared the same logic in `stock.move` in the move
      line onchange method and in the `_generate_serial_numbers` method.
      Moves this code in a new method, `_generate_serial_move_line_commands`,
      and call it in the two previous methods.
      
      task-2150561
      
      closes odoo/odoo#42316
      
      Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
      e72ae1aa
    • Fabien Meghazi's avatar
      [IMP] server: prevent threaded server to exceed memory limit due to malloc's arenas · 6ddf7a50
      Fabien Meghazi authored
      glibc's malloc() uses arenas [1] in order to efficiently handle memory
      allocation of multi-threaded applications. This allows better memory
      allocation handling in case of multiple threads that would be using
      malloc() concurrently [2].
      
      Due to the python's GIL, this optimization have no effect on
      multithreaded python programs. Unfortunately, a downside of creating one
      arena per cpu core is the increase of virtual memory which Odoo is based
      upon in order to limit the memory usage for threaded workers.
      
      On 32bit systems the default size of an arena is 512K while on 64bit
      systems it's 64M [3], hence a threaded worker will quickly reach it's
      default memory soft limit upon concurrent requests. We therefore set the
      maximum arenas allowed to 2 unless the MALLOC_ARENA_MAX env variable is
      set.
      
      This commit also brings the following changes:
      - allow to disable the memory hard limit for all servers if the provided
        value is 0 (instead of crashing)
      - increase the log level for threaded server in case of limits reached
      
      Note: Setting MALLOC_ARENA_MAX=0 allow to explicitely set the default
            glibs's malloc() behaviour.
      
      [1] https://sourceware.org/glibc/wiki/MallocInternals#Arenas_and_Heaps
      [2] https://www.gnu.org/software/libc/manual/html_node/The-GNU-Allocator.html
      [3] https://sourceware.org/git/?p=glibc.git;a=blob;f=malloc/malloc.c;h=00ce48c;hb=0a8262a#l862
      
      
      
      closes odoo/odoo#42323
      
      X-original-commit: 85fe2c6e
      Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
      6ddf7a50
    • Samuel Degueldre's avatar
      [FIX] website: fix snippet animations not being destroyed before clone · bbf93a80
      Samuel Degueldre authored
      
      In a80775ce, some code was refactored to stop using the confusing
      'animation' denomination, as in reality they were just public facing
      widgets that did many things, such as loading data based on
      data-attributes and other things that were not always animation related.
      One instance of the animation_stop_demand event was not renamed in the
      _onSnippetWillBeCloned method, which creates some problems, one of which
      being that the facebook snippet's iframe wouldn't be destroyed on clone,
      but since the animation was started after the clone, this would result
      in one facebook page snippet with two iframes with the facebook page,
      for a total of 3 instead of 2, and one of these was unconfigurable.
      
      This commit renames the event to restore the proper behavior.
      
      closes odoo/odoo#42311
      
      X-original-commit: 2a671f47f87e2bb52a5fade11ea6b79070516694
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      bbf93a80
    • wan's avatar
      [FIX] l10n_pe: adapt account group · fe97c78a
      wan authored
      The account.group model has been refactored in
      https://github.com/odoo/odoo/commit/a124050511d508f6f1f8a4d4f9dfb2fa1507ad98
      
      
      
      Although the filename was correct (.template) and one field was changed
      (code_prefix -> code_prefix_start), we don't accept a parent anymore and
      we have to provide the chart of account id.
      
      closes odoo/odoo#42302
      
      X-original-commit: 079ebab64e1ea7c17d786c8b4d17bbb707ff856a
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      fe97c78a
  14. Dec 18, 2019
  15. Dec 23, 2019
Loading