Skip to content
Snippets Groups Projects
  1. Oct 14, 2020
  2. Oct 13, 2020
  3. Oct 14, 2020
  4. Oct 13, 2020
  5. Oct 12, 2020
    • Swapnesh Shah's avatar
      [FIX] purchase: hide send reminder on unsaved record · 3cb26da7
      Swapnesh Shah authored
      
      Before this commit, Button to Send Sample reminder was always visible which doesn't makes sense as It would work on saved record only.
      
      Now Button will be hidden on unsaved record.
      
      Fixes #58744
      
      closes odoo/odoo#59799
      
      Signed-off-by: default avatarWilliam Henrotin <Whenrow@users.noreply.github.com>
      3cb26da7
    • Anh Thao Pham (pta)'s avatar
      [FIX] point_of_sale: fix decimal button in lang with not dot decimal · a1543d2a
      Anh Thao Pham (pta) authored
      
      - Activate debug mode
      - Go to Settings > Translations > Languages
      - Activate and switch to a language that does not use dot (.) as decimal separator (i.e. French)
      - Go to a POS session
      - Select a Product, edit the price with a decimal via the Numpad widget
      The decimal is not taken into account.
      
      This is due to the fact that the entered input ('.') is not considered as the decimal point
      in this language (i.e. ',') and is skipped.
      The same issue happens for quantity and discount.
      
      The dot in the Numpad widget has been replaced by the decimal separator of the language.
      Also "field_utils.parse.float" has to be used instead of "parseFloat" because "parseFloat" only
      recognizes a dot as separator. (i.e. "parseFloat" returns 12.00 for "12,99")
      Howerver "parseFloat" is still useful for checking values as "field_utils.parse.float" returns
      an error if its parameter is not a string or if the parsed result is not a number.
      
      opw-2357848
      
      closes odoo/odoo#59665
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      a1543d2a
  6. Oct 14, 2020
    • Priyanka Kakadiya's avatar
      [FIX] website_slides: properly display muted text in full-screen · 7f7f9c6c
      Priyanka Kakadiya authored
      
      Since a refactoring of the handling of the color system and the way the text
      muted is handled, the text-muted isn't visible on the full-screen mode of a
      course. That is becuase text-muted is based on the font color set for the body,
      which in this case is quite similar to the background of left panel in
      full-screen course content.
      
      This commit fixes the issue by using `text-600` class that is suited for this
      scenario (the background color is fixed here irrespective of the color-palette,
      and so should be muted text-color) instead of `text-muted` for the left panel
      of full-screen course content.
      
      taskId - 2346013
      closes #59390
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      7f7f9c6c
  7. Oct 13, 2020
    • IEL's avatar
      [FIX] delivery: choose delivery method by partner_shipping_id · 01f97eee
      IEL authored
      
      Steps:
      
      * Create a delivery method (1) restricted to Spain (any country would do)
      * Create a delivery method (2) restricted to Madagascar (same)
      * Create a partner, main company, whose country is Spain and the default
      delivery method is the first one.
      * Create a delivery address for that customer with Madagascar as country and the
      default delivery method as the second one.
      * Now place a new quotation with such partner and set the delivery address to
      the one of Madagascar (multiple addresses setting must be on).
      
      Before:
      
      * The delivery method for the quotation is set to the one restricted to Spain
      although we're sending it to Madagascar.
      
      After:
      
      * The delivery method for the quotation is set to the one restricted to
      Madagascar.
      
      ---
      
      opw-2348336
      
      closes odoo/odoo#59879
      
      X-original-commit: 535d429960a0347d01c528c2440c2b8e9ff2fb51
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      01f97eee
    • nie's avatar
      [FIX] web: Find key in stringified JSON · c36acb47
      nie authored
      Steps to reproduce the bug:
      - In Projects, switch to the calendar view
      - Click a task
      
      Bug:
      Traceback here: https://github.com/odoo/odoo/blob/7ba47e7215df69b6556a848532e4f33ef4243e83/addons/web/static/src/js/fields/basic_fields.js#L2181
      
      
      
      TypeError: Cannot use 'in' operator to search for 'invisible' in {}
      
      Explanation:
      We could change the inherited model of CalendarView from AbstractView to BasicView but it would be adding 400 lines of code to every calendar view. So, for now, and to keep it simple, we just parse the modifiers where it's needed to.
      
      opw:2352436
      opw:2352890
      opw:2354039
      
      closes odoo/odoo#59867
      
      X-original-commit: 422c52a0823b1a53eeb974e76d08a44cacf4ea0a
      Signed-off-by: default avatarbackspac <backspac@users.noreply.github.com>
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      c36acb47
    • IEL's avatar
      [FIX] website_sale_digital: allow download without reconciliation · 103abd32
      IEL authored
      TLDR: after installation accounting app, invoices paid online get status "In Payment" until
      reconciliation; this commit allows to download digital content without waiting
      reconciliation which may take days or week
      
      Steps:
      
      * Install Accounting app
      * Install website_sale_digital
      * Create Digital product (Product Type: Service + use Digital Files smart button
      to upload a file)
      * Setup payment acquirer (e.g. Paypal)
      * Buy digital product online and pay
      * Open the Sale Order in Portal
      
      Before:
      
      * No "Downloads" button near to product name
      
      After
      
      * User can download files after purchasing
      
      Notes
      
      * In Odoo 13.0 it worked via "post_at" option, which is removed in Odoo 14. See
      https://github.com/odoo/odoo/commit/caeb782841fc5a7ad71a196e2c9ee67644ef9074
      
      :
      
        > - Remove the post_at bank reconciliation feature. The "paid" state will be set on the invoices only if reconciled with a journal entry involving the journal's liquidity account.
        >     With invoicing, the payment will do that so the "in_payment" state should never be shown up.
        >     With accounting, only the statement lines have the power to move an invoice to the "paid" state.
      
      ---
      
      opw-2353064
      
      closes odoo/odoo#59825
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      103abd32
  8. Oct 12, 2020
  9. Oct 14, 2020
    • Samuel Degueldre's avatar
      [FIX] web_editor: fix dimensionless SVGs in media-dialog on firefox · 616c78e0
      Samuel Degueldre authored
      Previously, dimensionless SVGs (SVGs with no intrinsic width or height)
      were rendered with a width of 0 in the media-dialog on firefox. This is
      caused by the fact that firefox reports a naturalWidth and naturalHeight
      of 0 for dimensionless images, which we were relying on to compute the
      image's aspect ratio. See:
      https://github.com/whatwg/html/issues/3510#issuecomment-369982529
      
      
      for more details on the way browsers handle dimensionless images.
      
      This commit fixes that by giving the image a width, letting the browser
      render the image, and reading the height of the rendered image to
      compute the aspect ratio in the cases where the naturalHeight of the
      image is 0.
      
      task-2345120
      
      closes odoo/odoo#59785
      
      X-original-commit: b59208db376f738a8773d1ec88838af69fa3ef9d
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      616c78e0
    • Thibault Francois's avatar
      [FIX] crm: don't bypass access right to find partner: · 182fa38d
      Thibault Francois authored
      
      Problem
      -------
      
      Sales people can have restriction on partner they can see
      Private addresses, multi company, ....
      
      When they convert a lead to opportunity, it's currently possible
      that the wizard will find and link a partner that the current user
      cannot see.
      
      Solution
      --------
      Field that are now computed store field, that were previously
      normal field with onchange, should not be computed as sudo
      to respect the record rule
      
      closes odoo/odoo#59517
      
      X-original-commit: af9db1d2aa605d46b5b5dae3d63533367c431f33
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      182fa38d
  10. Oct 13, 2020
    • Benoit Socias's avatar
      [FIX] website: filter filter_opt of dynamic snippet by website_id · 19d82ca5
      Benoit Socias authored
      Add a filtering by the contextual website_id when looking up available
      website_snippet_filters via an rpc route limited to logged in users but
      relying on a sudo to actually obtain the list of available filters.
      
      Before this commit filters were visible on the editor for all websites.
      
      After this commit filters are only visible on the editor of the website
      that matches their website_id.
      
      https://github.com/odoo/odoo/pull/59341
      
      
      task-2312878
      
      closes odoo/odoo#59341
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      19d82ca5
    • Raphael Collet's avatar
      [FIX] core: assignment of binary field on new record with origin · 3563738c
      Raphael Collet authored
      
      The assignment of a binary field on a new record with origin did
      actually modify the attachment storing the value of the field on the
      origin record!  The fix is simply to avoid messing up with attachments
      when updating new records.
      
      closes odoo/odoo#59918
      
      X-original-commit: 6778c4c1
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      3563738c
    • Raphael Collet's avatar
      [FIX] core: assignment of size to new records · 9b714589
      Raphael Collet authored
      Upon onchange, the web client sends unchanged image fields on one2many
      lines as "bin size" values, while changed image fields are sent as their
      full value.  As the value is not base64-encoded, the assignment of that
      value crashes.
      
      Fix it by making assignment on new records not crash when decoding the
      image: the value is simply not assigned to the field.  In the situation
      described above, the record being assigned is a new record with a real
      record as origin.  Because the field is actually not assigned, its value
      is implicitly the value of the field on the origin record, which is
      consistent with the fact that the field was not modified in the form.
      
      X-original-commit: 4442d6f0
      9b714589
    • Nasreddin (bon)'s avatar
      [FIX] website_slides: Google drive does not start (error message) · c107edf7
      Nasreddin (bon) authored
      
      Issue
      
      	- Install "Elearning" module
      	- Activate "Drive" credidentials in settings
      	- Go to any course and edit it.
      	- In "Content" tab, click on "Add Content"
      	- Select `Video` as 'Type'
      	- Copy/Paste the Google Drive video link in "Document URL" field
      	- Wait for other field to be computed then "Save & Close"
      	- Save the course
      	- Go to the website to watch this new content
      
      	Youtube error message
      
      Cause
      
      	'mime_type' field is readonly. When saving the course (slide.channel),
      	the slide is not saved yet, and therefore drop the 'mime_type' value.
      	When generating the `embed url`, it verify if a mime_type is set: if not,
      	it will generate an iframe with youtube.com as domain, else,
      	a drive.google.com domain.
      
      Solution
      
      	Add `force_save="1"` on `mime_type` field.
      
      opw-2294344
      
      closes odoo/odoo#59913
      
      X-original-commit: 987b9bf4
      Signed-off-by: default avatarbon-odoo <nboulif@users.noreply.github.com>
      c107edf7
    • Victor Feyens's avatar
      [REV] base: revert 9f7f1db5 · 811cd40f
      Victor Feyens authored
      
      Revert commit
      "[FIX] base: clearer message in case of conflict for no_gap sequences"
      
      This commit changed the error returned in case of SQL conflict for no_gap
      sequences, wrongly disabling the automatic retry (service/model.py) in case
      of such errors.
      
      Also adds a comment in the dedicated test to ensure the behavior is explained
      and the automatic retry isn't broken once again by the same kind of change.
      
      closes odoo/odoo#59904
      
      X-original-commit: f84d728520257262cf0cd86221114c53f8332258
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      811cd40f
    • qsm-odoo's avatar
      [FIX] web_editor: remove useless code breaking the editor scrolling · 58ade8c0
      qsm-odoo authored
      Since the editor panel is placed on the right, the content was not
      possible to scroll when in a iframe, like for mass mailing. This was
      because of some strange code introduced with [1]. As the problem the
      mentioned commit says fixing is still fixed without that code, I see
      no reason to keep this... especially since it may introduce difference
      between readonly and editmode content.
      
      [1]: https://github.com/odoo/odoo/commit/f9bf408a827fa86323bc2d1891cb5173b4781e7b
      
      
      
      closes odoo/odoo#59902
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      58ade8c0
  11. Oct 09, 2020
  12. Oct 12, 2020
    • Nicolas Lempereur's avatar
      [FIX] sale: default on product change in configurator · 4a65e745
      Nicolas Lempereur authored
      
      When a product is set on a line and we change product with the product
      configurator wizard, we will use the attributes values of the previous
      product.
      
      But then since the attributes are the ones of wrong product, not
      attribute is selected and if eg. we have radio button with one option
      and custom value, it will never be selectable (because the radio button
      is hidden and unselected).
      
      In this commit, we do not use the current variant values when we change
      product in the product configurator wizard.
      
      note: this commit also increases the limit of (custom values) inside the
      product configurator wizard, for an arbitrary 10000 limit. Without this
      change, each opening of the wizard would only keep 40 customs values and
      discard the other ones.
      
      opw-2333091
      closes #59016
      
      closes odoo/odoo#59802
      
      X-original-commit: e9c54f6b
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      4a65e745
    • oco-odoo's avatar
      [FIX] account: tests: remove the default taxes from the invoices created by init_invoice helper · cc7d35d5
      oco-odoo authored
      
      closes odoo/odoo#59794
      
      X-original-commit: f3bb7e12823d13967b32a1f762c3589e5c7aa26c
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      Signed-off-by: default avataroco-odoo <oco-odoo@users.noreply.github.com>
      cc7d35d5
    • oco-odoo's avatar
      [FIX] account: cash basis taxis: allow full reconciliation of tax lines on... · 5a031e64
      oco-odoo authored
      [FIX] account: cash basis taxis: allow full reconciliation of tax lines on cash basis final account without full payment of the invoice
      
      To reproduce the issue before this fix:
      
      1. Create accounts ACC TAX A, ACC TAX B, with reconcile = True, internal_type = other
      
      2. Create Tax B, with tax_exigibilty = on_payment and account_id = ACC TAX B and cash_basic_account_id = ACC TAX A, 20%
      
      3. Create invoice B, account_id = Tax B, unit_price = 1000, Valide invoice,
      
      4. Register a payment of 600 for invoice B (so, that's half the invoice, when including the taxes). The cash basis tax creates a miscellaneous operation MISC A, containing a line on ACC TAX A.
      
      5. Create a mis operation MISC TVA, like this:
      line 1 : account_id = ACC TAX A, credit = 100
      line 2 : account_id = 401100, debit = 100
      
      6. Reconcile the following move lines:
      line of MISC A with account ACC TAX A (100)
      line of MISC TVA with account ACC TAX A (100)
      
      ==> The lines should be fully reconciled
      
      To solve that without breaking the fix made here https://github.com/odoo/odoo/commit/c43acc34b873dc70cf792675fe1d58d8b0e116b1 , we rely on the tax_exigible field of account move lines. When all the reconcile lines are exigible, it means we're not reconciling the transition line of a cash basis entry, and so we can directly full reconcile.
      
      Fixes https://github.com/odoo/odoo/issues/58996
      OPW 2350494
      
      X-original-commit: b8ab3c78ff9354091f5154bb03a716c32a609de2
      5a031e64
  13. Oct 06, 2020
  14. Oct 13, 2020
    • Denis Ledoux's avatar
      [FIX] phone_validation: assign mobile_blacklisted and phone_blacklisted · 55d7b9d3
      Denis Ledoux authored
      
      Make sure to assign a value to the computed fields
      `mobile_blacklisted` and `phone_blacklisted`
      in their compute method for all record included in `self`
      
      Otherwise, not assigning a value for one record included
      in `self` can result in a cache missing error.
      
      ```
      Traceback (most recent call last):
        File "/tmp/tmp3l14ain7/migrations/base/tests/test_mock_crawl.py", line 143, in crawl_menu
          self.mock_action(action_vals)
        File "/tmp/tmp3l14ain7/migrations/base/tests/test_mock_crawl.py", line 212, in mock_action
          mock_method(model, view, fields_list, domain, group_by)
        File "/tmp/tmp3l14ain7/migrations/base/tests/test_mock_crawl.py", line 238, in mock_view_form
          [data] = record.read(fields_list)
        File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3001, in read
          return self._read_format(fnames=fields, load=load)
        File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3021, in _read_format
          vals[name] = convert(record[name], record, use_name_get)
        File "/home/odoo/src/odoo/14.0/odoo/models.py", line 5620, in __getitem__
          return self._fields[key].__get__(self, type(self))
        File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 980, in __get__
          raise ValueError("Compute method failed to assign %s.%s" % (record, self.name))
      ValueError: Compute method failed to assign crm.lead(974,).phone_blacklisted
      ```
      
      closes odoo/odoo#59827
      
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      55d7b9d3
    • Thibault Delavallée's avatar
      [FIX] crm: fix query counters due to some runbot errors · 36bb56a5
      Thibault Delavallée authored
      
      To investigate a bit. Sometimes a few extra queries are generated.
      
      Task ID-2359847
      
      closes odoo/odoo#59821
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      36bb56a5
    • Antoine Prieels's avatar
      [FIX] pos_adyen: Adyen for Platforms fixes · d5b456a1
      Antoine Prieels authored
      
      - The Adyen sync cron didn't call the function to sync terminals
      
      - Do not specify the merchantAccount when creating a store, the proxy
      will add it itself.
      
      closes odoo/odoo#59819
      
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      d5b456a1
  15. Oct 12, 2020
  16. Oct 13, 2020
  17. Oct 12, 2020
    • Achraf (abz)'s avatar
      [FIX] point_of_sale: Send invoice by email with qr_code · 4bc17f78
      Achraf (abz) authored
      
      Issue
      
          - Install "Point of Sale"
          - Enable "Qr Code" in Invoicing
          - Open new POS session
          - Set random customer
          - Try to send the invoice by email
      
      Cause
      
          The 'qr_code_urls' doesnt exist in the dictionary.
      
      Solution
      
          Add 'qr_code_urls' with all generated qr code urls to the dictionary in report.point_of_sale.report_invoice
      
          EDIT:
            use `_get_report_values` function of report.account.report_invoice instead of generate all qr code urls
      
      opw-2357088
      
      closes odoo/odoo#59669
      
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      4bc17f78
  18. Oct 09, 2020
  19. Oct 08, 2020
  20. Oct 12, 2020
  21. Oct 07, 2020
    • Siddarth Gajjar's avatar
      [FIX] website_slides: fix concurrency traceback · c1b8c1d8
      Siddarth Gajjar authored
      - Prior to this commit, slide content of type document or presentation is
        having src as '/slides/embed' and that controller tries to set slide as
        viewed. Along with this, for few slide types (including document and
        presentation) and for logged in user, it will try to set slide as completed
        once slide rendering is done with help of method `_setCompleted`, without
        waiting for the iframe to be loaded. This means, the controller called from
        the src of iFrame and the above method both tries to update same 'slide_slide'
        table at the same time, resulting into concurrency error.
      
      - This commit fixes the issue by marking the slide as completed (with help
        of method `_setCompleted`) only after the iFrame is loaded, avoiding the
        concurrent updation of 'slide.slide' table.
      
      TaskID 2265863
      Closes https://github.com/odoo/odoo/pull/52918
      
      
      
      closes odoo/odoo#59382
      
      X-original-commit: c5f406c8
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      c1b8c1d8
Loading