Skip to content
Snippets Groups Projects
  1. May 02, 2021
  2. Apr 30, 2021
  3. Apr 19, 2021
  4. Apr 29, 2021
    • Adrien Widart's avatar
      [FIX] point_of_sale: post journal entries of cash in/out · 985f1bf5
      Adrien Widart authored
      
      When closing a POS session, if there was no sale, the journal entries of
      cash in/out will not be posted.
      
      To reproduce the error:
      (Need account_accountant)
      1. In Point of Sale, open Shop's settings:
          - Enable "Advanced Cash Control"
      2. Start a new session:
          - Open POS
          - Close, Confirm
      3. Close session
      4. Click on "End of Session"
      5. Add a "Cash In/out"
          - +$10
      6. Set Closing Cash
      7. Close Session & Post Entries
      8. Accounting > Cash
      
      Error: The $10 line is present but its status is "New". It should be
      "Processing".
      
      Since there was no sale during the POS session, the module ignores all
      the accounting part. When the session is closed, the accounting part is
      ignored because there were no sales. As a result, it does not post the
      cash in and out.
      
      OPW-2456395
      
      closes odoo/odoo#70101
      
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      985f1bf5
  5. Apr 30, 2021
  6. Apr 29, 2021
  7. Apr 28, 2021
    • oco-odoo's avatar
      [FIX] account: cash basis taxes: generate correct exchange difference when... · 3e07ebf2
      oco-odoo authored
      [FIX] account: cash basis taxes: generate correct exchange difference when using the same cash basis taxes on multiple lines
      
      To reproduce the bug:
      1) Create a cash basis tax for 42%
      2) Make an invoice with two lines at 100$, each using this tax
      3) Post and register full payment of the invoice
      
      ==> An exchange difference has been generated, doing +100 -100. One of its two line has tax_ids set, while the other does not. This makes the base amount shown in the generic tax report wrong: 100 instead of 200.
      
      Actually, this exchange difference entry shouldn't have existed in the first place, as there is no rounding issue to compensate for here. It happens because the grouping keys computed for the two base lines are the same, and the second line overwrites the totals of the first one instead of adding them to its own.
      
      closes odoo/odoo#70034
      
      Related: odoo/enterprise#18019
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      3e07ebf2
  8. Apr 29, 2021
    • Achraf (abz)'s avatar
      [FIX] l10n_in_sale: Set automatically GST Treatment on invoice creation · 36582d08
      Achraf (abz) authored
      
      What are the steps to reproduce your issue ?
      
          1. Create a contact and set 'VAT' to "20AAACT2803M2ZO". The 'GST Treatment' will be automatically set correctly.
          2. Create a sale order for this new contact. GST Treatment is automatically filled in correctly.
          3. Confirm the order.
          4. Create an invoice.
      
      What is currently happening ?
      
          The related invoice does not fetch the 'GST Treatment' automatically
      
      What are you expecting to happen ?
      
          The related invoice must set the 'GST Treatment' automatically.
      
      opw-2499503
      
      closes odoo/odoo#69392
      
      Signed-off-by: default avatarAchraf <abz-odoo@users.noreply.github.com>
      36582d08
    • Goffin Simon's avatar
      [FIX] hr_timesheet: Analytic account without company · 44693ca2
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Let's consider a project P set with analytic account AA and company C
      - Allow timesheet on P
      - Let's consider a task T belonging to P
      - Set AA with comapny = False
      - Try to encode a timesheet on T
      
      Bug:
      
      A UserError was raised because the field company_id on account.analytic.line is required
      
      opw:2486034
      
      closes odoo/odoo#70071
      
      X-original-commit: b3dc922c
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      44693ca2
    • Romeo Fragomeli's avatar
      [FIX] web: pdfjs: hide buttons that doesn't work in webviews · 39225827
      Romeo Fragomeli authored
      Some features of the PDF.js library doesn't work in the
      webview of the mobile apps.
      
      Initially 'window.print' is defined as an empty function in
      webviews unlike browsers where it is already ready.
      After that, PDF.js needs to monkey patch 'window.print' and
      saves a reference to the original definition, which is not
      yet fulfilled in by the mobile app (Java part).
      So the print of PDF.js doesn't work in webviews and end
      users will need to download the file before printing it.
      
      Regarding the Download button, the 'download' attribute is
      not supported by the webview as you can see in:
      https://bugs.chromium.org/p/chromium/issues/detail?id=432414
      
      
      As there's many ways to download a file in Odoo it's not
      a big deal to simply hide it in PDF.js.
      
      Because it's quite complicated to fix this, we decided
      to hide the features that don't work (Download / Print)
      or don't make sense (Open file).
      
      Note that a refactoring is already in progress in order to
      avoid to patch this library in master.
      
      closes odoo/odoo#70092
      
      Task-id: 2200168
      Signed-off-by: default avatarAdrien Dieudonné (adr) <adr@odoo.com>
      39225827
    • Xavier Morel's avatar
      [FIX] *: bunch of mismarked translation specifiers · 251b77c9
      Xavier Morel authored
      
      `_(xyz)` will wrap them in an underscore.js object, which when used in
      a string context will just return the string. So it's basically a
      no-op, but it certainly doesn't translate the terms.
      
      closes odoo/odoo#70000
      
      Related: odoo/enterprise#18001
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      251b77c9
  9. Dec 27, 2020
  10. Apr 28, 2021
    • Nicolas Lempereur's avatar
      [FIX] mail.py: sanitize do not remove file icon · 0e046c03
      Nicolas Lempereur authored
      
      Scenario:
      
      - add a file in mass mailing editor => an icon is added linking the file
      - save
      - edit => the icon is replaced by a generic icon
      - save
      - send mail => no icon is shown in email received
      
      The system is using eg. `data-mimetype="pdf"` to show the icon, before
      12.0 this worked but in saas-12.3 the system uses mailing.mailing
      body_arch's field that is sanitizing attributes and remove it on save,
      so the icon is only working in received email if you save one and only
      one time after adding file inside the mass mailing.
      
      opw-2474053 (ticket for similar issue in 14.0)
      
      closes odoo/odoo#70046
      
      X-original-commit: 7e14515b84d8081557517df7e9dc7d8c0d17f2be
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      0e046c03
  11. Apr 27, 2021
    • Djamel (otd)'s avatar
      [FIX]repair: fix invoice deletion · b5588246
      Djamel (otd) authored
      
      Steps to follow to reproduce the bug :
      - Install the Repairs and Accounting application
      - Create a new user and give him only access to Accounting
      - Connect with this user
      - Create a draft invoice
      - Try to delete it
      - Access rights error is triggered.
      
      Problem:
      When we delete an invoice and the Repairs app is installed, we check if it is not an invoice related to a repair.
      But the user does not have access to “repair.order”, so we can not check the field "repair_ids".
      
      opw-2507867
      
      closes odoo/odoo#69701
      
      Signed-off-by: default avatarRémy Voet <ryv-odoo@users.noreply.github.com>
      b5588246
  12. Apr 28, 2021
    • Swapnesh Shah's avatar
      [FIX] hr_attendance: compute worked hours when needed · c462782f
      Swapnesh Shah authored
      
      Steps to reproduce the bug:
      
      - Go to Attendances > Manager > Attendances
      - Remove Check in value of an hr.attendance record A
      - Set Check out to A
      
      Bug:
      
      A traceback was raised
      
      opw:2513143
      
      closes odoo/odoo#70041
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      c462782f
    • Adrien Widart's avatar
      [FIX] website_crm: add language to website form · 702d2b31
      Adrien Widart authored
      
      When the user submits a form, a lead will be created but the language
      won't be the one selected by the user.
      
      To reproduce the error:
      (Enable debug mode)
      1. Settings > Translations > Languages
      2. Activate another language L_other
      3. On website, add a form:
          - Action: Create an Opportunity
      4. Add an existing field: "Language"
      5. Submit the form
          - Language must be L_other
      6. Consult the new lead
      
      Error: The language is not the selected one.
      
      OPW-2486276
      
      closes odoo/odoo#70031
      
      X-original-commit: 8d6a971a
      Signed-off-by: default avatarAdrien Widart <adwid@users.noreply.github.com>
      702d2b31
    • Swapnesh Shah's avatar
      [FIX] hr_recruitment: allow to restore Application · b0dc16e4
      Swapnesh Shah authored
      
      Steps to reproduce the bug:
      
      - Create a Job Application without Applied Job
      - Refuse/Archive it.
      - Restore/Unarchive it
      
      Bug:
      
      - KeyError raised due to missing `False` in `default_stage`
      
      Fix:
      
      - Add `stage_id` if Applied Job is selected on the application.
      
      opw:2513147
      
      closes odoo/odoo#70023
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      Co-authored-by: default avatarsimongoffin <sig@odoo.com>
      b0dc16e4
    • Aaron Bohy's avatar
      [FIX] web: make test pass on chrome 90 · 9507af4a
      Aaron Bohy authored
      
      The changed test uses the drag&drop helper, and an operation does
      not work as expected with the given params on chrome 90. The runbot
      currently uses chrome 80, so it is not an issue, but if your chrome
      is up-to-date, and you try to run the test suite, this test would
      fail.
      
      closes odoo/odoo#70008
      
      X-original-commit: 43994da9980e4133274984f720bb58f3546ea0f9
      Signed-off-by: default avatarGéry Debongnie (ged) <ged@openerp.com>
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      9507af4a
    • Goffin Simon's avatar
      [FIX] account_check_printing: Only administrator can print checks · 11376c88
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Let's consider a user U not in group group_system
      - Log with U
      - Create a vendor payment with payment method Checks
      - Print it
      
      Bug:
      
      An access error was raised because U didn't have the rights to write on model ir.sequence
      
      opw:2513014
      
      closes odoo/odoo#70013
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      11376c88
    • Antoine Guenet's avatar
      [FIX] web_editor: ensure document filename doesn't overflow its cell · 5994c4df
      Antoine Guenet authored
      
      The media modal's document tab has cells with icons and filenames. If
      the filename was too long, it would overflow its cell, which caused an
      ugly design glitch. This ensures an ellipsis on the filename when it is
      too long.
      
      closes odoo/odoo#69977
      
      X-original-commit: 8a4f4bf0
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      5994c4df
    • nie's avatar
      [FIX] stock_account: check destination and source locations in forecast · 978853a6
      nie authored
      
      Steps:
      - Go to Inventory / Products / Products
      - Create a product (2)
        - Storable Product
        - Cost: 10
      - Click Update Quantity
      - Create a new quantity line with 3 in On Hand Quantity
      - Update the line with 1 in On Hand Quantity
      - Go back to the product
      - Click the "Forecasted" smart button
      
      Bug:
      The on hand value is 30 instead of 10.
      
      Explanation:
      When `location_dest_id` is the current location, it is used to specify
      that a given quantity has been added to this location's stock. However,
      when removing a quantity, the move goes from the current location to a
      virtual one. The current location is, in this case, stored in
      `location_id` and the destination is the virtual location.
      This makes stock removals not appear in the on hand value since we only
      filter the layers on their move's `location_dest_id`.
      
      This commit assumes that a move always goes from or to a virtual
      location and checks if the current location is in `location_dest_id` or
      in `location_id`.
      
      opw:2510911
      
      closes odoo/odoo#69969
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      978853a6
  13. Apr 27, 2021
  14. Apr 28, 2021
    • Xavier Morel's avatar
      [FIX] web: web client boot when user has not apps available · a5b21464
      Xavier Morel authored
      This mostly an issue when trying to run just the tests of `web` (aka
      `-iweb`) with only community modules available,
      `TestMenusDemoLight.test_01_click_apps_menus_as_demo`, wait for the
      ready code times out:
      
          AssertionError: False is not true : The ready "odoo.isReady === true" code was always falsy
      
      and the test suite fails.
      
      The ready code simply checks that `odoo.isReady` is set. The web
      client sets `isReady` when `webclient_started` is
      triggered (specifically in `_onWebClientStarted`, which is the handler
      for that event).
      
      [The community web client only triggers `webclient_started` at the end
      of `doAction`][0] meaning the community client is considered ready
      until after the first action has executed.
      
      [The first action is executed by `show_application`][1] whose process
      is the following:
      
      1. load and initialize the menus
      2. if an action is specified in the URL, run that
      3. otherwise if the user has a home action, run that
      4. otherwise run the first menu's action
      
      When installing only `web`, the only menus which could be available
      are Apps and Settings, and the demo user has access to neither. This
      means the demo user has no applications, and opening the first app is
      a no-op ([`openFirstApp` has a case just for that situation to ensure
      it does nothing][2]). As a result, `webclient_started` is never
      triggered, `_onWebClientStarted` is never called, `odoo.isReady` is
      never set, and the tour never runs.
      
      Fix by updating `openFirstApp` to return *whether* it opened an
      application, and in `show_application` the last fallback if even
      opening the first application failed is to just declare the web client
      ready.
      
      While at it, rewrite `show_application` using ES6 facilities and
      flatten and linearize it using guards. This means the code pretty much
      tracks the process described above, with one step added:
      
      5. otherwise complete the webclient's startup
      
      [0]: https://github.com/odoo/odoo/blob/1eb474243b55f1b9e10c70d199bbe022e68b51d0/addons/web/static/src/js/chrome/action_manager.js#L174
      
      [1]: https://github.com/odoo/odoo/blob/d1c56ec7c435c5baba8604feccc6116e4c25ca96/addons/web/static/src/js/chrome/web_client.js#L77-L107
      
      [2]: https://github.com/odoo/odoo/blob/e24ab17d38fb049404f04112990e8b2fe1dd7727/addons/web/static/src/js/chrome/apps_menu.js#L44-L46
      
      
      
      closes odoo/odoo#69962
      
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      a5b21464
  15. Apr 20, 2021
  16. Apr 28, 2021
  17. Apr 17, 2021
    • Adrien Widart's avatar
      [FIX] l10n_fr_pos_cert: reset session start date · f7048c1d
      Adrien Widart authored
      
      When resuming a POS session, if the latter has been opened in the past
      and if its state is 'Opening Control', a incorrect UserError is raised
      and prevents the session to be started.
      
      To reproduce the error:
      1. Use a French company
      2. Create a POS
          - Enable "Advanced Cash Control"
      3. Start a new session
      4. Close it
      5. Set the computer's date in the future
      5. Open the POS session > Continue Selling
      
      Error: A UserError is raised ("This session has been opened another day.
      To comply with the French law, [...]"), but the user does not have the
      possibility to close the session. Moreover, since its state is "Opening
      Control", no sales have been made yet.
      
      This fix suggests to reset the start date in such a situation.
      
      OPW-2488952
      
      closes odoo/odoo#69253
      
      Signed-off-by: default avatarWilliam André (wan) <wan@odoo.com>
      f7048c1d
Loading