Skip to content
Snippets Groups Projects
  1. Dec 19, 2019
    • qsm-odoo's avatar
    • qsm-odoo's avatar
    • qsm-odoo's avatar
      [REF] web_editor: remove useless files · 74419dc8
      qsm-odoo authored
      Commit https://github.com/odoo/odoo/commit/eb0ea8efbe932c140302e9f8da33a839bcd73146
      removed the use of the 'rte' and 'rte_inline' without removing the tests
      themselves. They apparently cannot work anymore as using routes which
      do not exist anymore.
      
      This commit removes the test files.
      
      Part of https://github.com/odoo/odoo/pull/41789
      74419dc8
    • Adrien Dieudonne's avatar
      [FIX] web: too small tap area for optional columns dropdown on mobile · 4e2fb178
      Adrien Dieudonne authored
      Before this commit, users encountered some difficulties to tap/click
      on the "optional columns" dropdown in list views.
      This issue only occured on Chrome: rather annoying to use the mobile app.
      
      "width: 10px" was used in inline list view but didn't have any sense
      in the other case. Worse still, Chrome miscalculated the size of the
      clickable area by a smaller one.
      This is due to the fact that we add some padding that exceed 10px.
      See:
      https://github.com/odoo/enterprise/commit/2f1320557ec67a741201d73a23a9782ec8f9b3bb#
      
      
      
      opw-2071605
      
      closes odoo/odoo#42210
      
      X-original-commit: 28b6e9c9
      Signed-off-by: default avatarAdrien Dieudonné (adr) <adr@odoo.com>
      4e2fb178
    • Pratima Gupta's avatar
      [FIX] mrp: delivery moves not cancelled · d255bdbf
      Pratima Gupta authored
      
      Before this -
      If we have follwing configuration -
      Manufacturing -> Propagate Cancel -> True
      Buy -> Propagate Cancel -> True
      
      * BOM of a Car -
      	1) Component 1 -> Iron (MTO & Buy)
      
      Now create a SO of product Car and confirm it.
      It will create a MO (Car) and then PO (Iron).
      Now if PO is cancelled, it will cancel its
      move_dest_ids and on change of it MO will be
      cancelled but delivery move will remain ongoing.
      
      When action cancel is called on a move raw, it will
      check if the production order is also cancelled.
      If the MO is cancel, in this case cancel also its
      move finished.
      
      Task-2117832
      
      closes odoo/odoo#42209
      
      X-original-commit: 9522e51a
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      d255bdbf
    • Odoo's Mergebot's avatar
      [MERGE] hr_timesheet: Improve Timer, Access Rights and Validation · 7dfc7925
      Odoo's Mergebot authored
      
      Access rights
      =============
      
      Purpose
      -------
      
      Currently, the lowest access right level for Timesheets allows a user
      to see the timesheets from all employees. Some companies do not want
      to have this information shared.
      
      As we already have three levels of access rights, creating a new one
      would be too much. Instead, we are using this opportunity to
      clean/simplify the current access right levels.
      
      Specification
      -------------
      
      Remove the current access rights and replace them with the following:
      - 'See own timesheets' the user can:
          - read/write/create/delete his own timesheets only
          - cannot timesheet on projects whose Visibility is set on
            'Invited employees' if the user is not a follower
          - see the 'My Timesheets' and the 'Timesheet App' menus
      - 'See all timesheets' the user can:
          - read/write/create/delete all timesheets
          - cannot see the Timesheets of Projects whose Visibility is set
            on 'Invited employees' if the user is not a follower
          - see the 'My Timesheets' + 'All Timesheets' + 'Timesheet App' +
            'To Validate' menus
          - validate the timesheets of whom he is the 'Timesheet
            Responsible' or the 'Manager'
      - 'Administrator' the user can:
          - read/write/create/delete all timesheets
          - see all menus
          - validate the Timesheets of all employees
      - Write tests
      
      New Validation Process
      ======================
      
      Purpose
      -------
      
      Currently, timesheets are validated by employees as a whole. However,
      as a manager, it is difficult to evaluate the timesheets of an
      employee for projects you know nothing about. Therefore, it would make
      more sense for a manager to validate the timesheets of his projects
      and to leave the rest to the other managers.
      
      In addition, having a date on the employees leaves room for error and
      performance issues, so we are introducing a new checkbox at the
      timesheet level.
      
      Specification
      -------------
      
      Remove the 'Timesheets Validation Date' field on the employee
      - replace it with a 'Timesheet Validated' checkbox (hidden field) on
        the timesheet entry
          - By default, this field is set to false
          - Once the manager validates the timesheets, switch the field to
            true
      - Filtering on 'Validated' timesheets should display timesheets for
        which 'Timesheet Validated' is true
      - Filtering on 'Non-Validated' timesheets should display timesheets
        for which 'Timesheet Validated' is false
      
      Rename the title of the validation menus into:
      - To Validate > Last Weeks -> Timesheets from Last Week to Validate
      - To Validate > Last Month -> Timesheets from Last Month to Validate
      
      Grid view: display projects on which the user timesheeted in the
      past 30 days (group_expand), or the employees who timesheeted in the
      past 30 days for the 'To Validate' menus)
      
      Open the 'To Validate' menus on the oldest non-validated timesheet
      you can find.
      
      Clicking on 'Validate' should validate all the timesheets displayed
      on the screen. List all the elements displayed in the view based on
      the group by applied in the 'Validate the timesheets' modal.
      
      When validating timesheets, bypass timesheets that were already
      validated in the past in order to avoid performance issues
      
      Timer list
      ==========
      
      Purpose
      -------
      
      Have an overview of the timesheets you need to do during the day.
      Easily track time spent on tasks using the timer instead of having to
      write down somewhere at what time you started an activity. Allow more
      flexibility if an activity if interrupted by another one (so you
      don't need to do mental arithmetic to determine how much time the
      first activity took substracted by the time spent on the second
      activity).
      
      Specification
      -------------
      
      - Move the time from fsm to hr_timesheet.
      - Add fa-play-circle and fa-stop-circle icons in the 'My Timesheets'
        menu:
          - on the left of the 'Duration' field in the list view
          - on the top right corner of the kanban card in the kanban view
          - on the right of the first column in the grid view
      - Display these icons
          - for non-validated timesheets only
          - if the Encoding Unit is Hours
      - Clicking on the play button should start and display the timer and
         switch to the stop icon
      - Clicking on the stop button should halt and stop displaying the
        timer and switch to the play icon
      - While the timer is running, the 'Duration' field should not
        be editable
      - Only one timer can run at the same time. If the user clicks on the
        start button of timesheet B while the timer is running for
        timesheet A, timesheet B should start and timesheet A should stop.
      
      Time selection when invoicing
      =============================
      
      Purpose
      -------
      
      Allow selecting a timeframe to invoice when the user is invoicing on
      a periodical basis. For instance, the user invoices each time at the
      end of the month. For some reason (he got sick, there was a bank
      holiday...), he only invoices of the 4th of the following month.
      Now the timesheets that are about to be invoiced include some that
      were recorded in the meantime.
      
      Specification
      -------------
      
      - Add an 'Invoice timesheets up to mm/dd/yyyy' field on the Invoice
        Creation modal
          - display this field only when creating an Invoice for a Service
            whose Invoicing Policy is on 'Timesheets on tasks'
          - not required
          - Set today's date by default
          - if this field is set, the quantity to invoice should only
            include the not yet invoiced (and validated) timesheets up to
            this date (included)
          - if this field is not set, include all not yet invoiced (and
            validated) timesheets without distinction.
          - Add the following tooltip: Only timesheets not yet invoiced
            (and validated, if applicable) up to this date included will be
            invoiced. If no date is indicated, all timesheets not yet
            invoiced (and validated, if applicable) will be invoiced
            without distinction.
      
      Miscellaneous
      =============
      
      Purpose
      -------
      
      Small usability improvements.
      
      - Move 'Create SO from Task' to sale_timesheet -> Means Enterprise to
        Community).
      - Add the pivot view to the 'All Timesheets' menu
      - Add the 'Today' button on the grid view of all menus (see the
        Reporting > Timesheets by Project menu for reference)
      
      closes odoo/odoo#40495
      
      Taskid: 2088586
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      Co-authored-by: default avatarLucas Lefèvre <lul@odoo.com>
      Co-authored-by: default avatarYannick Tivisse <yti@odoo.com>
      7dfc7925
    • Yannick Tivisse's avatar
      1bf2bfd2
    • Robin Heinz's avatar
      [IMP] point_of_sale: Show customer only and increase customer ranking. · ffd2502f
      Robin Heinz authored
      
      Following the removing of the vendor and customer field, when we wanted to display customer in the back end, we saw all. We added a default filter when clicking on the menu button that displays only customer with a customer rank higher than 0.
      We also increase their customer ranks everytime they make an order in the front end.
      
      closes odoo/odoo#41769
      
      Task-id: 2092483
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      ffd2502f
    • Xavier Bol (xbo)'s avatar
    • Xavier Bol (xbo)'s avatar
      [IMP] sale_timesheet: compute correctly the timesheet_total_duration · d1329e2d
      Xavier Bol (xbo) authored
      TaskID: 2088586
      
      When the user has the access right : 'See my timesheets'. He can only
      see his timesheets. Thus, in sale order, we want to display the real
      total number of hours spent on the 'Hours Recorded' stat button.
      
      When the encoding is in Days and not Hours, the total number on this
      stat button is not correct. This commit correct the total number.
      d1329e2d
    • Xavier Bol (xbo)'s avatar
      [IMP] hr_timesheet: add empty list tooltip · 9a8aad35
      Xavier Bol (xbo) authored
      TaskID: 2088586
      
      In 'My Timesheet' menu, in grid view when there is no record, the view
      displays an empty list tooltip. With this commit, the 'All Timesheets'
      menu, the empty list tooltip is also used when no record is displayed.
      9a8aad35
    • Xavier Bol (xbo)'s avatar
      d7d980b5
    • Xavier Bol (xbo)'s avatar
      [MOV] sale_timesheet: move 'create sales order' button on tasks · b673e3ae
      Xavier Bol (xbo) authored
      TaskID: 2088586
      
      Move this button from sale_timesheet_enterprise to sale_timesheet
      b673e3ae
    • Xavier Bol (xbo)'s avatar
      [FIX] hr_timesheet: problem desynchronization time between server and client · 2d3a44e6
      Xavier Bol (xbo) authored
      TaskID: 2088586
      
      When we launch the timer, if the clock of the client isn't correctly synchronize
      with internet, we can't correctly display the timer,
      because the clock of the server can be in advance.
      
      The solution is to call the server to have this time and use the timer
      only with the time of the server.
      2d3a44e6
    • Xavier Bol (xbo)'s avatar
      [MOV] hr_timesheet: move timer from timesheet_grid to hr_timesheet · 15e41f59
      Xavier Bol (xbo) authored
      TaskID: 2088586
      
      The timer use in project > task can be usable in community and not only in enterprise.
      
      move timer constraint from sale_timesheet_enterprise to hr_timesheet
      15e41f59
    • Xavier Bol (xbo)'s avatar
    • Xavier Bol (xbo)'s avatar
      [IMP] sale_timesheet: improve project overview to match with the access rights... · 68851c05
      Xavier Bol (xbo) authored
      [IMP] sale_timesheet: improve project overview to match with the access rights of hr_timesheet module
      
      TaskID: 2088586
      
      Some changement in project overview to match with the access rights
      in Timesheet.
      
      When the user has the lowest access right, the user may not see the
      timesheets of other users in the project overview. The total of hours
      spent must be equal to the number of recorded hours. But the
      remaining hour of the sale order must be corresponded to the reality
      and not only depending of the record that the user may see.
      
      Move the _domain_employee_id method from timesheet_grid into this
      module. Because this method is used for project overview into
      sale_timesheet module.
      68851c05
    • Xavier Bol (xbo)'s avatar
      [IMP] sale_timesheet: improve invoicing sale order with timesheets · 46d70e30
      Xavier Bol (xbo) authored
      TaskID: 2088586
      
      Add an 'Invoice timesheets up to mm/dd/yyyy' field on the Invoice
      Creation modal. This field is only visible when we want to create an
      invoice for a Service whose Service Policy is set on 'Timesheets on
      tasks'.
      This field allows to invoice the timesheets of a service up to the date
      set on this field.
      
      Before this commit, when we create the account.moves.line records, we
      link timesheets of a service to an invoice. Now, we need to check which
      timesheets are invoiced, because with the adding of the date for the
      creation of invoices, we cannot invoice the timesheets after to this
      date. Then, the process is done at the end of '_create_invoices' in
      'sale.order' model when the invoices are created.
      
      Override an ir.rule in accout module, because this rule accept all
      account.analytic.line in its domain and we don't want to accept all
      timesheets when the user has the access right : "See own timesheets".
      Therefore, we need to override this rule to apply the others rules in
      this model for the timesheets.
      46d70e30
    • Xavier Bol (xbo)'s avatar
      [FIX] account: remove the override _order in account.analytic.line · 3cff5808
      Xavier Bol (xbo) authored
      TaskID: 2088586
      
      Beside this override, the records in timesheets often change order
      because the date field is a date type and then, many timesheets can
      have the same date, thus the order isn't the same every time.
      When we remove this override in account module, the default order is
      restore for account.analytic.line model and it's 'date desc, id desc',
      with this order, we keep the same order every time in the different
      views of timesheet.
      3cff5808
    • Xavier Bol (xbo)'s avatar
      [IMP] hr_timesheet: add timer into list and kanban views for timesheets · c9da1571
      Xavier Bol (xbo) authored
      TaskID: 2088586
      
      Timer in the list and kanban views :
      ----------------------------------
      In kanban and list views, It's possible to update the 'unit_amount'
      field with a timer. The user can easily launch the timer in these views
      for one of his timesheets.
      One timesheet can be launched at the same time, when the user start a
      timer for a timesheet and start another timer for another timesheet, the
      first timer stop and the new timer start.
      
      The timer is usable only if the encoding unit is 'Hours' and the
      timesheet is not validated. To do this : a new computed field 'display_timer'
      is created in account.analytic.line, this field is set to True is the
      encoding unit is 'Hours'. With this field, we can easily hide and display
      the timer in different views.
      
      The user can only use the timer for his timesheets. Because the user
      with the access rights to see all timesheets might launch and/or stop a timer of a
      timesheet of other user. That is the timer must be accessed only in 'My Timesheets' menu.
      
      Add pivot view for 'All timesheets' menu.
      
      Creation a timer_mixin :
      ----------------------
      With this timer mixin, we can have a generic timer to use in other
      models that they need to use a timer like account.analytic.line and
      project.task models
      The timer in account.analytic.line model has changed to use the timer
      mixin.
      
      Specific behaviour of the timer :
      -------------------------------
      When the user use the timer and the minutes spent with the timer is less
      than 1 minute, we don't add in unit_amount of timesheet. If the
      unit_amount is equals to 0 and minutes spent of timer is less than 0.
      Then the timesheet created by the timer is deleted because it is useless to
      have a timesheet with unit_amount set on 0.
      
      Misc :
      ----
      Add some styles for the timer button and for the 'unit_amount' field when the
      timer is running.
      
      remove duplicated fields in tree view (record
      id='timesheet_view_tree_user')
      c9da1571
    • Xavier Bol (xbo)'s avatar
      [IMP] hr_timesheet: Improve access rights · 2f20b943
      Xavier Bol (xbo) authored
      TaskID: 2088586
      
      The low level access right is now "See my timesheets".
      This access disallow to a user to view and manage the timesheets of others users.
      
      When the visibility of a project is set on "Invited employees",
      the users with the access rules : 'See my timesheet' and
      'See all timesheets' can show the timesheets, if these users
      follow the project.
      2f20b943
  2. Dec 18, 2019
    • Jason Van Malder's avatar
      [FIX] website: fix background video widget on mobile · 073839c6
      Jason Van Malder authored
      
      Issue
      
          - Download the customer db: stargue-inc
          - Go on the website in mobile mode
      
          Traceback & the second item in the carousel is not displayed.
      
      Cause
      
          Traceback: we use `this.$iframe` without checking if it's defined
          Second item not displayed: the first video promise is overriden
          by the second video promise.
      
      Solution
      
          Check if this.$iframe is defined and resolve the old promise
          instead of overriding it.
      
      OPW-2152690
      
      closes odoo/odoo#42139
      
      X-original-commit: f5f569b4
      Signed-off-by: default avatarJason Van Malder <jvm-odoo@users.noreply.github.com>
      073839c6
    • Arnold Moyaux's avatar
      [FIX] stock: same package in different location · cdaf785e
      Arnold Moyaux authored
      
      - Create a move line from stock to shelf1 with PACK1
      - Create a move line from stock to shelf2 with PACK1
      - Validate
      
      It should be be blocked. The contents of a package should all
      be in the same location since the pack itself is in a location.
      
      It's due to commit 78d6f46 that fix a rounding error.
      However it should check for quants that have quantity since they
      represents the package content.
      
      closes odoo/odoo#42134
      
      X-original-commit: 78fba949790f2b1ecd3ba1bf60fb34c30d17769e
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      cdaf785e
    • qsm-odoo's avatar
      [FIX] website, *: fix tabs breaking when increasing number of columns · 04bd0161
      qsm-odoo authored
      
      * web_editor
      
      Previously, increasing the number of columns on the tabs snippet would
      cause the newly created tabs to toggle the original tabs instead of its
      own, this was caused by an oversight where the columns were clone
      directly using jQuery, and the snippets' the onClone method was not
      called on the newly created columns (here, tabs). This commit move the
      responsibility to clone onto the SnippetsMenu so that it can create the
      appropriate snippetEditor if needed and call its onClone method.
      
      task-2070643
      
      closes odoo/odoo#42130
      
      X-original-commit: 77ebadfe6ada8ad1fa4d6e476b9534f252499d92
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      04bd0161
    • Mathieu Duckerts-Antoine's avatar
      [FIX] web: take care of "groups" attribute in search view arch · 9d539cd8
      Mathieu Duckerts-Antoine authored
      
      The attribute "groups" on filters and fields in a search view arch was not taken
      into account anymore.
      Now items that should be invisible are not anymore available for selection
      in the interface (as expected) but are still activable as search defaults
      (and the corresponding facets appear if needed).
      
      Task ID: 2081450
      
      closes odoo/odoo#42125
      
      X-original-commit: ca2514a9fbcd693752367cb566d5c11165b40bd4
      Signed-off-by: default avatarGéry Debongnie (ged) <ged@openerp.com>
      9d539cd8
  3. Dec 17, 2019
  4. Dec 18, 2019
  5. Dec 19, 2019
  6. Dec 17, 2019
  7. Dec 19, 2019
  8. Dec 18, 2019
  9. Dec 12, 2019
    • Olivier Dony's avatar
      [FIX] ir.attachment: make filestore GC yield to other transactions · e63fd04b
      Olivier Dony authored
      If a long-running transaction holds a write-lock on any row in
      ir.attachment, the GC job can wait an indefinite amount of time to
      acquire its table-wise SHARE LOCK.
      
      While sitting in the queue for this lock, it will conflict with any
      future transaction that tries to acquire a write-lock on any row [1].
      So the GC transaction, which would normally execute very fast and
      immediately release its lock, will start to block other transactions and
      cause severe delays in response time. It basically depends on how long
      the tx holding the lock takes to complete... which is unknown.
      
      As a workaround, we force an arbitrary (but short) lock_timeout in the
      GC tx before attempting the lock. If it fails to acquire it, it will
      fail and raise, causing the whole operation to abort. The cron job will
      be rescheduled quickly because it failed to complete, giving the GC
      another chance to complete.
      
      10 seconds seems a reasonable compromise, as it gives the blocking
      transaction(s) some time to complete before bailing out, yet should
      not be long enough to bring the system to a halt due to other
      transactions blocked by the GC one. I have no hard data to back this
      claim, though.
      
      [1] See the LOCK conflict table in the documentation:
            https://www.postgresql.org/docs/10/explicit-locking.html
      
      
      
      closes odoo/odoo#42128
      
      X-original-commit: 8a093c74
      Signed-off-by: default avatarOlivier Dony (odo) <odo@openerp.com>
      e63fd04b
  10. Nov 20, 2019
  11. Dec 19, 2019
Loading