Skip to content
Snippets Groups Projects
  1. Mar 09, 2023
  2. Mar 08, 2023
  3. Mar 07, 2023
    • qsm-odoo's avatar
      [FIX] web: properly display table texts over any background · 02c2cfdf
      qsm-odoo authored
      
      Bootstrap tables can basically be customized with the `$table-bg` and
      `$table-color` variables. The problem is that, by default, BS4 defines
      them so that the background-color is null (so transparent: displaying
      the background-color of its ancestors) but the color is forced to the
      body color (by default: white). This is a problem as soon as the
      ancestors background colors are a color close to the body text color:
      the text becomes invisible. For instance, in website:
      - Set a body background color to black, the body text will automatically
        become white.
      - Add a table in a snippet: still ok, the text in the table is white
        over the black body (the table being transparent).
      - Then set the snippet background to white -> the table text will still
        be white... but now over a white background.
      
      This should be reviewed in master: it should be ok to set the variable
      $table-color to `null` thus letting the table be transparent and have
      the same text color as its parent. But in stable, changing a color
      variable to `null` could break customizations relying on the fact this
      is a set color. It would also not make sense if the user set up a
      `$table-bg` value going well with table text forced to the body color.
      Instead, here, in the very specific case we have a transparent table bg
      and table color equal to the body color, we temporarily unset the table
      color variable for the duration of the bootstrap table rules.
      Note: we cannot create a rule in an "Odoo file" to fix this as unsetting
      the color for the `.table` rule would also unset the color in the case
      of a `.table.bg-XXX` where we still want `.bg-XXX` to force the color.
      
      task-2728923
      opw-3048306
      opw-3180568
      
      closes odoo/odoo#82357
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      02c2cfdf
    • Antoine (ande)'s avatar
      [FIX] purchase: RFQ by mail needs login · eeacf6f8
      Antoine (ande) authored
      To reproduce the issue:
      1. Create an RFQ
      2. Send it by email
      3. Open link in email in incognito
      4. URL in mail redirects to a login page
      
      Error: Should be able to see the RFQ without being logged in
      
      Backport of https://github.com/odoo/odoo/pull/87520/commits/c4bd3f450c571da1322acb464f837612d498647c
      Which is a backport of https://github.com/odoo/odoo/commit/139e90027686b0471c3f2c9efa46d531c3abef5a
      
      
      OPW-3175464
      
      closes odoo/odoo#114541
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      eeacf6f8
    • Hansun (hale)'s avatar
      [FIX] google_spreadsheet: control access · 74827359
      Hansun (hale) authored
      
      1. Install CRM, Dashboards as admin
      2. On Settings, enable Google Spreadsheet
      3. Click on Dashboard, Google Spreadsheet
      - key in data with actual URL
      4. Log out and log back in as Marc Demo
      - you cannot access Google Spreadsheet in Dashboard
      
      Desired: enable the menu for partial visibility
      
      opw-3055142
      
      closes odoo/odoo#114152
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      74827359
    • Merel Geens (mege)'s avatar
      [FIX] website_sale: store empty fields as False · db701c21
      Merel Geens (mege) authored
      
      If you specify an empty VAT number in the Contacts app, it will store it
      as `False` in the ORM. If a new partner is created through the shop, the
      VAT number is set through HTML form submission. It will use `''` for an
      empty VAT number. When evaluating the VAT number in Python code, it will
      usually be converted to a boolean, so it doesn't matter if it's `False`
      or `''`. But in ORM queries those are two different values and code that
      checks on `False` to check for the presence of a VAT number can
      misinterpret `''` as being one.
      
      This fix replaces `''` values submitted through the address form in the
      shop with `False`.
      
      opw-3114246
      
      closes odoo/odoo#112807
      
      Signed-off-by: default avatarMerel Geens <mege@odoo.com>
      db701c21
    • Laurent Desausoi's avatar
      [FIX] base: decode wkhtmltopdf errors · 713a46cd
      Laurent Desausoi authored
      
      In some cases, wkhtmltopdf might exit with an error (e.g.: a memory
      limit). In such cases, we want to show to the user the error returned by
      wkhtmltopdf. Previously, this message was only displayed in binary
      format (displayed as "Message: b'My error\n'") which is not user-friendly.
      We want this message to be decoded so that it is a bare string
      (displayed as "Message: My error").
      
      closes odoo/odoo#112901
      
      Signed-off-by: default avatarVincent Schippefilt (vsc) <vsc@odoo.com>
      713a46cd
    • Solan Delvenne (sode)'s avatar
      [FIX] snailmail: Fix an error with invoice address · 199e96a9
      Solan Delvenne (sode) authored
      
      If an user tries sending a invoice using an invoice address and a
      delivery address through snailmail, it would result in a traceback.
      This is due to the invoice address record not having a name.
      
      closes odoo/odoo#114159
      
      X-original-commit: eceb23b1
      Signed-off-by: default avatarFlorian Daloze (fda) <fda@odoo.com>
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      199e96a9
    • Antoine (ande)'s avatar
      [FIX] purchase: analytic account clears · 6b300286
      Antoine (ande) authored
      To reproduce the issue:
      1. In Accounting, settings, activate Analytic Accounting
      2. Head over to the purchase module, create an RFQ
      3. Add a POL to the RFQ, with an analytic account specified
      4. Save the RFQ
      5. Edit the RFQ, and change the Order Deadline
      6. The analytic account in the POL has disappeared
      
      Error: The analytic account should not disappear
      
      When modifying the deadline, the analytic account was always
      being replaced, even if the replacement was empty.
      
      In the same version (14.0), the same fix can be found in AML:
      https://github.com/odoo/odoo/blob/1dcd071b27779e7d6d8f536c7dce7002d27212ba/addons/account/models/account_move.py#L3583-L3584
      
      In 16.0, the issue doesn't need to be fixed, as it has already
      been fixed, by a similar fix, as seen in POL:
      https://github.com/odoo/odoo/blob/c677f45dcb050ce7e6f755b71e56c9b9120bf613/addons/purchase/models/purchase.py#L1153
      
      
      
      OPW-3159905
      
      closes odoo/odoo#114326
      
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      6b300286
  4. Mar 06, 2023
    • Benjamin Vray's avatar
      [FIX] web_editor: fix customize panel backdrop position · 672a8cb1
      Benjamin Vray authored
      
      Before this commit, the customize panel backdrop did not fully cover the
      customize panel when the vertical scrollbar was scrolled to the bottom.
      
      Steps to reproduce the bug:
      
      - In website edit mode, add a table of content snippet to the page.
      - Add a three columns snippet within the table of content.
      - Click on an image in the three columns snippet.
      - Scroll the customize panel to the bottom and open the filter selector
      of the image.
      - Bug: the backdrop does not fully cover the customization panel.
      
      task-3090626
      
      closes odoo/odoo#110238
      
      Signed-off-by: default avatarOutagant Mehdi (mou) <mou@odoo.com>
      672a8cb1
    • Walid HANNICHE (waha)'s avatar
      [FIX] base: wkhtml2pdf large documents load · ac2df93e
      Walid HANNICHE (waha) authored
      
      Step to reproduce:
      
          Edit documents layout in general setting to add logo and background
          select multiple documents (more than 5) e.g. Inventory> delivery slips
          print all documents.
      
      Bug:
      background and logo missing on the last documents because the pages
      were printed before the browser had time to render them
      
      Fix:
      wkhtml2pdf has a default delay of 200 ms (--javascript-delay)
      increasing the value will allow large document to load
      
      opw-2951594
      
      closes odoo/odoo#113560
      
      Signed-off-by: default avatarJulien Castiaux (juc) <juc@odoo.com>
      ac2df93e
    • Soukéina Bojabza's avatar
      [FIX] website: increase the breakpoint of the 'Show on mobile' option · 791670db
      Soukéina Bojabza authored
      
      When using the 'Show on mobile' option, we can see that there is a
      mismatch between the screen breakpoint at which the elements are
      displayed like in mobile view (=> under 992px or `lg`) and the one that
      is impacted by the 'Hide/Show' option (=> under 768px or `md`). This is
      a problem because between these two breakpoints, the display is like in
      mobile view but is not considered as such and so, hiding an element in
      the mobile view (for example, if it does not look good in it) has no
      effect until the screen reaches 768px.
      
      This commit increases the screen breakpoint at which the 'Show on
      mobile' option is applied, that is, up to 992px instead of 768px, in
      order to be consistent with the display.
      
      task-3110770
      
      closes odoo/odoo#109053
      
      Signed-off-by: default avatarBenoit Socias (bso) <bso@odoo.com>
      791670db
    • Nasreddin Boulif (bon)'s avatar
      [FIX] base: fix partner merge wizard · 8d0cec68
      Nasreddin Boulif (bon) authored
      
      Steps to reproduce:
      
        - Install `Contacts` module
        - Create 3 contacts with the same name
        - Archive one of the contacts
        - Go to list view
        - Edit search filter to display archived and non archived contacts
        - Select the 3 created contacts
        - Open `Action` menu and click on `Merge`
      
      Issues:
      
        - Archived partner is set by default as destination partner.
        - Archived partner is not displayed in the list of partners to merge.
      
      Cause:
      
        - The default destination partner set is the last record of the record
          set returned by `_get_ordered_partner` (where `Archived` partners
          are the last ones in the record set).
        - The field `partner_ids` does not allow archived records.
      
      Solution:
      
        - Sort the partners to have the archived ones on top (since we took
          the last one).
        - Set `active_test` to False in the context of the partner_ids field.
      
      opw-3205577
      
      closes odoo/odoo#113778
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      8d0cec68
    • Julien (jula)'s avatar
      [FIX] base_vat: support for 2020 Albanian Tax ID · f0b6e4cc
      Julien (jula) authored
      __Description of the issue this PR addresses:__
      The first character of a Tax ID from Albania is a letter representing the decade in which it has been issued. The letter M represents the current decade. (This pdf explains in details how it is formated: https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Albania-TIN.pdf).
      
      Currently the way Albanian Tax IDs are validated is through the python library [`python-stdnum`](https://pypi.org/project/python-stdnum/).
      However, the regex that is used to validate them has not been updated since 2017. (I made a PR in its repo https://github.com/arthurdejong/python-stdnum/pull/402
      
       to fix that).
      
      The code from this commit is inspired by the one from that library, but the regex includes the letter M.
      
      __Current behavior before PR:__
      (`base_vat` must be installed)
      By going to Settings > Users & Companies > [A company]:
      - Set the country to Albania
      - Set VAT/Tax ID to “M12345678T”.
      
      => Error message
      
      closes odoo/odoo#114006
      
      Signed-off-by: default avatarNicolas Viseur (vin) <vin@odoo.com>
      f0b6e4cc
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] l10n_id_efaktur: multirecord access · 5ad4f6cf
      Andrea Grazioso (agr-odoo) authored
      
      Fixing typo in
      df74fb68
      
      closes odoo/odoo#114412
      
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      5ad4f6cf
    • Yolann Sabaux's avatar
      [FIX] account_check_printing: enable increment in new payment · 364bc769
      Yolann Sabaux authored
      Steps to reproduce:
      - Create a new journal Bank
      - In Sequence, find the 'New Bank Check" and edit it so the sequence can be 10 number digits long
      - Create a Vendor Payments with the the New Banck and Check as a method
      - Click on Print a check
      - Set the check number to 2147483648 and validate
      - Create a new payment with the check method
      - Click on Print a check
      
      Issue:
      Error is raised
      
      Cause:
      As for https://github.com/odoo/odoo/pull/112832
      
       there is a second check in order to increment the check number
      
      opw-3140973
      
      closes odoo/odoo#114393
      
      Signed-off-by: default avatarJohn Laterre (jol) <jol@odoo.com>
      364bc769
    • Pierre-Yves Dufays's avatar
      [IMP] test_mail: add template preview test about recipients · 5674947b
      Pierre-Yves Dufays authored
      
      Add a test that check recipients displayed in the template preview. This test
      has been added following the fix that solves the template "partner_to" not
      displayed in the preview.
      
      Task-3196081
      
      closes odoo/odoo#113341
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      5674947b
    • Pierre-Yves Dufays's avatar
      [FIX] mail: fix recipients (partner) not displayed in preview · 4a26a10a
      Pierre-Yves Dufays authored
      To reproduce the problem (example):
      - install the project app with demo data
      - activate the debug mode
      - go to Settings -> Technical -> Templates
      - choose the template "Task: Rating Request"
      - in email configuration, "To (partners)" is set to
      ${object.rating_get_partner_id().id}
      - click on preview
      - choose the task: "Room 2: Decoration"
      - the "Recipients" field value should be "YourCompany, Joel Willis" but this
      field remains empty without the fix
      
      Technical note: partner_to of the template was not rendered which was making
      generate_recipients returning incorrect values for partner_ids.
      
      Task-3196081
      
      Part-of: odoo/odoo#113341
      4a26a10a
  5. Mar 05, 2023
  6. Mar 03, 2023
    • Adrien Widart (awt)'s avatar
      [FIX] sale_{stock,mrp}: repost inv with cogs · d8e286ad
      Adrien Widart (awt) authored
      
      To reproduce the issue:
      (Also need: account_accountant,purchase)
      1. Setup a product P
         - Storable
         - Category:
           - FIFO + Auto
      2. Process a PO with 1 x P at $10
      3. Process a PO with 1 x P at $50
      4. Create and confirm a SO with 1 x P
          - Because of FIFO, the value of the delivered product is $10
      5. Process the delivery
      6. Post the invoice
      7. Add credit note
         - Credit Method: Full refund and new draft invoice
      8. Post the second invoice
      
      Error: The cogs are based on the second received product ($50), they
      should rather be based on the delivered one
      
      When computing the anglo-saxon unit price of the product, we consume
      the outgoing SVLs, and we consider the already-invoiced quantity.
      Here is the issue: we pretend that this quantity is 1, because of
      the first invoice, but this should be balanced with the quantity of
      the credit note
      
      OPW-3109789
      
      closes odoo/odoo#114054
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      d8e286ad
    • Julien Van Roy's avatar
      [FIX] account_edi_ubl_cii: change mapping for Buyer/Order Reference · 79f46cdb
      Julien Van Roy authored
      
      The BuyerReference (BT-10) should be easily editable by the user, so it is read
      from the `commercial_partner_id.ref`.
      
      The OrderReference (BT-13) should also be editable by the user, it is read from
      the `move.ref`.
      
      The definition for both tags in the peppol doc defines these tags as:
      "An identifier assigned by the Buyer used for internal routing
      purposes".
      
      The new tag SalesOrderId (BT-14) is added, and is the sale order's name
      linked to the invoice.
      
      opw-3175906
      
      closes odoo/odoo#114291
      
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      79f46cdb
    • Benjamin Vray's avatar
      [FIX] website: fix scroll table of content · eb356dfd
      Benjamin Vray authored
      
      This commit fixes two bugs with the table of content snippet:
      
      - Before this commit, the scrollspy position for the table of content
      navbar was incorrect in fullscreen or edit mode due to the calculation
      being based on the presence of the main navbar, which is not present in
      those modes.
      
      - Before this commit, when the table of content navbar contained enough
      elements to exceed the height of the page, the bottom elements were not
      accessible without first scrolling through the entire table of content.
      This commit addresses this issue by adding a scrollbar to the navbar,
      allowing for easier access to these links.
      
      opw-3115597
      
      closes odoo/odoo#109927
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      eb356dfd
    • Louis (loco)'s avatar
      [FIX] web, website: restore the use of the scroll to top button · 4ca793a3
      Louis (loco) authored
      
      Steps to reproduce the bug:
      - Go to the website and edit a page.
      - Make sure there is enough content to be able to scroll the page.
      - Go to the "Theme" tab and disable the "Show Header" option.
      - Click on the footer and enable the "Scroll Top Button".
      - Click on "Save".
      => Clicking on the "Scroll To Top" button does nothing.
      
      The "Scroll To Top" button is an anchor with its `href` set to `#top`.
      By disabling the "Show Header" option, the header is removed from the
      DOM and there is no existing element with `id=top` anymore. To fix
      this, the `scrollTo` function has been patched in order to be able to
      receive selectors as arguments. In the '#top' and '#bottom' case, those
      positions are known and always the same (either at the top of the
      document or the bottom of it) so there is no need to have the header or
      the footer present in the DOM in order to be able to scroll up to those
      positions.
      
      Now that the `scrollTo` function is able to scroll to the top or the
      bottom of the page even without header or footer, those two positions
      can always be suggested as internal link anchors during link edition.
      
      opw-3133464
      
      closes odoo/odoo#113117
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      4ca793a3
    • Arthur Detroux (ard)'s avatar
      [FIX] website: give correct height to image gallery on smaller screens · c36607dc
      Arthur Detroux (ard) authored
      
      Prior to this commit, the height of the Image Gallery snippet was set to
      auto on screens smaller than 400px.
      
      This ensures that the snippet looks the best on phones.
      
      However, when using Bootstrap, what defines a smaller screen is not
      any screen below 400px, but any screen below 768px.
      This meant that the Image Gallery snippet did not look the same on an
      iPhone 11 Pro max as it would on an iPhone 11 for example.
      
      This commit fixes that by using the built-in mixin that relies on
      Bootstrap's breakpoints (in this case SM).
      
      Steps to reproduce:
      - Go in edit mode and drop an "Image Gallery" snippet
      - Open the dev tools and choose "iPhone 11" or 375x812
      - The image gallery does not have white bands
      - Change the resolution to "iPhone 11 Pro Max" or 414x896
      - The image gallery has white bands / has a different layout
      
      opw-2995100
      task-2997119
      
      closes odoo/odoo#109761
      
      Signed-off-by: default avatarVray Benjamin (bvr) <bvr@odoo.com>
      c36607dc
    • Maruan Aguerdouh (magm)'s avatar
      [FIX] purchase: no more bold rows when unreaded messages that won't dissapear · 8741db1a
      Maruan Aguerdouh (magm) authored
      
      Steps to reproduce:
      
      - Install purchase and discuss.
      - Go to the purchase list view.
      - You will see the purchase lines in bold.
      
      Issue:
      
      The bold lines are supposed to indicate that we have unreaded messages
      in the chatter, but they are not working as expected, and instead it is
      mixed with discuss, and they bold line won't dissappear until we send a
      message in discuss.
      
      Solution:
      
      We removed from the views the "feature" of showing bold lines as it is
      not well implemented, and it is not working as expected. This will avoid
      confusion for the clients on not knowing what it is for, and when it's
      bold or when it's not. Also this feature was removed in future versions.
      
      Extra info:
      
      If you don't have any lines in bold, and you realize they don't appear
      when you send messages through the chatter. The easiest way I found to
      test it is removing `cp.channel_id = msg.res_id AND ` from the SQL query
      in the code inside `_compute_message_unread`. With this you will see the
      bold row whenever you send a message in the chatter, but it won't
      dissappear when you open the RfQ.
      
      Forward bot up to saas-15.2.
      
      opw-3185071
      
      closes odoo/odoo#113166
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      8741db1a
    • sofiagvaladze's avatar
      [FIX] hr_contract: proceed cron action even when ValidationError occurs · 66ba7a1b
      sofiagvaladze authored
      
      The method update_state is called from cron. When the contracts are
      updated couple things are checked. There are constraints set that can
      throw ValidationError. As a result, none of the contract states are updated.
      
      In this PR we do the following:
      In case the ValidationError occurs when we run the cron, we update
      contracts that can be updated, and silently pass the invalid contracts.
      
      task - 3069480
      
      bloupbloup
      
      closes odoo/odoo#110941
      
      Related: odoo/enterprise#36771
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      66ba7a1b
    • Benjamin Vray's avatar
      [FIX] website_form: fix items width in we-list when dragging them · f87daf1d
      Benjamin Vray authored
      
      This commit fixes an issue with the width of items in the we-list not
      being correct when they are being dragged using jQuery's sortable
      feature.
      
      Steps to reproduce the bug:
      
      - Drop a "Form" snippet on a page.
      - Add a "Multiple Checkboxes" field in the form.
      - Move an option from the list using the move button.
      - Bug: while dragging the item, the width of the items is too small.
      
      When an element is dragged, it is given an absolute position which takes
      it out of the normal flow of the document, causing the input element
      within the list item to no longer be able to correctly occupy 100% of
      the available width.
      
      task-3138662
      
      closes odoo/odoo#110871
      
      Signed-off-by: default avatarGuillaume-gdi <gdi@odoo.com>
      f87daf1d
  7. Mar 02, 2023
Loading