Skip to content
Snippets Groups Projects
  1. Jun 23, 2023
  2. Jun 22, 2023
    • Kartik Chavda's avatar
      [FIX] sale_timesheet: fix activity 'upsell' when threshold is not exceed · 9232093d
      Kartik Chavda authored
      
      Description of the issue/feature this PR addresses:
      In sale, when threshold value of product is not exceed than upsell activity is
      created while creating invoice. upsell activity is only create when threshold
      value exceed otherwise not.
      
      Current behavior before PR:
      When creating an invoice, an 'upsell' activity is created on the sales order and
      assigned to the salesperson even if the threshold has not been exceeded.
      
      Desired behavior after PR is merged:
      Do not create a 'upsell' activity unless threshold is exceeded.
      
      Fix:
      super class is invoke before checking the upsell and create activity. so
      now, we prevent super method from creating upsell activity via passing
      `mail_activity_automation_skip` context.
      
      task- 3330815
      
      closes odoo/odoo#121740
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      9232093d
  3. Jun 21, 2023
    • qsm-odoo's avatar
      [FIX] web: properly listen to colorpicker drag events · 63bf363d
      qsm-odoo authored
      With [1] and [2], the colorpicker / colorpalette were implemented. In
      both cases, for the custom colors hue / saturation / lightness selection
      we listened to mousemove/mouseup events on the whole body / document.
      That is to be able to start dragging the color cursors from inside the
      colorpicker to anywhere on the screen (the cursor being confined into
      their own box of course).
      
      Problems occur when iframes come into the equation. Indeed, from that
      moment, listening to mousemove events on an unique document is not the
      way to go as mousemove over inner iframes will be ignored. This should
      not be the case anywhere in 15.0 (that this original commit targets).
      The only iframe there should be the mass_mailing one and in that case,
      the colorpicker is inside the iframe so it should not be a problem.
      However, [3] (then fixed by [4]) were meant to tackle a similar problem
      (although [3] seems to say the goal was to ignore mousemove outside the
      iframe which is the opposite of what this current commit tries to do:
      listening on the whole screen). However, by doing so, a memory leak was
      created as the document on which the events were bound was not properly
      cleaned as the `destroy` which unbinds the events was not adapted. That
      is the main reason why this commit targets 15.0 (although, the solution
      here still makes sense generically in 15.0 and should make the code
      simpler and easier to understand).
      
      In 16.0, however, the iframe situation is a problem: the website builder
      colorpickers are now in the main document but the edited content is
      inside an inner iframe. In that case, listening to the main document's
      mousemove/mouseup events makes the colorpicker only work when not
      hovering the edited content (which could be acceptable but not perfect).
      Note that during that website builder refactoring, [5] worsened the code
      of [3] and [4] to do exactly that. Later, [6] was made to solve an
      unrelated problem and actually woke up that worsened code, not
      understanding what the new undocumented `ownerDocument` option was for
      (it will stay like this in stable from now on, as it will be not used
      anywhere anymore... hopefully). Because of that, the situation became
      the opposite: dragging inside the colorpicker did not work until the
      edited content was hovered. And because of that functional fact, an even
      more visible problem was created:
      
      - Click on a snippet
      - Select a custom background color using the hsl selection
      - Hover a non custom color (like nearly always the case "by mistake"
        after configuring a custom color, your mouse just moves over the non
        custom colors) => your custom color is lost
      
      This was because the chain of events that were listened inside the
      colorpicker were gone (because of the combination of [5] and [6]). In
      the end, this only revealed the shortcomings of the implementation in
      [1], [2], [3] and [4]: we should not try to search which frame we have
      to listen to: we should listen to the whole screen. This commit solves
      the issue by listening to the top window document and all its inner
      iframes, also fixing the memory leak mentioned earlier.
      
      task-3332711
      
      [1]: https://github.com/odoo/odoo/commit/29f0c0a186a9a60d6e5b7f026c305d689b6fc807
      [2]: https://github.com/odoo/odoo/commit/99910b526ed792235a778863b993d10cf4e77cd7
      [3]: https://github.com/odoo/odoo/commit/4fb33f7f8d6955a44fbb7c94c7d204e9baa09707
      [4]: https://github.com/odoo/odoo/commit/f1b26335a286a47f685b7830db97c21e6fefd68b
      [5]: https://github.com/odoo/odoo/commit/03c552690b15cbf2e7d6b7812386ac64042219af
      [6]: https://github.com/odoo/odoo/commit/418c1178301e28b4bd1412da6d0558e219060830
      
      
      
      closes odoo/odoo#125956
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      63bf363d
    • Jinjiu Liu's avatar
      [FIX] website_sale: block employees from updating their billing address · a251b14f
      Jinjiu Liu authored
      Reproduction:
      1. Install Event, Sales, Webiste
      2. Login as Admin, go to Website -> Go to website -> Events
      3. Click the Open wood event, Register, buy one VIP ticket
      4. In Address step, Edit the billing address, change the name to “Test
      Name”, click next
      5. The user name “Mitchell Admin” is changed to  “Test Name”, we
      shouldn’t be able to change the info
      
      Reason: In the fix to block name change here: https://github.com/odoo/odoo/commit/d823033ad67702b1b92d27a3f66c7a4ec304c644
      we use the can_edit_vat to check if we have existing invoice(s) or
      SO(s). However, we should block the route that an employee changes the
      billing address when placing an order. If they are placing an order for
      external people, it should be done from the back end.
      
      Fix: add an extra error case when it's an employee trying to change the
      name or email address when editing billing address. This is the case
      when an employee tries to order for external people. They should do it
      from the back end. They can still buy for themselves without changing
      the billing address. Also added translation in pot. Edited the test for
      editing address of log in user, added tests for portal user. Reformat
      the invoice exsits check for name change to have better readability
      
      In website, add render on MockRequest that return a supported type
      (string e.g.)
      
      The adding of can_edit_vat:
      https://github.com/odoo/odoo/commit/f8b05f52f5ea7f31135f700b0e240ff563204085
      
      Related fix to block the name change:
      https://github.com/odoo/odoo/commit/d823033ad67702b1b92d27a3f66c7a4ec304c644
      
      A patch to not block the checkout process when name is not set:
      https://github.com/odoo/odoo/commit/781dbeaccac76a6ec4f4b8cac1b607810697e394
      
      
      
      opw-3126325
      
      closes odoo/odoo#125935
      
      X-original-commit: ff0cc7fe
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      Signed-off-by: default avatarJinjiu Liu (jili) <jili@odoo.com>
      Co-authored-by: default avatarJeremy Kersten <jke@odoo.com>
      Co-authored-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      a251b14f
    • Francesco Ballerini's avatar
      [FIX] website_sale: typo in products view · ddebdad3
      Francesco Ballerini authored
      
      This commit fixes a simple SyntaxError on `website_ribbon_id` options attribute on view `product_template_form_view` of `website_sale` module.
      It doesn't seem to cause issues on module update, but it's a common syntax mistake which should be fixed.
      
      closes odoo/odoo#125901
      
      X-original-commit: 82425f57
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      ddebdad3
    • Thomas Lefebvre (thle)'s avatar
      [FIX] hr: prevent launch plan for archived employee · 6d9fc71e
      Thomas Lefebvre (thle) authored
      
      Issue:
      ------
      The "Launch Plan" button appears for an archived employee.
      It causes a traceback.
      
      Solution:
      ---------
      Do not display the button for an archived employee.
      
      opw-3366815
      
      closes odoo/odoo#125876
      
      X-original-commit: 6536a88b
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      Signed-off-by: default avatarThomas Lefebvre (thle) <thle@odoo.com>
      6d9fc71e
    • Florian Charlier's avatar
      [FIX] website_forum: fix tag posts count dependencies · 16103b0e
      Florian Charlier authored
      
      Post counts were not updated when a post was created or deleted
      because of missing dependencies in the _compute.
      
      Note that while "active_test" is included when counting without
      specifying it, the field must be explicitly added to the `_compute`'s
      dependency list to trigger it.
      
      Task-3358143
      
      closes odoo/odoo#125860
      
      X-original-commit: f09291da
      Signed-off-by: default avatarStéphane Debauche (std) <std@odoo.com>
      16103b0e
    • AMZIL Ayoub's avatar
      [FIX] account: accounting dashboard fix amount calculation · 66527c20
      AMZIL Ayoub authored
      
      The issue:
      a traceback raised because of float * NoneType
      
      The fix:
      parenthesis should be added to the expression
      
      opw-3366260
      
      closes odoo/odoo#125794
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      66527c20
    • Saurabh Choraria's avatar
      [FIX] base_geolocalize: update log when request to openstreetmap fails · 1f4395ea
      Saurabh Choraria authored
      
      When the user will not get an HTTP response as 200 while retrieving the location
      using OpenStreetMap Nominatim service, the logger error will occur.
      
      The logger is updated to use the 'warning' level instead of the 'error' level.
      This change reflects a less severe logging level for cases where a request to
      OpenStreetMap fails.
      
      sentry-4151622143
      
      closes odoo/odoo#125785
      
      X-original-commit: a73a65ef
      Signed-off-by: default avatarJulien Castiaux (juc) <juc@odoo.com>
      1f4395ea
    • flvr-odoo's avatar
      [FIX] tools : removing html comments · 74d058ec
      flvr-odoo authored
      
      This commit fixes the malformed comment that would sometimes comment out
      the rest of the html resulting in an improper display.
      
      this is due to the new html5 notation --!> not behing understood by
      our parser.
      
      this commit replaces any --!> into -->.
      
      this commit also remove  <!--> or <!--->
      
      opw-2812488
      
      closes odoo/odoo#125162
      
      X-original-commit: e3906018
      Signed-off-by: default avatarVranckx Florian (flvr) <flvr@odoo.com>
      74d058ec
    • qsm-odoo's avatar
      [FIX] website: prevent crash when missing field dependency in forms · 27144695
      qsm-odoo authored
      
      Steps to reproduce:
      - Add a form.
      - Setup a conditional visibility on one field, using the "contains" or
        "does not contain" operator.
      - Save.
      - Open the HTML editor and voluntarily break the form by changing the
        "data-visibility-dependency" attribute to a random text (non existing
        field used as a dependency).
      - Save => Crash on page load.
      
      One customer apparently reached that case of receiving a `null` value
      (actually possible when retrieving a form data which is an unchecked
      checkbox for example) but combined with an operator which really
      requires the received value to be a string... but not sure how this is
      possible. In any case, it should not make the form crash: it's just a
      problematic *visibility* dependency, it should not prevent using the
      form. For now, let's prevent this case to crash and add an error in the
      console so we may investigate the issue if it ever shows up in a test.
      
      opw-3243345
      
      closes odoo/odoo#125040
      
      Signed-off-by: default avatarGuillaume Dieleman (gdi) <gdi@odoo.com>
      27144695
    • Harald Panten's avatar
      [ADD] l10n_es: new tax IRPF 24 rendimientos del capital · edf8960c
      Harald Panten authored
      
      closes odoo/odoo#124878
      
      X-original-commit: 39f23ac5
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      edf8960c
    • Thomas Lefebvre (thle)'s avatar
      [FIX] project: make `project_ids` field required · d8920c1c
      Thomas Lefebvre (thle) authored
      
      When we create a project stage (project task type),
      it is essential that we link it to a project.
      
      Otherwise, the record created will never be accessible.
      
      opw-3322992
      
      closes odoo/odoo#122614
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      d8920c1c
    • Thomas Lefebvre (thle)'s avatar
      [FIX] industry_fsm, project: add a default project · e4f538ef
      Thomas Lefebvre (thle) authored
      
      Steps to reproduce:
      -------------------
      - create a stage without selecting a project.
      
      Issue:
      ------
      The new stage is inaccessible.
      
      Cause:
      ------
      When the project is not defined, the following ORM command is used:
      `[6, False, []]` for the `project_ids` field.
      
      Solution:
      ---------
      When we create a project stage (project task type),
      it is essential that we link it to a project.
      Add the possibility to override `_get_default_project_ids`.
      Set default project as first fsm project if not project in
      the context.
      
      opw-3322992
      
      closes odoo/odoo#125318
      
      Related: odoo/enterprise#42529
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      e4f538ef
  4. Jun 20, 2023
  5. Jun 19, 2023
    • Mathieu Duckerts-Antoine's avatar
      [FIX] web: orm: protect webSearchRead · 2899888a
      Mathieu Duckerts-Antoine authored
      
      The values for the key "async" found in some services is used to declare
      async methods that should be "protected". The hook "useService" makes sure
      that no code used to process results of those protected methods is
      executed by a destroyed component. The orm method "webSearchRead" was
      not protected due to a "typo".
      
      closes odoo/odoo#125621
      
      Signed-off-by: default avatarGéry Debongnie <ged@odoo.com>
      2899888a
    • Mahdi Cheikh Rouhou (macr)'s avatar
      [FIX] website_sale_product_configurator : show correct available qty in product page · b95f0576
      Mahdi Cheikh Rouhou (macr) authored
      
      When you add items in the cart it always show the number of available left in stock of the previous state for example :
      1- cart is empty it shows 20 items
      2- add one into cart - it shows 20 items left in stock (should be 19)
      3- add another one into cart - it show 19 items left in stock (should be 18)
      
      Steps to reproduce the error :
      1 - Go to one of the product and make sure that it has some available quantity
      2 - Go to sale configuration on the product and remove "out-of-stock : continue selling" and add show available qty only if below 5000 for example
      3 - Go the web page of the product and try to add some items into the cart you will see that the stock message is wrong
      
      The origin of the problem is that when we have optional products activated , it will launch a product configurator modal. After posting the update in the database there is no call to the function that updates the stock message.
      
      opw-3341377
      
      closes odoo/odoo#124164
      
      Signed-off-by: default avatarMahdi Cheikh Rouhou (macr) <macr@odoo.com>
      b95f0576
    • Mehdi Bendali Hacine's avatar
      [ADD] l10n_sa_edi_pos: Implement Saudi ZATCA invoicing standards (POS) · c16d58bf
      Mehdi Bendali Hacine authored
      
      With the introduction of our l10n_sa_edi module we are able to send invoices to ZATCA,
      in this commit we are forcing the invoicing of every PoS order in order to send a simplified
      invoice for each PoS order.
      add a fallback for l10n_sa_edi for invoice_payment_means
      This commit is to add a fallback ('unknown') incase _l10n_sa_get_payment_means_code
      returns value not considered
      
      closes odoo/odoo#124300
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      c16d58bf
    • Mathieu Duckerts-Antoine's avatar
      [FIX] web: search panel: fields should not be added in search bar · 15aefa56
      Mathieu Duckerts-Antoine authored
      
      Let us consider the search arch
      
          <search>
              <field name="foo"/>
              <searchpanel>
                  <field name="bar"/>
              </searchpanel>
          </search>
      
      The two tags "field" are supposed to generate different objects:
       - the first one should generate an entry in the search bar autocompletion
       - the second one should generate a search panel section.
      
      It turns out that the second field did also generate an entry in the
      search bar. This is of course wrong. We fix that problem and add a test.
      
      closes odoo/odoo#125541
      
      Signed-off-by: default avatarJulien Mougenot (jum) <jum@odoo.com>
      15aefa56
Loading