Skip to content
Snippets Groups Projects
  1. Sep 07, 2023
    • Arnaud Joset's avatar
      [FIX] base_geolocalize: allow using the functionnality without privileges. · 3bbe8d2b
      Arnaud Joset authored
      Before this commit, simple user could not use the novatim API since https://github.com/odoo/odoo/commit/160e8bfbf72a3e5d7cc8d8cbe7bc4f310f298baa
      
      
      
      closes odoo/odoo#134735
      
      Taskid: 3497580
      X-original-commit: 43763618
      Signed-off-by: default avatarArnaud Joset (arj) <arj@odoo.com>
      3bbe8d2b
    • hmai's avatar
      [FIX] web editor: cursor jumps out of blockquote · 2b2da9b7
      hmai authored
      
      Steps to reproduce:
      
      1. add a paragraph
      2. add a blockquote
      => the cursor will jump in the paragraph
      This commit fixes a bug detected when inserting a blockquote. The cursor
      jumps to nearby paragraph on insert, and other issues.
      
      The cause of the bug is tied to the fact that we rely on a complex behavior
      when inserting paragraph related elements (within the insert command).
      The way to make blockquote behave like the other paragraph related
      elements is simply to add it to the list as done in this commit.
      
      Task-3383441
      
      closes odoo/odoo#134633
      
      X-original-commit: 8195beac
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      2b2da9b7
    • Pedram (PEBR)'s avatar
      [FIX] point_of_sale: improve order synchronization mechanism · 2e7f7b12
      Pedram (PEBR) authored
      
      This commit introduces improvements to the order synchronization
      mechanism. The changes ensure better error handling and provide a more
      reliable and informative synchronization process.
      
      Key Changes:
      
      1. Enhance `_flush_orders` Method
          - The `_flush_orders` method now has additional error handling to
          detect RPC errors during synchronization of multiple orders. If an
          RPC error is detected and multiple orders are being synced, the
          method will attempt to send each order to the server individually.
      
      2. Introduce `_flush_orders_retry` Method
          - This method sends orders to the server one by one and keeps track
          of the synchronization status (successful, RPC error, or other
          errors).
          - It sets the synchronization status to `'connected'`, `'error'`,
          or `'disconnected'` based on the outcome of individual order
          synchronization attempts.
      
      3. Improve Error Handling
          - Enhanced error handling mechanisms to differentiate between
          various types of errors.
          - Synchronization status reflects the type of error encountered.
      
      opw-3389388
      
      closes odoo/odoo#134333
      
      X-original-commit: 57074c34e90cdbf1db5b06fc8ccd6ae2318191fc
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      Signed-off-by: default avatarPedram Bi Ria (pebr) <pebr@odoo.com>
      2e7f7b12
    • Nshimiyimana Séna's avatar
      [FIX] account: include 'quantity' in '_compute_all_tax' dependencies · 2aafff6a
      Nshimiyimana Séna authored
      
      Summary
      -------
      This commit addresses an issue where fixed taxes were not calculated
      correctly when applied to a line with a price of 0.
      
      Steps to reproduce
      ------------------
      1. Create a fixed tax with an amount of 5.
      2. Create an invoice with a line having zero price and apply the fixed
         tax.
      3. Save the invoice. You should have a total of 5.
      4. Change the quantity of the invoice line, to something like 2.
      5. Save the invoice.
      
      We expect the total to be 10, but we get 5.
      
      opw-3212536
      
      closes odoo/odoo#134153
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      2aafff6a
    • Touati Djamel (otd)'s avatar
      [FIX] mrp: ignore verification for tracked product with 0 to consume qty · 35ca0d94
      Touati Djamel (otd) authored
      
      Steps to reproduce the bug:
      - Create a storable product “P1” with BoM:
          - Add a tracked component
          - Add another component (no tracked)
      - Create a MO to produce 1 unit of the product "P1":
          - Confirm
          - Unlock the MO
          - Set the "to consume" quantity of the tracked component to 0.
      
      - Try to validate the MO
      
      Problem:
      A user error is triggered: “You need to supply Lot/Serial Number for
      products:”
      
      Solution:
      If the quantity to consume is 0, ignore the serial number verification
      for this move.
      
      opw-3471256
      
      closes odoo/odoo#134567
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      35ca0d94
    • lejeune quentin's avatar
      [FIX] point_of_sale: Remove timesyncd service from iot · 3857462d
      lejeune quentin authored
      
      With the new version of raspios the timesyncd service is not
      correctly stopped during a shutdown or a reboot.
      Here 'timedatectl set-ntp true' enables and starts
      the first existing network synchronization service
      
      closes odoo/odoo#134628
      
      Signed-off-by: default avatarQuentin Lejeune (qle) <qle@odoo.com>
      3857462d
    • yhu-odoo's avatar
      [FIX] mrp: wrong workorder state in tests · a2574b45
      yhu-odoo authored
      As a good pratice, in compute method, we assign a default value before
      we do the actual calculation to avoid issues like no value is assigned
      for fields with required=True. For example `reservation_state`:
      https://github.com/odoo/odoo/blob/7ebc8cc5771d069b32722d493dd0ae5341e54c96/addons/mrp/models/mrp_production.py#L572
      However, since workorder state is depends on this field:
      https://github.com/odoo/odoo/blob/7ebc8cc5771d069b32722d493dd0ae5341e54c96/addons/mrp/models/mrp_workorder.py#L158-L159
      
      
      For some reason, this unexpected false value can lead to some transit
      wrong state in tests (it happens when you run the test, but correct
      state show when you put a breakpoint and step into each state
      computation).
      To solve it, we remove this default value assignment. It should be safe
      since this field is not required.
      
      closes odoo/odoo#134264
      
      Related: odoo/enterprise#46875
      Signed-off-by: default avatarSteve Van Essche <svs@odoo.com>
      a2574b45
    • Gauthier Wala (gawa)'s avatar
      [IMP] l10n_pl_{jpk/sale_stock}: Add fields necessary for JPK · 82e85c14
      Gauthier Wala (gawa) authored
      
      For the JPK and the EDI, a lot of additional informations are needed.
      We provide them in community, so it's available later for EDI.
      
      The delivery date is needed in Poland, and we compute it if
      sale_stock is installed. It will be done later for all localizations,
      but not in stable, so we will merge it with the other ones later.
      
      closes odoo/odoo#115225
      
      Related: odoo/enterprise#38166
      Signed-off-by: default avatarOlivier Colson (oco) <oco@odoo.com>
      82e85c14
    • Gauthier Wala (gawa)'s avatar
      [FIX] l10n_pl: tax report and tax changes for JPK · f41aa416
      Gauthier Wala (gawa) authored
      Some taxes and tax report lines are needed for the export of JPK
      (and EDI that will be done later)
      
      Part-of: odoo/odoo#115225
      f41aa416
    • Maruan Aguerdouh (magm)'s avatar
      [FIX] website_sale: add to cart modal properly displayed on list view · 643141dd
      Maruan Aguerdouh (magm) authored
      
      Made the modal for add to cart to be the same when in Grid view and list
      view. We achieve this by modifying the css inside
      `#products_grid.o_wsale_layout_list`.
      
      opw-3235969
      
      closes odoo/odoo#133439
      
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      643141dd
    • Nicolas Bayet's avatar
      [FIX] web_editor: strengthen collab stale detection & recovery · 37836c0a
      Nicolas Bayet authored
      
      Before this commit, the stale document detection was imprecise and
      incomplete.
      
      The stale document could happen in different scenario:
      1)  Client B save when client A is disconnected (therefore client A
          should be notified that the document is stale upon reconnection):
      
          - For that scenario, the code had a heuristic to detect if the
          internet connection disconnected and reconnected but was imprecise
          as the browser api is not 100% reliable on all browser and
          platforms. That made the code under-checking or over-checking with
          the server.
      
      2)  The user has not yet focused on the element and before this
          commit, the stale document was not detected.
      
      3) If there is a partition in the peer to peer network and a member of
         another partition that save, all other partition will not be aware
         that they are working on a stale document.
      
      4) The stale document happen before 2 peers could be fully connected.
      
      For any of those scenarios, if a stale document was not detected and
      the user tried to save changes, only then, a popup would inform that
      the version was stale. And if the user closed the tab thinking the
      document would automatically save, the change would not be saved
      (without warning).
      
      This commit:
      1) improve detection of stale document
      To detect the document this commit add a message in the odoo bus.bus
      for the channel of the record for each write. That will ensure the
      message to be received as soon as a user is connected to odoo.
      
      2) improve recovery from stale document
      Before this commit, the recovery was only made from the server.
      
      As a detection is now direct (rather than delayed by the previous
      heuristic), a document could be detected stale before receiving a step
      that would not make it stale. Therefore, we cannot just reset from the
      server as a recovery mechanism.
      
      To recover, this commit first tries to reset from missing steps from
      all peers. If unsuccessful, it will tries to reset from a snapshot. If
      unsuccessful, it will reset from the server.
      
      3) add a mechanism for aborting requests
      To prevent unexpected concurrency behavior, this commit add a mechanism
      to abort requests.
      
      4) a framework for testing the collaboration of the wysiwyg
      As it could be quite tedious and error prone to manually tests
      concurrency issues related to the wysiwyg, this commit add a framework
      for testing the collaboration of the wysiwyg and test the detection
      and recovery of stale document.
      
      task-3217965
      
      closes odoo/odoo#128847
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      37836c0a
    • Nicolas Bayet's avatar
      [FIX] web_editor: move _getNewPtp out of a closure · 115393d5
      Nicolas Bayet authored
      In a subsequent commit, we need to change the content of the method
      `_getNewPtp` and to patch it in tests.
      
      To make that commit more readable by understanding which lines
      changed, this commit moves the creation _getNewPtp to the Wysiwyg
      prototype rather in a closure.
      
      task-3217965
      
      Part-of: odoo/odoo#128847
      115393d5
  2. Sep 06, 2023
  3. Sep 05, 2023
    • Arthur Detroux (ard)'s avatar
      [IMP] website: stay in backend on F5 or CTRL-R while in website preview · e69c6eae
      Arthur Detroux (ard) authored
      Since [1], it was no longer possible to refresh the page and stay in
      the backend at the same time. This was known at the time and was an
      accepted downside.
      
      However, with this commit, a compromise has been found, if the keyboard
      shortcut for a refresh (CTRL-R or F5) is used while the Website Preview
      is shown (mounted), then the website preview will do its best to keep
      the user inside the backend.
      
      This will make developing features for the website modules easier, as
      before, every refresh would require an extra click to return to the
      backend.
      
      To note: the debug=[mode] param would also be lost
      on refreshing a website page. Starting 16.4, since [2], this would make
      tracebacks harder to read as for every refresh, they would no longer
      point to the source, rather just the minified file. Therefore, with
      this commit, we also keep the debug mode in the URL when doing a
      keyboard refresh.
      
      [1]: https://github.com/odoo/odoo/commit/1c18b79972c3b0a97197b98390e0ba9fda703585
      [2]: https://github.com/odoo/odoo/commit/59f49d6a8c856a5d8ca28dcfd7840baaa1c7672f
      
      
      
      task-3458691
      
      closes odoo/odoo#131236
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      e69c6eae
    • prye-odoo's avatar
      [FIX] hr_holidays: handle tz attribute error if user timezone empty · 904edbdb
      prye-odoo authored
      When a user tries to create a leave request without linking an employee
      with the user and without a configured login user timezone, a traceback
      will be generated.
      
      Steps to reproduce:
      - Install the "hr_holidays" module.
      - Create a new user, e.g., "Test user", and login with another browser.
      - Login as an admin user and go to Settings > Users & Companies.
      - Search for "Test user" and set Timzone as empty.
      - Go to the Time Off menu and create a leave request; after that, a traceback
      will be generated.
      Error: AttributeError: 'bool' object has no attribute 'upper' 
      
      When a user tries to create a leave request without linking an employee with the
      user and without a configured login user timezone, the
      _get_start_or_end_from_attendance() function of the "hr.leave" object will call
      at that time timzone not getting.
      Code reference:
      https://github.com/odoo/odoo/blob/15.0/addons/hr_holidays/models/hr_leave.py#L111
      
      
      
      Sentry-4441512696
      
      closes odoo/odoo#134208
      
      X-original-commit: 2b0f9e39
      Signed-off-by: default avatarSofie Gvaladze (sgv) <sgv@odoo.com>
      904edbdb
    • Maximilien (malb)'s avatar
      [FIX] l10n_de: translation issues · 696cfac2
      Maximilien (malb) authored
      
      There was inconsistency in the translation for the words "price unit", with this
       commit all the "price unit" are translated the same.
      
      closes odoo/odoo#134107
      
      Task-id: 3262408
      Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
      Signed-off-by: default avatarMaximilien La Barre (malb) <malb@odoo.com>
      696cfac2
    • Maximilien (malb)'s avatar
      [FIX] l10n_de: print and preview css · f7812ae8
      Maximilien (malb) authored
      This PR solve two things:
      - Preview: due to the hardcoded width the preview didn't take all the page and
      was push on the left.
      - PDF: Weird stuff happened with the header, he was hiding information below
       the header.
      
      Task-id: 3262408
      Part-of: odoo/odoo#134107
      f7812ae8
    • Maximilien (malb)'s avatar
      [FIX] l10n_de: shipping address traceback · 0d273e68
      Maximilien (malb) authored
      Before this PR, when there is no shipping address, the pdf show an empty
      "Shipping Address" header. By changing the colspan dynamically we can manage to
      keep the layout like it was and remove the useless section.
      
      Task-id: 3262408
      Part-of: odoo/odoo#134107
      0d273e68
    • Yolann Sabaux's avatar
      [FIX] account: display the move to check · d8498091
      Yolann Sabaux authored
      
      Steps to reproduce:
      - Set "To Check" for a bill in the Bill list view
      - go back to the dashboard
      
      Issue:
      There won't be the "To Check" shortcut as it was the case in 15.0
      
      opw-3455414
      
      closes odoo/odoo#133296
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      d8498091
    • Sina Chaichi Maleki (cmsi)'s avatar
      [FIX] hr_holidays: Ensure the name is mandatory in public holidays · 732f27c4
      Sina Chaichi Maleki (cmsi) authored
      
      The name field was previously optional when adding a new instance
      from the tree view, which in the absence of a name, 'false' is indicated
      in the calendar view. The field is now set as mandatory.
      
      closes odoo/odoo#132772
      
      Task: #3469914
      Signed-off-by: default avatarSofie Gvaladze (sgv) <sgv@odoo.com>
      732f27c4
    • Aaron Bohy's avatar
      [FIX] web: DELETE_ALL command should forget, not delete · 57b37c0a
      Aaron Bohy authored
      Have a list view with a many2many field, and an onchange on a
      field in the list that returns a command 5 (CLEAR, or DELETE_ALL
      in the js terminology). Before this commit, the command 5 was
      mapped to a list of commands 2 (DELETE), i.e. all records in the
      many2many relation were deleted when the record was saved. We
      instead want those records to be removed from the relation, i.e.
      the command 5 should be mapped to a list of command 3 (UNLINK, or
      FORGET in the js terminology).
      
      Note that this only impacts list and kanban views, as the form
      view still used the BasicModel.
      
      Issue reported here https://github.com/odoo/odoo/commit/48ef812a635f70571b395f82ffdb2969ce99da9e#r126483773
      
      
      
      closes odoo/odoo#134318
      
      Signed-off-by: default avatarFrancois Georis (fge) <fge@odoo.com>
      57b37c0a
    • Victor Piryns (pivi)'s avatar
      [FIX] web: truncate filename when importing custom module via studio · 8a3e2739
      Victor Piryns (pivi) authored
      
      Issue:
      When uploading a large custom module via studio for importing, Chrome
      crashes with an internal SIGKILL and Firefox manages to load, but is
      really sluggish.
      
      Steps to reproduce:
      - Install Studio
      - In the Apps Dashboard > Customizations > Import
      - Upload a large custom module (50 MiB)
      - Chrome crashes, while on Firefox the page is sluggish
      
      Cause:
      In the module `base_import_module`, the `module_file` doesn't have a
      corresponding `filename`, therefor the name used to be displayed in
      the wizard is the content of the binary file in base64 encoding...
      For a module that is of a large size, this is a *gigantic* string
      that crashes Chrome and slows down the DOM on Firefox.
      
      Fix:
      Truncate the maximum filename that is displayed in the template to
      the max length necessary to encode in base64 (0xFF) 255 bytes, as
      255 bytes is the maximum filename size on Linux/Windows/MacOS.
      
      Affected versions:
      16.0 up to master
      
      Reference:
      opw-3491998
      
      closes odoo/odoo#134165
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      8a3e2739
Loading