Skip to content
Snippets Groups Projects
  1. Nov 22, 2019
    • fw-bot's avatar
      [FIX] web_unsplash: traceback on saving the product · 2efad751
      fw-bot authored
      
      before this commit:
      when creating a product from frontend and editing the product and
      delete image, it doesn't get any url thus generating the traceback.
      
      after this commit: if url is not defined then return None from
      ir.qweb.field.image field converter
      
      task-2063293
      
      closes odoo/odoo#40626
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      2efad751
    • David Beguin's avatar
      [FIX-IMP] website, website_livechat : disable create visitor and review ACLS · 23f33248
      David Beguin authored
      
      This commit applies the following ACLs rules:
      
      C : nobody can create visitor (except of course the automated flow)
      R : everyone that should access to this model
      U : website_designer can update (even if only few fields are editable),
          mainly useful for language (+ system obviously)
          + livechat users as they are the guys who directly speaks with the visitors
      D : system + website_designer can delete, mainly useful to clean if necessary
      
      Remove the no_create from all visitor views as nobody can create.
      
      This fixes the 'can create' that should not be done by any users (even admin)
      except the system.
      
      Task ID: 2092502
      PR #40439
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      23f33248
  2. Nov 26, 2019
    • Mahendra Barad's avatar
      [FIX] digest: force recompute of all kpis each time-based run · 2966ee59
      Mahendra Barad authored
      
      Before this commit, the computation of kpi for last week, last 30 days and
      previous period comparison was wrong due to cache. Indeed as first value
      was in cache, other values were taken directly from cache itself instead
      of recomputing each value based on start_date and end_date of the computation
      timeframe.
      
      As digest fields are computed fields used a bit off-side, let us manually
      invalidate the cache before computing a kpi so that it correctly computes
      the timeframe values.
      
      Task ID 1883428
      
      closes odoo/odoo#40834
      
      Closes: #40834
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      2966ee59
    • Goffin Simon's avatar
      [FIX] repair: No fiscal position from repair order · 3810f9d9
      Goffin Simon authored
      
      Steps to reproduce the bug:
      - Let's consider a fiscal position FP with automatic detection for customer in your country
      - Let's consider two taxes T1 and T2 where T1 is mapped by T2 in FP
      - Let's consider a product P with T1 as customer taxe
      - Let's consider a customer C in your country with no fiscal position
      - Create a repair order for C
      - Add P as an add line
      
      Bug:
      
      T1 was set as customer taxe for P instead of T2.
      When manually creating an invoice for C with P, FP is automatically
      detected and T2 is set.
      
      With this fix, the automatic detection of FP is applied on repair order.
      
      opw:2120595
      
      closes odoo/odoo#40511
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      3810f9d9
    • Nicolas Martinelli's avatar
      [FIX] sale_timesheet: remove group_by · 3f17dd36
      Nicolas Martinelli authored
      
      - Group the SO list view by Analytic Account
      - Go to a SO
      - Click on the stat button 'Timesheets'
      
      Traceback because the field `analytic_account_id` is not on Timesheets.
      
      opw-2124539
      
      closes odoo/odoo#40518
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      3f17dd36
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] account: show payments posted at bank reconciliaton · 3aab5890
      Andrea Grazioso (agr-odoo) authored
      
      Accounting > Configuration > Journal > Create
      Under Journal Entry Tab Fill name, type "Bank", short code
      Under Advanced Settings tab set Post at "bank reconciliation"
      Save
      
      Go to Accounting > Customer Invoices > Create
      Add Customer, and SO line with label and price, remove Tax Line.
      Post and Register payment on the created journal.
      
      Go to Accounting > <Created Journal> > Create
      Add reference, label, partner as in soline, amount as in so line.
      Save and Reconcile.
      
      There will be no entry to reconcile with. This is because the domain
      used by the reconciliation widget does not take into account the
      possibility to have a draft move_id, so the line which can be reconciled
      because the line is automatically posted on reconciliation is filtered
      
      Rearranging the domain to take into account this possibility
      
      closes odoo/odoo#40786
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      3aab5890
  3. Nov 21, 2019
    • Pierre Masereel's avatar
      [FIX] point_of_sale: duplicate orders · cddf29e7
      Pierre Masereel authored
      
      When you create a pos order, it is possible that the request timeout or
      the client loose the connection with the server, that will lead to not
      have the server_id of the order sent to the server. So when the client
      will try to synchronize the order again, it'll not send the server_id to
      the server, and the server will create a new order which is a duplicate
      of the one created when the client lost the connection.
      
      To avoid this duplication, we are using the pos_reference to find if
      there is an existing order like in 12.0 to avoid duplication.
      
      closes odoo/odoo#40600
      
      Task-id: 2127656
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      cddf29e7
  4. Nov 25, 2019
  5. Nov 22, 2019
    • Nicolas Lempereur's avatar
      [FIX] point_of_sale: pos order -> count of order · 35c0e813
      Nicolas Lempereur authored
      
      In the pivot view of report.pos.order that is a view mainly over
      pos.order, the "Count" measure is a little rubish giving more or less
      the number of different products in the grouped order lines.
      
      With this changeset, we have the field "Order" as measure that allow us
      to know the number of orders a grouping is corresponding to.
      
      opw-2127275
      closes #40723
      
      closes odoo/odoo#40797
      
      X-original-commit: 431114d4
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      35c0e813
  6. Nov 25, 2019
  7. Nov 22, 2019
  8. Nov 25, 2019
    • mightyjol (jhk)'s avatar
      [FIX]product:change pricelist fixed_price field from float to monetary · 27b90fc7
      mightyjol (jhk) authored
      
      steps to reproduce:
      -change decimal accuracy for "Product Price"
      -create a price list with fixed price
      -the fixed price field does not takes the decimal accuracy into account
      
      this was working in V11 and V12
      fixed_price was a float field like other price fields
      
      previous behavior:
      fixed_price is a monetary field
      when setting up a fixed price for a pricelist, it takes into account
      the precision from the current currency
      
      current behavior:
      fixed_price is a float field
      when setting up a fixed price for a pricelist, it takes into account
      the proper decimal accuracy setting ("Product Price")
      
      opw-2121964
      
      closes odoo/odoo#40777
      
      Signed-off-by: default avatarJorge Pinna Puissant (jpp) <jpp@odoo.com>
      27b90fc7
    • Haresh Shyara's avatar
      [ADD] l10n_id: introducing Indonesian localization · 046f7039
      Haresh Shyara authored
      
      Added Chart of Accounts, taxes and other related data
      
      closes odoo/odoo#40776
      
      Task: 42243
      Courtesy: www.vitraining.com
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      046f7039
  9. Nov 19, 2019
  10. Nov 25, 2019
  11. Nov 13, 2019
    • Damien Bouvy's avatar
      [FIX] web,(various): don't pollute session_info for portal users · 6e99ac2c
      Damien Bouvy authored
      
      The `session_info` dictionnary is used to bootstrap some JS code client
      side (usually in the backend). It includes relevant information, such
      as some parameters key for the OdooBot onboarding, the Enterprise
      subscription expiration alert, etc. to avoid triggering a lot of RPC
      calls upon webclient start.
      
      `session_info` is also called by the remote authentication mechanism
      located at `/web/session/authenticate`, which can be used by external
      mechanism to obtain a valid session remotely.
      
      Revision odoo/odoo@8a28cc2 introduced the concept of cache keys for
      some oft-requested data (such as menus, translations and dynamic qweb
      templates) to avoid requesting them on each webclient start, since they
      tend not to change often. Unfortunately, it introduced a read on the
      ir.ui.menu model that raised an `AccessError` if the authenticating user
      was not a member of the `base.group_user` group ('Internal' user type).
      
      While fixing that issue, it became apparent that `session_info`
      returns a whole lot of information through this remote connection route
      which is entirely unnecessary if not used in the context of a webclient
      start, such a currencies, the state of the enterprise subscription, etc.
      
      This commit fixes the access right issue by removing this non-relevant
      information from the returned dict (including cache keys) if the user
      is not an internal one.
      
      closes odoo/odoo#40213
      
      Related: odoo/enterprise#6688
      Signed-off-by: default avatarDamien Bouvy (dbo) <dbo@odoo.com>
      6e99ac2c
  12. Nov 20, 2019
  13. Nov 22, 2019
  14. Nov 24, 2019
  15. Nov 23, 2019
  16. Nov 22, 2019
    • jbm-odoo's avatar
      [FIX] mail: Limit emojis quantity · b115bc11
      jbm-odoo authored
      
      If the user put more than 200 emojis, we didn't replace emoji with
      image. But due to a typo in the code, this mechanism broke the
      discuss application.
      
      closes odoo/odoo#40725
      
      X-original-commit: 0877cb6c
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      b115bc11
    • fw-bot's avatar
      [FIX] l10n_it_edi: remove 'Send' button from Customer Invoices · 633b931d
      fw-bot authored
      
      'Send' button meant to send Italian e-invoices are shown
      for invoices belonging to non-Italian companies as well.
      
      Since the invoices' are being sent on validating the
      invoice itself, Send button means less business here.
      
      Hence removed it.
      
      opw-1945836
      closes #31470
      
      closes odoo/odoo#40717
      
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      633b931d
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] mail: make attachment filtering selective on uid · 6258c7eb
      Andrea Grazioso (agr-odoo) authored
      
      Install Accounting, go to Configuration > Follow-up Levels. Create a new
      Follow-Up Action with low due days just to make testing easier and "Join
      open invoices" enabled. Go to Customers>"Follow-up Reports", select a
      follow up report with action "test", click on "Send Email"
      
      The email will be sent, without attachments. There should be a number of
      attachments equal to the number of due invoices, but for security reason
      the attachments are filtered in the message post processing phase.
      
      Changing security check to avoid filtering legitimate material.
      
      opw-2116803
      
      closes odoo/odoo#40181
      
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      6258c7eb
    • Nicolas Martinelli's avatar
      [FIX] l10n_be_edi: error at PDF generation · 2174e406
      Nicolas Martinelli authored
      
      An UBL invoice can contain several `AdditionalDocumentReference`, some
      of them without `Attachment`. For example:
      
      ```
        <cac:AdditionalDocumentReference>
          <cbc:ID>UBL.BE</cbc:ID>
          <cbc:DocumentDescription>BOB50  6.07.0</cbc:DocumentDescription>
        </cac:AdditionalDocumentReference>
        <cac:AdditionalDocumentReference>
          <cbc:ID>Facture N°19090118 - 30-09-2019.pdf</cbc:ID>
          <cbc:DocumentDescription>CommercialInvoice</cbc:DocumentDescription>
          <cac:Attachment>
            <cbc:EmbeddedDocumentBinaryObject filename="Facture.pdf" mimeCode="application/pdf">JVBERi0xLjMK...
      ...
      ```
      
      In this case, a crash occurs since:
      
      ```
      element.xpath('cac:Attachment//cbc:EmbeddedDocumentBinaryObject', namespaces=namespaces)
      ```
      
      is an empty list.
      
      To avoid this, we loop on all elements and generate all PDFs.
      
      opw-2128083
      
      closes odoo/odoo#40698
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      2174e406
  17. Nov 20, 2019
  18. Nov 22, 2019
  19. Nov 21, 2019
    • Nicolas Martinelli's avatar
      [FIX] calendar: round duration · 91b5650a
      Nicolas Martinelli authored
      
      When a calendar event is created with a duration of for example 20
      minutes, the end time appears as the start time + 19 minutes.
      
      Because of the rounding of the duration (20 minutes = 0.333... hours),
      the end time is incorrectly set (xx:19:59.998...) then displayed. Since
      the duration can only be set by the minute, we round it before computing
      the end time.
      
      opw-2122853
      
      closes odoo/odoo#40652
      
      X-original-commit: f6ae9f0a
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      91b5650a
    • Denis Vermylen's avatar
      [FIX] server.py: <threaded> avoid registry lock upon shutdown · 7ed9478d
      Denis Vermylen authored
      
      A deadlock can occur between threads when concurrent requests
      acquire the registry lock and conflicting database-level locks
      in different orders. The database won't be able to detect and
      break the deadlock because it involves an external, Python-level
      lock. This situation is more likely to occur during module
      installations [1].
      
      If the server is started with the `limit_time_real` option,
      it should be able to abort the deadlocked requests after the
      timeout, and restart. However that could not work because
      the recovery initiated by `reload()` is blocked at the end
      of the `stop()` method, as it cannot acquire the registry
      lock either, necessary for `Registry.delete_all()`.
      
      Since that deletion step is in fact not necessary, it can
      be skipped, avoiding the deadlock entirely.
      
      Indeed there's no real reason anymore to delete the DB's
      registry upon shutdown. This was introduced for 7.0 by
      b5daffc1, in order to perform
      other cleanups (including cron agent threads). These other
      cleanups are not necessary anymore, and when the stop()
      method of the ThreadedServer completes, the next step is
      either a restart of the whole process (via execve() through
      _reexec()), or a full process exit. Keeping the registry in
      memory for a few cycles until this happens makes no difference.
      
      When such a deadlock occurs, it's always possible to manually
      kill the server with 2 `kill` commands, or 1 `kill -9`.
      
      ~~~~~~~~~~~~~~~~~~~~~~
      [1] Reproduction info:
      
      The following deadlock was observed in Odoo threaded server mode:
      
      1. incoming request spawns a new thread A
         A starts a transaction and does a "SELECT ... FROM res_users ..."
         getting an ACCESS SHARE lock on the table
      2. incoming request spawns a new thread B
         B is a request that calls `button_immediate_install`, that will
         install new modules and alter the res_users table.
      3. B takes and holds the registry lock and executes "ALTER TABLE
         res_users ...", that waits to get the ACCESS EXCLUSIVE lock on the
         table until A's transaction releases the ACCESS SHARE lock.
      4. A continues code execution and reaches a .sudo() call, it tries to
         create a new environment. The creation of the new environment
         requires to wait for the registry's lock to be release but it's held
         by B.
      
      -> A waits for B's registry lock to be released
      -> B waits for A's ACCESS SHARE lock to be released
      -> Deadlock that can't be broken except by force-killing the server
      
      closes odoo/odoo#40663
      
      X-original-commit: 9e675254
      Signed-off-by: default avatarOlivier Dony (odo) <odo@openerp.com>
      7ed9478d
    • Victor Feyens's avatar
      [FIX] doc: remove support for IE 11. · 9071a253
      Victor Feyens authored
      
      Since Odoo V13, ES6 is supported and we therefore do not support IE 11
      anymore.
      
      closes odoo/odoo#40602
      
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      9071a253
Loading