Skip to content
Snippets Groups Projects
  1. Apr 05, 2023
  2. Apr 04, 2023
  3. Apr 03, 2023
    • Abderraouf Ghrissi (abgh)'s avatar
      [FIX] project: display project in read-only when portal user is not a collaborator · f5168521
      Abderraouf Ghrissi (abgh) authored
      
      Before this commit:
      - A portal user cannot access the project if he's not a
      follower but a public user can do that and it doesn't
      make sense for portal users to have less access than public users.
      
      - Technically the problem was that we call _check_project_sharing_access
      with the portal user instead of sudo, so when trying to access
      self.collaborator_ids, an exception is raised saying that
      the portal user cannot access to project fields.
      
      After this commit:
      - Portal users can access the project in read-only when they are not
      followers.
      - Technically, we preferred searching over just adding self.sudo()
      to get the result directly in one query for a better performance.
      
      task-3205644
      
      closes odoo/odoo#117401
      
      X-original-commit: 0130508e
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      f5168521
    • niyasraphy's avatar
      [FIX] website_profile: show + only when gained karma is positive · 53b406bc
      niyasraphy authored
      
      Before this commit, in the website profile frontend, if we filter the users
      using 'This week' or 'This month' filters we always get a '+' displayed before
      the karma gain.
      
      If user gained negative karma, lets say -500, currently it displays as follows
      --> +-500 , instead of -500.
      
      After this commit, if the gained karma during the period is it will show
      -500 instead of +-500.
      
      closes odoo/odoo#117018
      
      X-original-commit: d4068589
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      53b406bc
    • Michele's avatar
      5516cff9
    • Dylan Kiss (dyki)'s avatar
      [FIX] l10n_be: change legal report name · 9d8b0655
      Dylan Kiss (dyki) authored
      
      English term changed in source. Dutch and French via Transifex.
      
      task-3193776
      
      closes odoo/odoo#113780
      
      Related: odoo/enterprise#37578
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      9d8b0655
    • gawa-odoo's avatar
      [FIX] account: prevent wrong type tax on move · 85d89a98
      gawa-odoo authored
      
      - Create an account of type current asset
      - Add him a Sales Tax and a Purchase Tax
      - Create invoice
      - Add a line
      - Remove the taxes from this line
      - Change the account to the one you created
      
      => A purchase tax is applied to the line.
      It should not happen, so we prevent it.
      
      closes odoo/odoo#117481
      
      X-original-commit: 8c8d657c
      Signed-off-by: default avatarQuentin De Paoli <qdp@odoo.com>
      Signed-off-by: default avatarWala Gauthier (gawa) <gawa@odoo.com>
      85d89a98
    • Audric Onockx (auon)'s avatar
      [FIX] project,hr_timesheet: fix performance issue in task kanban · bb7aec2d
      Audric Onockx (auon) authored
      
      It takes a too long to load project task kanban view.
      And ~85% of this time is spent in `ProjectTask._get_all_subtasks`,
      which is a recursive method returning the children of the children,
      while any, of the task, for each task, just to display their count.
      
      We replaced this recursive method with a SQL request,
      which is way faster. Also, it can be called in batch.
      It will return a dict {id: subtask_ids}.
      
      task-3246085
      
      closes odoo/odoo#116570
      
      Related: odoo/enterprise#38723
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      bb7aec2d
    • Nshimiyimana Séna's avatar
      [FIX] account: fix interaction between early payment discount and intra-community taxes · 4c19af2b
      Nshimiyimana Séna authored
      
      Bug:
      Currently, creating an intra-community bill and reconciling it with an
      early payment can break the tax report.
      
      Steps to reproduce:
      1. install the Austrian localization (l10n_at)
      2. set `Cash Discount Tax Reduction` to `On early payment`
      3. create a €1000 intra-community bill (you can just use the tax called
         `IGE 20%`)
      4. set the payment term to`2/7 Net 30` and confirm
      5. reconcile the bill with a payment within the discount period
         (2% discount: €980).
      6. check the Tax Report: line 5.4 of the report should be €196. If you
         reconciled the bill with a back statement directly, sections
         `Innergemeinschaftliche Erwerb` and `Bemessungsgrundlage` will be
         wrong as well.
      
      Cause:
      Since the intra-community applies here, the bill will produce two tax
      lines. And because `Cash Discount Tax Reduction` is set to `On early
      payment`, those two tax lines will be reduced when an early payment is
      made.
      However, because of the way the `is_refund` property of
      `account.move.line` field is computed on moves of type `entry`, one of
      those *tax reduction line* will be considered a refund and the other
      will not. Furthermore, the computed tags are correct only because the taxes
      are recomputed again when creating the payment.
      After removing this extra taxes computation, both tax_tag_ids/tax_tag_invert
      are invalid.
      So the solution is to fix the method computing the taxes for cash discount lines.
      
      opw-3112197
      
      Enterprise PR: odoo/enterprise#39181
      
      closes odoo/odoo#114801
      
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      Co-authored-by: default avatarLaurent Smet <las@odoo.com>
      4c19af2b
    • Pierre Rousseau's avatar
      [FIX] spreadsheet: correctly format date/datetime values of list · 9b6534fe
      Pierre Rousseau authored
      
      Before this revision, a date/datetime field was displayed in UTC instead
      of in the user timezone.
      This revision fixes this issue.
      
      opw 3127742
      
      closes odoo/odoo#114529
      
      X-original-commit: odoo/enterprise@4bbf70f
      Signed-off-by: default avatarLucas Lefèvre (lul) <lul@odoo.com>
      9b6534fe
    • David (dafr)'s avatar
      [FIX] purchase_stock: Prevent picking update when product_qty isn't updated · 6b3d5294
      David (dafr) authored
      
      _create_or_update_picking() is a time-consuming method.
      On some Purchase, all the purchase.order.line may be written with 'product_qty' in 'values', even though it did not change.
      
      OPW-2978569
      
      closes odoo/odoo#117350
      
      X-original-commit: 5575fe2d
      Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
      Signed-off-by: default avatarDavid <dafr@odoo.com>
      6b3d5294
    • Matheus Leal Viana (malv)'s avatar
      [FIX] mrp: display total qty on MO form view · f567f965
      Matheus Leal Viana (malv) authored
      
      In the MO form view, the total quantity was broken: it was appearing bellow the line.
      
      Steps to reproduce:
      
      Go to Manufacturing App
      Click on some Confirmed MO
      The quantity field in MO forms is appearing bellow the line and broke the view
      This issue was happening because the button was automatically using class "btn" and it was using a padding style that was moving them bellow the expected position.
      
      OPW-3244574
      
      closes odoo/odoo#117020
      
      Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
      f567f965
    • Xavier Morel's avatar
      [REV] core: allowance of NULLS clause in ORDER BY · 4e4be5f1
      Xavier Morel authored
      
      Reverts 90b856dc: for the reasons
      noted by @rco-odoo on the PR the relaxation of the regex was not
      sufficient, and the NULLS clause would not *just* be ignored, in the
      case of m2os it would break DESC clauses (that is `DESC NULLS LAST`
      would be entirely ignored).
      
      While this is fixable (and probably improves that code), it was
      considered a bit too risky to be implemented in 16.0 directly, so it's
      going to be implemented in master, then maybe get backported later.
      
      closes odoo/odoo#117437
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      4e4be5f1
    • Cuong, Nguyen Minh Tran Manh's avatar
      [FIX] sale,purchase: fix report pdf borders · 8dd6927c
      Cuong, Nguyen Minh Tran Manh authored
      
      Since BS5 integration in v16.0, the pdf of the sale and purchase report have changed. Borders would be present in the body of the report and the total detail.
      
      Came back to v15 display by using the table-borderless class on those elements.
      
      closes odoo/odoo#117431
      
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      8dd6927c
    • pedrambiria's avatar
      [FIX] l10n_fr_pos_cert: raise error when there is no order · 4c799643
      pedrambiria authored
      
      Before this commit: if the user wanted to generate a
      POS Inalterability Check statement, an IndexError was raised.
      This commit raises a more understandable error.
      
      opw-3237383
      
      closes odoo/odoo#117364
      
      X-original-commit: 9cc56fc3
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      Signed-off-by: default avatarPedram Bi Ria (pebr) <pebr@odoo.com>
      4c799643
    • pedrambiria's avatar
      [FIX] point_of_sale: handle line breaks in product search · 7ab2a4e4
      pedrambiria authored
      
      Before this commit: the `product.display_name` field could contain
      line breaks, which prevented it from being matched correctly by
      regular expressions. This commit fixes the issue by modifying the
      `_product_search_string()` function to remove line breaks.
      
      opw-3239830
      
      closes odoo/odoo#117352
      
      X-original-commit: 80d8a057
      Signed-off-by: default avatarTrinh Jacky (trj) <trj@odoo.com>
      Signed-off-by: default avatarPedram Bi Ria (pebr) <pebr@odoo.com>
      7ab2a4e4
    • flvr-odoo's avatar
      [FIX] web : isolate new tab to external ressources · 9e2dd0fd
      flvr-odoo authored
      
      This commit is a security reinforcement.
      
      Before this commit:
      
      ir.action.act_url was able to handle and redirect to protocols like
      file:, javascript:, date: ... This is unnecessary in the context of
      this action. It could potentially be abused by a poorly written custom
      module
      
      It also would not isolate the landing page in case of a new tabs.
      It means that chrome would still consider the tab to be from the
      previous domain in case no url was passed and js was executed.
      This would allow the newly open tab to still make query's to the
      referrer using the referrer's cookie. While not stricly necessary
      if we already prevent url that start with "javascript:", it is a
      nice to have.
      
      After this commit:
      
      New tabs are not able to access referrer informations or execute
      javascript interacting with the referrer. Also, it is now impossible
      to redirect to protocols other than http and https directly from
      the ir.action.act_url
      
      Test update:
      
      All new tabs are required to have the "noreferrer" argument
      
      Tested an example of an unsupported protocol.
      
      closes odoo/odoo#117329
      
      X-original-commit: 69b086eb
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      Signed-off-by: default avatarVranckx Florian (flvr) <flvr@odoo.com>
      9e2dd0fd
Loading