Skip to content
Snippets Groups Projects
  1. Jun 16, 2023
    • Julien Van Roy's avatar
      [FIX] account_edi_ubl_cii: no xml declaration with the send & print · d3323d1b
      Julien Van Roy authored
      
      Issue: the xml declaration "<?xml version='1.0' encoding='UTF-8'?>" is
      lost when opening the send & print wizard with existing xml attachments.
      
      Explanation: When opening the send and print wizard, the PDF are
      generated and postprocessed by `_postprocess_pdf_report`. In the
      `_postprocess_pdf_report` override in `account_edi_ubl_cii`, the xml
      attachments are parsed through `tree = etree.fromstring(xml)`, then the
      base64 PDF is inserted, and the etree is converted to a bytes through
      `etree.tostring(cleanup_xml_node(tree))` and the resulting bytes is
      written back on the attachment, but the xml declaration disappeared.
      
      Solution: include the arguments `xml_declaration=True, encoding='UTF-8'`
      in the `tostring` function when converting the etree to a bytes.
      
      opw-3144519
      
      closes odoo/odoo#125285
      
      X-original-commit: d89f5cb2
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      Signed-off-by: default avatarJulien Van Roy <juvr@odoo.com>
      d3323d1b
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] account: skip banner on faulty PDF · 6dd9fee0
      Andrea Grazioso (agr-odoo) authored
      
      create a vendor Bill
      attach the PDF
      go back to list view, select the bill > print Original Bills
      
      Issue: a traceback is raised
      Similar to f814c607
      In some malformed PDF files zlib is unable to extract the data properly.
      
      opw-3368907
      
      closes odoo/odoo#125426
      
      X-original-commit: 41f659e0
      Signed-off-by: default avatarJohn Laterre (jol) <jol@odoo.com>
      6dd9fee0
    • Claire Bretton (clbr)'s avatar
      [FIX] account: fix update taxes link between parent and children tax · 4d341e7b
      Claire Bretton (clbr) authored
      
      When updating taxes, all taxes are correctly created but the link
      between children taxes and their parent was not correctly set.
      
      opw-3347425 (1st issue)
      
      closes odoo/odoo#125406
      
      X-original-commit: 2fd0d2bb
      Signed-off-by: default avatarOlivier Colson (oco) <oco@odoo.com>
      Signed-off-by: default avatarClaire Bretton (clbr) <clbr@odoo.com>
      4d341e7b
    • Pierre Paridans's avatar
      [FIX] website: CSS properties value comparison · 82074846
      Pierre Paridans authored
      
      Due to a change between Chrome 101 and 114, the CSS Custom Property
      containing custom string are now always serialized using the type of
      quotes used in their declaration (ie. single quotes will be kept ;
      double quotes also) which wasn't the case in previous versions of Chrome
      (and still not the case in WebKitGTK 2.40.0 at least).
      
      This doesn't impact the value itself but only comparison between the
      computed value and an arbitrary one (like we do in the design-themes
      test).
      
      This commit fixes it by removing the single/double quotes in the
      `assertCssVariable` test helper.
      
      The impacted precondition was introduced in odoo/odoo@b29e17765f4e912b2dd472493b5be500b3a32c87 and
      odoo/design-themes@8b377af3a71b875dfc452a14206a9a1679371000 .
      
      closes odoo/odoo#125404
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      82074846
    • Victor Feyens's avatar
      [FIX] sale: multi-company conflict at reinvoicing · d0e53ece
      Victor Feyens authored
      
      Since d88409e8, taxes from different companies
      are forbidden on sale.order.line records (which is the expected behavior).
      
      Nonetheless, this highlighted some flows where the taxes were not properly
      set/recomputed, especially re-invoicing, which is fixed by the current commit.
      
      Fixes #123675
      
      closes odoo/odoo#125394
      
      X-original-commit: 6ce4019968bd0a1a11475910d35aa2ccfc2c6a9a
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      d0e53ece
    • Bruno Boi's avatar
      [FIX] web: traceback in usePosition on Firefox · 2338f941
      Bruno Boi authored
      It turns out `instanceof` is wonky in Firefox when multiple
      documents are involved (e.g. iframe) since [1] has been fixed
      and [2] has not yet been addressed accordingly.
      Because of that, the check at [3] will return false and
      therefore `getReference` will be a Node rather than a Function,
      thus triggering the traceback.
      
      **Solution**
      Check if `reference` is typeof 'function' instead, which will not fall into the Firefox trap.
      
      [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1360715
      [2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1821790
      [3]: https://github.com/odoo/odoo/pull/73130/commits/a9614e0babd6dc517287d547708a8be758c14e12#diff-86a5774240db76cdc93cb570596564cc6816ef4144a7c960f10cd347b7564e44R220
      
      
      
      opw-3348172
      
      closes odoo/odoo#125380
      
      X-original-commit: 4ac33b76
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      Signed-off-by: default avatarBruno Boi (boi) <boi@odoo.com>
      2338f941
    • Walid HANNICHE (waha)'s avatar
      [FIX] delivery: Backorder shipping cost with invoice policy in real · cbd720c3
      Walid HANNICHE (waha) authored
      port of this fix
      https://github.com/odoo/odoo/pull/70454
      
      
      
      Steps to reproduce the bug:
      
      - Let's consider a delivery carrier DC with invoice policy = 'real'
      - Let's consider a consumable product P with a weight = 1kg and sales price = 10€
      - Create a sale order SO with 2 P and add DC as shipping cost
      - Process the shipment for 1 P and create a backorder
      - Process the second shipment with the last P
      
      Bug:
      
      Two lines L1, L2 with DC were created on SO but only L1 as a price unit and a description.
      L2 had a price unit = 0€ and no description.
      
      opw-3219711
      
      closes odoo/odoo#125379
      
      X-original-commit: 4ce4f9444e5050ae30e4468ff24aecb573045dc7
      Signed-off-by: default avatarAdrien Widart (awt) <awt@odoo.com>
      Signed-off-by: default avatarWalid Hanniche (waha) <waha@odoo.com>
      cbd720c3
    • Christophe Monniez's avatar
      [REM] packaging: remove windows 32 bit support · 47046e9d
      Christophe Monniez authored
      
      Since may 2020, M$ stopped to ship their 32 bits OS.
      So, there is no need to distribute a 32 bit version anymore.
      
      This will reduce the package size by 2.
      
      The new package will use Python 3.10 by default, that's why the
      local requirements were changed (a wheel package was missing for windows
      in the previous version of PyKCS11).
      
      closes odoo/odoo#125361
      
      Signed-off-by: default avatarChristophe Monniez (moc) <moc@odoo.com>
      47046e9d
    • Aaron Bohy's avatar
      [FIX] web: fix test failing non deterministically · 89749f07
      Aaron Bohy authored
      The modified test failed non deterministically on runbot since [1].
      The test simulates an action that throws an error in its setup, and
      assets that a dialog error is displayed. However, the thrown error
      was incomplete (no "data" key), and it crashed in the error handler,
      producing a second error, which was the one actually displayed when
      the test passed. We rely on the "unhandledrejection" event to handle
      errors, and an animation frame may occur between the moment the error
      is thrown and the moment the event is triggered.
      
      We fix this issue by actually fixing the root cause, which then
      avoids the problem: the thrown error is now complete and the handler
      doesn't crash anymore, so we are sure that the error dialog is in
      the DOM when we check, and it is the dialog for the error we thrown
      in the test, not for a crash in the code.
      
      [1] https://github.com/odoo/odoo/commit/38b689bbfc2b
      
      
      
      Runbot error~21956
      
      closes odoo/odoo#125353
      
      Signed-off-by: default avatarSamuel Degueldre (sad) <sad@odoo.com>
      89749f07
    • Mayurrajsinh Rathod's avatar
      [FIX] website_slides: prevent copy of a attendee in course · d4d46b22
      Mayurrajsinh Rathod authored
      
      Before this commit:
      
      Duplicating the contact that is linked to an attendee of a course also
      creates a copy of an attendee as well.
      
      After this commit:
      
      It does not create duplicate attendee in course.
      
      Task-3253983
      
      closes odoo/odoo#125324
      
      X-original-commit: e6c4937437bdf5e55c48fc80faf65b5094c96879
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      d4d46b22
    • niyasraphy's avatar
      [FIX] payment_mollie: neutralize mollie token · dfdd9c3c
      niyasraphy authored
      
      before this commit, on neutralizing the database the
      mollie token is not cleared from the payment provider.
      
      after this commit, on neutralizing a database, the
      token from mollie payment provider is cleared.
      
      closes odoo/odoo#125296
      
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      dfdd9c3c
    • Habib (ayh)'s avatar
      [FIX] account: term is not translatable · c5b38436
      Habib (ayh) authored
      
      The bills upload widget uses a custom attr "linkText". translate.py will only generate terms that are in the TRANSLATED_ATTRS constant, thereby not including these in the po template file.
      
      To fix this, the attribute is changed to a recognised attr "title".
      The JS widget will still recognize linkText, for databases that have not updated the module.
      
      Task-3335585
      
      closes odoo/odoo#125276
      
      Related: odoo/enterprise#42651
      Signed-off-by: default avatarBrice Bartoletti (bib) <bib@odoo.com>
      c5b38436
    • Habib (ayh)'s avatar
      [FIX] web: redirectWarningDialog does not markup noContentHelp HTML · 0086841a
      Habib (ayh) authored
      
      The bank recon custom view relies on the noContentHelper. (When there are no records, a custom noContentHelper is  displayed including buttons to clear filters)
      
      When the view is activated from a RedirectWarning, the action's help text is not marked up
      therefore displaying raw html in the UI.
      
      With this fix, the actions help key is marked up (very similar to the doActionButton)
      
      To reproduce:
      - On a DB with demo data
      - Accounting -> Actions -> Lock Dates
      - Set a lock date for all users (after the last unreconciled date, ensure there are no unposted moved before this date)
      - You will be presented with a Redirect Warning Dialog
      - Click Show Unreconiled Bank Statement Lines
      - If there are lines, use the filter to search for "SomethingThatWontReturnRecords"
      - You will see raw html
      
      Task-3366470
      
      closes odoo/odoo#125254
      
      Related: odoo/enterprise#42641
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      0086841a
    • Kevin Baptiste's avatar
      [FIX] hr: show plan with no company · d15587e2
      Kevin Baptiste authored
      
      Plans with no company defined were not showing in the list when
      launching a plan on an employee.
      
      task-3366394
      
      closes odoo/odoo#124853
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      d15587e2
    • yhu-odoo's avatar
      [FIX] stock_account: valuation layer is zero when return dropshipping · 67d6230f
      yhu-odoo authored
      
      To reproduce:
      1. Create a Sales Order for a product whose product category is set to
         FIFO and automated. Use route "dropship".
      2. Confirm the PO created.
      3. Deliver the products (DS transfer)
      4. Create the customer invoice
      5. Return, for example, 1 unit of product
      6. Add a credit note to the invoice for that 1 unit returned (reset to
         draft then change qty and post)
      Issues:
      The value on the valuation layers of the returned picking is 0, posted
      entries for COGS and stock interim (delivered) account for credit note
      is also 0.
      
      Since #85751, When create valuation layer for return, we take all svls
      of origin_returned_move_id into account to calculate the price unit.
      However, then dropshiping, 2 svls are created for the original move, and
      the sum of them is 0 since there is no impact of the stock when
      dropshiping. So when return, the price unit will be calculated as 0.
      
      To fix, when calculate price unit for return of dropshiping, we only
      take non-negative svls into account. Note that we use non-negative ones
      instead of positive ones because when subcontract dropshiping,
      additional negative svls will be added for the cost of the components.
      
      opw-3283436
      
      closes odoo/odoo#124725
      
      X-original-commit: 1c128224dfcc85905671c3d9c01b3393bac15eb5
      Signed-off-by: default avatarArnold Moyaux (arm) <arm@odoo.com>
      Signed-off-by: default avatarYuchen Huang (yhu) <yhu@odoo.com>
      67d6230f
    • Touati Djamel (otd)'s avatar
      [FIX] project_mrp: display MO button even if only confirmed or draft MO · a51445d1
      Touati Djamel (otd) authored
      Steps to reproduce the bug:
      - Install project_mrp
      - Create a MO:
          - select any product
          - add an analytic account linked to a project, e.g: “field service”
          - save
      
      - Go to the “field service” project
      - click on “project Updates”
      
      Problem:
      The manufacturing order view button is not displayed, because we have
      no MO in the done status
      
      To display the button, we do a "read_group" on the
      "account.analytic.line" related to the "account.analytic" of the project
       in the "Mrp" category.
      
      https://github.com/odoo/odoo/blob/08112964f76816f11ef28d702ae49243f9cb5f91/addons/project_mrp/models/project.py#L42-L46
      
      
      
      However, since the "account.analytic.line" records are created only
      when the manufacturing order (MO) is in the "done" status, no records
      are found, and so the button is not displayed.
      
      opw-3300251
      
      closes odoo/odoo#124714
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      a51445d1
    • Jurgen (jugj)'s avatar
      [IMP] website_hr_recruitment: Make website_id field always visible · 8446039f
      Jurgen (jugj) authored
      
      task-3337958
      
      closes odoo/odoo#122271
      
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      8446039f
    • Odoo's avatar
      [FIX] web_editor: table insertion in mobile · a1fa78cd
      Odoo authored
      
      Before this commit:
      
      In mobile view, the user was unable to select the table size form table
      table picker, making table picker of no use.
      
      After this commit:
      
      In mobile view, the picker will not be visible visible and when the user will
      write '/table' then a table of 3x3 dimension will automatically be inserted
      without displaying the table picker.
      
      Task id: 3283083
      
      closes odoo/odoo#119806
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      a1fa78cd
    • Maruan Aguerdouh (magm)'s avatar
      [FIX] web: proper display of pages headers for companies view form · 19c03acc
      Maruan Aguerdouh (magm) authored
      
      Steps to reproduce:
      
      1. Activate Dev mode
      2. Settings > Technical > User Interface > Views
      3. res.company.form
      4. In the architecture add more pages
      `<page name="test1" string="This is a test ABC DEF"/>
      <page name="test2" string="This is a test ABC DEF"/>
      <page name="test3" string="This is a test ABC DEF"/>
      <page name="test4" string="This is a test ABC DEF"/>
      <page name="test5" string="This is a test ABC DEF"/>
      <page name="test6" string="This is a test ABC DEF"/>
      <page name="test7" string="This is a test ABC DEF"/>` Save manually
      5. Settings > Users & Companies > Companies
      6. Open any company.
      
      Issue:
      
      Tabs go off the screen instead of moving down a row like in previous
      versions.
      
      Solution:
      
      Adding the proper `overflow-x=auto` will handle the issue.
      
      opw-3079492
      
      closes odoo/odoo#107024
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      19c03acc
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] point_of_sale: duplicate internal reference in invoice · 5d43f8d4
      Andrea Grazioso (agr-odoo) authored
      
      Have a product with internal reference
      Open POS session
      Create an order with the product
      Invoice
      
      Issue: Internal reference is shown twice on the invoice line
      
      opw-3343170
      
      closes odoo/odoo#125257
      
      X-original-commit: 4fbcbd2b
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      Signed-off-by: default avatarGrazioso Andrea (agr) <agr@odoo.com>
      5d43f8d4
    • arsi's avatar
      [FIX] point_of_sale: add outstanding accounts set in payment methods · 3f66030c
      arsi authored
      
      For a `pos.payment.method`, it is possible to define an outstanding
      account, but if this account is not defined as an outstanding account in
      the company settings nor in the journal, the payment will not be
      considered in the bank reconciliation, nor in the bank reconciliation
      report.
      
      Steps to reproduce (demo-data with POS and Accounting installed):
      -go to 'Point of Sale/Configuration/Payment Methods'.
      -click on the "Bank" payment method.
      -add an 'Outstanding Account' which is not the default outstanding
       account of the company, nor an outstanding account of an
       `account.payment.method.line`.  So for example "Liquidity Transfer".
      -then open a POS session, sell smth, pay with the Bank method, validate,
       then close the session.
      -If you go to 'Accounting/Customers/Payments', you can see that an
       `account.payment` has been created, with the outstanding account being
       "Liquidity Transfer".
      ->It is not possible to reconcile that payment with a
       `account.bank.statement.line`. If you go to the accounting dashboard,
       then click the reconcile button of the journal "Bank", then on a
       statement line with no partner, you will not see the outstanding line
       of that payment.
      ->If you open the 'Reconciliation Report' of the journal "Bank"
       (accessible from the journal dashboard, by clicking the options of the
       journal), the line will not show in the 'Outstanding Receipts'
       category.
      
      FIX:
      Override the `_get_journal_inbound_outstanding_payment_accounts`
      method of `account.journal`, to add the accounts from each
      `pos.payment.method` linked to the journal.  Using the field
      `pos_payment_method_ids` from `account.journal`.
      
      opw-3271090
      
      closes odoo/odoo#125178
      
      X-original-commit: c002e6bf
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      Signed-off-by: default avatarArnaud-Sibille (arsi) <arsi@odoo.com>
      3f66030c
    • Stanislas Gueniffey's avatar
      [FIX] mass_mailing: no hover effect on buttons · 5ac58ebf
      Stanislas Gueniffey authored
      
      Most e-mail clients do not support CSS rules for hover effects.
      Previously, the mass_mailing application allowed to add buttons with
      such effects. This was confusing to some and introduced discrepancies
      between the editor preview and the actual e-mails.
      
      This commit removes such hover effects from buttons in the context of
      mass mailing.
      
      Task-2936682
      
      closes odoo/odoo#125268
      
      X-original-commit: 55aff2dcdf5537e16bdaf01ee68d776510572171
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      5ac58ebf
    • Hubert Van de Walle (huvw)'s avatar
      [FIX] web: remove duplicate month in arabic · bfdf5baf
      Hubert Van de Walle (huvw) authored
      Steps to reproduce
      ==================
      
      - Switch to arabic
      - Open a datepicker
      - Select the month
      
      The month are displayed twice in two different arabic namings.
      
      Cause of the issue
      ==================
      
      There is an issue in the moment locale files since [0]. It has been made
      apparent since [1].
      
      Solution
      ========
      
      Cherry pick a fix from the moment repo [2].
      
      Revert the ar.js locale from before [0]
      
      [0]: 11f3e735
      [1]: 6a1183f4
      [2]: https://github.com/moment/moment/commit/251fba65cca5d5b2cf79f1f51a9d413c5e0cb161
      
      
      
      opw-3349560
      
      closes odoo/odoo#125241
      
      Signed-off-by: default avatarJulien Mougenot (jum) <jum@odoo.com>
      bfdf5baf
    • Valentin Vallaeys (vava)'s avatar
      [FIX] payment: fallback on transaction partner parent name · e3143f14
      Valentin Vallaeys (vava) authored
      
      In a Sale Order, it is possible to select an invoice address without a
      name. The partner of the transaction does not have a name, which leads
      to a traceback when trying to split the name.
      
      The idea is to force the name to be filled, with a fallback on the
      partner' parent name.
      
      OPW-3338406
      
      closes odoo/odoo#125236
      
      X-original-commit: 505109d4
      Signed-off-by: default avatarAntoine Vandevenne (anv) <anv@odoo.com>
      Signed-off-by: default avatarVallaeys Valentin (vava) <vava@odoo.com>
      e3143f14
    • Bert Stomphorst's avatar
      [CLA] bertstomphorst · d65f5448
      Bert Stomphorst authored
      
      closes odoo/odoo#125192
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      d65f5448
    • Julien Mougenot's avatar
      [FIX] web_editor: fix black and white CSS variables · 766413c2
      Julien Mougenot authored
      With [1], the enforced black and white CSS values set on the :root were
      not interpolated and rendered as the variable names instead of their
      values. This commit fixes that.
      
      [1]: https://github.com/odoo/odoo/commit/e406b084815b19a43e0d92d0f2bf119db230d7f6
      
      
      
      closes odoo/odoo#125176
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      766413c2
    • Thomas Lefebvre (thle)'s avatar
      [FIX] website_hr_recruitment: prevent applying for unpublished job · 72072263
      Thomas Lefebvre (thle) authored
      
      Issue:
      ------
      When we have the link to the form to apply for a job,
      even if the job is not published, we can still apply.
      
      Solution:
      ---------
      Check that the job is published before the creation of the record
      in the `website_form_input_filter`.
      
      opw-3331717
      
      closes odoo/odoo#125141
      
      X-original-commit: 547355a5
      Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
      72072263
    • Robin Lejeune (role)'s avatar
      [FIX] web_editor: adapt options' icons in RTL · e973ee01
      Robin Lejeune (role) authored
      
      The triangle pointing towards an option in the editor is pointing
      right and the symbol └ is used to show a sub option in the editor panel.
      In a RTL setting, this does not make sense and should be mirrored.
      
      task-3284274
      
      closes odoo/odoo#125091
      
      X-original-commit: f65a9bff
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      e973ee01
    • Rodolpho Lima's avatar
      [FIX] web_editor: readonly links opening in the same tab · cb84f993
      Rodolpho Lima authored
      
      Before this commit, when viewing the content of an html field in
      readonly mode, internal links (same origin or relative links) that did
      not have the target attribute set to "_blank" would be opened in the
      same browser tab. This is undesired, and particularly disturbing when
      the content is inside an iframe.
      
      This commit ensures that, in readonly mode, all links are opened
      in a new tab.
      
      task-3323602
      
      closes odoo/odoo#125024
      
      Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
      cb84f993
    • Hamza (hisl)'s avatar
      [FIX] hr_timesheet : update effective_hours for progress_hours computation · a28b6a6f
      Hamza (hisl) authored
      
      Steps to reproduce the issue:
      
      Add a project and create a task with a timesheet in it
      set the allocated hours to 00:03
      add a line in the timesheet with hours spent 00:03
      Current Behaviour:
      The percentage calculated would be 96%, even though the time allocated and time spent are equal.
      
      Desired Behaviour:
      The percentage should be 100 as both values i.e. time spent and time allocated are equal.
      
      This is happening because effective_hours value is being rounded off to 2 decimal places, and is not accurate enough to compute the progress_hours.
      
      Here, I have used the same line, that is used to compute effective_hours, to compute the task_total_hours but without rounding off. This will make the calculate more precise and accurate.
      
      OPW-3270858
      
      closes odoo/odoo#124914
      
      X-original-commit: 3b1316e7
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      a28b6a6f
    • xO-Tx's avatar
      [FIX] web: restore HTML report CSS · 9275e42d
      xO-Tx authored
      Steps to reproduce:
      
      - Open base runbot with no installations > Install Account > Check an
      invoice preview.
      - Install Website > Check invoice preview > It looks narrow and does
      not fill the available width.
      
      Starting from [1], the code that sets the `container-fluid` class on
      HTML web reports was replaced with the Owl version on the `ReportAction`
      [2] but since some reports are not using this system, the code was
      restored in a separate JS module.
      
      [1]: https://github.com/odoo/odoo/commit/feef532b417828905ce09675043b55b2b3736e43
      [2]: https://github.com/odoo/odoo/commit/feef532b417828905ce09675043b55b2b3736e43#diff-ed0708a6c1a18e945a7829b2f8b17df7a2fbe4ab83e27fe6140dba79465c2832R39-R43
      
      
      
      opw-3209231
      
      closes odoo/odoo#124742
      
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      9275e42d
    • Thomas Lefebvre (thle)'s avatar
      [FIX] sale: prevent the sending of a zero price · ea883e75
      Thomas Lefebvre (thle) authored
      
      Issue:
      ------
      When a cart is created via ecommerce, an email is sent to the salesperson
      (defined in Settings/Website/Assignment).
      This email contains a subtitle with the amount of the sale order.
      This price is always 0.00.
      
      Cause:
      ------
      The email is sent during the creation of the sale order
      and not after it has been updated with the product information.
      
      Solution:
      ---------
      Use a key in the context to prevent sending the price of a sale order.
      
      Remark:
      The email sent in this case is an assignment email only.
      Mentioning the price in this case would not be relevant
      if the customer subsequently updates their cart.
      
      opw-3329722
      
      closes odoo/odoo#123916
      
      Signed-off-by: default avatarLefebvre Thomas (thle) <thle@odoo.com>
      Co-authored-by: default avatarFeyensv <vfe@odoo.com>
      ea883e75
    • Prakash Prajapati's avatar
      [FIX] project, hr_timesheet: move the action_project_timesheet in hr_timesheet module · b4f3f35b
      Prakash Prajapati authored
      
           When the hr_timesheet module is not installed and a customer uses the
           action_project_timesheets action through customization, a traceback will
           occur because he will not get the action of hr_timesheet.
      
      closes odoo/odoo#123214
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      b4f3f35b
  2. Jun 15, 2023
    • Ali Alfie (alal)'s avatar
      [FIX] account: wrong quick encoding calculation with cash discount · a65dda25
      Ali Alfie (alal) authored
      
      Before: when using the quick encoding feature on an invoice or bill with payment term containing an early payment discount and the company's epd computation is set to "Always (upon invoice)", the calculation was done incorrectly.
      
      Example: if you invoice a 100€ product with a 21% tax with a 2% cash discount, the total of the invoice will be 120.58 (the 21% is calculated on 98€ (100€*2%) which is 20.28€).
      In our case, if you tried to calculate suggestions from a quick encoding value of 120.58, the calculation would calculate the untaxed amount from the 120.58 based on the 21% tax without applying the 2% discount.
      
      After: when calculating the suggestions check if an early discount is set on the payment term and the company's epd computation is set to "mixed" ("Always (upon invoice)") and if so, apply the discount to the tax before calculating the untaxed amount from the total.
      
      task-3339223
      
      closes odoo/odoo#123748
      
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      a65dda25
    • Prakash Prajapati's avatar
      [FIX] project: open the Tasks Analysis and customer rating report in project burger menu · 1de6f53e
      Prakash Prajapati authored
      
      task-3345839
      
      closes odoo/odoo#123212
      
      Signed-off-by: default avatarXavier Bol (xbo) <xbo@odoo.com>
      1de6f53e
    • Harsh Bhatt (habh)'s avatar
      [FIX] account: fix traceback on opening bank statement · 12410133
      Harsh Bhatt (habh) authored
      
      When user changes the default_account_id on a journal and tries to open a
      statement line, they will get the traceback.
      
      Note: This is reproduceable by using account_accountant only.
      
      Steps to reproduce:
      1) open configuration of bank journal
      2) change default_account_id (bank account) from bank to cash
      3) open bank statement
      4) open any statement line
      5) by following these steps, traceback occurs.
      
      This commit will prevent the above traceback.
      
      sentry - 4059226840
      
      closes odoo/odoo#122428
      
      Related: odoo/enterprise#42232
      Signed-off-by: default avatarLaurent Smet <las@odoo.com>
      12410133
    • roen-odoo's avatar
      [FIX] pos_loyalty: specific discountable take discount into account · 2d109b8b
      roen-odoo authored
      
      Current behavior:
      When computing the discountable values of an order, the discount of the
      program where not taken into account if you used specific discountable
      products.
      
      Steps to reproduce:
      - Create products A and B with a price of 20$
      - Create a loyalty program
      - Rule:
        - Minimum qty : 2
        - Apply on specific products : Product A and Product B
        - Reward : 5 points per order
      - Reward:
        - 10$ per order
        - In exchange of 2 points
        - Apply on specific products : Product A and Product B
      - Open PoS and add Product A and Product B to the order
      - A reward should be added automatically with a value of -10$
      - Click on the reward button, another reward should be added but it has
        the wrong value. It should be -10$ but it is not.
      
      opw-3232565
      
      closes odoo/odoo#121209
      
      Signed-off-by: default avatarJoseph Caburnay (jcb) <jcb@odoo.com>
      2d109b8b
    • hote's avatar
      [FIX] sale: currency conversions and rates · 66eb732c
      hote authored
      
      Before this commit the reports in sales and associated app suffered from a confusion between
      multiplicative and divisive rates for currency conversion. After this commit this will no longer be
      the case.
      
      There are several models with their own currencies that are involved in computing the amount of a
      sale order:
      - the order's company currency `order.company_id.currency_id`
      - the order's pricelist currency `order.pricelist_id.currency_id`
      - the product's currency for each product in the sale order `product.currency_id`
      
      In the case of a report we need also to take into account the current user's company currency:
      `self.env.company.currency_id`.
      
      The `sale_order.currency_rate` is the **multiplicative <u>rate</u>** to convert from the company
      currency into the SO currency.
      
      Any product added to a sale order follow the next conversion. Let `conversion_rate` be the conversion
      rate between the product's currency and the order's company currency, then:
      ```python
      product_amount_converted = product.list_price / conversion_rate
      
      order.amount_total +=  product_amount_converted * order.currency_rate
      ```
      
      The rates returned by `_get_query_currency_table()`, on the other hand, are computed as the
      **multiplicative <u>ratio</u>** to convert from each company currency into the current user's
      company currency.
      
      Any order that is to be analysed on a *report* follow the next conversion. Let `current_company_currency_rate`
      be the conversion rate between the order's company currency and the current user's company, then:
      ```python
      order_amount_in_cmp_currency = order.amount_total / order.currency_rate
      
      report.order_id.price_total = order_amount_in_cmp_currency * current_company_currency_rate
      ```
      
      What follow is a numerical example. Suppose you have the following multi-company and
      multi-currency environment.
      
      |order.id|order.company  |line.subtotal|order.currency|order.currency_rate|
      | ------ | -----------   | ----------- | ------------ | ----------------- |
      |1      |BE Company (EUR)|1000         |INR           |89.46              |
      |2      |BE Company (EUR)|2000         |USD           |1.09               |
      |3      |BE Company (EUR)|3000         |EUR           |1.0                |
      |4      |US Company (USD)|4000         |USD           |1.0                |
      
      If we try to convert all of this for reporting in the US company, the currency table returned by
      `_get_query_currency_table()` will give this (company currencies vs USD):
      
      |currency_table.company|currency_table.rate|
      | -------------------- | ------------------ |
      |BE Company (EUR)      |1.09                |
      |US Company (USD)      |1.0                 |
      
      Finally, in order to convert each amount into USD, applying the formulae listed above should give
      the following result:
      
      |order.id|order.company|display_price_usd           |
      | ------ | ----------- | -------------------------- |
      |1       |BE Company   |1000 / 89.46 * 1.09 = 12.18 |
      |2       |BE Company   |2000 / 1.09 * 1.09 = 2000.00|
      |3       |BE Company   |3000 / 1.0 * 1.09 = 3270.00 |
      |4       |US Company   |4000 / 1.0 * 1.0 = 4000.00  |
      |Total (USD): 9282.18|
      
      Task - 3277006
      
      closes odoo/odoo#119608
      
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      66eb732c
    • Martin Trigaux's avatar
      [I18N] sale_timesheet: remove duplicated entry · aac4a1e9
      Martin Trigaux authored
      
      closes odoo/odoo#125182
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      aac4a1e9
    • Kartik Chavda's avatar
      [FIX] web: fix new line in confirmation and alert dialog · 700d41d2
      Kartik Chavda authored
      
      Steps:
      - Install studio.
      - Open studio.
      - Click on reset default view.
      
      Issue:
      - Confirmation dialog body display in single line instead in
      multiple lines same thing happens in pos confirmation dialog
      also in new friendly message task we need to display error
      message in multiple line.
      
      Cause:
      - There is a style missing on body of that dialog to preserve
      white spaces also need to use other tag then <t> to apply
      proper style
      
      Fix:
      - Use <p> tag instead <t> tag and add `white-space:pre-wrap;`
      to preserve space in that dialogs.
      
      task-3356114
      
      closes odoo/odoo#124953
      
      Signed-off-by: default avatarPierre Paridans (app) <app@odoo.com>
      700d41d2
Loading