Skip to content
Snippets Groups Projects
  1. Nov 10, 2022
  2. Nov 09, 2022
    • Romain Derie's avatar
      [FIX] website, *: hide .s_popup itself too, not only its .modal child · cfd53b8f
      Romain Derie authored
      *: website_mass_mailing (tests)
      
      - Web Editor facts:
      Since the refactoring of the editor done at [1], the cookies bar popup
      is receiving a `contenteditable=true` attribute, making it receive the
      chrome default `height` style for such elements.
      The problem is that if this cookies bar's modal is hidden, the bar will
      be shown as a thin empty white bar.
      
      - Website Builder / Popup Snippet / Cookies bar facts:
      A popup element is composed of a `.s_popup` parent containing the actual
      `.modal` BS modal. Our internal logic and events are hiding and showing
      this inner `.modal` modal element without considering its `.s_popup`
      parent. It means that when the `.modal` is hidden, its `.s_popup` parent
      is not touched and kept visible.
      It might looks like it's not an issue as it would just be an empty
      element (its only child is hidden) but it leads to some issues as
      explained just above: an ugly white bar is shown.
      Note that the cookies bar is nothing more than a `.s_popup` snippet.
      
      - Web Editor facts 2:
      During the mentioned refactoring [1], they actually added some code to
      hide this bug once you were playing with the edit mode (mainly for when
      you clicked on the invisible panel element or before saving).
      But this code was actually not fixing the case when you just entered
      edit mode.
      
      This commit simply remove that "edit only" web editor logic and add a
      new one in charge of simply synchronizing the `.s_popup` snippet
      visibility with its `.modal` BS modal in a public widget (which is
      obviously also executed in edit mode).
      
      Finally:
      - note that if there is no way through regular flow to arrive to the
        same result with a normal popup snippet, it is still concerned by this
        issue and you can reproduce it by moving it somewhere else in the DOM
        and/or simply adding it the `contenteditable=true` attribute.
      - we already fixed that issue a few months/years ago, I couldn't find
        a commit related to that so I don't know if it was due to the same
        root cause
      - in case one is wondering why we simply couldn't do that in the already
        existing `_onHideModal` of the `PopupWidget`, it is because that
        `hide.bs.modal` is not called when entering edit mode, because the
        `destroy` is destroying it before hiding the modal. The event is thus
        not fired. And we can't move the hide part before the destroy's super
        because otherwise, it would go through the normal hidden process which
        is creating a "seen" cookie for the popup as if it was closed
        manually.
      
      [1]: https://github.com/odoo/odoo/commit/740168ce8d27da3d6a7156d2d79655a898394923
      
      
      
      task-2754108
      
      closes odoo/odoo#103382
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      Co-authored-by: default avatarqsm-odoo <qsm@odoo.com>
      cfd53b8f
    • FrancoisGe's avatar
      [FIX] web: abort a rpc must unlock the ui · 52066bc8
      FrancoisGe authored
      
      Before this commit, if you abort an rpc, the ui is never unlocked.
      
      How to solve it:
      Simply trigger an RPC:RESPONSE event in the abort to signal that the RPC
      is finished and that the screen can be unlocked.
      
      closes odoo/odoo#105448
      
      Signed-off-by: default avatarSamuel Degueldre <sad@odoo.com>
      52066bc8
    • Ricardo Gomes Rodrigues (rigr)'s avatar
      [FIX] account_edi{,ubl_cii}: disable move_type check · 7b18c2e7
      Ricardo Gomes Rodrigues (rigr) authored
      
      Currently, if the user uploads a facturx document whose move_type does not match the move_type chosen by the user, the document is not auto filled with the information contained in the facturx XML because of a restrictive check. Therefore, the document is empty and is sent to the OCR which acts as a backup.
      
      Starting from this commit, we will remove this restrictive check. So, if the user uploads a facturx document, we will use the move_type define by facturx regardless of the move_type chosen by the user. This means that when we upload a facturx document, we will always use all the information that is in the xml to create the document and avoid using the OCR.
      
      task-id 2961932
      
      closes odoo/odoo#105447
      
      X-original-commit: 81a68544
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      Signed-off-by: default avatarRicardo Gomes Rodrigues (rigr) <rigr@odoo.com>
      7b18c2e7
    • Benjamin Vray's avatar
      [FIX] website: fix language switcher in off-canvas menu · b89dbb2e
      Benjamin Vray authored
      Since this commit [1], the header language switcher has been moved out
      of the header navbar. This created a bug, when the off-canvas option of
      the navbar is activated, the language switcher is no longer accessible
      on mobile.
      
      As this commit is in stable version, the fix is only in Javascript. It
      puts the language switcher back in the navbar when the off-canvas menu
      is opened.
      
      A specific case with the "hamburger full" header template, where there
      is the same bug with the "call to action" button, is also fixed by this
      commit.
      
      This commit also fixes display issues in the off-canvas menu.
      
      [1]: https://github.com/odoo/odoo/commit/2a000e33c5a44ddf0a777b43d8266cc413d8e4e2
      
      
      
      opw-2964824
      
      closes odoo/odoo#100235
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      b89dbb2e
    • PNO's avatar
      [FIX] stock: block product type change if sales count · 1b468ad1
      PNO authored
      
      Steps to reproduce:
      - Create a product and complete a sales order.
      - Then try to change the product type.
      - The following message is shown:
      "You cannot change the products type because it is already used in sales orders."
      However, we can close the message and save.
      
      Problem:
      If some sales were already made, it should not be possible to change the product type.
      There is a warning message on the onchange but it's not blocking.
      This causes inconsistencies between the quantities and value shown in the quants and in the valuation layers.
      
      Solution:
      Raise an user error when trying to save the changes.
      
      opw-3000886
      
      closes odoo/odoo#105292
      
      X-original-commit: 1b2c045f
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      1b468ad1
    • Solan Delvenne (sode)'s avatar
      [IMP] snailmail: Send an error when using non-A4 paperformat. · 884b3b07
      Solan Delvenne (sode) authored
      
      Since the provider only accepts A4 letters, prevent the user from using
      non A4 formats by giving them an error when clicking the Send button.
      
      closes odoo/odoo#105206
      
      X-original-commit: 3e257644
      Signed-off-by: default avatarFlorian Daloze (fda) <fda@odoo.com>
      884b3b07
    • Thibault Libioulle's avatar
      [FIX] sale_mrp{,_margin}: fix dependency break on purchase_price · ac921c88
      Thibault Libioulle authored
      This commit fixes premature usage of `purchase_price` field on
      sale.order.line model, before its definition in sale_margin module.
      
      Since this test requires both sale_mrp and sale_stock_margin to pass,
      this commit adds an auto-install bridge module that solely address this
      issue.
      
      Steps to reproduce:
      - Install sale_mrp module
      - Run tests (at least .test_kit_cost_calculation)
      
      Problem:
      Traceback:
      AttributeError: 'sale.order.line' object has no attribute 'purchase_price'
      
      See #100126
      
      closes #104891
      
      closes odoo/odoo#105304
      
      X-original-commit: https://github.com/odoo/odoo/commit/74b36c48f73710495e19c3ad258645f05e589a73
      
      
      Signed-off-by: default avatarDjamel Touati (otd) <otd@odoo.com>
      Co-authored-by: default avatarThibault Libioulle <thibault.libioulle@aerospacelab.be>
      ac921c88
    • David (dafr)'s avatar
      [FIX] stock_account: Use correct company for SVL account_move creation · 6a8df26f
      David (dafr) authored
      
      The valuation field of the product_id is company-dependent.
      If the user validate the picking in multi-company context with his current company != picking company, then the checks may fail, and the account move can not be created.
      
      closes odoo/odoo#105272
      
      X-original-commit: 33fa9cff
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      6a8df26f
    • nouraellm's avatar
      [FIX] stock: fix tests for unreserve caused by import · f57bca2e
      nouraellm authored
      
      In #103423 _load_records_write and _load_records_create
      both bypass the self.user_has_groups('stock.group_stock_user')
      check in _is_inventory_mode which makes some tests fail in 15+
      To solve the problem we set inventory_mode to True
      - Task id: 3007499
      
      closes odoo/odoo#105160
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      f57bca2e
    • Nshimiyimana Séna's avatar
      [FIX] account: set correct account on cash basis tax line · b69fc397
      Nshimiyimana Séna authored
      
      ### Steps to reproduce
      * go to Accounting > Settings and activate 'Cash Basis'
      * got to Chart of Accounts and create a new  account of type
        `Current Assets`. We'll call it `A`.
      * create a new tax, we'll call it `T`, with the following parameters:
        * Tax type: Purchases
        * Tax computation: Percentage of Price
        * Amount: 22%
        * Distribution of invoices:
          * add a line with the following parameters:
            % = 40, Based On = 'of tax' and Account = the tax paid account.
          * add a second line with the following parameters:
            %= 60, Based On = 'of tax'
        * Distribution of Credit Notes: Add the same lines as
          'Distribution of invoices'
        * In the Advanced Options tab, set :
          * Tax Eligibility = 'Based on Payment'
          * Cash Basis Transition Account = `A`
      * create a new vendor bill and add a product line to it and set
        Taxes = `T` on that line
      * confirm and register payment
      
      Now go to Accounting > Journal Items, group by Journal. Look through the
      'Cash Basis Taxes' group and find the entries related to the vendor bill
      you just made. One of the debit lines on account `A` is not correct.
      Here, the account should be the one specified on the invoice line.
      
      opw-2796727
      
      closes odoo/odoo#105284
      
      X-original-commit: afe87957
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      Signed-off-by: default avatarNshimiyimana Serge Séna (sesn) <sesn@odoo.com>
      b69fc397
    • niyasraphy's avatar
      [IMP] account_sale_timesheet, project_{}, sale_poject_account : module license · 69798a98
      niyasraphy authored
      
      closes odoo/odoo#104956
      
      Signed-off-by: default avatarJohn Laterre (jol) <jol@odoo.com>
      69798a98
    • Tommy (tong)'s avatar
      [ADD] l10n_ph · 89dc54aa
      Tommy (tong) authored
      
      - add philippines localization
      
      task-2713149
      
      closes odoo/odoo#105024
      
      X-original-commit: c5aa1b31
      Signed-off-by: default avatarFlorian Gilbert (flg) <flg@odoo.com>
      89dc54aa
    • Tommy (tong)'s avatar
      [IMP] base_uat: update ph vat format · 240ad8de
      Tommy (tong) authored
      X-original-commit: 450c70ac
      Part-of: odoo/odoo#105024
      240ad8de
    • Sergey Shebanin's avatar
      [FIX] web: translations hash don't consider all loaded modules · 7847bb90
      Sergey Shebanin authored
      Only server wide modules are being taken into account when calculating translations hash.
      So user probably can't get translations of new installed modules unless it is forced by hard page reload (Ctrl+Shift+R).
      
      Problem exists since https://github.com/odoo/odoo/commit/80d74e7ee0eab83dc5100e0776df09d04b882fec
      
       and the cause in that `mods = odoo.conf.server_wide_modules or []` string was unpaired with the following `if` statement during refactoring.
      
      This commit restores computation of hash based on all loaded modules.
      
      closes odoo/odoo#104861
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      7847bb90
    • Guillaume (guva)'s avatar
      [FIX] account: cumulated balance non exportable in GL · 921d418d
      Guillaume (guva) authored
      
      We made the field cumulated balance non exportable
      in the GL.
      
      Steps:
      
      - Go to Accounting->Accounting->General Ledger
      - Unfold and select one or several lines
      - export lines
      -> The cumulated balance is not computed
      
      The reason is we don't pass in the compute as we don't
      come from the search_read method when exporting, so we don't have a domain
      to compute the cumulated balance.
      As we can't force the domain, we override the fields_get method
      to make the field non exportable.
      
      opw-2800669
      
      closes odoo/odoo#105309
      
      X-original-commit: a3563da3
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      921d418d
  3. Nov 08, 2022
  4. Nov 07, 2022
Loading