Skip to content
Snippets Groups Projects
  1. Jan 30, 2020
    • William Henrotin's avatar
      [IMP] mrp: choose operation to consume new product · ec0d5b48
      William Henrotin authored
      This commit adds the possibility to choose in which operation a new product
      will be consumed. New product can be added to the production once the
      manufacturing order is in state draft.
      Before this commit, the new product was consumed
      automatically in the last workorder.
      
      Task: 2121714
      ec0d5b48
  2. Jan 29, 2020
    • William Henrotin's avatar
      [IMP] mrp: unit_factor as computed field · 96b17a82
      William Henrotin authored
      The next commits will allow changing the initial demand of
      confirmed moves as well as adding move once the production
      order is confirmed. In order to not duplicate again the unit
      factor computation in multiple write and create, make the
      field a stored computed.
      
      Unit_factor is stored and only depends on product_uom_qty because
      updating only quantity_done (after a partial production for
      instance) should leave unit_factor unchanged for the futur
      partial production.
      
      Task: 2121714
      96b17a82
  3. Jan 30, 2020
    • Pedro M. Baeza's avatar
      [FIX] account: Perform B2B/B2C overlapping check per user · 8e51fd2a
      Pedro M. Baeza authored
      
      Steps to reproduce the problem:
      
      - Have user A with B2B group.
      - Have user B with B2C group.
      - Add simultaneously on both - via write - another group (or call `_check_one_user_type`).
      
      Expected result:
      
      - No problem
      
      Got result:
      
      - Error "A user cannot have both Tax B2B and Tax B2C..."
      
      That's because the check is performed for more than one user each time, while it has
      to be record per record. The implementation of `_has_multiple_groups` actually
      checks if the passed recordset is only one record, and if not, it looks directly for all
      existing users, so also the case of both users A and B being in the same B2x group, but
      having a 3rd user in the other group will fail.
      
      Revisiting the query in `_has_multiple_groups`, there's a hidden error when you use it
      for only one ID because a missing space.
      
      closes odoo/odoo#44300
      
      X-original-commit: 83f104b2
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      8e51fd2a
    • Nicolas Martinelli's avatar
      [FIX] base_vat: cache VIES result · ba3062e6
      Nicolas Martinelli authored
      
      - Activate the VIES online check
      - Create a partner of type Company and add several contacts
      - Set the VAT number, save
      
      A call to VIES is done for each contact.
      
      The field VAT is propagated from the parent company to the children,
      triggering the check on all partners. This is not problematic for local
      checks since those are fast. However, online checks take time which can
      lead to a timeout of the request if there are many contacts.
      
      Since the check is triggered through a constraint (`check_vat`), only
      one record at a time is checked. Therefore, it is not possible to build
      a local list of the VAT numbers to avoid duplicated verifications inside
      a single transaction.
      
      The solution is to store the result in cache. Since the call to the
      external API may fail (e.g. timeout), we extract the check to store only
      the successful calls.
      
      Closes #43939
      opw-2181744
      
      closes odoo/odoo#44298
      
      X-original-commit: 0c7a3e95
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      ba3062e6
    • wan's avatar
      [FIX] l10n_fr_fec: CompAuxNum changes · 7efff597
      wan authored
      
      opw-2122776
      * CompAuxNum should be the code of the account concatenated with the id
      of the client
      * It should be popuated only if it is a receivable/payable
      
      The problem is the export of the partner ID in the column G
      "CompAuxNum". We only export the ID of the linked customer/vendor. When
      they import the FEC into their software to make tax declarations and
      annual accounts. The system will notice if an account is filled in in
      the column G and will override the account in column E with the ID of
      the partner. As the ID is not a real account, they cannot use the FEC to
      import correctly.
      
      closes odoo/odoo#44297
      
      X-original-commit: 955eec23
      Signed-off-by: default avatarwan <william-andre@users.noreply.github.com>
      7efff597
    • Xavier Morel's avatar
      [IMP] core, web: test failure reporting · c4e075cf
      Xavier Morel authored
      
      * remove misleading documentation about a "test failed" message, in
        13.0 any uncaught exception or console.error will cause the current
        test to be interpreted as failed
      * fix tour manager to console.error its step and not add a second
        useless error message
      * fix menu tester to try and display the failure cause on failure
      * improve qunit's test reporter to print the number of tests failed in
        case of test suite failure
      
      Should make test failures in tours a bit clearer.
      
      closes odoo/odoo#44296
      
      X-original-commit: 78121b68
      Signed-off-by: default avatarXavier Morel (xmo) <xmo@odoo.com>
      c4e075cf
    • Jason Van Malder's avatar
      [FIX] auth_signup: fix email sent when testing an import · f99f4db1
      Jason Van Malder authored
      
      Issue
      
          - Contacts
          - Import a contact that will be a portal user
          - Test import
      
          Activation email sent
      
      Cause
      
          Testing an import do the whole process including sending an email
          because of force_send (email not rollbacked).
      
      Solution
      
          Check if we are testing the import. If yes, do not force
          send the email. So, the email will be rollbacked.
      
      OPW-2168868
      
      closes odoo/odoo#44283
      
      X-original-commit: f372334facd189d0a70268e7876511bf1f800a4a
      Signed-off-by: default avatarJason Van Malder (jvm) <jvm@odoo.com>
      f99f4db1
  4. Jan 28, 2020
    • jerome hanke (jhk)'s avatar
      [FIX] sale: context lang used on product variants display name · 2ecbfddd
      jerome hanke (jhk) authored
      
      Steps to reproduce:
      - install sales and contact
      - install another language
      - go to contacts, pick a specific contact and set its language to
      the new language installed
      - go to sales > settings > activate the "product configurator" option
      - create a product with a translated variant (the variant has to have
      at least 2 translated attributes with custom values)
      - create a quotation with the modified contact and the product
      with the variant (use the product configurator wizard) > save
      - print that quotation
      
      Previous behavior:
      product description is not fully translated
      the part describing the variants is in the current user's language
      while the product display_name is using the associated partner's
      language
      
      Current behavior:
      product description is fully translated into the correct language
      
      opw-2168102
      
      closes odoo/odoo#44144
      
      X-original-commit: 4a542cbd
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      2ecbfddd
    • Jeremy Kersten's avatar
      [FIX] payment_ingenico: fix payment_token creation · f167c3d0
      Jeremy Kersten authored
      Now, we can again creates ingenico token on production environment.
      Commit https://github.com/odoo/odoo/commit/f0e059e6#diff-0c487d0R558
      
       replaced aquirer.id by self.acquire_id.id.
      It is wrong since env['payment.token'].create() will call the function with self == payment.token().
      self.acquirer_id == False --> self.acquirer_id.state != 'enabled' --> request done in test mode each time.
      
      closes odoo/odoo#44126
      
      X-original-commit: 68028b90
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      f167c3d0
  5. Jan 30, 2020
  6. Jan 28, 2020
    • Thomas Carlier's avatar
      [ADD] hr_expense : add the ability to install OCR module · 4eeeb4f1
      Thomas Carlier authored
      
      - if checked in settings, OCR can be used to get infos from the attached receipt image
      
      - set default product to EXP_GEN when created from picture
      
      - use "register_as_main attachment" when expenses are created from receipt images
      
      - Add the upload button to the kanban view to see it immediately in the mobile version
        and use it to create expenses from pictures. (with or without OCR installed)
      
      closes odoo/odoo#39559
      
      Related: odoo/enterprise#6493
      Signed-off-by: default avatarFlorian Daloze (fda) <fda@odoo.com>
      4eeeb4f1
  7. Jan 30, 2020
  8. Jan 29, 2020
    • Nicolas Martinelli's avatar
      [FIX] hr_holidays: modify validated leave · f99c2520
      Nicolas Martinelli authored
      
      - Create and validate a leave
      - Go to Time Off > Everyone
      - In the Gantt view, move the leave
      
      Nothing prevents the modification of the leave while is it validated.
      
      opw-2179839
      
      closes odoo/odoo#44214
      
      X-original-commit: 05257fc75211ea4b34b35c94eeb42ee5b55bfd5b
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      f99c2520
    • Romain Derie's avatar
      [FIX] website_sale: prevent race condition on tour · 6e18e7f9
      Romain Derie authored
      
      As this race condition seems not possible to be reproduced in local, all this
      is an assumption based on the logs.
      
      After the checkout, the user is redirected to `/shop/confirmation` where there
      is RPCs fired every seconds to fetch the payment status
      (`/shop/payment/get_status`).
      
      As the test was considered as finished on that page, sometimes the RPC would
      still be processed in python while the tour was considered done and killed,
      thus also the cookies, session & co.
      From that point, the python would crash when accessing the session.
      In the logs, the python crash in the RPC call occurs after the test is done.
      
      closes odoo/odoo#44235
      
      X-original-commit: 082c6600
      Signed-off-by: default avatarRomain Derie <rdeodoo@users.noreply.github.com>
      6e18e7f9
  9. Dec 19, 2019
    • Robin Heinz's avatar
      [FIX] point_of_sale: Deactivate pricelist from res config. · 6a9ea9db
      Robin Heinz authored
      
      This commit prevent the use of the pricelist in the pos after deactivating the option in the res config setting.
      Before, the xml was not shown anymore but the option use_pricelist was still True and we could still see the pricelist in the frontend of the POS.
      We were unable to change the option in the backend.
      Now, when we untick the option in the res config setting, we disable all 'use_pricelist' in the pos configs.
      
      closes odoo/odoo#41613
      
      Task-id: 2151669
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      6a9ea9db
  10. Jan 22, 2020
  11. Jan 29, 2020
    • Akim Juillerat's avatar
      [FIX] account: Fix matching rules reconciliation when dealing with negative amounts · 1e5eca50
      Akim Juillerat authored
      
      match_total_amount_param on account.reconciliation.model is not
      respected when paying a vendor bill through bank statement because
      the amounts from both the statement line and the move line that
      are used in the comparison will be negative.
      
      closes odoo/odoo#44234
      
      X-original-commit: 1a9221584f78fc7619277c2c0e9b9659e7c80ee2
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      1e5eca50
    • David Beguin's avatar
      [FIX] survey: fix first input autofocus · be5e86f4
      David Beguin authored
      
      Before this commit, the survey form widget was focusing on the first text
      input found on the page, even if this input was not the first question.
      
      After this commit, the survey form widget focus only on first text input
      if that input is the first question on the page.
      
      Triggered by task ID 1972640 (live sessions on survey)
      PR #44205
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      be5e86f4
    • Aurélien Warnon's avatar
      [FIX] survey: fix survey result filters · bfae383f
      Aurélien Warnon authored
      Since recent refactoring, filter data have 'question' and 'answers' as
      filter_data keys, instead of 'question_text' and 'labels'. This commit fixes
      the naming in template using filter_data.
      
      Also, comment that does not count as answer is not linked to a suggested
      answer. So that filtering on those comment does nothing because we cannot
      find an answer_id in that case. As it makes no real sens anyway to filter
      on those kind of comment, filtering have been disabled on those comments.
      
      Triggered by task ID 1972640 (live sessions on survey)
      PR #44205
      bfae383f
    • Aurélien Warnon's avatar
      [FIX] survey: fix division by 0 error · 8862a32d
      Aurélien Warnon authored
      This commit fixes a potential division by 0 error by correctly applying the
      default division by 1.
      
      Triggered by task ID 1972640 (live sessions on survey)
      PR #44205
      8862a32d
    • David Beguin's avatar
      [FIX] survey: ensure same color in community and enterprise while taking surveys · a8b3800a
      David Beguin authored
      Use $primary to always get same color in COM and ENT. The goal of using color
      variable for styling is to get always the same color, no matter if we are in
      community or on enterprise.
      
      Before this commit, *$o-brand-primary* was used in survey stylesheet but this
      variable is not matching the same colors in COM and in ENT.
      
      After this commit, *$primary* is used to render the same color no matter the
      environment (COM or ENT).
      
      Triggered by task ID 1972640 (live sessions on survey)
      PR #44205
      a8b3800a
    • Tiffany Chang (tic)'s avatar
      [FIX] survey: avoid including skipped (empty) rows in results · 6ff7c59a
      Tiffany Chang (tic) authored
      This commit avoids the showing of '0.0' for skipped numerical_box
      questions and empty rows for other skipped simple entry (i.e. not
      multiple choice questions) in the survey results "All Data" tab.
      
      Triggered by task ID 2061937 (improve scoring in surveys)
      PR #44205
      6ff7c59a
    • Thibault Delavallée's avatar
      [IMP] survey: do not sanitize survey description · b4ac232a
      Thibault Delavallée authored
      As access to survey description field is limited to survey users and managers
      we can let them put whatever they want in the description field. Otherwise
      they cannot use the full power of web editor, notably embedded videos.
      
      PR #44205
      b4ac232a
    • Tiffany Chang (tic)'s avatar
      [FIX] survey: allow 0 as numerical_box user answer even if required · f54feba5
      Tiffany Chang (tic) authored
      Because 0 evaluates as False in "if" statements, generalized answer_type
      constraint check logic would not allow user to submit a survey with 0
      as a numerical value. This commit fixes this issue by explicitly allowing
      this case.
      
      Triggered by task ID 2061937 (improve scoring in surveys)
      PR #44205
      f54feba5
    • Romain Derie's avatar
      [IMP] website: introduce cookies bar on website · 3028e9a8
      Romain Derie authored
      With this commit, it is now possible to activate a cookies bar on a
      website through the res.settings.
      
      The cookies bar can be edited in the frontend by entering edit mode.
      
      The cookies bar will appear until the user clicks on 'I agree'.
      
      Part of https://github.com/odoo/odoo/pull/41294
      
      
      task-2087003
      
      closes odoo/odoo#41294
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      3028e9a8
    • Romain Derie's avatar
      [IMP] website: add consent duration on s_popup snippet · 3bce5277
      Romain Derie authored
      This commit introduce a new snippet option for s_popup to control the
      consent duration in days. This value will be used to know if the popup
      should be shown or not.
      If the user close the popup, it won't be shown until the consent
      duration is over.
      
      This will also avoid popup to be shown on exit (display mode) more than
      once. Indeed, every mouseout of the screen (changing tab, changing app,
      alt tab etc) would show the popup, as well as page navigation.
      
      Part of https://github.com/odoo/odoo/pull/41294
      task-2087003
      3bce5277
    • Romain Derie's avatar
      [FIX] web_editor, *: correctly find `o_snippet_invisible` · 506d2937
      Romain Derie authored
      *: website
      
      This commit is a safety nest to ensure `o_snippet_invisible` will be
      found, even if somehow they appear as one of the editable area elements.
      
      It might be the case with some refactoring, as it was the case between
      404fa816 and 83d99941c, in which case, the step to reproduce were:
        - Add s_popup snippet into the page
        - In the options, select 'Show On All pages' -> It moves to footer
        - Now save and enter Edit mode again
        - The invisible element (popup in this case) is in the DOM, the widget
          is working fine but it is not retrieved as an invisible element,
          thus not possible to edit it
      
      + lint/dead code
      
      Part of https://github.com/odoo/odoo/pull/41294
      task-2087003
      506d2937
    • Simon Lejeune's avatar
      [REF] web: gantt documentation: delete attribute · 1f6f76e7
      Simon Lejeune authored
      
      Enteprrise pr 6836 will allow disabling the delete button on gantt
      views. Document it is possible.
      
      task-2088954
      
      closes odoo/odoo#40716
      
      Related: odoo/enterprise#6836
      Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
      1f6f76e7
    • Ankita Raval's avatar
      [REF] mrp: disabled delete on workorder gantt and calendar · 1728cd0c
      Ankita Raval authored
      task-2088954
      1728cd0c
    • Ankita Raval's avatar
      [REF] web: calendar: allow disabling the delete button · 0052222b
      Ankita Raval authored
      In this commit, we add a new attribute "Delete" for user conveniency
      if he don't want 'Delete' button on popover card they easily achive
      by "delete=false" attribute and also add a testcase for it.
      
      task-id:2088954
      0052222b
  12. Jan 28, 2020
  13. Jan 27, 2020
  14. Jan 29, 2020
  15. Jan 17, 2020
    • wan's avatar
      [IMP] account_check_printing: log state for vendor checks · c5e5e978
      wan authored
      
      Task 2168197
      
      Especially when writing out checks we would like to track the value of
      the state of the vendor payment in the chatter. This way we can see who
      prints it, cancels it, etc and at what time this happened. It's
      important for traceability. I think we can just enable it for all
      payments in general, I can't think of any downsides and payments are
      usually sensitive documents so I imagine people want as much info as
      possible.
      
      closes odoo/odoo#43505
      
      Signed-off-by: default avatarQuentin De Paoli (qdp) <qdp@openerp.com>
      c5e5e978
  16. Jan 29, 2020
Loading