Skip to content
Snippets Groups Projects
  1. Jun 21, 2021
    • alt-odoo's avatar
      [FIX] mrp_account: correctly retrieve rounding factor of currency · 2c9a86c5
      alt-odoo authored
      
      The company is not mandatory on the analytic account, and the currency on it
      is a related field to the currency of that company, if set. In case it is not
      set, we should add a default fallback on the currency of the company of the
      manufacturing order.
      
      closes odoo/odoo#72456
      
      X-original-commit: 4fc2ec31
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      Signed-off-by: default avatarAlex Tuyls <alt-odoo@users.noreply.github.com>
      2c9a86c5
    • Xavier Morel's avatar
      [FIX] core: don't break import on files triggering UnicodeEncodeError · 72fea2fe
      Xavier Morel authored
      
      The import logging (ish) assumes that if an exception has at least 2
      args the second arg is metadata added by the callee.
      
      As it turns out, `UnicodeEncodeError` has *five* arguments, none of
      which is added by us. So if encoding something fails during the
      process (e.g. because the file contains a lone surrogate, which leads
      to the database insert failing when psycopg2 tries to encode the query
      to UTF8), then the `_log` function itself will fail, yielding a very
      unhelpful error of:
      
         dictionary update sequence element #0 has length 1; 2 is required
      
      (because we tried to update a dict using a string).
      
      This issue occurs only during *field conversion* and most fields have
      no need to interact with the database (so don't need to encode the
      value, which is what fails), however it is a problem when the invalid
      string is used as a record name to look for (e.g. an m2o).
      
      Further improve the experience by converting the UnicodeEncodeError to
      a ValueError using the stringified UEE: `_log` assumes the first
      argument to the exception is an error message of some sort, but for
      UnicodeError subclasses it's just the encoding involved in the
      error (here `utf-8`), which doesn't really serve as an error message.
      
      Stringifying the exception generates a complete error message which is
      quite a bit more helpful.
      
      Issue 2480064
      
      closes odoo/odoo#72398
      
      X-original-commit: a24fe7ff06a03e4a4b477b30ee3feb0ec06a7d0a
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      72fea2fe
    • Prakash Prajapati's avatar
      [FIX] account, purchase, sale: reposition tooltip to avoid resize flicker · 8511d235
      Prakash Prajapati authored
      
      The tour bubble "animation" that makes it to bounce up and down can cause
      issues when its position is at the edge of the bottom of the screen.
      
      In the sale tour, this would make the window constantly resize to show a
      scrollbar and then resize to hide the scrollbar, creating quite a sickening
      effect visually.
      
      closes odoo/odoo#68391
      
      Task-id: 2480195
      Related: odoo/enterprise#17393
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      8511d235
    • wan's avatar
      [FIX] l10n_de: review DIN5008 format · 234fd4c1
      wan authored
      
      closes odoo/odoo#66697
      
      Signed-off-by: default avatarQuentin De Paoli (qdp) <qdp@openerp.com>
      234fd4c1
  2. Jun 10, 2021
  3. Jun 21, 2021
  4. Jun 17, 2021
  5. Jun 21, 2021
    • William Henrotin's avatar
      [FIX] product,purchase_stock: get correct supplier for lead days · c1bd985e
      William Henrotin authored
      
      Resupplying a product with a purchase order ask to choose the suitable
      supplier to put on the purchase order. Another search is perform on top
      of that to compute de date to order in order to respect the lead days
      promise by the supplier. The issue is that the first search is done with
      the orderpoint company into account but not the second one.
      
      This commit passes the company to _select_seller when computing the total
      lead days required for an order.
      
      opw : 2557125
      
      closes odoo/odoo#72340
      
      Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
      c1bd985e
  6. Jun 07, 2021
    • Nasreddin Boulif (bon)'s avatar
      [FIX] website_crm_partner_assign: allow editing contact from portal · 7d41ab05
      Nasreddin Boulif (bon) authored
      
      Issue
      
        - Install 'addons/website_crm_partner_assign' module
        - Create a partner X without a phone number (edit only name).
        - Save and click on "Opportnuties" stat button
        - Create an opportunity Y and set X as customer
        - Edit it and set "Joekl Willis" as assigned partner
        - Logout then login with portal user (Joel Willis)
        - Go to "My account" page and click on "Opportunities"
        - Select the opportunity Y and edit "Contact"
        - Change phone number then save
      
        Access error message:
        (not allowed to access 'Contact' (res.partner) records)
      
      Cause
      
        When editing the opportunity (OPP) phone (or email_from) field,
        if a partner is linked to the OPP and the phone is different,
        we will update also the phone of the partner.
        User portal is not allowed to edit partner.
      
      Solution
      
        If user has write access on lead, use sudo() to update lead.
        Raise an error if a user want to update a non allowed field
        from portal through the contact lead form.
      
      opw-2530744
      
      closes odoo/odoo#71497
      
      Signed-off-by: default avatarbon-odoo <nboulif@users.noreply.github.com>
      7d41ab05
  7. Jun 18, 2021
  8. Jun 08, 2021
  9. Jun 21, 2021
    • Thibault Delavallée's avatar
      [FW][FIX] mail: correctly avoid increasing bounced counter two times · 6e1bca5d
      Thibault Delavallée authored
      
      When a bounce has to be managed on a record already inheriting from blacklist
      mixin it shoudl not be counted two times: one for email-based bounce and one
      for "all records using that email linked to blacklist mechanism should
      bounce".
      
      A mechanism exists to prevent that double increase but it was not correctly
      done. Protection was reset in a loop.
      
      Task ID-2547347
      PR odoo/odoo#72347
      
      closes odoo/odoo#72371
      
      X-original-commit: odoo/odoo@0fc5f504170f302fffabeeb32e8c321b62c4467d
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      6e1bca5d
    • Jairo Llopis's avatar
      [FW][IMP] mail: allow to remove plus addressing from bounce return addresses · df2d955b
      Jairo Llopis authored
      Since odoo/odoo@f4524f03c32a27b1899562a71cad6f491bfe44ce plus addressing is not used anymore
      for handling bounces. Indeed it relies on references / in reply to to find
      original message that bounced. It is therefore not necessary to enforce the
      use of plus addressing.
      
      As some provider do not support plus addressing as a way to contact left-part
      of email with sub-informations people should have a way to deactivate plus
      addressing used in bounce aliases.
      
      To preserve backwards compatibility for stable versions old behavior is
      retained unless a new `mail.bounce.alias.static` ICP is set with a truthy
      value.
      
      Fix https://github.com/odoo/odoo/issues/71242 by dropping requirement of plus addressing.
      
      @Tecnativa TT29827
      Closes #71242
      Task ID-2547347
      PR odoo/odoo#72347
      
      X-Original-Commit: odoo/odoo@6c1fbed523d0b7b83f0d5b3c305f1eb2a7549292
      df2d955b
  10. Jun 16, 2021
  11. Jun 17, 2021
    • Achraf (abz)'s avatar
      [FIX] web: Prevent quick create from closing after text selection · c19660c8
      Achraf (abz) authored
      
      There is a function allowing to close the quick create if we click outside the element.
      
      `RecordQuickCreate._onWindowClicked`
      
      Except that this function is triggered in a "click" event, so if we click on the quick create element and drag the mouse outside, it will detect that we are outside and close the quick create.
      This manipulation can happen when you want to select text with the mouse.
      
      This PR prevents this behavior by detecting when a click is from the quick create
      
      opw-2558932
      
      closes odoo/odoo#72259
      
      X-original-commit: 75538bf2a36aa91df8b183ac21ae99a174e1c2fa
      Signed-off-by: default avatarAchraf <abz-odoo@users.noreply.github.com>
      c19660c8
  12. Jun 20, 2021
  13. Jun 18, 2021
  14. Jun 17, 2021
  15. Jun 04, 2021
  16. Jun 17, 2021
    • Nicolas Lempereur's avatar
      [FIX] website_slides: can edit frontend enroll message · 6334c728
      Nicolas Lempereur authored
      
      The frontend enroll message was display as a `<small/>` tag, but it
      seems that lxml HTMLParser parse it wrongly, for example:
      
        html.tostring(html.fromstring('<small data-oe-model="test"><p></p></small>'))
      
      returns:
      
        '<div><small data-oe-model="test"></small><p></p></div>'
      
      So branding attributes like data-oe-model that are on small tag are not
      found on root node that has become a `div` tag after parsing => this causes
      a traceback error when saving a change in this part.
      
      Fix: use small as wrapper for `<div/>` tag that is treated correctly by
      HTMLParser (span is also treated correctly but div makes more sense
      here).
      
      opw-2573955
      
      closes odoo/odoo#72304
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      6334c728
    • xO-Tx's avatar
      [FIX] tools: keep image option related attributes · 7c566661
      xO-Tx authored
      
      - Change an image option in mass mailing editor (e.g. Quality)
      - save
      - edit -> The option can't get the new applied value.
      
      The body_arch's field used in mass mailing editor is
      sanitizing attributes and as a consequence, option related data
      attrs are removed on save.
      
      task-2327045
      
      closes odoo/odoo#72008
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      7c566661
  17. Feb 17, 2021
  18. Jun 17, 2021
  19. Jun 15, 2021
    • Goffin Simon's avatar
      [FIX] mrp: Unbuild serial number · 47d6ff49
      Goffin Simon authored
      
      When a serial number SN is trying to be consumed and has been unbuilt in the past,
      an evaluation is used to check that the # of times SN was unbuilt is equal to
      the # of times SN was consumed. However, when counting the unbuild SN it did not take into account if
      it was from an unbuild order.
      
      opw:2510294
      
      closes odoo/odoo#71684
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      47d6ff49
  20. Jun 16, 2021
    • Aurélien (avd)'s avatar
      [FIX] account: Fix reconciliation with multi-currencies but balance = 0 · 1231d54b
      Aurélien (avd) authored
      
      This commit fixes the case when the reconciliation never ends due to an infinite loop.
      This happens when we attempt to reconcile two journal items having differents foreign currencies but an amount_residual = 0.0.
      In that case, partials are created everytime with zero amount, zero debit_amount_currency and zero credit_amount_currency.
      We don't need to handle such reconciliation because exchange difference journal items are always created using the same foreign currency as the originator line.
      
      The way the reconciliation is made for reversal moves is also edited by this commit to avoid reconciling lines on the same moves but with different currencies.
      
      closes odoo/odoo#71906
      
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      1231d54b
  21. Jun 15, 2021
    • Djamel (otd)'s avatar
      [FIX] website_slides: hide the "Go to website" button if the slide is not saved · 5b9aa865
      Djamel (otd) authored
      
      Steps to reproduce the bug:
      - Go to Elearning > choose any course or create a new one
      - Click on “add content” :
          - Add a title to slide
          - Click on "Go to Website"
      
      Problem:
      An error is triggered because we call the "create" method to save the slide, which tries to access the “channel_id”, the course ID in which the slide will be added. However, the field is not set in values.
      The "create" or "write" function in "slide_channel" must first be called to save the course, which will then call the create function in "slide_slide"
      
      Solution :
      Hide the "Go to website" button as long as the course is not created and therefore has no id
      
      opw-2526541
      
      closes odoo/odoo#72185
      
      X-original-commit: e412ba48
      Signed-off-by: default avatarDjamel Touati <DjamelTouati@users.noreply.github.com>
      5b9aa865
  22. Jun 16, 2021
    • Romain Derie's avatar
      [FIX] sale_coupon: align stat button with act_window results · 79afc80e
      Romain Derie authored
      
      Before this commit, the number you saw on the stat button was not always
      the same as the number of sale order you would see when you clicked on it.
      Indeed, there was a domain force on the action to only show confirmed orders,
      while the stat button was counting quotations too.
      
      Fixed #70911
      
      closes odoo/odoo#71826
      
      Signed-off-by: default avatarRomain Derie <rdeodoo@users.noreply.github.com>
      79afc80e
    • Stéphane Debauche's avatar
      [FIX] crm: dot not sync the phone / email from False to an empty string · 9ce77416
      Stéphane Debauche authored
      
      Bug
      ===
      
      1. Create a new database from the database selector
      2. Do not select a country for your company
      3. Install CRM
      4. Create a new opportunity and select your company
      5. The sync "warning" will be displayed, and it should not
      
      The reason for that is the phone of the company is an empty string and the
      phone of the lead is False. So we try to sync them and we show the warning
      message even if for the user, nothing will happen.
      
      This commit fixes that behavior by correctly checking that False / empty
      strings are considered as equel.
      
      TaskID-2499659
      
      closes odoo/odoo#72237
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      9ce77416
    • Robin Heinz's avatar
      [FIX] point_of_sale: reprint in manage order · 7a7aaced
      Robin Heinz authored
      
      The printer dialog was not shown when going through the manage order if there
      was no printer connected.
      
      In order to fix this issue, the tryReprint doesn't check anymore if a printer is
      connected or not. It'll print via printer if connected or show the the printer dialog.
      
      closes odoo/odoo#72215
      
      Signed-off-by: default avatarQuentin Lejeune (qle) <qle@odoo.com>
      7a7aaced
  23. Jun 03, 2021
    • Denis Ledoux's avatar
      [FIX] registry: check_foreign_keys, constraint names are limited to 63 chars · e33abdcd
      Denis Ledoux authored
      
      When computing the foreign key name,
      `check_foreign_keys` didn't take into account the limit of 63 characters
      for constraint names.
      
      Because of this, some constraints were dropped and recreated
      over and over while they were correct, during install and upgrades.
      
      For instance, when installing `base`
      when adding the foreign key for which the name was computed
      `base_partner_merge_automatic_wizard_res_partner_rel_base_partner_merge_automatic_wizard_id_fkey`
      Postgresql created the constraint under the name
      `base_partner_merge_automatic__base_partner_merge_automatic_fkey`
      and therefore, as the name did not match,
      the constraint was dropped and re-created.
      
      closes odoo/odoo#71658
      
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      e33abdcd
  24. Jun 15, 2021
  25. Jun 14, 2021
  26. Jun 08, 2021
Loading