Skip to content
Snippets Groups Projects
  1. Nov 25, 2022
  2. Nov 24, 2022
    • vishal padhiyar's avatar
      [FIX] web_editor: remove copy paste unwanted newline · bf7835e8
      vishal padhiyar authored
      
      Before this commit:
      
      - When you try to paste text beside a text which is in code formate it
        puts the new text in new line with smaller font.
      
      - When we try to paste text in code formate in new line then it will
        give a blank space below the pasted text
      
      After this commit:
      
      - when you try to paste text beside a text which is in code formate it
        puts the pasted text in new line with original fontsize.
      
      - When we paste the text in code formate in new line then it will not give
        a empty line below it,
      
      Task-2683455
      
      closes odoo/odoo#105939
      
      X-original-commit: 449cacfe
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      bf7835e8
    • Jeremy Kersten's avatar
      [FIX] *: remove flag Application on some apps · 8b1928b3
      Jeremy Kersten authored
      
      We decided to make this list as feature and not application.
      It allows any user in mode OneAppFree to use them without become an
      Extra App.
      
      List of apps impacted:
          blog
          forum
          all payments acquirer
      
      task-3062641
      
      closes odoo/odoo#105787
      
      Related: odoo/enterprise#33961
      Signed-off-by: default avatarThibault Francois <tfr@odoo.com>
      8b1928b3
    • Antoine Vandevenne (anv)'s avatar
      [IMP] payment_demo: store a dummy provider reference on transactions · 73865f2b
      Antoine Vandevenne (anv) authored
      
      As provider references are included in the memo of `account.payment`
      records, it makes sense to set one on demo transactions to mimic what
      is done with other providers.
      
      task-3063368
      
      closes odoo/odoo#105550
      
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      73865f2b
    • Horacio Tellez's avatar
      [IMP] account_payment: Better reference for account payment memos · 414fb09b
      Horacio Tellez authored
      The Memo field in the form view of the `account.payment` model
      (the `ref` field) was a little cryptic and did not supplied a lot
      of information about the payment.
      After this commit the Memo will (if available) provide information
      about the sales order, the partner and the payment transaction.
      
      Task - 3063368
      
      Part-of: odoo/odoo#105550
      414fb09b
    • Brice bib Bartoletti's avatar
      [FIX] account,pos,stock_account:add/update indexes · b743e736
      Brice bib Bartoletti authored
      1) forward-port of this PR: https://github.com/odoo/odoo/pull/97000
      
      
         commit: c9209664
      
      2) use btree_not_null instead of simple btree for space optimisation
      
      closes odoo/odoo#106363
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      b743e736
    • Arthur Detroux (ard)'s avatar
      [FIX] website: prevent CTRL-K from focusing on browser's URL bar · 797a0514
      Arthur Detroux (ard) authored
      Ever since the website is previewed in the iframe [1], pressing CTRL-K
      (or Meta-K on macOS)  while previewing the website can result in
      focusing on the browser's URL bar on top of summoning the command
      palette.
      
      Steps to reproduce:
      - Preview the website
      - Click on the iframe to focus on it
      - Press CTRL|Meta - K
      - URL bar is focused
      
      This commit fixes that by preventing the default behaviour within the
      iframe and only summon the command palette.
      
      [1]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
      
      
      
      task-3035637
      
      closes odoo/odoo#106272
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      797a0514
    • Ivan Yelizariev's avatar
      [FIX] mail: show activity groups with future items · b5aaf7b4
      Ivan Yelizariev authored
      When activity group (e.g. activities for Sale Orders) has future acitivities,
      but not today or overdue activities, the group is deleted. This is not what we
      want. In v15 it worked opposite way, but in v16 it was changed after js
      refactoring. Variable name for `total_count` is confusing. It actually means
      today activities + overdue activities [1]
      
      [1] https://github.com/odoo/odoo/blob/1666ee5515996fab8a843b36b4fd93b776172f75/addons/mail/models/res_users.py#L237-L238
      
      
      
      opw-3042616
      opw-3063110
      
      closes odoo/odoo#106178
      
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      b5aaf7b4
    • clesgow's avatar
      [FIX] purchase_requisition: Compare product lines · 1b904ece
      clesgow authored
      
      Steps to reproduce:
      - Create a product with both MTO and Buy routes.
      - Create a Sale Order containing this product.
      - On the created PO, go to Alternatives -> Create Alternative and select
      another vendor.
      - Go back to the original Sale Order
      - Click on the linked Purchase Order
      - Go to Alternatives -> Compare Product Lines
      
      When doing this, the `active_id` in the context is the id of the Sale
      Order, which raises an issue in the renderer for this list as it's using
      the active_id as if it was the Purchase Order.
      
      closes odoo/odoo#106085
      
      Signed-off-by: default avatarTiffany Chang <tic@odoo.com>
      1b904ece
    • vishal padhiyar's avatar
      [FIX] web_editor: stuck after manual link creation · e2afc3c8
      vishal padhiyar authored
      
      Before this commit:
      
      When we try to create link manually and try to press enter cursor gets stuck.
      
      After this commit:
      
      Now when we create link manually and press enter cursor moves to next line.
      
      Task-2745129
      
      closes odoo/odoo#105961
      
      X-original-commit: 4d14fa55
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      e2afc3c8
    • clesgow's avatar
      [IMP] stock: Add product category groupby for inventory adjustment · ad5382ac
      clesgow authored
      
      Add a group by product categories in the stock.quant.
      
      Part of task-2985735
      
      closes odoo/odoo#106396
      
      Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
      ad5382ac
    • Julien Van Roy's avatar
      [FIX] account_edi_ubl_cii: prevent translating some tags · 9cc535f9
      Julien Van Roy authored
      
      Some tags in Factur-X are translated (for instance: 'INVOICE' becomes 'FACTURE')
      and thus break the compliance tests of PDFA/3.
      Also prevent translating 'VAT' into 'TVA' because it breaks the factur-x/UBL
      tests.
      
      task-3077791
      
      closes odoo/odoo#106386
      
      X-original-commit: 1739fbe0fe4482cb253b486ed584f670607246d7
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      Signed-off-by: default avatarJulien Van Roy <juvr@odoo.com>
      9cc535f9
    • arsi's avatar
      [FIX] account_taxcloud: change display_type filter · 8bfca583
      arsi authored
      
      Traceback when computing taxes using TaxCloud.
      
      Steps to reproduce:
      -Activate TaxCloud in accounting settings, with valids "API ID" and
       "API KEY".
      -Create an invoice for a USA customer with an invoice line and
       "Fiscal Position" set to "Automatic Tax Mapping (TaxCloud)" (in the
       "Other Info" tab).
      -Confirm
      -->Traceback
      
      Traceback:
      File
      "/src/enterprise/16.0/account_taxcloud/models/taxcloud_request.py",
      line 136, in get_all_taxes_values
      for item in response.CartItemsResponse.CartItemResponse:
      AttributeError: 'NoneType' object has no attribute 'CartItemResponse
      
      Explanation:
      -There's a traceback when CartItem is empty (like if there are no move
       lines).
      -It is empty because of the filter in the function
       '_process_lines(self, lines)'.
       --> 'lines.filtered(lambda l: not l.display_type)'.
      -The goal is to take only move lines that are not Notes or Sections.
      -This worked in v15 because display_type was defined as:
      
          display_type = fields.Selection([
                  ('line_section', 'Section'),
                  ('line_note', 'Note'),
              ], default=False, help="Technical field for UX purpose.")
      
      -But now in v16 it is defined as:
      
          display_type = fields.Selection(
                  selection=[
                      ('product', 'Product'),
                      ('cogs', 'Cost of Goods Sold'),
                      ('tax', 'Tax'),
                      ('rounding', "Rounding"),
                      ('payment_term', 'Payment Term'),
                      ('line_section', 'Section'),
                      ('line_note', 'Note'),
                      ('epd', 'Early Payment Discount'),
                  ],
                  compute='_compute_display_type', store=True, readonly=False,
                  precompute=True, required=True,
              )
      
      -The display_type=False does not corresponds anymore to move lines
       that are not Sections or Notes, but it corresponds to no move lines at
       all.
      
      The fix:
       Will filter move lines that are not of type 'line_section' or
       'line_note'.
      
      Discussion:
       Do I fix the traceback that we get when there a no move lines?  This
       'issue' is present since at least v14 and it seems like nobody ever
       complained.
      
      +:
       I've applied the similar change to some lines in the code that also
       check if 'display_type' is False for some 'account.move.line' records.
      
      ++:
       The fix revealed an other issue in the function
        '_inter_company_create_invoices' of the file
        enterprise/account_inter_company_rules/models/account_move.py:
        There's a call on a function that doesn't exist anymore
        'line._set_price_and_tax_after_fpos()'.  I've deleted the line.
      
      opw-3064174
      
      closes odoo/odoo#106353
      
      Related: odoo/enterprise#34289
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      8bfca583
    • Aurélien Warnon's avatar
      [FIX] base: allow user to modify its own preferences · 490d4804
      Aurélien Warnon authored
      
      The res.users model functions a bit uniquely since it should allow a user to
      modify their own parameters but turns off model edition priviledges by default.
      See "SELF_WRITEABLE_FIELDS".
      
      This implies that ir_ui_view#_postprocess_access_rights method will by default
      turn off record edition, by automatically adding a 'edit="false"' attribute on
      the form node when the frontend calls 'get_views'.
      
      This will in turn prevent the user from modifying its preferences as it will
      set the form view in readonly mode.
      (It was apparently ignored pre-OWL, hence why we only have this issue now).
      
      To fix the issue, we force the edition by manually setting 'edit="1"' on our
      "view_users_form_simple_modif" form.
      Allowing the end-user to modify their own settings again.
      
      A tour was added to ensure this behavior.
      Note that tour steps need to be adapted in the 'hr' module, as this module
      changes the flow of modifying user preferences.
      
      Task-3067001
      
      closes odoo/odoo#106125
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      490d4804
    • Thomas Lefebvre (thle)'s avatar
      [FIX] base, contact: add conditions in Set Defaults form · 07315bee
      Thomas Lefebvre (thle) authored
      
      Version: only V16.0 (will be improve in future versions)
      
      Steps to reproduce:
          - install the "contacts" module;
          - go to a contact;
          - go to the "Set Defaults" tab (in the debug menu).
      
      Issue:
          There is no field that allows you to select the condition.
      
      Cause:
          The function `getConditions` needs the `change_default` attribute of the field.
      
      Solution:
          Add the `change_default` attribute to the list which is returned by the `_get_view_field_attributes` function.
      
      opw-3079328
      
      closes odoo/odoo#106350
      
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      07315bee
    • Adrien Widart (awt)'s avatar
      [FIX] delivery: hide useless length UoM · d5a86a06
      Adrien Widart (awt) authored
      The dimensions UoM of the carrier packaging is useless: it is not the
      one used in the requests and there is not any conversion
      
      To reproduce the issue
      (Need delivery_fedex. Use demo data. Enable debug mode)
      1. In Shipping Methods, edit 'Fedex US':
          - Package Weight Unit: KG
          - Debug Requests: True
      2. Edit its Fedex Package Type:
          - Height: 1m
          - Width: 1m
          - Length: 1m
          - Package Code: YOUR_PACKAGING
      3. Create a SO with a US partner and one product
      4. On the SO
          - Add Shipping
          - Select 'Fedex US'
          - Click on 'Get Rate'
      5. In Logging, open the request sent
      
      Error: the dimensions of the packaging are expressed with "CM" but they
      are not converted:
      ```xml
      <ns0:Dimensions>
      	<ns0:Length>1</ns0:Length>
      	<ns0:Width>1</ns0:Width>
      	<ns0:Height>1</ns0:Height>
      	<ns0:Units>CM</ns0:Units>
      </ns0:Dimensions>
      ```
      
      When encoding the packaging in the request, the UoM defined on the
      packaging (meter) is ignored. Instead, we define a length UoM depending
      on the UoM of the weight and we don't convert any dimension:
      https://github.com/odoo/enterprise/blob/e4fd13a0e073b9855864b7fabc26bc05b9a5fd19/delivery_fedex/models/fedex_request.py#L172-L178
      There is even a `TODO` about the issue.
      
      It will be the same with the other carriers. For instance, with UPS:
      https://github.com/odoo/enterprise/blob/c9899f7860cd19c86f215d6dcea89f73b51433f3/delivery_ups/models/ups_request.py#L98-L102
      
      
      We use the UoM of `ups_package_dimension_unit` and do not convert the
      dimensions.
      
      We can't implement the dimensions conversion on stable versions, since
      it will break all existing packagings. So, as temporary solution, we can
      simply hide the useless UoM defined on the packagings.
      
      OPW-3053048
      
      closes odoo/odoo#106329
      
      X-original-commit: 3bc2f594395a08515ed362e3d9a816e7cc18c842
      Related: odoo/enterprise#34301
      Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
      d5a86a06
    • niyasraphy's avatar
      [FIX] base: country form oe_button_box alignment · c7f1bb18
      niyasraphy authored
      
      closes odoo/odoo#106319
      
      Signed-off-by: default avatarRémy Voet <ryv@odoo.com>
      c7f1bb18
    • Nshimiyimana Séna's avatar
      [FIX] web_editor: fix codeview toggle · 01fb9cab
      Nshimiyimana Séna authored
      
      ### Steps to reproduce
      * Enable Dev mode
      * Open an email template
      * Open Code View of the template
      * Click the green button in the top right corner of the content box
      
      You should be met with a traceback.
      
      opw-3045759
      
      closes odoo/odoo#106063
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      01fb9cab
    • William Henrotin's avatar
      [FIX] stock_account: open layer form from list · d5162f81
      William Henrotin authored
      
      Since e4988b70, the record openned from the stock valuation layer
      list view will depend on the stock move parent's document. If, the move
      has a picking_id set, the record will be the stock picking.
      
      This implies in some cases (a stock move linked to a picking or a
      manufacturing order) we cannot access the stock valuation form view and
      thus the accounting entries are not reachable from there.
      
      This commit adds a button in the list view to open the layer form view.
      
      closes odoo/odoo#105452
      
      Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
      d5162f81
    • Odoo Translation Bot's avatar
  3. Nov 23, 2022
    • Audric Onockx (auon)'s avatar
      [FIX] hr_timesheet: uninstall project's 'timesheet' config · 7bf73663
      Audric Onockx (auon) authored
      
      Steps :
      Go to project > settings.
      Check 'timesheet' config and save.
      Uncheck it back and save.
      
      Issue :
      See errors in the logs, due to on delete restrict.
      
      Cause :
      Record 'hr_timesheet.internal_project_default_stage' from data
      is deleted when hr_timesheet is uninstalled.
      Yet some project task records still use it, so we can't delete it.
      
      Fix :
      Delete the corresponding ir.model.data to keep the stage,
      but unlink it from the 'hr_timesheet.internal_project_default_stage' ref.
      
      task-2998416
      
      closes odoo/odoo#106344
      
      X-original-commit: c9e49358111521c042dd793f80ff99895d0fd179
      Related: odoo/enterprise#34309
      Signed-off-by: default avatarLaurent Stukkens (ltu) <ltu@odoo.com>
      7bf73663
    • niyasraphy's avatar
      [FIX] mail: channel/partner create error · e998b2c5
      niyasraphy authored
      
      closes odoo/odoo#103761
      
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      e998b2c5
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] account, account_sequence: psycopg2 errors class missing · b21fdf11
      Andrea Grazioso (agr-odoo) authored
      
      Traceback when starting odoo server
      ImportError: cannot import name 'errors' from 'psycopg2'
      
      Exception management update in commit
      4b430f8e
      would require psycopg2 version 2.8 minimum but version in
      requirements is 2.7.7
      
      closes odoo/odoo#106345
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      b21fdf11
    • Romain Estievenart's avatar
      [FIX] web: text header appears over the text kanban card · 041fddf0
      Romain Estievenart authored
      
      Scrolling inside a grouped kanban with a lot of cards on a column
      makes the text header appear over the kanban card due to the missing
      background.
      
      Steps to reproduce :
      - Open Helpdesk on small screen like a mobile
      - Open VIP Support
      - Made a Group by "Create date => day" (there should be enough cards on
        a column to scroll)
      - Scrolling the column => bug, the text header appears over the kanban
        card
      
      closes odoo/odoo#106330
      
      Signed-off-by: default avatarPierre Paridans (app) <app@odoo.com>
      041fddf0
    • aliya's avatar
      [FIX] account: bill date rather than accounting · 76a640d0
      aliya authored
      
      We should always use `invoice_date` instead of the `date` of the move for currency exchange.
      Re-adding some of the changes from odoo/odoo#87984
      
      task-2807136
      
      closes odoo/odoo#106218
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      76a640d0
    • Arthur Detroux (ard)'s avatar
      [FIX] web_editor, website: improve perf of color previews · 7f5a9d04
      Arthur Detroux (ard) authored
      Follow-up of [1].
      
      After [2], color previews on the side panel would be changed by the
      wysiwyg adapter. The adapter would add each block individually inside
      the iframe and check its current styling to then add the style to the
      color preview elements. This was performed many times (as color palettes
      all have their own individual rendering of the color previews)
      and slowed down the editor.
      
      This commit improves that by relying on the copied variables introduced
      at [3]. This removes the "re-render" of the color preview elements,
      instead relying on styling rules and CSS variables which are initialized
      when the editor is started.
      
      [1]: https://github.com/odoo-dev/odoo/pull/1149#discussion_r900120846
      [2]: https://github.com/odoo/odoo/commit/212a8bfdd21269b18054200b9e2585e1c95540d6
      [3]: https://github.com/odoo/odoo/commit/a396f791da94d064d58cce15892e74f45d29b7b7
      
      
      
      closes odoo/odoo#100441
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      Co-authored-by: default avatarqsm-odoo <qsm@odoo.com>
      7f5a9d04
    • PNO's avatar
      [FIX] stock: multi-company check to change product type · 89622aa0
      PNO authored
      On the ticket https://github.com/odoo/odoo/pull/101547
      
       a constraint was added to prevent the user from changing the product type if some moves have already been made.
      This was done because changing the type creates inconsistencies (like breaking the valuation).
      However, it currently only checks if there are moves on the current company, when it should check in all companies.
      This can be fixed by adding sudo.
      
      closes odoo/odoo#106340
      
      X-original-commit: e8bb4a50
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      89622aa0
    • Abdelouahab (abla)'s avatar
      [FIX] point_of_sale: fix customer name overflow · 4bf9627f
      Abdelouahab (abla) authored
      
      To Reproduce
      ============
      - start a session on pos
      - on customer button create new one with a long name
      - go back to pos dashboard, the name of the chosen customer goes outside of the button
      
      Solution
      ========
      a style was added to the button so that the long string is divided on multiple lines
      
      opw-3074503
      
      closes odoo/odoo#106144
      
      Signed-off-by: default avatarMasereel Pierre <pim@odoo.com>
      4bf9627f
    • Touati Djamel (otd)'s avatar
      [FIX] mrp, sale_mrp: always use BOM UoM on Replenishment · 8c5fb8b7
      Touati Djamel (otd) authored
      
      Steps to reproduce the bug:
      - Create a storable product “P1”:
          - route: MTO + manufacture
          - uom: unit
          - BOM:
              - qty: 1 dozen
              - component: 12 units of “C1”
      - Create a SO:
          - Product: 12 unit of “p1”
          - uom: unit
          - Confirm the SO
      
      Problem:
      The UOM set on the product is used instead of the BOM UoM on the created
      manufacturing order.
      
      wrong MO:
          - 12 unit of "P1"
      expcted MO:
          - 1 dozen of "P1"
      
      opw-3048190
      
      closes odoo/odoo#104912
      
      Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
      8c5fb8b7
    • Paolo Gatti's avatar
      [FIX] l10n_it_edi: Non EU VAT fix · 56214259
      Paolo Gatti authored
      Non EU vendor bills are sent to the Tax Agency as self-invoices,
      so the partner actually is the seller, but the same checks on the
      VAT must apply as it was the buyer.
      
      Task: https://www.odoo.com/web#id=3010849&model=project.task
      
      
      opw-3010849
      
      closes odoo/odoo#106303
      
      X-original-commit: 8c18b870
      Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
      Signed-off-by: default avatarPaolo Gatti (pgi) <pgi@odoo.com>
      56214259
    • Philippe Wauthy's avatar
      [FIX] hr_holidays: fix allocation without validation · c98e1280
      Philippe Wauthy authored
      
      In hr_holidays, when the time off type has the following settings:
      - Requires allocation: Yes
      - Employee Requests: Not allowed
      An allocation created with this time off type still requires to be validated.
      
      This commit removes the need to validate an allocation created with the time off type described above.
      
      task-3004313
      
      closes odoo/odoo#106306
      
      X-original-commit: 9377b79cfdcfd088e515fa1a198477bb1dfbc32b
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      c98e1280
    • Kartik Chavda's avatar
      [FIX] hr_timesheet,repair: fix field width issue · 41b354f3
      Kartik Chavda authored
      
      Before this commit field width was not as expected because
      its label defined in container(Ex: div,span)
      
      This commit fix field width issue by giving o_td_label class
      to container of label to properly compute its width
      
      task-3032518
      
      closes odoo/odoo#104727
      
      Signed-off-by: default avatarLaurent Stukkens (ltu) <ltu@odoo.com>
      41b354f3
    • william-andre's avatar
      [FIX] account: unique constraint in sequence mixin · 4b430f8e
      william-andre authored
      
      Change the way the uniqueness of the sequence numbers is ensured.
      Instead of using a `SELECT FOR UPDATE` approach inspired from the
      `ir.sequence`, or even a true UPDATE, we can use a constraint approach.
      
      SELECT FOR UPDATE
      =================
      
      By doing a FOR UPDATE NO WAIT, we are throwing an exception when another
      transaction is creating a move using the same sequence as this one, by
      locking the row that holds the current greatest sequence.
      Since the row doesn't change, the lock is released and the following
      UPDATE is allowed. Because of this, a "useless" UPDATE was always done
      on the previous row to ensure a SerializationFailureError if two
      concurrent transactions were trying to assign the same number.
      This means that in a database with a lot of concurrent transactions
      (typically with an online shop), many transactions were
      aborted/rollbacked.
      This approach also has the drawback of having the constraint implemented
      python side, which is less robust.
      
      UNIQUE CONSTRAINT
      =================
      
      Using a constraint on the database level means that the database knows
      when some transactions will try to do something similar. It will
      therefore make the concurrent transactions wait instead of aborting the
      transaction.
      It is however harder to have the constraint customized by different
      modules/localization because it is now done directly in the database and
      not in python. Changing the constraint means deleting/recreating the
      index. For now, this only happens for Latin America l10n, so a simple
      hardcoded approach is implemented.
      In order to achieve this, the business code is trying to use the
      sequence incrementally until it gets a number it can use for when
      multiple transactions are concurrent.
      
      closes odoo/odoo#104606
      
      Related: odoo/enterprise#34236
      Signed-off-by: default avatarQuentin De Paoli <qdp@odoo.com>
      4b430f8e
    • william-andre's avatar
      [FIX] account: locking in partner customer/supplier rank update · b1491b76
      william-andre authored
      2 fixes are made:
      * We use a FOR NO KEY UPDATE instead of FOR UPDATE because we don't want
        to prevent the insertion of lines referencing the partner as a foreign
        key (i.e. new invoices).
        The data is purely informative and the exact value isn't too important
        anyways.
      * We catch SerializationFailure on top of the previously catched
        LockNotAvailable. It can happen in this use case
        - T1 and T2 start
        - T1 acquires the lock and updates
        - T1 commits
        - T2 acquires the lock: it gets it because T1 released it
        - T2 updates: T1 did it as well so there is a serialization failure.
      
      Part-of: odoo/odoo#104606
      b1491b76
    • william-andre's avatar
      [IMP] core: allow to have virtual SQL constraints · e1f06479
      william-andre authored
      Sometimes a constraint is too complex to be expressed in the general
      `_sql_contraint`.
      This allows to hook on a constraint if it matches the name in order to
      display a user friendly error message.
      
      Part-of: odoo/odoo#104606
      e1f06479
    • Joseph Caburnay's avatar
      [FIX] web: update records of the current page when deleting · 28639780
      Joseph Caburnay authored
      
      **Issue:**
      
      When at the first page of the list, and the user deleted all/or some
      of the records, the next page is not automatically displayed.
      
      **Solution:**
      
      This is because the first page (offset=0) is exempted from offset
      adjustment (_adjustOffset) which is responsible in reloading the
      records in the list.
      
      In this commit, we propose to reload the list if the call to
      `_adjustOffset` didn't call `load` and there are actually deleted
      records.
      
      closes odoo/odoo#106176
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      28639780
Loading