Skip to content
Snippets Groups Projects
  1. Mar 06, 2021
  2. Mar 05, 2021
    • Samuel Degueldre's avatar
      [FIX] web_editor: fix media-dialog not showing most images · 126a09cc
      Samuel Degueldre authored
      
      This was caused by trying to not show dynamic-svgs that had already been
      downloaded when the option to not allow the media-library was activated
      (eg in the website logo, we do not want to allow dynamic SVGs)
      
      Unfortunately the domain was doing a string comparison to make sure the
      url wasn't like the one from dynamic SVGs but implicitly required that
      the url field be not null. This commit fixes that by explicitly allowing
      images with a null url field.
      
      task-2466819
      part of odoo/odoo#66732
      
      closes odoo/odoo#67411
      
      X-original-commit: 0784e14d
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      126a09cc
    • Samuel Degueldre's avatar
      [FIX] web_editor: adapt warning when quality options are unavailable · 6c7476f5
      Samuel Degueldre authored
      Previously, when quality options were not available, the option would
      simply not be displayed. User feedback suggests that this is confusing,
      as for example, in the case of modifying the image in a t-field, quality
      options would not be available when starting the editor, but would
      become available when picking the image again in the media-dialog.
      
      Some leftover code allowed to display a warning about why the quality
      options were not available in the case where the image is not local to
      the database. This warning has been adapted to display a more
      informative message about why quality options are not available, as well
      as suggest a solution:
      - External image => download the image and upload it in odoo
      - t-field => "You need to choose this image again in the media-dialog or
      reupload it to have access to quality options"
      - Images that are in an unsupported format (anything other than PNG or
      JPEG) => short explanation that quality options are only available on
      PNG and JPEG images.
      
      task-2466819
      part of odoo/odoo#66732
      
      X-original-commit: 84417a17
      6c7476f5
    • Younn Olivier's avatar
      [FIX] web, web_editor: customize colorpicker inputs from web_editor · 2ecb5e17
      Younn Olivier authored
      Styles for the hex and rgba inputs from the color picker were modified
      on directly from the web module, which means that for a specification
      concerning only the frontend colorpicker, the backend colorpicker was
      also changed.
      
      This commit reverts the changes that were made and only applies the new
      style for the website editor.
      
      Related to https://github.com/odoo/odoo/pull/65249
      
      
      
      closes odoo/odoo#67396
      
      X-original-commit: 9529e296
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      2ecb5e17
    • Thibault Delavallée's avatar
      [FIX] partner_autocomplete: remove duplicate and wrong version number · 1a2cd3b5
      Thibault Delavallée authored
      
      closes odoo/odoo#67394
      
      X-original-commit: b54b6bb2e09d332a154c67d1c693ebecdcf4f242
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      1a2cd3b5
    • Thibault Delavallée's avatar
      [IMP] mail: simplify index creation · e53956cc
      Thibault Delavallée authored
      
      Currently in init of mail.notification we search for a specific index
      and create it if not found. This is easily replaced by a standard
      CREATE IF NOT EXISTS allowing to simplify code.
      
      LINKS
      
      Task ID-2477444
      Prepares Task ID-2377974 (trace management cleaning task)
      Prepares Task ID-2070632 (channel members main task)
      Prepares Task ID-2419762 (channel members followup task)
      COM PR #67382
      UPG PR odoo/upgrade#2245
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      e53956cc
    • ryv-odoo's avatar
      [REF] mail: rename mail.notification table · ba9e79f2
      ryv-odoo authored
      
      RATIONALE
      
      A bit of history. Link between a message and its recipients has been added
      at first mail refactoring towards a Chatter / Discuss feature. It was done
      in v7 at d64f3c97 with the base addition of mail notification model (lots
      of commits follow that one but that's the first one about notification).
      
      Due to some people thinking that it was unnecessary to keep a model for
      notification it has been removed in v9 at 88b8cd05. Notification table was
      renamed from mail_notification to mail_message_res_partner_needaction_rel.
      
      It was proven to be a mistake even if those "some people" were warned and
      model made its way back to Odoo in v10 at 72dfcae2 . Table name mail_message
      _res_partner_needaction_rel was kept to ease migration and backward
      compatibility.
      
      It is now time to complete the circle and rename it to mail_notification.
      
      SPECIFICATIONS
      
      Rename ``mail_message_res_partner_needaction_rel`` to ``mail_notification`` .
      
      RIP JEM.
      
      Never forget.
      
      LINKS
      
      Task ID-2477444
      Prepares Task ID-2377974 (trace management cleaning task)
      Prepares Task ID-2070632 (channel members main task)
      Prepares Task ID-2419762 (channel members followup task)
      COM PR odoo/odoo#67382
      UPG PR odoo/upgrade#2245
      
      Co-Authored-By: default avatarRémy Voet <ryv@odoo.com>
      Co-Authored-By: default avatarThibault Delavallée <tde@odoo.com>
      ba9e79f2
    • Thibault Delavallée's avatar
      [DOC] mail: clean some docstrings and helpers · d2079b1f
      Thibault Delavallée authored
      As I was passing by I found some docstrings or helpers could be updated or
      rephrased a bit more clearly. This is free as in free beers, without beers.
      
      Some code about mail features (posting) may also be re-indented to ease
      understanding of future modifications. Or just because we had to read
      it and go through many files. Still free beers.
      
      LINKS
      
      Task ID-2477444
      Prepares Task ID-2377974 (trace management cleaning task)
      Prepares Task ID-2070632 (channel members main task)
      Prepares Task ID-2419762 (channel members followup task)
      COM PR odoo/odoo#67382
      UPG PR odoo/upgrade#2245
      d2079b1f
    • Martin Trigaux's avatar
      cc1780cd
    • Benoit Socias's avatar
      [FIX] website: avoid duplication of cookie policy page · d400205f
      Benoit Socias authored
      Before this commit a cookie policy page was created every time the
      website settings were saved with the "Cookies Bar" option enabled.
      
      After this commit the policy page is created only if it does not already
      exist for the website.
      
      task-2454424
      https://github.com/odoo/odoo/pull/67217
      
      
      
      closes odoo/odoo#67370
      
      X-original-commit: 2f920e00
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      d400205f
    • Benoit Socias's avatar
      [FIX] website: remove save snippet button for cookie bar · 0187020e
      Benoit Socias authored
      Before this commit the save snippet button appeared for the cookie bar.
      But this makes no sense because the cookie bar is implicitly saved.
      
      After this commit the save snippet button is not available for the
      cookie bar.
      
      task-2464233
      https://github.com/odoo/odoo/pull/67217
      
      X-original-commit: 439a7568
      0187020e
    • Nasreddin (bon)'s avatar
      [FIX] website_event_track: allow removing favicon · cf7c3b75
      Nasreddin (bon) authored
      
      Issue
      
      	- Install 'website_event_track' module
      	- Go to settings and remove website favicon
      	- Save
      
      	Traceback is raised.
      
      Cause
      
      	Trying to create image from favicon for app_icon,
      	but favicon not set anymore.
      
      Solution
      
      	If no website.favicon, set website.app_icon to False.
      
      opw-2451934
      
      closes odoo/odoo#67367
      
      X-original-commit: dfe1a6af
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      cf7c3b75
    • Jitendra Prajapati's avatar
      [FIX] web_editor: prevent traceback when custom color area is excluded · 1b823742
      Jitendra Prajapati authored
      Bug since the combination of [1] and [2].
      
      [1]: https://github.com/odoo/odoo/commit/1c1894d6d976806be6951db54a3b741dfd093ece
      [2]: https://github.com/odoo/odoo/commit/8b5640b46a33fec5fdac4b19ea354e67211e8e46
      
      
      
      task-2464340
      
      closes odoo/odoo#67364
      
      X-original-commit: d7a540c545cfe2500b08f5d6dfb6fe99747cc7de
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      1b823742
    • Adrien Widart's avatar
      [FIX] mrp: generate all stock picking · e03ee35d
      Adrien Widart authored
      If the company uses multi-step routes, when duplicating a MO, if the
      user changes the BoM, one stock picking will be missing.
      
      To reproduce the error:
      1. In Settings, enable "Multi-Step Routes"
      2. Go to Inventory > Configuration > Warehouse Management > Warehouses
      3. Edit the warehouse "YourCompany"
      4. Set Manufacture to "Pick components, [...] products (3 steps)"
      5. Create a storable product SP
      6. Create two non-empty BoM (BoM01 and BoM02) for SP
          - (Hint: set a different reference for each BoM)
      7. Create a MO
          - Product: SP
          - BoM: BoM01
      8. Save, Mark as Todo
          - (As you can see, 2 transfers have been created: one from WH/Stock
      to WH/Pre-Production, and a second one from from WH/Post-Production to
      WH/Stock)
      9. Duplicate the MO
      10. Set BoM to BoM02
      11. Save, Mark as Todo
      
      Error: Only one transfer has been generated. The transfer from WH/Stock
      to WH/Pre-Production is missing. (The duplication step is used to
      compare the result. If the user saves a new MO, and then edits this MO
      to change the BoM, the same problem will occur).
      
      When confirming the MO, the module runs both pull and push rules. When
      running the pull rule, the modules assigns a stock picking to a stock
      move. To do so, it checks if one stock picking already exists:
      https://github.com/odoo/odoo/blob/7d9264c56ac725c8d19aebad55d5668df2a8c814/addons/stock/models/stock_move.py#L863-L873
      Since such a stock picking does not exist, the module creates a new one:
      https://github.com/odoo/odoo/blob/7d9264c56ac725c8d19aebad55d5668df2a8c814/addons/stock/models/stock_move.py#L887-L900
      
      
      
      When changing the BoM, an `onchange` method is raised, deletes the stock
      moves linked to the first BoM and creates some new ones. However, since
      `group_id` is not a field required by the view
      `view_stock_move_raw_tree`, this field will not be included in the
      `onchange` response.
      
      As a result, when saving the new MO, the `write` request does not
      contain the `group_id` field, so the new stock moves do not have this
      information. Therefore, when running `_search_picking_for_assignation`,
      the module finds a picking and does not create a new one.
      
      OPW-2444235
      
      closes odoo/odoo#67356
      
      X-original-commit: b810e5ff
      Signed-off-by: default avatarAdrien Widart <adwid@users.noreply.github.com>
      e03ee35d
    • Djamel (otd)'s avatar
      [FIX] base: fix the customer search by vat number · 313bd0a2
      Djamel (otd) authored
      
      Steps to follow to reproduce the bug:
      -Go to sales
      -Add a vat number with a '-' like: "123456789-5" to any customer
      -Create a new SO
      -Search the customer by entering their VAT number
      
      Problem :
      When the VAT number contains the character '-' you cannot find the customer with his VAT number.
      The problem is the same if the vat number contains a '.'
      Because, the "_name_search" method before creating the query to search clients by VAT number, removes all the special characters from user input
      
      Solution :
      Do not remove the characters '-' and '.' from the user input for the customer search by vat number.
      
      opw-2457692
      
      closes odoo/odoo#67355
      
      X-original-commit: 3f54c1c7
      Signed-off-by: default avatarAnh Thao PHAM <kitan191@users.noreply.github.com>
      Signed-off-by: default avatarDjamel Touati <DjamelTouati@users.noreply.github.com>
      313bd0a2
    • xO-Tx's avatar
      [FIX] web_editor: fix parent element selection · 1d8077c3
      xO-Tx authored
      
      When a block is removed, the parent will be activated.
      If the parent element is empty and removable:
      
      1) It will be removed too.
      2) In '_activateSnippet' method, we look for the right element to
         be selected using the block's parent (removed from the DOM...).
      
      The goal of this commit is to fix this behaviour by computing the
      selected element before parent removal.
      
      task-2431506
      
      closes odoo/odoo#67354
      
      X-original-commit: 1d483ab5
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      1d8077c3
    • Odoo's Mergebot's avatar
      [FW][MERGE][FIX] survey, website_slides: split computed editable fields · cda0b9c9
      Odoo's Mergebot authored
      
      Purpose
      =======
      Some computed stored editable fields are computed in the same method.
      
      In that case, when one of the value is provided in a create / write call,
      the computed method is not called and other fields computed in the same
      method do not have the right value.
      
      Task 2377119
      COM odoo/odoo/pull/65772
      ENT odoo/enterprise/pull/16221
      
      closes odoo/odoo#67345
      
      Forward-port-of: odoo/odoo#67017
      Forward-port-of: odoo/odoo#65772
      Related: odoo/enterprise#16894
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      cda0b9c9
    • std-odoo's avatar
      [REF] survey: split computed editable fields · 6f552e10
      std-odoo authored
      Purpose
      =======
      Some computed stored editable fields are computed in the same method.
      
      In that case, when one of the value is provided in a create / write call,
      the computed method is not called and other fields computed in the same
      method do not have the right value.
      
      Task 2377119
      COM odoo/odoo/pull/65772
      ENT odoo/enterprise/pull/16221
      
      X-original-commit: c9c64fa740fea31964f433a05d37a0f869b8e9d3
      6f552e10
    • std-odoo's avatar
      [REF] website_slides: split computed editable fields · bdb09107
      std-odoo authored
      Purpose
      =======
      Some computed stored editable fields are computed in the same method.
      
      In that case, when one of the value is provided in a create / write call,
      the computed method is not called and other fields computed in the same
      method do not have the right value.
      
      Task 2377119
      COM odoo/odoo/pull/65772
      ENT odoo/enterprise/pull/16221
      
      X-original-commit: c37ff784f2195325d770e41c70e24a0d1d0420c7
      bdb09107
  3. Mar 04, 2021
    • xO-Tx's avatar
      [FIX] web_editor: fix anchor range selection · 048612f2
      xO-Tx authored
      When we double click a form submit anchor, and depending on the selected
      element before click, the selection range ("document.getSelection()") can
      start from a parent of the targeted node. This will send a wrong range
      to be used in LinkDialog widget.
      
      The goal of this commit is to prevent this behaviour by adjusting the range
      if it starts from anchor parent.
      
      Note: the bug only occurred in Firefox.
      
      Part of https://github.com/odoo/odoo/pull/62206
      
      
      task-2381305
      
      closes odoo/odoo#62206
      
      closes odoo/odoo#67171
      
      closes odoo/odoo#67176
      
      X-original-commit: 9a16c313f131ed2e1017566a5f1bed134e22cc10
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      048612f2
    • xO-Tx's avatar
      [FIX] website_form: add support for redirection to anchors on submit · a0628290
      xO-Tx authored
      Part of https://github.com/odoo/odoo/pull/62206
      task-2381305
      
      X-original-commit: 49943014b0d16e2fed31d4601f76c471252e24c6
      a0628290
    • xO-Tx's avatar
      [FIX] website_form, *: allow to update buttons using link dialog · 6c8fea3c
      xO-Tx authored
      *: web_editor, website_mass_mailing
      
      When we double click a link/button, a link dialog appears
      to update the target properties, and since the current link dialog
      can only handle anchor targets, using it on buttons leads to some
      inconsistencies :
      
      - visible href options for button & url required to save changes.
      - missing preview when button style changed.
      ...
      
      The goal of this commit is to add a fix (with minimum of code) on
      summernote linkdialog to handle button elements using the same logic as
      anchor nodes.
      
      Also, update website form test tour to test those new changes.
      
      Part of https://github.com/odoo/odoo/pull/62206
      task-2381305
      
      X-original-commit: 19fbbdc0327482b5d70bdbcf17c2a5a950327d63
      6c8fea3c
  4. Mar 05, 2021
  5. Mar 04, 2021
  6. Mar 05, 2021
  7. Jan 26, 2021
    • xO-Tx's avatar
      [IMP] web_editor: select siblings when block is removed · 2cdd95f1
      xO-Tx authored
      
      CONTEXT: Within a container, delete a block which has a sibling.
      
      The actual behaviour is to select the container after deletion.
      
      The goal of this commit is to select the previous sibling (if exists),
      or next one. Otherwise the parent element will be selected (default behaviour).
      
      task-2431506
      
      closes odoo/odoo#64875
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      2cdd95f1
  8. Mar 04, 2021
Loading