Skip to content
Snippets Groups Projects
  1. Aug 30, 2023
  2. Aug 29, 2023
    • Ricardo Gomes Rodrigues (rigr)'s avatar
      [FIX] l10n_it_stock_ddt: condition to create the l10n_it_ddt_sequence_id · 8a277a4c
      Ricardo Gomes Rodrigues (rigr) authored
      
      The condition to create is wrongly evaluated and does not take into account
      the country code and the picking type code. This commit fixes this by
      reordering the conditions.
      
      closes odoo/odoo#133161
      
      X-original-commit: 30b00e5c
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      Signed-off-by: default avatarRicardo Gomes Rodrigues (rigr) <rigr@odoo.com>
      8a277a4c
    • Benjamin Hanquin (beha)'s avatar
      [IMP] Stock Production Lot dissociate last_delivery_partner_id computation · 6852152e
      Benjamin Hanquin (beha) authored
      
      In stock_production_lot model, there is a field last_delivery_partner_id which is displayed in a Tree View. This fields require to compute ALL the delivery_ids of each LOT, only to display the last_delivery_partner.
      
      This implies a big performance issue for big lots with huge tracability needs in it. The idea is simple, dissociate the computation for delivery_ids, which is only used in Form View and the last_delivery_partner_id which is only used in the Tree View.
      
      I do agree that if both are used in the same view, it would double the computation time. But currently there is a lot of useless computation. Currently the only way to mitigate is by removing the field last_delivery_partner_id in the Tree View, but if client needs that field, it doesn't works.
      
      Benchmark
      
      |Lots/Serial |# Lots | # Delivery | Before PR | After PR |
      |:------------:|:---------:|:--------:|
      |Lots| 3 | 3  | 0.2723 s |0.0091 s |
      |Lots| 4 | 6699 | 307.98 s | 0.0059 s |
      |Lots | 13 | 9575 | 569.85 | 0.0036 s |
      |Serial | 80  | 80  | 0.30 s | 0.42 s |
      |Serial | 150 | 150 |0.39 s | 0.51 s |
      |Serial | 7000 | 2000 | 0.50 s/Batch of 1000 | 0.60 s/Batch of 1000|
      
      closes odoo/odoo#129363
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      6852152e
    • roen-odoo's avatar
      [FIX] sale_timesheet: Fallback on user employee when creating timesheet · ba0d428a
      roen-odoo authored
      
      Current behavior:
        If you set a specific sale_order_item for an employee on a project, and
        create a timesheet line from the "My Timesheets" menu,
        the sale_order_item will not be the one you selected for this employee.
        This happens because when you create a timesheet line from the "My
        Timesheets" menu, the employee is not set on the timesheet line.
        To fix this we fallback on the user's employee when creating a timesheet
        line from the "My Timesheets" menu.
      
      Steps to reproduce:
        - Make sure you'r logged in as Mitchel Admin
        - Create a service product that create project and tasks
        - Create a sale order with this product
        - Go to the project and set a sale order item for Mitchel Admin in the
          invoicing tab
        - Go to the "My Timesheets" menu and click "Add Line"
        - Select the project you created
        - The sale order item will not be autofilled with the one set on the
          invoicing tab of the project.
      
      opw-3463849
      
      closes odoo/odoo#133478
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      ba0d428a
    • Nicolas Lempereur's avatar
      [FIX] web: accept is_html_empty in layout wizard (fixup) · 346cc5e5
      Nicolas Lempereur authored
      
      After eb3dcd60cb88f190d6398d7cadfb7852eecf909c is_html_empty was
      accepted in document layout and would no longer cause an error when
      using "Configure Document Layout" wizard.
      
      If l10n_de is installed, this caused an error itself in "Configure
      Document Layout" because of the content of the external_layout_din5008
      that itself use the "company" variable if available (and in the given
      case, this is a NewId base.document.layout record).
      
      To fix this issue, this commit backports the 16.0 forward-port of the
      referenced commit (5f1ad0c1).
      
      opw-3433583
      
      closes odoo/odoo#133447
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      346cc5e5
    • Christophe Simonis's avatar
      [FIX] point_of_sale: always create missing picking types · 51d85383
      Christophe Simonis authored
      
      Don't do it only at install.
      
      closes odoo/odoo#133364
      
      X-original-commit: 5add840b
      Signed-off-by: default avatarNicolas Seinlet (nse) <nse@odoo.com>
      Signed-off-by: default avatarChristophe Simonis (chs) <chs@odoo.com>
      51d85383
    • Guillaume (gdi)'s avatar
      [FIX] web_editor: don't display option if target matches data-exclude · 56e75ed0
      Guillaume (gdi) authored
      Since [this commit], it's now possible to edit a media when it's in a
      parent that is not editable thanks to `o_editable_media` class.
      Unfortunately, these changes make the new class bypass the potential
      `data-exclude` defined in the XML option declaration. So if the target
      looks like that:
      ```html
      <img class="o_editable_media odoo"/>
      ```
      and the XML option declaration has a `data-exclude=".odoo"`, the option
      will still be displayed. This commit corrects the way the
      `o_editable_media` class works, so that it only bypasses the
      `.o_not_editable` but not the entire exclude.
      
      [this commit]: https://github.com/odoo/odoo/commit/580f1b77ce0b96b7efbf83a0ccdf6979bbf0e904
      
      
      
      task-3476644
      
      closes odoo/odoo#132849
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      56e75ed0
    • Benjamin Vray's avatar
      [FIX] website: fix images wall with link on image · 13f70469
      Benjamin Vray authored
      
      After this commit, we prevent the slideshow from appearing when clicking
      on an "Images Wall" snippet image that has been set as a link.
      
      Steps to reproduce the bug:
      
      - Drag and drop an "Images Wall" snippet onto the page.
      - Add some images in the snippet.
      - Click on an image within the snippet.
      - In the editor text toolbar, click on the "Link" button.
      - Set the URL of the link to "/contactus".
      - Click on the "Save" button in the modal.
      - Save the page.
      - Click on the image with the link.
      - Bug: The slideshow briefly appears before redirecting to the "contact
      us" page.
      
      task-3425624
      
      closes odoo/odoo#133325
      
      X-original-commit: 8b29eabb
      Signed-off-by: default avatarColin Louis (loco) <loco@odoo.com>
      13f70469
    • dinolew's avatar
      [FIX] l10n_cn_city: correct the zipcode from the list · f5d4ec5d
      dinolew authored
      
      closes odoo/odoo#133036
      
      X-original-commit: 854923b8
      Signed-off-by: default avatarQuentin De Paoli <qdp@odoo.com>
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      f5d4ec5d
    • Dino Lew's avatar
      [CLA] signature for wllbll · 7f9b2729
      Dino Lew authored
      X-original-commit: b9de6fc2
      Part-of: odoo/odoo#133036
      7f9b2729
    • Theo VINCENT (thvi)'s avatar
      [FIX] point_of_sale: closing session without cash · b1dca1d0
      Theo VINCENT (thvi) authored
      
      The closing session popup input for bank payment methods throws an error when no cash payment method is configured.
      
      Steps to reproduce:
       - Configure a shop without any cash payment method and with at least one bank payment method
       - Open a session for that shop
       - Click on the button to display the closing session popup
       - In the popup, change the amount of the bank payment method
      
      An error is thrown.
      
      The fix simply consists in correctly checking if there is a cash payment method.
      
      closes odoo/odoo#132473
      
      Task-id: 3468828
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      b1dca1d0
  3. Aug 28, 2023
  4. Aug 27, 2023
  5. Aug 25, 2023
    • Ricardo Gomes Rodrigues (rigr)'s avatar
      [IMP] account: allow switching from credit note to invoice · 863eba62
      Ricardo Gomes Rodrigues (rigr) authored
      Currently, the user has access to a "Switch into credit note/refund" but
      not the reverse button to go from a credit note/refund to an
      invoice/bill. This is now the case.
      
      This is a partial backport of https://github.com/odoo/odoo/pull/103427
      
      
      
      task-id 3102251
      
      closes odoo/odoo#132969
      
      Related: odoo/enterprise#46200
      Signed-off-by: default avatarFlorian Gilbert (flg) <flg@odoo.com>
      863eba62
    • Thomas Lefebvre (thle)'s avatar
      [FIX] hr_recruitment: correct count in mutli-company context · 8bce129a
      Thomas Lefebvre (thle) authored
      
      Steps to reproduce:
      -------------------
      - create a job position without specifying the company;
      - being in the first company, create an application for this job position;
      - being in the second company, create an other application;
      - go to the job position kanban view;
      
      Issue:
      ------
      Despite the selected company, the count for this job application is still two.
      
      Solution:
      ---------
      Include the allowed companies in the query to count the number of applicants.
      
      opw-3453348
      
      closes odoo/odoo#133033
      
      Signed-off-by: default avatarSofie Gvaladze (sgv) <sgv@odoo.com>
      8bce129a
    • Merel Geens (mege)'s avatar
      [IMP] odoo: prevent unsafe import from file · 5cc7d5e5
      Merel Geens (mege) authored
      
      It's possible to specify an existing module as the xml id prefix when
      importing records from a file. This will result in `ir_module_data`
      records being created with `noupdate` set to False. When the module is
      upgraded, these records will be deleted.
      
      This can lead to undesired side effects like journal items for
      accounts imported this way being deleted.
      
      This change prevents creating new records linked to existing modules
      when importing from a file. Instead, the user should either use no
      prefix or the name of a non-existent module, like `__import__`.
      
      opw-3231987
      
      closes odoo/odoo#133053
      
      X-original-commit: 56a53e90
      Signed-off-by: default avatarMerel Geens <mege@odoo.com>
      5cc7d5e5
    • Brice bib Bartoletti's avatar
      [IMP] account: tax tag on any journal item · 2023b96c
      Brice bib Bartoletti authored
      The aim of this commit is to allow any tax tag to be set on a journal
      item and to allow the user to put tax tag from foreign countries in
      which they have a VAT number on any tax.
      
      The end goal is to allow the user to impact tax reports from several
      country with the same journal item, avoiding the creation of a whole
      journal entry and setting the path for some more automation.
      
      Context:
      Our user has a company based in Belgium but has a warehouse in
      Netherland. Thus, when the company sells anything from that warehouse, it
      needs to fill the Dutch tax report directly.
      Moreover, the company needs to fill a grid on the Belgian VAT tax report.
      That means that the user would need to gather some journal items on both
      the Belgian tax report and the Dutch tax report.
      
      Before this commit:
      The user can't set tax tag from another country on its tax nor in the same move.
      
      After this commit:
      The user can set tax tags from any country for which its company has a
      foreign vat number on any tax and in a move
      
      Task-id: 3196547
      opw-2810712
      
      backport of https://github.com/odoo/odoo/commit/c45a164b136f3f12eb3b203646463dfa0bddd50b
      
      
      
      closes odoo/odoo#131088
      
      Related: odoo/enterprise#45385
      Signed-off-by: default avatarJohn Laterre (jol) <jol@odoo.com>
      2023b96c
    • Miquel Raïch's avatar
      [FIX] base: deleting selection fields of non tabled models · 736b0e03
      Miquel Raïch authored
      
      When a model selection record is going to be deleted, a _process_ondelete method is called in order to delete all the records of the corresponding model that have that selection. These records are obtained by calling _get_records, which uses a query that needs a table. Thus, we should avoid cases for non-abstract models that have _auto = False.
      
      closes odoo/odoo#133067
      
      X-original-commit: 408175a7
      Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
      736b0e03
    • Jurgen (jugj)'s avatar
      [FIX] l10n_be_hr_payroll_(fleet): Fix Bike tax deduction computation · 7bdb6e66
      Jurgen (jugj) authored
      
      closes odoo/odoo#128827
      
      Related: odoo/enterprise#43982
      Signed-off-by: default avatarSofie Gvaladze (sgv) <sgv@odoo.com>
      7bdb6e66
  6. Aug 24, 2023
    • Adrien Widart (awt)'s avatar
      [FIX] mrp: check cycle with 'apply on' feature · 31120a53
      Adrien Widart (awt) authored
      
      Commit [1] does not include the amazing feature "apply on variants".
      As a result, a legit configuration could lead to a `ValidationError`
      (see the new test `test_cycle_on_legit_apply_variants`)
      
      Note about the modifications of `test_11_multi_level_variants`:
      because of an ORM limitation, if we create a BoM line directly:
      ```py
      self.env['mrp.bom.line'].create({...})
      ```
      the constraint will not be triggered... We need to write the line
      creation directly on the BoM
      
      [1] 4a4f92c5
      
      opw-3200969
      
      closes odoo/odoo#133039
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      31120a53
    • Walid's avatar
      [FIX] mrp_account: reconcile AVCO kits amls · e029abe6
      Walid authored
      
      Steps to reproduce:
      - Create a product in KIT
      - The product and components must be AVCO rated.
      - Sell product, confirm delivery and post the invoice
      
      Bug:
      the journal entries are not reconciled.
      the lines are gouped by product but in this case the products don't match
      on the stock side it's the components and on the invoice it's the kit
      
      Fix:
      match components stock moves of kits to the kit product
      
      opw-3208169
      
      closes odoo/odoo#128009
      
      Signed-off-by: default avatarAdrien Widart (awt) <awt@odoo.com>
      e029abe6
    • Benoit Socias's avatar
      [FIX] website_blog: prevent edition of blog social media links · 27d8633c
      Benoit Socias authored
      
      Steps to reproduce:
      - Go to `/blog`.
      - Enable "Show Sidebar" in the "Customize" menu.
      - Edit the page.
      - Click on an icon of the "Follow Us" section of the sidebar.
      - Click on the "Link" icon of the editor toolbar.
      
      => An error popup appears.
      
      In further versions, the link parameters can be edited - but they are
      lost upon save.
      
      The social media links sections of the blog and blog post pages is
      generated and is not supposed to be editable.
      
      This commits makes these social media links sections non editable.
      
      If a user needs to configure such a content specifically, it can be done
      inside the "About Us" section of the sidebar above.
      E.g.:
      - Deactivate the "Follow Us" section from the "Customize" menu.
      - You can use copy/paste to duplicate the existing style of the
      "About Us" section if you want.
      - Click on the "File / Image" icon of the editor toolbar (or type
      "/image" to use the Power Box as of 15.0).
      - Select a pictogram.
      - Click on the "Shape: Circle" icon of the editor toolbar.
      - Select the "Font Color" from the editor toolbar.
      - Click on the "Link" icon of the editor toolbar to specify an URL.
      
      opw-3450880
      
      closes odoo/odoo#132024
      
      X-original-commit: 2ba1ab5f
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      27d8633c
Loading