Skip to content
Snippets Groups Projects
  1. Oct 21, 2021
    • Christophe Monniez's avatar
      [FIX] packaging: remove mako · fb9f89af
      Christophe Monniez authored
      
      Mako is not used anymore for a long time.
      
      closes odoo/odoo#78131
      
      Signed-off-by: default avatarChristophe Monniez (moc) <moc@odoo.com>
      fb9f89af
    • Christophe Monniez's avatar
      [IMP] packaging: sort requirements · 32f3e358
      Christophe Monniez authored
      Part-of: odoo/odoo#78131
      32f3e358
    • Christophe Monniez's avatar
      [IMP] requirements: adapt to latest focal versions · 794677fb
      Christophe Monniez authored
      With the release of Debian Bullseye the time has come for the balancing
      act by trying to update the requirements.
      
      The constraints are the following:
          * Stick as close as possible to python3-* Debian packages versions
            of the current Debian stable.
          * Same but for the Ubuntu LTS version.
          * When one of the above package is patched by Debian or Ubuntu
            maintainers, set the upstream version that includes the patch if any.
      
      Also, as support for python < 3.7 is dropped, some cleanup can be done.
      
      The `reportlab / pillow` combo is a special case:
          * Pillow has to be updated to 8.1.2 as this version includes the
            security patches that were added to Ubuntu package 7.0.0 (Focal).
          * Reportlab crashes with 8.1.2 with version prior to 3.5.54 [0].
            The problem does not occur on Ubuntu Focal as both versions from
            the Ubuntu packaging are compatible.
      
      So the reportlab 3.5.59 is chosen as it's the Debian Bullseye version
      and to avoid multiple lines for a few minor versions.
      
      [0] https://hg.reportlab.com/hg-public/reportlab/rev/0cf382dab63b
      
      Part-of: odoo/odoo#78131
      794677fb
    • Aurélien (avd)'s avatar
      [FIX] stock_valuation_layer: auto_join product_id to avoid bloating queries · cec84ece
      Aurélien (avd) authored
      
      The active field of stock_valuation_layer is related to product_id.active.
      Adding auto_join = True avoids bloating search/read_group queries in
      expression.parse().
      
      closes odoo/odoo#77821
      
      X-original-commit: 2526c640
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      cec84ece
    • Pierrot (prro)'s avatar
      [FIX] account: display currency in invoice preview · c911e0fe
      Pierrot (prro) authored
      
      The currency symbol was not present for the fields "Untaxed Amount"
      and "Total", in the online preview of an invoice.
      
      Now the preview will use the "formatted" value for the fields.
      
      opw-2666340
      
      closes odoo/odoo#78744
      
      Signed-off-by: default avatarFlorian Gilbert <FlorianGilbert@users.noreply.github.com>
      c911e0fe
    • Achraf (abz)'s avatar
      [FIX] web: Fix components position in modal · 1f86e285
      Achraf (abz) authored
      When a componentes is in a modal and uses the positioning hook (filter dropdown in the Search More modal for example), it will shifted from the toggler button.
      This is due to a `-webkit-transform: translate3d (0, 0, 0);` applied on the `modal-body`
      which influences the `position: fixed` attribute of `.o-popper-position` in the `dropdown-menu`
      
      "It is positioned relative to the initial containing block established by the viewport,
      except when one of its ancestors has a transform, perspective,
      or filter property set to something other than none (see the CSS Transforms Spec),
      in which case that ancestor behaves as the containing block. "
      
      See: https://developer.mozilla.org/en-US/docs/Web/CSS/position
      
      the translate3d was applied with https://github.com/odoo/odoo/pull/20314
      
      
      As the bug is no longer exists, we can remove this style.
      
      opw-2668638
      
      closes odoo/odoo#78736
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      1f86e285
    • anhe-odoo's avatar
      [FIX] accounting: fix invoices preview total and untaxed amounts · 2d632013
      anhe-odoo authored
      
      Expected Behavior
      
      The total amount and total taxes amount in invoice, purchase order and offer should be formated with the correct formating options (related to the client's location), and with the correct currency symbol, as it was the case in V14
      
      Observed behaviour
      
      In V15, these amount are written as pure numerical values (eg : 1452.24 instead of $1.452,24). This is the case in every generated pdf, as well as in the user portal preview(s), but not in classical form view(s).
      
      Reproducibility
      
      This bug can be reproduced following these steps:
      - Create a new invoice
      - Validate it
      - Preview it in the user portal of download the printable .pdf
      This can also be done with a purchase order, following the same steps.
      
      Problem Rout Cause
      
      The problem comes from the fact we read the wrong fields, using account.tax_totals.amount_total and account.tax_totals[subtotals].amount instead of account.tax_totals.formatted_amount_total and account.tax_totals[subtotals].formatted_amount.
      
      opw-2666924
      opw-2666553
      opw-2665130
      
      closes odoo/odoo#78372
      
      Signed-off-by: default avatarQuentin De Paoli (qdp) <qdp@openerp.com>
      2d632013
    • Nidhi Patel's avatar
      [FIX] project,web: fix project status color in kanban progress bar · 0886c10d
      Nidhi Patel authored
      Currently, projects that are 'on hold'  stage are represented in grey in
      the kanban progress bar while the colored dot on their card is in blue.
      
      In this commit, we change the color of the 'on hold' stage into 'info'
      instead of 'muted'. After this projects that are 'on hold' are display
      blue in the kanban progress bar as well.
      
      Task-Id:2633273
      
      closes odoo/odoo#76355
      
      Signed-off-by: default avatarLTU-Odoo <IT-Ideas@users.noreply.github.com>
      0886c10d
    • Hardik Prajapati's avatar
      [FIX] project: align the project and task name to the right in the activity view · bb9734fb
      Hardik Prajapati authored
      
      purpose of this commit is to display the project name and task
      to the right of the div in the activity view.
      
      before this commit, the project name and task displays next to
      the many2many_tags div in the activity view.
      
      closes odoo/odoo#76681
      
      Taskid: 2646204
      Related: odoo/enterprise#20949
      Signed-off-by: default avatarLTU-Odoo <IT-Ideas@users.noreply.github.com>
      bb9734fb
  2. Oct 20, 2021
    • Alexandre Kühn's avatar
      [FIX] mail: memleak model manager in tests · 4c18e2d0
      Alexandre Kühn authored
      
      closes odoo/odoo#78686
      
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      4c18e2d0
    • Leonardo Pavan Rocha's avatar
      [FIX] base: use address_format in layout designer · 83aeb8fb
      Leonardo Pavan Rocha authored
      
      In task-2355704 changes were made to the pdf layout designer to allow more
      flexibility when setting company data. However, for the default values of both
      company_details and report_footer, the data wasn't being escaped, therefore
      offering security risks. Also, they didn't take into account the address_format
      when computing the default value. This PR implements Markup usage in the html
      fields and fixes _default_company_details to use the set address_format.
      
      closes odoo/odoo#78652
      
      Signed-off-by: default avatarOlivier Dony (odo) <odo@openerp.com>
      83aeb8fb
    • Louis Wicket (wil)'s avatar
      [IMP] mail: enforce the definition of identifying fields in models · 02fb0c7c
      Louis Wicket (wil) authored
      
      Ensure that all models have their own explicit definition of identifying
      fields. Prior to this commit, if a model did not have identifying fields,
      the ones in mail.model were used implicitly because of the inheritance.
      
      closes odoo/odoo#78692
      
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      02fb0c7c
    • Tom De Caluwé's avatar
      [IMP] website: prevent clicking while starting the editor · 89bdfcd1
      Tom De Caluwé authored
      
      When visiting a page with enable_editor set to true, the web editor
      will be automatically started. However, while the editor is loading,
      the end user can still click other buttons in the navbar.
      
      For example, some changes in the web editor require a save and reload
      of the current page being edited. After saving, the same page will be
      reloaded with enable_editor.
      
      This commit blocks any clicks while the editor is being loaded.
      
      task-2607755
      
      closes odoo/odoo#77428
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      89bdfcd1
    • Benoit Socias's avatar
      [FIX] web_editor: make class-based colors selectable for custom buttons · 26d37812
      Benoit Socias authored
      
      Before this commit selecting a class-based color (gray scale,
      o-color-1~5) was ignored when configuring a custom button colors.
      
      After this commit the color's class is applied.
      Additionally, upon switching between Custom and other types, the custom
      UI is now cleaned up.
      
      task-2653874
      
      closes odoo/odoo#76936
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      26d37812
    • Benoit Socias's avatar
      [IMP] web_editor: reset button text styles when customizing button · 03c02639
      Benoit Socias authored
      Before this commit if button text had styles, they would override the
      color set by customizing the button.
      
      After this commit button text styles are removed when applying custom
      button colors.
      
      task-2653874
      
      Part-of: odoo/odoo#76936
      03c02639
    • svs-odoo's avatar
      [IMP] stock: `inventory_quantity_set` own compute · 489e76ad
      svs-odoo authored
      
      Sets the `inventory_quantity_set` as an editable field (not readonly)
      and creates its own compute to avoid to override it each time the
      `inventory_quantity` is modify and we set the `inventory_quantity_set`
      aside (before this commit, this field new value was always overrided by
      the `inventory_diff_quantity` compute).
      This is useful when we want to write on the quants from the Barcode App
      as we can write on `inventory_quantity` and `inventory_quantity_set` at
      the same time.
      
      task-2632818
      
      closes odoo/odoo#76756
      
      Related: odoo/enterprise#20985
      Signed-off-by: default avatarRémy Voet <ryv-odoo@users.noreply.github.com>
      489e76ad
    • Florian Damhaut's avatar
      [FIX] l10n_it_stock_ddt : fixed ddt report quantity · 1440ded1
      Florian Damhaut authored
      
      Currently, DDT use the product_uom_quantity of product for the ddt move which is inaccurate in case of no-backorder change in quantity
      
      The fix correctly check if the done quantity is other than 0 for the delivery and if it is, use it as the delivery quantity
      
      opw-2663174
      
      closes odoo/odoo#78658
      
      X-original-commit: 8678bf38
      Signed-off-by: default avatarFlorian D <fdamhaut@users.noreply.github.com>
      1440ded1
    • Aaron Bohy's avatar
      [FIX] web: ActionContainer: properly unbind handler · d01c89d8
      Aaron Bohy authored
      
      This isn't a problem in production, because the ActionContainer is
      never destroyed, but it caused a small memory leak in the test
      environment.
      
      closes odoo/odoo#78621
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      d01c89d8
    • Aaron Bohy's avatar
      [FIX] web: ui service: remove leak in tests · d86cc5c0
      Aaron Bohy authored
      Before this commit, the ui service listened to the "change" event
      on several MediaQueryList corresponding to specific window sizes.
      However, those event handlers were never removed. Whereas this
      isn't an issue in production (services are started once and live
      forever), this caused a memory leak in tests, where services are
      deployed on demand, test by test.
      
      There is no cleanup function for services (since they live forever
      by nature). In the test environment, we have a solution for handlers
      bound on window (i.e. window.addEventListener), by monkey patching
      the function (thanks to the browser object), and automatically
      removing all handlers bound during a test, at the end of that test.
      
      This commit fixes the memory leak by no longer using addEventListener
      on MediaQueryList (as this is a deprecated feature anyway [1]), and
      simply using window (or browser)'s addEventListener instead. This
      leak sometimes produced a timeout in the QUnit test suite [2].
      
      [1] https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/addListener
      [2] https://runbot.odoo.com/web#id=2374&action=573&model=runbot.build.error&view_type=form&cids=1&menu_id=405
      
      Part-of: odoo/odoo#78621
      d86cc5c0
    • Aaron Bohy's avatar
      [FIX] crm: properly call super in forecast tests · f62503a5
      Aaron Bohy authored
      Before this commit, those tests sometimes failed because we didn't
      correctly wait for the load and reload promises.
      
      Part-of: odoo/odoo#78621
      f62503a5
    • Aaron Bohy's avatar
      [FIX] web: prevent some tests from failing undeterministically · 78762d0a
      Aaron Bohy authored
      This is a tricky one. The problematic tests involve the quick edit
      feature. Before this commit, those tests sometimes failed [1],
      because there was no guarantee that we waited enough in the test
      before doing assertions.
      
      [1] https://runbot.odoo.com/web#id=2012&action=573&model=runbot.build.error&view_type=form&cids=1&menu_id=405
      
      Part-of: odoo/odoo#78621
      78762d0a
    • Aaron Bohy's avatar
      [FIX] web: attempt to fix non deterministic issue in tests · ed0761dc
      Aaron Bohy authored
      This commit *could* prevent a test from failing randomly. The
      important part in the diff is the switch from $.Deferred to native
      Promise. JQuery Deferred behave differently upon resolution (it is
      sync if the deferred is resolved directly, whereas it is not the
      case for native Promise). I couldn't find any other reason to
      explain why the test was sometimes failing. There is no reason to
      use Deferred anyway.
      
      The issue didn't occur after this commit in more than 600 builds.
      
      [1] https://runbot.odoo.com/web#id=2297&action=573&model=runbot.build.error&view_type=form&cids=1&menu_id=405
      
      Part-of: odoo/odoo#78621
      ed0761dc
    • Aaron Bohy's avatar
      [FIX] web: make test more robust · 880c4683
      Aaron Bohy authored
      Before this commit, the changed test sometimes failed on runbot
      (rarely though), because it might happen that the debounce released
      before the promise returned by the click helper resolved (e.g. if
      the server was overloaded, or was garbage collecting...). That
      promise waited for a setTimeout, and then for a nextAnimationFrame.
      In this scenario, there's no need to wait so long, as there is no
      rendering to wait for.
      
      Example of failing build: https://runbot.odoo.com/runbot/build/10360554
      
      Part-of: odoo/odoo#78621
      880c4683
    • Aaron Bohy's avatar
      [FIX] web: patch: can call a not bound patched function · 476dbf75
      Aaron Bohy authored
      Before this commit, it wasn't possible to patch some functions
      (e.g. setTimeout) on window, because of the way we call them.
      Indeed, we typically do `setTimeout(...)`, because this function
      doesn't need to be bound to the window object.
      
      Part-of: odoo/odoo#78621
      476dbf75
    • Florian Charlier's avatar
      [FIX] event_sale: create tickets with default product type "service" · a03e1281
      Florian Charlier authored
      
      In some cases when creating a new ticket, the default product
      type shown is a "Consumable". It should rather be handled as a
      "Service". In later versions, a detailed type is created, but the
      base product type should be set to service too.
      
      This commit uses the `product_id` `context` to set the default
      detailed type to "event".
      
      Task-2655226
      
      closes odoo/odoo#78519
      
      X-original-commit: 440daf2d
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      a03e1281
    • Mitul Shah's avatar
      [FIX] crm_iap_lead_website: properly handle 'lead_ids' on visitors · bc22bacf
      Mitul Shah authored
      
      While installing 'crm_iap_lead_website' module, 'website_crm' module is
      automatically installed(auto install based on website and crm), and it
      introduces m2m field 'lead_ids' on visitors, as well as 'visitor_ids'
      m2m on leads.
      
      The issue is, 'website_crm' is installed automatically in this case,
      but does not depend on 'crm_iap_lead_website', and one can therefore
      uninstall 'website_crm' without knowing it may impact
      'crm_iap_lead_website' (the 'lead_ids' field is defined in 'website_crm'
      and it is used in 'crm_iap_lead_website', and so trying to access it
      from 'crm_iap_lead_website' in this scenario will introduce a traceback).
      
      Other point to note: as we have no visitor field available in
      'crm_iap_lead_website' (many2many added in 'website_crm'), we cannot
      manually search for leads as we do not have the information (we could
      make a fallback on visitor.partner_id if set, but that would be much
      low-level management just for a corner case).
      
      Considering above points, to avoid the traceback, instead of directly
      accessing the 'lead_ids' field, we simply check that whether the field
      exists or not. If it does not exist, we simply consider that no leads
      are attached to the visitor and we create the reveal view. If the field
      is there, the flow remains the same.
      
      Task-2655439
      
      closes odoo/odoo#78672
      
      X-original-commit: b9c180dd
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      bc22bacf
    • David (dafr)'s avatar
      [FIX] sale_mrp: filter variant BOMs for anglo_saxon price_unit · 7d770f2b
      David (dafr) authored
      
      When invoicing a product with multiple variants and with anglo_saxon_accounting, the COGS would be the wrong amount.
      The function _stock_account_get_anglo_saxon_price_unit() was selecting the first BOM among all variant BOMs.
      Using the variant_bom_ids when existing prevent this situation.
      
      OPW-2662863
      
      closes odoo/odoo#78647
      
      X-original-commit: c07d005a
      Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
      Signed-off-by: default avatarDavidFesquet <DavidFesquet@users.noreply.github.com>
      7d770f2b
    • Bruno Boi's avatar
      [FIX] web: always add usercontext to legacy action · 79756741
      Bruno Boi authored
      
      In the new web client architecture, the user context is added to server
      requests through the ORM service and is therefore not needed in the
      action context. Thus the commit 7354d168 has removed it from the action.
      
      Before the new webclient architecture, the user context was always
      prepended to the action context. So this commit reintroduces it for
      the legacy views and client actions through their proper adapters.
      
      closes odoo/odoo#78555
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      79756741
    • Bruno Boi's avatar
      [FIX] web: do not keep additional context in stored action · 2533d47a
      Bruno Boi authored
      Before this commit
      The current action is stored in the session storage with its evaluated
      context. This design is wrong because a context is by definition
      contextual which means it has to be evaluated at the last possible
      moment to ensure it reflects the most recent context.
      
      After this commit
      The current action is now stored in the session storage it its most
      original state. This is sufficient as in any case actions go through
      the doAction method which evaluates the context right before applying
      the action logic.
      
      Part-of: odoo/odoo#78555
      2533d47a
    • std-odoo's avatar
      [FIX] web: do not write before saving when clicking on a radio · ff1329ca
      std-odoo authored
      
      Bug
      ===
      If we open a view in readonly mode, click on a radio widget and if a
      constraint exists on this field, an error message is raised.
      (e.g. the enroll field in "website_slides_sale").
      
      Technical
      =========
      This is because in the "Basic controller", in the "_onFieldChanged",
      we force "force_save" if the view is in readonly mode. This is wanted
      for widgets that can change the value even in readonly mode
      (e.g. Priority), but clicking on a Radio widget switch the mode to edit,
      so this is not needed.
      
      To fix that, we call `setValue` after switching to the edit mode. So
      the `setValue` is skipped in `_onInputClick` if we are in readonly mode,
      and the `setValue` is done in `_quickEdit` instead.
      
      Task-2668763
      
      closes odoo/odoo#78392
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      ff1329ca
    • Mitul Shah's avatar
      [FIX] website_crm: fix random website_crm_pre_tour bug · d135916b
      Mitul Shah authored
      
      Currently, The 'TestWebsiteCrm.test_catch_logged_partner_info_tour' is randomly
      failing on runbot. The tour is triggered on contactus page. Tour bug is
      occurring because editor may not be completely loaded. In that case some
      selectors are not accessible.
      
      This tour is linked with selectors. In this commit updates the selectors and
      add the extra triggers in order to be sure editor is fully loaded and the
      tour can resume.
      
      Task-2649723
      
      closes odoo/odoo#78512
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      d135916b
    • Ivàn Todorovich's avatar
      [FIX] web: restore proper alignment and spacing of navbar's user avatar · 1dc91c2b
      Ivàn Todorovich authored
      
      closes odoo/odoo#78663
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      1dc91c2b
    • Raphael Collet's avatar
      [FIX] base: user group selection fields · 8f6a36c0
      Raphael Collet authored
      
      This is a followup on b6c688ca, which
      has introduced a new bug.
      
      Consider two groups A and B in a given category, where B implies A and
      also A.id > B.id.  For the sake of simplicity, assume that A.id=2 and
      B.id=1.  Following the commit above, the name of the group selection
      field will be 'sel_groups_1_2'.
      
      Consider a user in group B.  Because B implies A, this means that the
      user now belongs to both A and B.  A call to read() on that user returns
      field 'sel_groups_1_2' with value 2, which on the form view appears as
      the user belonging to A only.
      
      The error is in read(), which assumes that the group ids in the field
      name correspond to the implication order of the groups, which is no
      longer the case since b6c688ca.
      
      closes odoo/odoo#78660
      
      X-original-commit: e73c406671a51e9c1c4872a9e85eebe5656ea38e
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      8f6a36c0
  3. Oct 19, 2021
Loading