Skip to content
Snippets Groups Projects
  1. Feb 03, 2020
  2. Jan 31, 2020
  3. Feb 03, 2020
  4. Jan 31, 2020
  5. Jan 28, 2020
    • Toufik Ben Jaa's avatar
      [FIX] website: rollback transaction before creating new one · b22ba61c
      Toufik Ben Jaa authored
      
        - When rendering a website page, exceptions might happens.
          If so, an error page is displayed, to do so we create
          a new psyscopg cursor to read the view in database and render it.
      
          But if the current (failed) transaction was holding a lock, the new
          cursor might have to wait for this lock to be released further
          down the line. However, this will only happen after the
          request is done (and in fact it won't happen). As a result, the
          current thread/worker is frozen until its timeout is reached.
      
          So rolling back the transaction will release any potential lock
          and, since we are in a case where an exception was raised, the
          transaction shouldn't be committed in the first place.
      
      closes odoo/odoo#44085
      
      X-original-commit: 7a61c89d
      Signed-off-by: default avatarToufik Benjaa (tbe) <tbe@odoo.com>
      b22ba61c
  6. Feb 03, 2020
  7. Jan 31, 2020
    • Paul Morelle's avatar
      [FIX] website_blog: fix sidebar overflow · 6f639e98
      Paul Morelle authored
      
      When a tag has a very long name, on a screen too narrow, the sidebar
      overflows outside of the screen and a horizontal scrollbar appears.
      
      By allowing the tags to wrap, the overflow does not occur any more,
      excepted if there is a very long word. In that case, we truncate it.
      
      Same goes in the short blog post template, excepted that the parent's
      width is already specified.
      
      closes odoo/odoo#44424
      
      X-original-commit: a5ff42ce
      Signed-off-by: default avatarPaul Morelle <madprog@users.noreply.github.com>
      6f639e98
  8. Feb 01, 2020
    • Simon Lejeune's avatar
      [REF] stock, stock_account: indices for fast move unlink · aca23d57
      Simon Lejeune authored
      
      Stock moves records can be unlinked in some cases, for example when
      confirming a move containing a kit, the original move is unlinked and
      replaced by the moves of the components of the kit.
      
      This commit adds two indices to accelerate the unlink of stock move
      records. The fields were the indices are added are foreign key on stock
      move, and postgres checks the foreign keys of the rows before deleting
      them.
      
      closes odoo/odoo#44426
      
      X-original-commit: e34a176d
      Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
      aca23d57
  9. Jan 31, 2020
    • Rémy Voet (ryv)'s avatar
      [FIX] stock: fix move line without state · 86771472
      Rémy Voet (ryv) authored
      
      When the "Show Detailed Operations" is enabled on a picking type,
      create a immediate transfers with it, validate, unlock and readd
      a new detailed operation, save and it will create a move line without
      any state. Due this lack of state, the quant won't be updated.
      
      Fix by remove the readonly=False in the state fields
      (3f4f77fd), to avoid sending
      state:False by the web client.
      
      closes odoo/odoo#44425
      
      X-original-commit: 8f28b302
      Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
      86771472
    • Jason Van Malder's avatar
      [FIX] web_editor: fix required html fields · cf2f53e4
      Jason Van Malder authored
      
      Issue
      
          - Studio
          - Add an required html field
          - Create new record
          - Leave it empty
      
          It is saved
      
      Cause
      
          The isSet function of FieldHtml widget, have a "/" in the <br> tag
          and summernote empty = <p><br></p>. If you add a space, the value
          becomes <p>&nbsp;&nbsp;   <p>.
      
      Solution
      
          Remove the "/" and the spaces, check if value != <p></p> &&
          <p><br></p>
      
      OPW-2183687
      
      closes odoo/odoo#44427
      
      X-original-commit: c984b1b1
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      cf2f53e4
    • Juan Jose Scarafia's avatar
      [FIX] l10n_latam_invoice_document: bill unlink · 58732e4d
      Juan Jose Scarafia authored
      
      closes odoo/odoo#44415
      
      X-original-commit: fd8af797
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      58732e4d
    • Jason Van Malder's avatar
      [FIX] payment_stripe: fix traceback when error has no event · 1c14419e
      Jason Van Malder authored
      
      Issue
      
          - Install eCommerce
          - Add Stripe
          - Pay with invalid cart
      
          Traceback
      
      Cause
      
          When I improved stripe error, I didn't checked if
          an error could have no event
      
      Solution
      
          Check if the error has an event
      
      OPW-2186385
      
      closes odoo/odoo#44414
      
      X-original-commit: 772c0274
      Signed-off-by: default avatarJason Van Malder (jvm) <jvm@odoo.com>
      1c14419e
    • Christophe Monniez's avatar
      [FIX] attachement_indexation: make pdfminer optional · 6fa4dbf2
      Christophe Monniez authored
      
      As pdfminer does not have a Debian package in Ubuntu Bionic, it cannot
      be declared as a strong requirement.
      
      With this commit, a warning is logged if the library is not installed.
      It does not prevent to index other types of documents.
      
      closes odoo/odoo#44327
      
      Signed-off-by: default avatarChristophe Monniez (moc) <moc@odoo.com>
      6fa4dbf2
    • Kevin Baptiste's avatar
      [IMP] project, industry_fsm: Improve subtasks and configuration UX · 2ac06038
      Kevin Baptiste authored
      
      Purpose
      =======
      
      In Project, the configuration has to be done twice: in the settings of the
      app and on each project.
      
      During the onboarding, the user won't understand that a feature has to be
      enabled at both places and will think that the system just doesn't work.
      
      If the user enabled a feature, he most likely intends on using it for most
      of his projects. Therefore, having to do a double configuration for each
      new project is annoying.
      
      By the way, sub-tasks is the only global feature (it can't be enabled or
      disabled by project), so we are breaking it down by project to remain
      consistent with the rest.
      
      Specification
      =============
      
      1/ Enable subtasks per project
      Before this commit, sub-tasks were a global feature (i.e. once enabled
      they were enabled for all projects). This commit gives the ability to
      enable/disable sub-tasks per project.
      
      2/ Make project_id on planning required
      
      3/ Change default rating status on new projects
      
      4/ Default value for allow_subtasks
      
      5/ Enable timesheets on existing projects
      
      6/ Hide Total Hours if subtasks are disabled
      
      7/ Create project in the company context.
      Otherwise some records generation could use a default company which is not
      the company for which we want to create a project.
      
      8/ Default value for allow_forecast, is_fsm
      
      9/ Change reference to timesheet product
      
      10/ Fix tracback on industry_fsm_report.
      Before this commit, there was a traceback when enabling "Worksheets"
      (industry_fsm_report) after "Time and Material" (industry_fsm_sale).
      
      11/ Convert some onchange method into computed editable stored fields
      
      closes odoo/odoo#41218
      
      Taskid: 2146474
      Related: odoo/enterprise#6998
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      Co-authored-by: default avatarYannick Tivisse <yti@odoo.com>
      2ac06038
    • Nicolas Martinelli's avatar
      [FIX] sale: allow invoice creation from public user · b5902c3f
      Nicolas Martinelli authored
      - Activate automatic invoicing after successful payment
      - Go to the eCommerce with the public user
      - Purchase an item
      
      An error occurs because a `list` has no attribute `id`.
      
      The root cause is the following line:
      
      https://github.com/odoo/odoo/commit/3abe78087a0426ad2783942baa01e1d5fbdff2d9#diff-39d0613187d36f16c541734e80925e9dR556
      
      
      
      We want to allow the following scenarios:
      - a saleman generates an invoice for its customer but doesn't have
        accounting rights
        => check on `sale.order`
      - an accountant generates an invoice from a SO he can read but not
        modify
        => check on `account.move`
      - an invoice is generated from a purchase on the ecommerce
        => use of `sudo` in calling methods
      
      opw-2185680
      
      closes odoo/odoo#44400
      
      X-original-commit: 9ef6282f
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      Co-authored-by: default avataralt-odoo <alt@odoo.com>
      Co-authored-by: default avatarThibault Francois <tfr@openerp.com>
      b5902c3f
    • Jason Van Malder's avatar
      [FIX] survey: fix datetime picker · 83f28112
      Jason Van Malder authored
      
      Fixing 59a50e76, were minDate & maxDate are declared before usage.
      
      closes odoo/odoo#44368
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      83f28112
  10. Jan 30, 2020
  11. Jan 31, 2020
    • Aaron Bohy's avatar
      [FIX] web: do not deploy services twice · 8641c46c
      Aaron Bohy authored
      
      Since 671a5471, services are deployed twice in the backend:
      once by the webclient (as it is a ServiceProvider), and once by the
      env (which now deploys the services to make them directly available
      for each Owl component of the component tree). As a consequence,
      some services perform twice some operations (e.g. the mail service
      fetches twice the /mail/init_messaging route, the crash manager
      service displays twice the tracebacks...).
      
      This commit fixes the issue by making the webclient directly use
      services from the env, instead of deploying them a second time.
      
      Part of 2183810
      
      closes odoo/odoo#44301
      
      Signed-off-by: default avatarLucas Perais (lpe) <lpe@odoo.com>
      8641c46c
    • Odoo's Mergebot's avatar
      [MERGE][IMP] survey: add a 'live session' mode to the survey app · 2161d23d
      Odoo's Mergebot authored
      
      PURPOSE
      
      Add a "live session" mode for survey that allows the host to interact with its
      audience. He controls the pace of the survey and the audience answers questions
      one at a time.
      
      Results for each question can be displayed by the host to adapt his speech in
      real time.
      
      A gamification component even allows to give points to the attendees, based on
      the quickness of their answer, and create ranking to keep everyone's attention.
      
      SPECIFICATIONS
      
      This whole feature is deeply integrated within survey. It adds a layer of
      "survey session" on top if it that gathers attendees and answers during
      the lifespan of the session.
      
      In addition, we fixed/pimped several survey features:
      - we now prevent 'enter' submit when survey is done to avoid a raise.
      - we made a few small improvements on the frontend views
      - we now correctly remove the timer and initialize the result
        widget when the user presses 'enter' on the last page / question.
      
      See sub-commits for details.
      
      Task 1972640
      
      closes odoo/odoo#43568
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      2161d23d
    • David Beguin's avatar
      [IMP] survey: improve survey frontend pages · e0d16325
      David Beguin authored
      To make the survey even more beautiful than it was, this commit:
      - set 'or press Enter' in black instead of primary color.
      - align content of inputs (text, number, date, datetime) to the left when
        relevant (readonly mode).
      - Add 'Powered by Odoo' on all 'no footer' survey screens.
      
      PR #43568
      Task 1972640
      e0d16325
    • Aurélien Warnon's avatar
      [IMP] survey: improve demo data for quiz session · f9710a68
      Aurélien Warnon authored
      This commit improves the new survey "quiz" demo data by adding some questions to fill in the email
      and nickname of the user with the associated user inputs.
      
      PR #43568
      Task 1972640
      f9710a68
    • Aurélien Warnon's avatar
      [IMP] survey: add a 'live session' mode to the survey app · e973bd55
      Aurélien Warnon authored
      
      PURPOSE
      
      Add a "live session" mode for survey that allows the host to interact with its
      audience.
      He controls the pace of the survey and the audience answers questions one at a
      time.
      
      Results for each question can be displayed by the host to adapt his speech in
      real time.
      
      A gamification component even allows to give points to the attendees, based on
      the quickness of their answer, and create ranking to keep everyone's attention.
      
      SPECIFICATIONS
      
      This whole feature is deeply integrated with survey.
      It adds a layer of "survey session" on top if it that gathers attendees and
      answers during the lifespan of the session.
      
      The attendee identity is filled in by a special question that is marked as
      "Save as user nickname".
      If the host has not configured that question or if the user doesn't answer,
      they are marked as "Anonymous" in the rankings.
      
      The answer score computation is also altered during the session to take the
      speed of the answer into account.
      
      To ease the access to the survey to attendees, we have introduced two new
      routes in the survey main controller:
      - '/s/123456'
        That uses the 6 first characters of the token to give quick access to the
        survey and allow typing the URL manually somewhat conveniently.
      - '/s' that renders a view that asks the attendee to enter the survey 'code',
        which then redirects to the previous route.
      
      This commit also fixes a few bugs:
      - A bugged use case with the "enter key" listener.
        When the survey is done, we display a "result template" that shows the user
        his score and allows him to retry if possible.
        When this template is displayed, we don't want to listen to the "enter" key
        that allows to submit the survey form.
      - We now correctly remove the timer and initialize the result
        widget when the user presses 'enter' on the last page / question.
      
      SURVEY SESSION FLOW
      
      HOST point of view:
      
      - On the Survey Form, the host configures:
          - "Reward quick answers" that gives more points to attendees if they answer
            quickly
          - Question Time Limit, on each question, that defines the time limit for
            that specific question, allowing to have different (or no) timer for each
            question.
      - From the Survey Form, the host can start a "live session"
        Only one session per survey can be running at a time.
      - When he starts the session, the session_state is marked as 'ready', meaning
        all attendees landing on the survey page will be part of the session.
      - The host will land on a page showing the current number of attendees as well
        as the link for the attendees to join that session.
      - The host starts the session, activating the first question of this session.
        We keep an active reference to the "current_question_id" and use the bus to
        trigger an event that will refresh the survey page for all attendees, showing
        them the question and allowing them to answer.
      - The host gets a "question management screen", from which he can:
          - See the current question text & suggested answers
          - See the current question timer
          - See the number of answers received for the question
          - Display the answers of the question (same view as the survey "results"
            page, but only for the question)
          - Display the ranking of attendees (if "competitive mode" is enabled)
      - The host controls the pace of the survey by moving to the next question until
        it's the last one of the survey, then ends the current session.
        When the session is closed, we mark the answers of the attendees as "done".
      - The host lands on a screen where he sees the survey results and the ranking
        of all attendees.
      
      ATTENDEE point of view:
      
      - He reaches the survey when a session and open, and gets a screen asking him
        to wait until the host decides to start the session.
      - When the sessions starts, he's automatically redirected to the first question
        (see above).
      - If the session is already started when he reaches the link, he lands on the
        current question (and NOT on the first one)
      - If the host has configured a time limit, the attendee sees the countdown
        while he's answering.
      - When the attendee answers the question, the screen tells him the answer is
        registered and he has to wait for the host to go to the next question, which
        will happen automatically.
      - If the timer reaches 0 and he has not submitted his answer, it's too late and
        he waits for the next one.
      - It continues like that until the end of the session.
      - At the end of the session, the attendee gets a screen with his global results
        (same as a regular scored survey).
      
      PR #43568
      Task 1972640
      
      Co-authored-by: default avatarDavid Beguin <dbe@odoo.com>
      e973bd55
Loading