Skip to content
Snippets Groups Projects
  1. Nov 02, 2021
  2. Oct 31, 2021
  3. Oct 29, 2021
  4. Oct 28, 2021
  5. Oct 27, 2021
    • JF Aubert's avatar
      [FIX] mrp_subcontracting: Allow to create backorder for tracked products · 0ef9583b
      JF Aubert authored
      
      This commit fixes the 'You need to supply a Lot/Serial Number...' message
      when validating a receipt with backorder for subcontracted tracked products.
      
      closes odoo/odoo#78062
      
      Task: 2604664
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      0ef9583b
    • Rémy Voet (ryv)'s avatar
      [FIX] base: fix batched version of get_metadata · 657748dc
      Rémy Voet (ryv) authored
      
      - The batch version of get_metadata won't work correctly for the xmlid
      returns due to the limit=1 (cause by
      718b0f8b ). Fix the
      previous issue by reversing the order and without limit.
      - The read should be read with the correct user.
      
      closes odoo/odoo#79076
      
      X-original-commit: 29a53f19
      Signed-off-by: default avatarRémy Voet <ryv@odoo.com>
      657748dc
    • Adrien Widart's avatar
      [FIX] mrp_account, sale_mrp: check if BoM line is correct · acd35564
      Adrien Widart authored
      
      Suppose an automated AVCO product category. When confirming an invoice,
      if the associated product was a kit and if its BoM has changed during
      the process, a traceback can occur.
      
      To reproduce the issue:
      (Need sale_management)
      1. Create a product category PC:
          - Costing Method: AVCO
          - Inventory Valuation: Automated
      2. Create 3 products P1, P2, P3:
          - Product Type: Storable
          - Category: PC
      3. Update P3's quantity > 0
      4. Create two bills of materials:
          - BOM01:
              - Product: P1
              - BoM Type: Kit
              - Components: 1 x P2
          - BOM02:
              - Product: P2
              - BoM Type: Kit
              - Components: 1 x P3
      5. Create a sale order SO with 1 x P1
      6. Confirm SO and process the delivery
      7. Edit BOM02:
          - BoM Type: Manufacture
      8. On SO, create the invoice INV
      9. Confirm INV
      
      Error: an Odoo Server Error is displayed with a traceback: "[...] in
      _compute_average_price, bom_line_data = bom_lines[bom_line] [...]
      KeyError: mrp.bom.line(19,)"
      
      On step 7, when changing the BoM type, a new BoM line is created.
      Therefore, in `_compute_average_price`, the BoM associated to the move
      (i.e., `bom_line`) is not one of the lines in `bom_lines` (i.e., the new
      BoM lines). There is already a check in case the line has been deleted,
      but not if it has been changed.
      
      OPW-2610685
      
      closes odoo/odoo#78917
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      acd35564
    • Bruno Zanotti's avatar
      [FIX] l10n_ar: doc types active field no updatable · 0f900ba5
      Bruno Zanotti authored
      
      We create the document types data with a csv file, but the active field
      should be not updatable so the users could active or inactive records.
      
      closes odoo/odoo#78576
      
      X-original-commit: a7ea6f21
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      0f900ba5
    • Tiffany Chang (tic)'s avatar
      [FIX] stock: always show draft outs in forecasted report · c7647097
      Tiffany Chang (tic) authored
      
      Fix a small logic bug which made it so draft outs would only show only
      if there were also draft ins.
      
      closes odoo/odoo#79037
      
      Fixes: odoo/odoo#78872
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      c7647097
  6. Oct 26, 2021
    • Arnold Moyaux's avatar
      [FIX] sale_mrp: Link to MO on SO · 475e6b3c
      Arnold Moyaux authored
      
      commit 96b56ea3 fix the link between SO <-> MO in manufacture 3 steps
      but break it on other configuration
      
      It happens because without `store after manufacturing` the procurement
      group is not copied and used on the MO. And the stat button search on
      procurement group with a MO and a SO on it. Before it was searching
      on `stock_move.created_production_id` and thus was able to find the MO.
      
      This commit do a mix of the 2 solutions. It search for procurement group
      linked to SO and MO + created_production_id to be sure to find all the
      MO related to a SO
      
      opw-2645042
      
      closes odoo/odoo#79015
      
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      475e6b3c
    • william-andre's avatar
      [FIX] l10n_au: ABN number for demo company · 755c074a
      william-andre authored
      The number that was there before was a TFN, not an ABN because of
      confusion between those two tax numbers.
      See
      https://github.com/arthurdejong/python-stdnum/commit/cc3a970e893ebe6635982bcd49c48e6549cb5ac3
      https://github.com/odoo/odoo/commit/a72f7222c9f5987a20461be9c837e3de73801ff7
      
      
      
      closes odoo/odoo#78894
      
      Signed-off-by: default avatarLaurent Smet <las@openerp.com>
      755c074a
    • Harald Panten's avatar
      [FIX] Fix typo in 24% IRPF tax · 3415ba88
      Harald Panten authored
      
      closes odoo/odoo#78883
      
      X-original-commit: 83bb18e4
      Signed-off-by: default avatarOlivier Colson <oco@odoo.com>
      3415ba88
    • oco-odoo's avatar
      [FIX] l10n_es: Replace grid 61 by the proper tag on tax templates · f16086c3
      oco-odoo authored
      Fix https://github.com/odoo/odoo/commit/b40216a8ae8fefd03311b2884e7b83644baac0a1
      
       was merged though partially ready.
      
      closes odoo/odoo#79005
      
      X-original-commit: 880c32f9
      Signed-off-by: default avatarJosse Colpaert <jco@openerp.com>
      Signed-off-by: default avatarOlivier Colson <oco@odoo.com>
      f16086c3
    • Antoine Dupuis (andu)'s avatar
      [FIX] base: catch PDFs that fail on PdfFileWriter.write · 2dbe39ae
      Antoine Dupuis (andu) authored
      
      Issue:
      Our functionality for merging PDFs from multiple vendor bills relies on PyPDF2. It is well-known that PyPDF2 is sometimes unable to manipulate even perfectly normal PDFs. To provide a helpful error message to the user when this happens (i.e. give them the names of the vendor bills corresponding to the offending pdfs), the `_get_unreadeable_pdfs()` function is called right before we try to merge the PDFs in `_merge_pdfs`. This function is meant to identify the offending PDFs and provide them to the user.
      However, _get_unreadable_pdfs did not notice the problem with 3 of my customer's pdfs, because the error was only triggered once the PdfFileWriter.write function was called in _merge_pdfs. This function, however, is not called in _get_unreadable_pdfs, therefore, it did not notice that anything was wrong.
      
      Fix:
      - Change _get_unreadable_pdfs so that it also makes a call to PdfFileWriter.write
      - As soon as PdfFileWriter.write fails once, it will continue failing when we append more PDF streams to the PdfFileWriter. I therefore suggest initialising a different PdfFileWriter at each iteration of the for loop in order for an offending PDF to not cause a false positive on subsequent PDFs.
      
      closes odoo/odoo#78955
      
      X-original-commit: 0b4efd37
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      Signed-off-by: default avatarAntoine Dupuis (andu) <andu@odoo.com>
      2dbe39ae
    • Audric Onockx (auon)'s avatar
      [FIX] web : Fixed datetime filter search based on wrong hours · 454a367a
      Audric Onockx (auon) authored
      
      Reproduce :
      (With timezone GMT+3)
      - Create any record R1 with previous day's date and time after 21:00.
      - Create any record R2 with today's date and time after 21:00.
      - Create a filter to show all todays records (Date is between "<TODAY'S DATE> 00:00:00 and <TODAY'S DATE> 23:59:59".
      
      Result :
        Even though R1 is in yesterday's date, it will show in the list.
        R2 will not show in this list.
      
      Explanation :
        This behaviour has been observed in several modules, for any timezone but UTC & only with custom filters default datetime values.
        The search was applied on [datetime(UTC) + 2 * offset] because the timezone wasn't correctly set.
      
      Solution :
        Timezone is now correctly set on default datetime values.
      
      closes odoo/odoo#75663
      
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      454a367a
    • Raphael Collet's avatar
      [FIX] core: related field attributes · d10073d4
      Raphael Collet authored
      
      A related field copies the attributes from its target field, except for
      the attributes defined on the related field itself.  The implementation
      of this feature was not working properly for attributes with a truthy
      default value.
      
      closes odoo/odoo#78687
      
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      d10073d4
    • Alvaro Fuentes's avatar
      [FIX] stock: fix search default property for missing locs · b9d98950
      Alvaro Fuentes authored
      It may happen that there is a property defined on some field that is not
      the default property, but rather the property associated to a record.
      For example
      ```
      => select id,name,company_id,fields_id,value_reference,res_id from ir_property where name like '%property_stock_inventory%'
      +------+--------------------------+--------------+-------------+-------------------+----------------------+
      | id   | name                     | company_id   | fields_id   | value_reference   | res_id               |
      |------+--------------------------+--------------+-------------+-------------------+----------------------|
      | 528  | property_stock_inventory | 1            | 4665        | <null>            | product.template,752 |
      | 6    | property_stock_inventory | <null>       | 4665        | stock.location,5  | <null>               |
      +------+--------------------------+--------------+-------------+-------------------+----------------------+
      ```
      In this case the property with id=528 is not a default property since
      res_id is not NULL. Alternatively the property id=6 is a default one.
      
      The issue here is that when searching for the missing locations we do
      not filter out the properties with res_id not NULL, thus we may get that
      a company has the location define while in fact it doesn't. Following
      the example above, this means that we incorrectly get property id=528 as
      the one defining the location for the company id=1 here:
      https://github.com/odoo/odoo/blob/c5c47da2e96fd5e37030c70d6bb1bae4c4047fa8/addons/stock/models/res_company.py#L107
      This not only prevents the creation of the correct default property but
      also the default locations
      https://github.com/odoo/odoo/blob/c5c47da2e96fd5e37030c70d6bb1bae4c4047fa8/addons/stock/models/res_company.py#L36-L51
      
      
      
      On this patch we fix the domain search for default property. This allows
      for the correct creation of the default locations and associated
      properties.
      
      This issue was observed during upgrade 40921, where it prevents the
      upgrade to 15.0
      
      closes odoo/odoo#78949
      
      X-original-commit: 17e74b48
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      b9d98950
    • Kevin Baptiste's avatar
      [FIX] hr: remove footer buttons on My Profile · 71e59f43
      Kevin Baptiste authored
      
      The "Save" / "Cancel" buttons were wrongly showing on the "My Profile"
      page.
      
      closes odoo/odoo#78820
      
      Taskid: 2675313
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      71e59f43
    • Tiffany Chang (tic)'s avatar
      [FIX] purchase: correct amounts for purchase report multi-company/currency · 083a3776
      Tiffany Chang (tic) authored
      
      Selection of multiple companies to view multi-company data was added
      in v13, but at the time there was no way to have reports correctly
      take into account currency rates when also working with multi-currency.
      v14 onwards is able to correctly apply the currency rates, therefore we
      fix the purchase report to do so.
      
      Steps to reproduce:
      1. Start with existing demo data + add a new company with currency = EUR
      2. Activate multi-currencies + set a currency rate (not 1) for Euro to $
      3. Open Purchase Report (Purchase > Reporting > Dashboard)
      4. Activate demo company + new EUR company
      5. Switch between USD and EUR company as selected company
      
      Expected result:
        Dashboard monetary quantities switch between $ and EUR, i.e. both the
        amount changes according to current exchange rate and symbol.
      
      Actual result:
        Currency symbol changes, but amount stays the same.
      
      closes odoo/odoo#75651
      
      Signed-off-by: default avatarArnold Moyaux <arm@odoo.com>
      083a3776
    • Philippe Wauthy's avatar
      [FIX] resource: timezone end before assigning search_range · 36e20a34
      Philippe Wauthy authored
      
      The end datetime is not timezoned in _adjust_to_calendar before defining the search_range and using the _get_closest_work_time method.
      Since _get_closest_work_time will timezone the timestamp received to start searching, the search interval needs to refer to the same end timestamp to avoid erratic behaviors.
      
      Task-2628876
      
      closes odoo/odoo#76374
      
      Related: odoo/enterprise#20783
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      36e20a34
  7. Oct 25, 2021
    • Victor Feyens's avatar
      [FIX] purchase_product_matrix: multiple fixes · 591e424f
      Victor Feyens authored
      
      Same fixes for the purchase scope
      
      1) Do not overwrite lines description if the line was not modified
      
      2) Correctly recompute prices/sellers on quantity change.
      
      When no new line was added to the PO through the matrix, the
      prices/sellers were not recomputed, even if the qty was modified for
      some products.
      
      closes odoo/odoo#78902
      
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      591e424f
    • Victor Feyens's avatar
      [FIX] sale_product_matrix: multiple fixes · 4f819438
      Victor Feyens authored
      1) Do not overwrite lines description if the line was not modified
      
      Fixes #78833
      
      2) Correctly recompute prices on quantity change.
      
      When no new line was added to the SO through the matrix, the prices were 
      not recomputed, even if the qty was modified for some products.
      
      The prices have to be recomputed in this case since pricelist provide 
      rules based on minimum qty.
      
      Part-of: odoo/odoo#78902
      4f819438
Loading