Skip to content
Snippets Groups Projects
  1. Nov 05, 2019
  2. Nov 06, 2019
  3. Nov 05, 2019
    • Nans Lefebvre's avatar
      [FIX] ir_http: return a 404 if binary content cannot be decoded · e923a965
      Nans Lefebvre authored
      
      Backport of a68f7e6e
      
      Commit 5a9e1af6 has the unfortunate side-effect of crashing early
      if for any reason the content cannot be decoded.
      However, simply ignoring that the content cannot be decoded is no better idea:
      some functions pipe the result to decoding functions that crash the same.
      The resulting traceback pollutes the log with uninformative message such as:
      binascii.Error: Incorrect padding 5 0.002 0.016
      
      In case the content cannot be decoded (data corruption, or simply missing file)
      we return a clean 404 instead, which is morally almost equivalent,
      and is clean even from functions that depend on binary_content.
      
      opw 2117114
      
      closes odoo/odoo#39792
      
      Signed-off-by: default avatarNans Lefebvre (len) <len@odoo.com>
      e923a965
  4. Nov 04, 2019
  5. Oct 31, 2019
  6. Nov 04, 2019
    • Xavier Morel's avatar
      [FIX] core: SIGXCPU in worker processes · 549bd199
      Xavier Morel authored
      
      odoo/odoo#30688 (6ce2d6ef) added an
      indirection in prefork workers: Python-level signal handlers are
      delayed until native calls have ended (e.g. accept() or
      execute()). Running the actual work in a sub-thread allowed the main
      thread to handle signals in all cases.
      
      However there is apparently an issue with SIGXCPU on linux (possibly
      other cases as well): SIGXCPU is delivered to the child thread (if
      possible?) and Thread.join apparently stops it from redelivered to
      the main thread (Thread.join is signal-interruptible since 3.2 but
      possibly not Python-interruptible).
      
      Blocking SIGXCPU on the child thread causes the OS to deliver on the
      main thread and fixes the issue.
      
      Also split set_limits so it sets the signal handler in the parent
      thread but properly updates the soft limit in the child after each
      request, as the goal is to put a hard limit on the CPU time per
      request, not on the worker. 6ce2d6ef would set the limit once then
      never update it, likely cycling workers more than desired.
      
      While at it:
      
      * block other signals with a handler set, they seem to work
        regardless on linux but other OS may have a different way of
        dispatching process-directed signals
      * unset signals which are set by the prefork server but whose
        set behavior makes no sense in workers:
      
        - TERM and CHLD were already unset
        - HUP is used to restart the server, workers can just be killed
        - TTIN and TTOU configure the number of workers
      
      closes odoo/odoo#39341
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      549bd199
  7. Nov 03, 2019
  8. Oct 31, 2019
  9. Oct 30, 2019
  10. Oct 29, 2019
    • Lucas Perais (lpe)'s avatar
      [FIX] account: exchange rate difference when payment in domestic · 40db7a8c
      Lucas Perais (lpe) authored
      Make an invoice in Foreign
      Make a refund in Foreign
      reconcile the two, partially
      
      Make a payment in domestic, partial also, but with writeoff
      
      Before this commit,
      
      The invoice was not fully reconciled and -0.02 was yet to pay on it
      Notice the negativity of that number, which actually means that it HAS been
      fully reconciled !!!! (there is too much payment compared to invoiced)
      
      This was because, the account.payment in domestic currency is doing:
      Invoice residual in foreign, converted to domestic
      
      Then that amount minus payment's amount gives write off amount in domestic
      
      Then, at reconciliation, the whole payment's amount, which is
      the payment + the writeoff contained the expected and mathematically
      correct conversion and currency rounding errors
      (which should make out the exchange difference)
      
      The exchange difference IS created, and rightfully too
      that is, it records the exchange difference as debit 0.01 in the receivable !
      
      What was tricky though, is that the partial line recorded the debit 0.01 receivable
      as its CREDIT move line !
      
      After this commit, the receivable line is recorded as the DEBIT move line of
      the partial between the payment and the invoice
      so the invoice, is fully paid.
      
      We keenly admit this is hackish, but justified:
      - business-wise: the rounding/exchange errors are appearing ex-post
      to the choice of the amount of the reconciliation between the payment
      and the invoice, because we are reconciling them on the domestic amount
      
      - technically: our hands are tied because some key information is not present
      every time, and weirdly, not symmetrically. That is, the computation of
      line.amount_residual[currency] may be different if your are on a line with a currency,
      or on a line that doesn't.
      We should really think of systematically putting the currency on the line
      whichever it is ! The same goes for partial reconciliation model !
      Touching the current behavior is out of the question.
      
      Moreover, we should take into account that comparing amounts at different
      points in time should be done by actualizing those amounts to a common date
      See https://github.com/odoo/odoo/pull/39117
      
       for details
      
      OPW 2057845
      
      closes odoo/odoo#39205
      
      Signed-off-by: default avatarLucas Perais (lpe) <lpe@odoo.com>
      40db7a8c
  11. Oct 26, 2019
  12. Oct 27, 2019
  13. Oct 23, 2019
    • Martin Trigaux's avatar
      [FIX] profiler: be more pesimistic · 9d7147a3
      Martin Trigaux authored
      
      The profiler was too optimistic. If the local variable self was not a
      cursor, it assumed it was automatically an Odoo model.
      Instead, only do the custom tracer methods when self is an instance of
      BaseModel.
      
      Full scenario to reproduce explained at odoo/odoo#39237
      
      In case a method like the default_get of utm.mixing was profiled, the
      tracer crashed when evaluating `__bool__(request)`.
      The tracer considered self as an Odoo model while it was a werkzeug
      instance with its custom __getattr__ that crashed while trying to
      retrieve the content of `_name`.
      
      Fixes odoo/odoo#39237
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      9d7147a3
  14. Oct 24, 2019
  15. Oct 23, 2019
  16. Oct 21, 2019
  17. Oct 22, 2019
    • Lucas Perais (lpe)'s avatar
      [FIX] web: calendar: fetch records in right timezone · 70ed3d54
      Lucas Perais (lpe) authored
      
      Before this commit, the calendar searched records on the wrong time ranges
      which did not take into account the timezone of the user
      It obviously resulted in some records not being there
      
      After this commit, all the relevant records are fetched according to the right
      time range in UTC, corresponding to start/end of the week/month/day of the calendar
      
      OPW 2076114
      
      closes odoo/odoo#39184
      
      Signed-off-by: default avatarLucas Perais (lpe) <lpe@odoo.com>
      70ed3d54
  18. Oct 10, 2019
  19. Aug 27, 2019
  20. Oct 22, 2019
  21. Oct 21, 2019
  22. Oct 18, 2019
    • Christophe Monniez's avatar
      [REF] packaging: use docker to build packages · 3952cd2e
      Christophe Monniez authored
      
      Actually, docker is used to test Linux packages once they are built.
      The packaging process is done on the host system where package.py is
      run.
      
      Consequences:
          * difficult to reproduce an exact same build on another host
          * changing a Debian/Ubuntu target version means some upgrade steps
            on the build host (mix that with the fact that the host also
            could build old Odoo versions)
          * Fedora rpm package is built on an Ubuntu system (which is not a
            real problem but it could be)
      
      With this commit, the package.py utility is refactored to use Docker
      containers to build the Gnu/Linux packages.
      
      Backport of 8c4c4394
      
      closes odoo/odoo#38940
      
      Signed-off-by: default avatarChristophe Monniez (moc) <moc@odoo.com>
      3952cd2e
  23. Oct 20, 2019
  24. Oct 17, 2019
  25. Oct 15, 2019
  26. Oct 17, 2019
    • Denis Ledoux's avatar
      [FIX] fields: do not attempt to set foreign keys on views · dfaea03d
      Denis Ledoux authored
      
      Users sometimes define custom models on SQL views
      e.g. @nseinlet
      In such a case, Odoo should not attempt to create foreign keys
      as it just cannot work on views.
      
      This could prevent the migration of a database
      with such a custom model using a view
      when it attempted to fix the missing foreign keys
      when updating the modules.
      
      closes odoo/odoo#38951
      
      Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
      dfaea03d
  27. Oct 03, 2019
  28. Oct 15, 2019
    • Luis Torres's avatar
      [FIX] point_of_sale: Record in for is used · b3c88566
      Luis Torres authored
      
      The method ``action_pos_order_invoice`` is multi, and has a ``for`` to
      each record, then, inside of that for, is called the method
      ``_action_create_invoice_line``, but is called with self, not with
      order, that is each record.
      
      This was fixed to avoid singleton error.
      
      closes odoo/odoo#38809
      
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      b3c88566
    • Nicolas Martinelli's avatar
      [FIX] account: multi-currencies fixes · 3363d723
      Nicolas Martinelli authored
      
      - Create 2 rates for a secondary currency
        2019-01-01: 1.0
        2019-10-01: 2.0
      - Create an invoice on 2019-09-01 in the secondary currency
      - Register a payment on 2019-10-02: pay the invoice partially in the
        secondary currency, and mark the invoice paid
      
      No journal entry is created for the currency rate difference.
      
      Backport of commits e1306066, 8bec4fa0 and
      f7971a95.
      
      opw-2072519
      
      closes odoo/odoo#38252
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      3363d723
    • jvm-odoo's avatar
      [FIX] mrp: stock move not applied on kanban state change · 3e27de5a
      jvm-odoo authored
      
      In manufacturing orders, there is a kanban view.
      
      The kanban items are drag & droppable from a column into another.
      When moving an item into the "cancelled column", the stock move
      is not applied.
      
      Actually, you can't change the state of a MO by clicking on the state
      in the status bar. So, the expected behavior is that you can't drag
      and drop an item into another column.
      
      According to this, I reproduced the same behavior than in V13.
      
      Before this commit:
      
          - The kanban items can be drag and dropped from a column into
            another but there is no stock move
      
      After this commit:
      
          - The kanban items cannot be drag and dropped like in V13.
      
      OPW-2081255
      
      closes odoo/odoo#38761
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      3e27de5a
    • Martin Trigaux's avatar
      [FIX] event: print registrations without name · a21a81e9
      Martin Trigaux authored
      
      Before this commit, trying to print a registration without a name
      specified (not required), was failing
      
      Fixes odoo/odoo#38564
      
      Replace and closes odoo/odoo#38582
      Courtesy of Swapnesh Shah
      
      closes odoo/odoo#38767
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      a21a81e9
  29. Oct 14, 2019
Loading