Skip to content
Snippets Groups Projects
  1. Feb 04, 2020
    • Swapnesh Shah's avatar
      [FIX] account: Use current date as fallback to convert currency · c3151dae
      Swapnesh Shah authored
      
      Fixes #43705
      Before this commit, There will be tracback on converting currecy if there is not date on tax line.
      
      Now we use current date to as fallback to convert currency.
      
      closes odoo/odoo#44559
      
      X-original-commit: 2b88d71c
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      c3151dae
    • Martin Trigaux's avatar
      [IMP] bus: unescape notification message · d11ee780
      Martin Trigaux authored
      
      The title of notification is the author name escaped (for security
      reasons).
      
         if (message.hasAuthor()) {
             title = _.escape(message.getAuthorName());
         }
      
      When forwarded to the system notification, it does not need to be
      escaped though, as the system notification is not HTML based.
      
      Without this patch, a user named "Bob's friend" sending a message was
      creating a notification with the title "Bob&#x27;s friend"
      
      Unescaping the notification body just in case but the HTML of the body
      in a mail.messages should be stripped by _notifyIncomingMessage.
      Unescaping will just ignored unescaped characters and should do
      nothing on messages not escaped.
      
      Fixes odoo/odoo#24846
      
      closes odoo/odoo#44550
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      d11ee780
    • Odoo's Mergebot's avatar
      [MERGE] web_studio: model configurator · d64bf7e6
      Odoo's Mergebot authored
      
      Improvements for custom models and some default behaviours
      linked to the Studio model configurator (Enterprise task).
      
      In a nutshell:
      - mark the default `x_name` field of a custom model as 'to be copied'
      - improvement for kanban views that makes it easier to user with
        custom models
      
      The interesting part is in the Enterprise `web_studio` module.
      
      Task 2091654
      Enterprise PR: odoo/enterprise#7326
      
      closes odoo/odoo#42055
      
      Related: odoo/enterprise#7326
      Signed-off-by: default avatarDamien Bouvy (dbo) <dbo@odoo.com>
      d64bf7e6
    • Damien Bouvy's avatar
      [IMP] base: make name of custom models `copied` by default · c2fccc91
      Damien Bouvy authored
      Copying a custom model's record seems pointless by default, since
      no field is actually copied.
      
      It makes sense to copy at least the `x_name` field, to make it clear
      to the user that the system understood it was duplicating something
      and not just creating something entirely new.
      c2fccc91
    • Damien Bouvy's avatar
      [IMP] web: kanban content container · 18e06fa9
      Damien Bouvy authored
      The 'new' (read: the classes not in the 'compatibility layer section')
      classes of the kanban views did not allow to cleanly separate an image
      header from a content container.
      
      This commit adds such a container, allowing a very simple layout that
      should work all the time for a typical 'card with left image and right
      content layout':
      ```xml
      <div class="o_kanban_record oe_kanban_global_click o_kanban_record_has_image_fill">
        <field class="o_kanban_image_fill_left" name="image_128"
               widget="image"
               options="{'zoom': true, 'background': true, 'preventClicks': false}"/>
        <div class="o_kanban_record_details">
          <div class="o_kanban_record_top">
            <div class="o_kanban_record_headings">
              <strong class="o_kanban_record_title">
                <field name="x_name"/>
              </strong>
            </div>
          </div>
          <div class="o_kanban_record_body">
            <!-- some fields here (e.g. tags,...) -->
          </div>
          <div class="o_kanban_record_bottom">
            <div class="oe_kanban_bottom_left">
              <!-- some fields here (e.g. kanban status,...) -->
            </div>
            <div class="oe_kanban_bottom_right">
              <!-- some fields here (e.g. user image,...)-->
            </div>
          </div>
        </div>
      </div>
      ```
      
      Before this commit, the absence of a container for the right side meant
      that the top/body/bottom were flex-growed in a flex-direction: row
      element, appearing as 3 columns instead of rows.
      18e06fa9
    • Damien Bouvy's avatar
      [IMP] web: allow background-style images for custom models · ea4c9347
      Damien Bouvy authored
      The `FieldBinaryImage` assumes that the image mixin is used to manage
      its fields - this is mostly true, until you use custom fields.
      
      This commit makes using the 'background' option of the Image widget
      possible by fallbacking the thumbnail field's name to the name of
      the field itself instead of `image_128` when we're dealing with a custom
      field.
      ea4c9347
    • Nicolas Martinelli's avatar
      [FIX] purchase: vendor reference · 411dd85a
      Nicolas Martinelli authored
      
      - Create a product A
        MTO, Buy
        Add a supplier S1 and set a specific reference
      - Create a product B
        MTO, Buy
        Add a supplier S2 and set a specific reference
      - Create a SO with A & B, confirm
      - 2 RFQ are created
      
      The first RFQ is created with the correct reference, but not the second
      one.
      
      This is because `display_name` depends on context keys: it is computed
      once for both products with `partner_id` set as `S1`, while it should be
      recomputed for product B with `partner_id` set as `S2`.
      
      In order to avoid this, we use `with_prefetch()` to avoid reusing the
      prefetched value.
      
      opw-2176638
      
      closes odoo/odoo#44564
      
      X-original-commit: d96c1910be8f242455de9b443fc9db82155b4dd1
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      411dd85a
    • Victor Feyens's avatar
      [REM] web_diagram: remaining files · 1ed07959
      Victor Feyens authored
      
      The web_diagram module was removed in saas-13.1,
      along with the diagram view support but some translation files were
      brought back by forwardports.
      
      closes odoo/odoo#44563
      
      X-original-commit: 3f50601736b23dac78720d24d5b67bf6b94f5f43
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      1ed07959
    • Nicolas Martinelli's avatar
      [FIX] l10n_ch: ISR with partial payment · a02a4b11
      Nicolas Martinelli authored
      
      - Create an invoice for 1000
      - Make a partial payment (e.g. cash) for 250
      - Print the ISR
      
      The ISR contains an amount of 1000 (total amount), while it should be
      750 (amount left to pay).
      
      opw-2180538
      
      closes odoo/odoo#44552
      
      X-original-commit: 421bbcd5
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      a02a4b11
    • Jason Van Malder's avatar
      [FIX] web_editor: replace root style/class attrib · 5b252215
      Jason Van Malder authored
      
      Issue
      
          - Install eLearning
          - Edit the header > change image
          - Save
      
          Image not changed
      
      Cause
      
          We do not take new style/class attrib in account in
          replace_arch_section.
      
      Solution
      
          Take them in account
      
      OPW-2122947
      OPW-2182109
      
      closes odoo/odoo#44541
      
      X-original-commit: 8579c0ca
      Signed-off-by: default avatarJason Van Malder (jvm) <jvm@odoo.com>
      5b252215
  2. Feb 03, 2020
  3. Jan 31, 2020
  4. Jan 29, 2020
    • Thibault Francois's avatar
      [FIX] account: take into account force_company for default journal · 08dfa9ff
      Thibault Francois authored
      The default journal depends on the company define in the context or the company in the environment
      In case of online signature/payment of a SO in a different company then the public user
      The company will be wrong and the journal_id as well
      It lead to a fail of the payment since the payment could not be reconciled with the invoices
      
      This is happening because the force_company is not taken into account for the default journal
      
      This commit take the force_company into account, it take the precedences on the default_company
      
      closes odoo/odoo#44238
      
      X-original-commit: 8158e286
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      08dfa9ff
  5. Feb 03, 2020
    • Jeremy Kersten's avatar
      [IMP] hr_holidays: improve display name · e3fa264d
      Jeremy Kersten authored
      
      Before this commit, the date range was not known without open the record in backend.
      It is really painfull to don't know when a guy of your team ping you on a new leave
      the date from the current leave. (today ? next week ? ...)
      
      Now we have the date into the name_get and so the subject of the email.
      
      task-2001439
      
      Nothing related to next activity ;) but idea was the same.
      
      closes odoo/odoo#44462
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      e3fa264d
    • Denis Ledoux's avatar
      [IMP] base_automation, web: give possibility to disable/edit failing automated actions · 355cb456
      Denis Ledoux authored
      
      If an automated action raises an exception, in the traceback modal:
       - For admins, display Disable & Edit automated action buttons
         to be able to directly know with wihch automated action the error occurred,
         and to give the possibility to edit or disable it quickly,
       - For regular users, just add a paragraph to tell with which automated action the error occurred,
         so they can give this useful information to their administrator
      
      This is specially useful for databases which have just been
      upgraded to a newer version, and for which the server action
      is failing because its code is no longer supported.
      
      closes odoo/odoo#44513
      
      X-original-commit: 8f3940c132bbbc99e47fa3f0cba0e768159d9af2
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      355cb456
    • jbm-odoo's avatar
      [FIX] stock_account: Avoid divide by 0 · dc1402c7
      jbm-odoo authored
      
      closes odoo/odoo#43188
      
      Related: odoo/enterprise#7676
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      dc1402c7
    • jbm-odoo's avatar
      [IMP] stock: Add context key to avoid send sms · 620730ed
      jbm-odoo authored
      In stock, before sending an sms, we check if there aren't the key
      'skip_sms' in the context. It is useful, for example, in fsm
      application.
      
      TaskID: 2081191
      620730ed
  6. Jan 31, 2020
    • Lucas Lefèvre's avatar
      [IMP] hr_timesheet, sale_timesheet: Set task analytic account · ac8c30be
      Lucas Lefèvre authored
      
      Purpose
      =======
      
      Currently, it is only possible to set an Analytic Account for a whole Project, there
      is no distinction by task. However, if the user has 1 task per customer, he cannot
      track the costs and revenues for that specific customer easily. He has to manually
      change the AA of the timesheets' analytic lines. An option would be to set a
      different AA on the SO generating the task, but the AA of the project takes over
      anyway.
      
      Specifications
      ==============
      
      If the user sets an AA on the SO, it should bypass the one set on the project
      Add an AA field below the Email cc one on tasks in debug mode
      - should be related to the AA field from the SO
      - it should also bypass the AA set on the project
      All the timesheets from this task should be related to the AA field set on the SO/Task
      
      closes odoo/odoo#40844
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      ac8c30be
  7. Feb 03, 2020
  8. Jan 31, 2020
  9. Feb 03, 2020
    • Victor Feyens's avatar
      [FIX] website_sale_comparison: archived (or deleted) products · 7ae9b811
      Victor Feyens authored
      
      Archived or deleted products shouldn't be counted in the comparison
      widget count anymore.
      
      The current behavior did only reset the cookie (and the count) when
      products were added/removed from the comparison, but didn't consider
      the case when the products currently in the cookie weren't all existing/valid.
      
      Fixes #44049
      
      closes odoo/odoo#44485
      
      X-original-commit: 0b488842
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      7ae9b811
    • Joseph Caburnay's avatar
      [FIX] point_of_sale: invoiced receipt screen not shown if offline · df0c60cc
      Joseph Caburnay authored
      
      The following steps will reproduce the issue:
      
      1. Activate invoicing in the pos config
      2. Start a new session
      3. Switch browser to offline mode (or stop the odoo server)
      4. Make an order
      5. Invoice the order during payment
      6. Validate
      7. Error shows (which is okay)
      8. The problem is that the receipt screen is not shown after validation.
      The intended behavior is that the receipt screen will show with
      an additional Print Invoice button above the receipt.
      
      The problem is caused by wrong signature of the thrown error
      when the _save_to_server is called. The signature understood by
      the error handlers is the one by `error` and not by `reason`.
      
      See _handleFailedPushForInvoice which is the main consumer of the
      error thrown by the _save_to_server call.
      
      closes odoo/odoo#44392
      
      X-original-commit: 5d593eb3
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      df0c60cc
    • Michael Mattiello (mcm)'s avatar
      [ADD] web: add owl AbstractField · 3fd7b200
      Michael Mattiello (mcm) authored
      
      This commit adds the new AbstractField class written in owl,
      meant to be extended by specific Field owl implementations.
      
      Note that its API is not complete yet, but it is enough for
      basic usecases.
      
      This commit also adapts the BasicRenderer to instantiate the
      future new fields that will be written in owl.
      
      closes odoo/odoo#43759
      
      Related: odoo/enterprise#7872
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      3fd7b200
    • Lucas Perais (lpe)'s avatar
      [IMP] web: custom_hooks: dynamic inheritable event handling · 6bdcf054
      Lucas Perais (lpe) authored
      This commit's intention is to bring class inheritance of event handlers
      to components.
      Use case:
      A component class may want to set generic event handlers for all classes
      inheriting from it, in order to set shared event behavior from the start
      It is the case in many parts of Odoo, in particular in the cases of fields
      which need at least to react on some keyboard event for navigation
      
      The way to implement such a behavior is to make use of the
      `useListener` OWL hook, by passing as arguments
      event name and the handler function
      6bdcf054
    • Aaron Bohy's avatar
      [REF] web: remove custom useExternalListener hook · a3e24efc
      Aaron Bohy authored
      This hook is now available in owl directly, so we remove its custom
      definition in Odoo, and adapt the code using it.
      a3e24efc
    • Aaron Bohy's avatar
      [FIX] web: update owl to last version · 6eadb1f7
      Aaron Bohy authored
      This commit updates owl from v1.0.0-beta5 to v1.0.4.
      6eadb1f7
    • Nicolas Martinelli's avatar
      [FIX] delivery, product, stock: use 'Volume' decimal precision · 749d4730
      Nicolas Martinelli authored
      
      Use the 'Volume' decimal precision on all `volume` fields.
      
      Complement of commit c1a5221b
      
      opw-2185374
      
      closes odoo/odoo#44473
      
      X-original-commit: dc0111d6
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      749d4730
    • David Beguin's avatar
      [FIX] website_slides: save video thumbnail on slide creation · 9f73ff62
      David Beguin authored
      Linked to issue: https://github.com/odoo/odoo/issues/43745
      
      
      
      At slide creation, as image_1920 was in readonly mode in form view when type is
      video, document or presentation, the field was not sent in value to the create.
      
      There is no reason to set this field readonly. If the user want to modify the
      thumbnail, that his responsability.
      
      This commit remove the readonly flag for slide.image_1920 field to allow
      computed thumbnail to be saved at slide creation.
      
      Task ID: 2182638
      PR #44405
      
      closes odoo/odoo#44472
      
      X-original-commit: 15af8734
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      9f73ff62
    • Sébastien Theys's avatar
      [FIX] mail: adapt "history" test with non deterministic issue · 4f5334a0
      Sébastien Theys authored
      
      Follow up on 255f7219
      
      The issue is still happening.
      
      With the current commit, we will be able to know for sure if it happens because
      we don't wait long enough, or because the messages are never appearing.
      
      closes odoo/odoo#44471
      
      Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
      4f5334a0
    • fja-odoo's avatar
      [FIX] web_editor: fix input selection not supported · c547d7c1
      fja-odoo authored
      
      Some elements like the file input are not compatible with selection.
      Since there is no reliable way of figuring out if the element is
      compatible or not we will simply try catch it.
      
      closes odoo/odoo#44470
      
      X-original-commit: 1f0a0b380c2738795b0b5a7976692d9e9cd88583
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      c547d7c1
    • Xavier Morel's avatar
      [FIX] *: duplicate views · 28796cdd
      Xavier Morel authored
      
      If a view is present multiple times in the same module, the "last
      instance" is going to win (by replacing any previous instance's arch
      with its own).
      
      Most cases of duplications are probably views which got moved then
      either not removed (from the original location) or revived (through a
      forward-port), the first instance can just be removed entirely.
      
      For the few which seemed to be more than just trivial mistakes, merge
      the two views instead.
      
      closes odoo/odoo#44463
      
      Related: odoo/enterprise#8107
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      28796cdd
Loading