Skip to content
Snippets Groups Projects
  1. Apr 16, 2018
    • Christophe Simonis's avatar
      5f2d080c
    • Christophe Simonis's avatar
    • Florent de Labarre's avatar
      [FIX] stock: remove wrong decorator · b7e47be0
      Florent de Labarre authored
      Was probably introduced during a forward-port as was correctly changed at 8df0a2a9
      
      Closes #24238
      b7e47be0
    • Kinjal Mehta's avatar
      [FIX] purchase: "product_type" related field on po line · 026be48c
      Kinjal Mehta authored
      Issue:
      Currently, since "product_type" is not set readonly, it is triggering write() of product.product
      model when saving a PO having PO line with product_id. And it is failing by throwing access error
      for users belonging to purchase "User" group users due to the fact that write() is permissible to
      purchase "Manager" group users only.
      
      Solution:
      Made the "product_type" related field readonly since it is used in purchase order views domain
      with lone purpose to set "received_qty" field non-editable when order line product is of type
      stockable/consumable.
      
      task id 1818787
      026be48c
    • Toufik Benjaa's avatar
      [FIX] payment: Portal payment were not saving tokens · 904c2e51
      Toufik Benjaa authored
      - Portal payement is not respecting the option to save tokens after payments.
      904c2e51
    • Nicolas Lempereur's avatar
      [FIX] web: setDate mixing utc+tz and local date · 7680635c
      Nicolas Lempereur authored
      In the calendar view there is some mixing of moment with:
      
      - a local date with given timezone
      - a UTC date with added timezone manually applied
      
      The setDate function of calendar model sometimes received either of the
      two types, and always transforms them to UTC date with added timezone.
      
      This cause eg. the following issues:
      
      - in the minicalendar, if we click on a day (eg. 12) the day highlighed
        will be the one of 12th at midnight with timezone applied. So with a
        negative timezone the 11th would be highlighted in the mini calendar
        (but the 12th would still be the day shown).
      
      - if we change scale (week/day/month) or open calendar or use next or
        previous button: we call `setDate` with a UTC+timezone moment. So each
        time this is done, we get an additional timezone
      
        eg. when opening the calendar view on the 12th at 5:00 with GMT-0200:
            -> the target date is 12th at 1:00
            -> if we set the day mode: target date is 11th at 23:00
            -> if we set the week mode: target date is 11th at 21:00
      
      With this change we keep target_date and highlight_date as local date so
      setDate always receives a local date and jquery-ui DatePicker gets the
      date in the expected format.
      
      opw-1831368
      closes #24188
      7680635c
    • Christophe Simonis's avatar
    • Nicolas Martinelli's avatar
      [FIX] stock: change product on S/N · 620a6f45
      Nicolas Martinelli authored
      Do not allow to change the product on a serial/lot number for a product
      which has existing stock moves. Doing so would screw up the traceability
      report.
      
      opw-1832452
      620a6f45
  2. Apr 17, 2018
  3. Apr 16, 2018
    • Christophe Simonis's avatar
      aab09088
    • Christophe Simonis's avatar
      c92d43c0
    • Kirti Choudhary's avatar
      [FIX] sale: income account in invoice with down payments · aaadfd7d
      Kirti Choudhary authored
      When creating an invoice with 'Down payment' option for an SO, it should
      first consider income account of the 'Deposit Product'. if it does not
      have one then it should consider that product category's income account.
      
      Fixes #23100
      Task# 1819531
      aaadfd7d
    • Simon Lejeune's avatar
      [REM] stock_account: valuation stat button · b8133aa6
      Simon Lejeune authored
      Remove the valuation stat button as we say that from now on, to
      understand the current value of a product, you should go through the
      valuation ation and its stat button.
      b8133aa6
    • Simon Lejeune's avatar
      [REF] stock_account: valuation at date wizard · 352875a5
      Simon Lejeune authored
      We add the valuation at date wizard by re-using the quantity at date
      wizard and adding a context key to separate the both.
      
      The same view/action is used when openning the current or at date
      valuation, only the `to_date` context key is changed.
      352875a5
    • Simon Lejeune's avatar
      [REF] stock_account: support valuation at date · 3a828117
      Simon Lejeune authored
      For the standard and average cost method, we use `qty_available` at date
      and the `product.price.history` table.
      
      For FIFO, the normal way would have been to get the `qty_available` at
      date and value this quantity with the more recent IN moves at this date.
      
      But there's two main obstacles preventing to use this solution:
      - when editing a done move to change the quantity, the change is
        reflected at the date, the `qty_available` at date will be incremented
      - in the same usecase, the remaining_qty and remaining_value is
        incremented in place, which mean that even if the layer was already
        consumed, it's now appearing again at the bottom of the fifo layer
      
      Fixing this issue by adding a stock move at the date of today instead of
      editing in place in v11 and adding a proper "cost layer" model in master
      was deemed too complex as well as unnecessary by our bosses
      
      So we now say we continue to update in place, and when looking at the
      quantity at date
      - if periodic, we sum the value of the move since the beginning of times
      - if perpetual, we sum the balance of the account move lines since the
        beginning of times. Also, in this case, the quantity at date is
        computed across account move lines too, via the "quantity" field on
        aml.
      
      This commit adds three non stored computed field:
      - qty_at_date: will be computed across stock moves if fifo periodic and
        across account move line if fifo perpetual to reflect the design
        choice: if periodic, we *really* edit in the past ; if perpetual, no,
        the change is done at today's date
      - stock_fifo_real_time_aml_ids: the used aml to compute qty_at_date
      - stock_fifo_manual_move_ids: the used move to compute qty_at_date
      3a828117
    • Simon Lejeune's avatar
      [FIX] stock_account: stock_value and depends · 0eec54ca
      Simon Lejeune authored
      stock value should be recomputed when the standard price change
      
      it is not optimal since it is updated in fifo after a delivery but
      needed when working with standard cost method
      
      remaining_value should also be part of the depends since the current
      value depends on it
      0eec54ca
    • Simon Lejeune's avatar
      [REF] stock_account, stock_landed_costs: `quantity` field on account.move.line · 348c371e
      Simon Lejeune authored
      Properly set the quantity field on the account move lines when
      exceptions happen (unlock and edit: only the difference is set as
      quantity, negative stock and vacuum: no quantity should be set).
      
      When applying a landed cost, no quantty should be set neither.
      
      This is a preliminary work to bring the valuation at date wizard to v11.
      348c371e
    • Simon Lejeune's avatar
      [REF] stock_account: move's value and exceptions · 704f5c9e
      Simon Lejeune authored
      Update the value on the moves when exceptions happen (unlock and edit,
      negative stock).
      
      This is a preliminary work to bring the valuation at date wizard to v11.
      
      We also update the value on moves in the standard cost method to stay
      consistent.
      
      - `_run_fifo` now returns the used value in the negative stock case
      - we simplify the `_fifo_vacuum` method so that the `remaining_value`
        always represent the not yet compensated value
      - we adapt the tests to reflect theses changes ; the value is not the
        initial valued amount but is updated upon exceptions
      704f5c9e
    • Christophe Simonis's avatar
      752dcc76
    • Christophe Simonis's avatar
      [IMP] website: handle geoip2 databases · 264398de
      Christophe Simonis authored
      Since April 1, 2018, free versions of GeoLite Legac y databases are no
      longer updated and free downloads not available [1].
      
      [1] https://support.maxmind.com/geolite-legacy-discontinuation-notice/
      264398de
    • Christophe Simonis's avatar
      412501a5
    • Nicolas Martinelli's avatar
      [FIX] account: default taxes · 3efa5b01
      Nicolas Martinelli authored
      Make sure the variable is casted to an integer when getting taxes.
      
      opw-1830862
      3efa5b01
    • Kiril Vangelovski's avatar
      [FIX] base: reason json payload using get_data · ff07f078
      Kiril Vangelovski authored
      Replace `httprequest.stream.read()` by `httprequest.get_data()` so the
      payload content remains available: get_data stores the request body (by
      default) so it remains available for alternative processing or checks
      (MAC checks for webhook validations for instance). With `stream.read()`,
      once the data is read if it's not stored separately it is lost.
      ff07f078
    • Christophe Simonis's avatar
      71476226
    • Lucas Perais (lpe)'s avatar
      [FIX] project: subtasks should be taken into account even if archived · 7a2cba3c
      Lucas Perais (lpe) authored
      Have a task (A) with two subtasks (B and C)
      Archive C
      
      Before this commit, when using timesheets, the task A hours was misconputed and did not take C's timesheet into account
      
      After this commit, hours are accounted for even if their task is archived
      
      OPW 1829658
      closes #23920
      7a2cba3c
    • len-odoo's avatar
      [FIX] stock: set procurement time to noon to avoid timezones changing the date · 1ae1cac9
      len-odoo authored
      If a user set a procurement to the day N, the procurement datetime field would
      be set to day N at midnight. So any negative timezone make it appear that the
      procurement is set to day N-1.
      
      opw 1831272
      1ae1cac9
    • Aaron Bohy's avatar
      [FIX] web: DatePicker: open when clicking on caret · 71087021
      Aaron Bohy authored
      Before this rev., the datepicker could only be opened by clicking
      on the input, not on its caret.
      
      OPW 1836520
      71087021
  4. Apr 15, 2018
  5. Apr 14, 2018
  6. Apr 13, 2018
    • Xavier Morel's avatar
      [FIX] export performance regression from d28f8f70 · 1e6da402
      Xavier Morel authored
      d28f8f70 carefully clears only the
      relevant bit of the cache (only the top-level object which we're
      exporting), however the commit did not considert that _export_rows
      calls itself recursively for relational fields, and thus when
      exporting relational fields the relation would become the new
      top-level and get cache-cleared on every iteration, significantly
      slowing down cases where such records are shared and would need to be
      re-fetched every iteration, even more so if they're somewhat/somehow
      expensive.
      
      OPW-1833545
      OPW-1836361
      1e6da402
    • Xavier Morel's avatar
      [FIX] export time regression by b5c660d8 · 115fa8f2
      Xavier Morel authored
      While c059e7b93c64b9dd9bc96eeb6ee5cadf significantly lowers the cost
      of generating xids, a safety invalidate cache can regress cases
      significantly e.g. 18s -> 430s (7mn) for some recursive exports of
      xids as the cache would be completely cleared *after each record*
      requiring complete fetching & recomputation of the following records.
      
      Fix by only clearing the cache if we've actually had to create
      xids *and* only for ir.model.data records.
      
      It's possible that clearing the cache isn't even necessary at all (?),
      check with @rco-odoo
      
      OPW-1835226
      115fa8f2
    • Géry Debongnie's avatar
      [FIX] mail: prevent race conditions in discuss · 1d8466ab
      Géry Debongnie authored
      The discuss application starting process is strongly asynchronous.
      However, it relies implicitely on the fact that the widget is not
      destroyed in its starting process.  For example, if the widget is
      detroyed before the updateChannel method is called, then any call to the
      chat manager service will return undefined and the widget will crash.
      
      When discuss is destroyed exactly between the start and the end of the
      creation of its search view (which is asynchronous), then it is possible
      to have a crash, because the search view will be destroyed when the
      do_search method is called.
      
      Note that we had to fix discuss mobile as well:
      The _setChannel method is supposed to return a deferred, but the mobile
      override did not return it.  As a result, a test in the mobile suite
      failed because this.alive takes a deferred in argument.
      1d8466ab
    • Alexandre Kühn's avatar
      [FIX] web: always update breadcrumb on change title · 8bdc650f
      Alexandre Kühn authored
      Revision on https://github.com/odoo/odoo/commit/32b8cec5361174c92c45a4975d4e02f1fb448aa2
      
      Before this commit, when we switch channels in the Discuss app, the breadcrumb
      was visually not updated: it keeps the name of the first opened channel.
      
      With this commit, the breadcrumb is updated on each change of channel, so that
      it displays the name of the currently opened channel.
      
      Technical details:
      
      	This is due to a change of logic of updating the GUI of the breadcrumb:
      	before the refactoring above, discuss had to pass the content of the
      	breadcrumb to the control panel, in order to update the breadcrumb visually.
      
      	After the refactoring, the action manager should warn the control panel to
      	update the breadcrumb on any change of the title. This is already the case
      	for `ir.actions.act_window`, but not for all types of client actions.
      8bdc650f
    • Quentin De Paoli's avatar
      [FIX] l10n_do: adapt to Norma 07-2018 · 08009420
      Quentin De Paoli authored
      Was PR #24123 and #24124. Courtesy of Gustavo Valverde (Iterativo)
      08009420
    • Nicolas Lempereur's avatar
      [FIX] web: remove ­ when saving phone number · b8b0f947
      Nicolas Lempereur authored
      When Odoo display a phone number number, on phone or if VOIP is
      installed a invisible `­` character was added from 9.0 up to
      saas-11.2 so an applications such as skype would not be concerned with
      the number.
      
      But if someone copy-pasted from this to somewhere else in Odoo, we would
      get incorrect number with this invisible caracter. So this change make a
      special case for the "FieldPhone" so the character is removed from data
      saved.
      
      opw-1834858
      closes #24223
      b8b0f947
    • Aaron Bohy's avatar
      [FIX] web: BasicModel: default_get on o2m with date field · 52cd52e6
      Aaron Bohy authored
      Before this rev., a crash occured when a default_get returned a
      command 0 (CREATE) for a one2many, with a value for a date(time)
      field (e.g. [0, false, {some_date_field: '2018-12-08'}]). This
      was because the related values (inside the commands) weren't
      parsed. This only impacted date and datetime fields, for which the
      parsing converts the string into a moment instance.
      
      Fixes #23672
      52cd52e6
    • William Henrotin's avatar
      [IMP] doc: add profiler example · baeb7432
      William Henrotin authored
      The built-in Odoo profiler can be used directly into the logs. This
      information was not given in the documentation. This commit add it. An
      example on how to use is shown as well as the produced result.
      baeb7432
    • Lucas Perais (lpe)'s avatar
      [FIX] web: o2m list with field datetime from server · 8e515693
      Lucas Perais (lpe) authored
      Have the create_date field displays on a one2many list
      Try to add a record onto the list
      
      Before this commit, when the virtual record is added onto the list
      it crashes because the datetime field is undefined and cannot be parsed
      
      After this commit, It doesn't crash though the value would have to wait the save on the main record
      to be updated (because it is the create_date)
      
      OPW 1834250
      closes #24097
      8e515693
Loading