Skip to content
Snippets Groups Projects
  1. Jun 17, 2021
    • xO-Tx's avatar
      [FIX] tools: keep image option related attributes · 7c566661
      xO-Tx authored
      
      - Change an image option in mass mailing editor (e.g. Quality)
      - save
      - edit -> The option can't get the new applied value.
      
      The body_arch's field used in mass mailing editor is
      sanitizing attributes and as a consequence, option related data
      attrs are removed on save.
      
      task-2327045
      
      closes odoo/odoo#72008
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      7c566661
  2. Feb 17, 2021
  3. Jun 17, 2021
  4. Jun 15, 2021
    • Goffin Simon's avatar
      [FIX] mrp: Unbuild serial number · 47d6ff49
      Goffin Simon authored
      
      When a serial number SN is trying to be consumed and has been unbuilt in the past,
      an evaluation is used to check that the # of times SN was unbuilt is equal to
      the # of times SN was consumed. However, when counting the unbuild SN it did not take into account if
      it was from an unbuild order.
      
      opw:2510294
      
      closes odoo/odoo#71684
      
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      47d6ff49
  5. Jun 16, 2021
    • Aurélien (avd)'s avatar
      [FIX] account: Fix reconciliation with multi-currencies but balance = 0 · 1231d54b
      Aurélien (avd) authored
      
      This commit fixes the case when the reconciliation never ends due to an infinite loop.
      This happens when we attempt to reconcile two journal items having differents foreign currencies but an amount_residual = 0.0.
      In that case, partials are created everytime with zero amount, zero debit_amount_currency and zero credit_amount_currency.
      We don't need to handle such reconciliation because exchange difference journal items are always created using the same foreign currency as the originator line.
      
      The way the reconciliation is made for reversal moves is also edited by this commit to avoid reconciling lines on the same moves but with different currencies.
      
      closes odoo/odoo#71906
      
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      1231d54b
  6. Jun 15, 2021
    • Djamel (otd)'s avatar
      [FIX] website_slides: hide the "Go to website" button if the slide is not saved · 5b9aa865
      Djamel (otd) authored
      
      Steps to reproduce the bug:
      - Go to Elearning > choose any course or create a new one
      - Click on “add content” :
          - Add a title to slide
          - Click on "Go to Website"
      
      Problem:
      An error is triggered because we call the "create" method to save the slide, which tries to access the “channel_id”, the course ID in which the slide will be added. However, the field is not set in values.
      The "create" or "write" function in "slide_channel" must first be called to save the course, which will then call the create function in "slide_slide"
      
      Solution :
      Hide the "Go to website" button as long as the course is not created and therefore has no id
      
      opw-2526541
      
      closes odoo/odoo#72185
      
      X-original-commit: e412ba48
      Signed-off-by: default avatarDjamel Touati <DjamelTouati@users.noreply.github.com>
      5b9aa865
  7. Jun 16, 2021
    • Romain Derie's avatar
      [FIX] sale_coupon: align stat button with act_window results · 79afc80e
      Romain Derie authored
      
      Before this commit, the number you saw on the stat button was not always
      the same as the number of sale order you would see when you clicked on it.
      Indeed, there was a domain force on the action to only show confirmed orders,
      while the stat button was counting quotations too.
      
      Fixed #70911
      
      closes odoo/odoo#71826
      
      Signed-off-by: default avatarRomain Derie <rdeodoo@users.noreply.github.com>
      79afc80e
    • Stéphane Debauche's avatar
      [FIX] crm: dot not sync the phone / email from False to an empty string · 9ce77416
      Stéphane Debauche authored
      
      Bug
      ===
      
      1. Create a new database from the database selector
      2. Do not select a country for your company
      3. Install CRM
      4. Create a new opportunity and select your company
      5. The sync "warning" will be displayed, and it should not
      
      The reason for that is the phone of the company is an empty string and the
      phone of the lead is False. So we try to sync them and we show the warning
      message even if for the user, nothing will happen.
      
      This commit fixes that behavior by correctly checking that False / empty
      strings are considered as equel.
      
      TaskID-2499659
      
      closes odoo/odoo#72237
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      9ce77416
    • Robin Heinz's avatar
      [FIX] point_of_sale: reprint in manage order · 7a7aaced
      Robin Heinz authored
      
      The printer dialog was not shown when going through the manage order if there
      was no printer connected.
      
      In order to fix this issue, the tryReprint doesn't check anymore if a printer is
      connected or not. It'll print via printer if connected or show the the printer dialog.
      
      closes odoo/odoo#72215
      
      Signed-off-by: default avatarQuentin Lejeune (qle) <qle@odoo.com>
      7a7aaced
  8. Jun 03, 2021
    • Denis Ledoux's avatar
      [FIX] registry: check_foreign_keys, constraint names are limited to 63 chars · e33abdcd
      Denis Ledoux authored
      
      When computing the foreign key name,
      `check_foreign_keys` didn't take into account the limit of 63 characters
      for constraint names.
      
      Because of this, some constraints were dropped and recreated
      over and over while they were correct, during install and upgrades.
      
      For instance, when installing `base`
      when adding the foreign key for which the name was computed
      `base_partner_merge_automatic_wizard_res_partner_rel_base_partner_merge_automatic_wizard_id_fkey`
      Postgresql created the constraint under the name
      `base_partner_merge_automatic__base_partner_merge_automatic_fkey`
      and therefore, as the name did not match,
      the constraint was dropped and re-created.
      
      closes odoo/odoo#71658
      
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      e33abdcd
  9. Jun 15, 2021
  10. Jun 14, 2021
  11. Jun 08, 2021
  12. Jun 15, 2021
  13. Jun 09, 2021
  14. Jun 15, 2021
  15. Jun 14, 2021
  16. Jun 11, 2021
    • Jairo Llopis's avatar
      [FIX] sale: improve compute expected date performance · bca5c03e
      Jairo Llopis authored
      
      Without this patch, each time the compute reaches the line with `.filtered()`, it needs a new fetch from the database. With too many sale orders, this becomes a bottleneck.
      
      Now, before getting to that line, Odoo knows that it'll need all sale.order.line records, so it can fetch them all at once.
      
      In a production database, loading the sale.order list goes down from 7s to 500ms with this patch.
      
      @Tecnativa TT30390
      
      closes odoo/odoo#72090
      
      X-original-commit: 254b2a08
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      bca5c03e
  17. Jun 14, 2021
  18. Jun 11, 2021
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] sale: retrieve correct reinvoice pricelist price · 10fcbce2
      Andrea Grazioso (agr-odoo) authored
      
      - Install Sale, Project, Purchase, Timesheet, Accounting
      - Enable pricelists, discount, analytic accounting
      - Create a pricelist [PRICELIST]:
        * Discount all product by 50%
        * Discount Policy: Show public price & discount to the customer
      - Create a product [SERVICE]:
        * Type: Service
        * Timesheet on task
        * Create a task in sales order project
      - Create another product [TEST]:
        * Price: 100
        * Re-Invoice Expenses: At cost
      - Create a SO with pricelist [PRICELIST], product [SERVICE], confirm
      - Create a PO with [TEST], specify analytic account from SO
      - Receive the product, create the bill & confirm
      
      Back to the SO, the unit price of [TEST] is set to 50, when invoicing it
      will be cut of another 50%, resulting in 25
      
      opw-2491693
      
      closes odoo/odoo#72083
      
      X-original-commit: 538400e9
      Signed-off-by: default avataragr-odoo <agr-odoo@users.noreply.github.com>
      10fcbce2
  19. Jun 10, 2021
  20. Jun 11, 2021
    • Adrien Widart's avatar
      [FIX] purchase: compute unit price with different uom · 852217eb
      Adrien Widart authored
      
      On a product form, if the purchase UoM is different from the default
      UoM, this will lead to an error when creating a RfQ.
      
      To reproduce the error:
      (Need stock)
      1. In Settings, enable "Unit of Measures"
      2. Create a product P:
          - Cost: 100
          - UoM: Units
          - Purchase UoM: Dozens
      3. Create a RfQ:
          - Add P
      
      Error: The quantity is 1 and UoM is Dozens, however the unit price is
      $14400. The ratio has been applied twice.
      
      When setting the product, an onchange method computes the unit price.
      However, the computation is wrong: it first converts the product's
      standard price using the purchase UoM of the product. Then, it converts
      the result, this time using the UoM of the PO line.
      
      OPW-2519294
      
      closes odoo/odoo#72038
      
      Signed-off-by: default avatarArnold Moyaux <amoyaux@users.noreply.github.com>
      852217eb
  21. Jun 13, 2021
  22. Jun 11, 2021
  23. Jun 08, 2021
    • Adrien Widart's avatar
      [FIX] pos: keep same ratio width/font-size in receipt · 26c74a1d
      Adrien Widart authored
      To reproduce the error:
      1. In the settings of a POS, enable "Header & Footer"
      2. Add this footer: "0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4
      5"
      4. Start a session
      5. Validate an order
          - Note that in the footer, there is a line break after the third '3'
      6. Print Receipt
          - Error: the line break is after the third '5'
      7. Send the receipt by email
          - Error: in the receipt of the mail, the line break is after the
      third '2'
      
      The appearance should be the same in the three cases. On step 5, here
      are the values used to display the receipt:
      https://github.com/odoo/odoo/blob/6c1172922505cd955d278bc80d327423fc6867a6/addons/point_of_sale/static/src/css/pos.css#L1680-L1692
      
      
      This fix applies the same ratio `width/font-size = 18.75` on values used
      to print the receipt (`266 / 18.75 = +-14`) and the ones used to
      generate the receipt in the mail (`512 / 18.75 = +-27`). That way, the
      appearance of the receipts remains similar.
      
      OPW-2528558
      
      closes odoo/odoo#71900
      
      Signed-off-by: default avatarAdrien Widart <adwid@users.noreply.github.com>
      26c74a1d
    • Adrien Widart's avatar
      [FIX] pos: allow new line in receipt header · 66c695b2
      Adrien Widart authored
      To reproduce the error:
      1. In the settings of a POS, enable "Header & Footer"
      2. Add a header (with at least one line break)
      4. Start a session
      4. Validate an order
      
      Error: The header of the receipt is incorrect, line breaks are not
      applied
      
      OPW-2528558
      66c695b2
  24. Jun 11, 2021
    • Borni DHIFI's avatar
      [FIX] mrp: Fix compute field allowed_operation_ids in stock move · 1f9e0325
      Borni DHIFI authored
            Fix the  error 'Expected singleton for company' when user try to open MO ( user have many companies selected)
      
      closes odoo/odoo#72013
      
      Signed-off-by: default avatarRémy Voet <ryv-odoo@users.noreply.github.com>
      1f9e0325
    • Alvaro Fuentes's avatar
      [FIX] sale_timesheet: fix _compute_warning_employee_rate · 71c3897a
      Alvaro Fuentes authored
      On account analytic lines, employee_id can be null.
      https://github.com/odoo/odoo/blob/c63af09774414a004ef34644b4f38b4fdb1d12bd/addons/hr_timesheet/models/hr_timesheet.py#L48
      
      
      
      ```
      Traceback (most recent call last):
        File "/tmp/tmpowipzc_d/migrations/base/tests/test_mock_crawl.py", line 155, in crawl_menu
          self.mock_action(action_vals)
        File "/tmp/tmpowipzc_d/migrations/base/tests/test_mock_crawl.py", line 245, in mock_action
          mock_method(model, view, fields_list, domain, group_by)
        File "/tmp/tmpowipzc_d/migrations/base/tests/test_mock_crawl.py", line 335, in mock_view_kanban
          self.mock_web_search_read(model, view, [domain], fields_list)
        File "/tmp/tmpowipzc_d/migrations/base/tests/test_mock_crawl.py", line 394, in mock_web_search_read
          data = model.search_read(domain=domain, fields=fields_list, limit=80)
        File "/home/odoo/src/odoo/14.0/odoo/models.py", line 4839, in search_read
          result = records.read(fields)
        File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3020, in read
          return self._read_format(fnames=fields, load=load)
        File "/home/odoo/src/odoo/14.0/odoo/models.py", line 3040, in _read_format
          vals[name] = convert(record[name], record, use_name_get)
        File "/home/odoo/src/odoo/14.0/odoo/models.py", line 5666, in __getitem__
          return self._fields[key].__get__(self, type(self))
        File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 1019, in __get__
          self.compute_value(recs)
        File "/home/odoo/src/odoo/14.0/odoo/fields.py", line 1175, in compute_value
          records._compute_field_value(self)
        File "/home/odoo/src/odoo/14.0/addons/mail/models/mail_thread.py", line 410, in _compute_field_value
          return super()._compute_field_value(field)
        File "/home/odoo/src/odoo/14.0/odoo/models.py", line 4061, in _compute_field_value
          getattr(self, field.compute)()
        File "/home/odoo/src/odoo/14.0/addons/sale_timesheet/models/project.py", line 90, in _compute_warning_employee_rate
          dict_project_employee[line['project_id'][0]] += [line['employee_id'][0]]
      TypeError: 'bool' object is not subscriptable
      ```
      
      ```
      ❯ psql test_14 -c '\d account_analytic_line' | grep employee_id
       employee_id            | integer                     |           |          |
          "account_analytic_line_employee_id_fkey" FOREIGN KEY (employee_id) REFERENCES hr_employee(id) ON DELETE SET NULL
      ```
      
      Observed on upgrade request 16289
      opw-2525553
      
      Steps to reproduce on runbot (or local db with -i sale_timesheet and
      deoma data)
      1. Select Project > Office Design
      2. Change project settings:
        Settings tab > Billable=True
        Invoicing tab > Invoice Tasks to=A unique customer
                      > Pricing=Employee rate
      3. Save
      4. Delete Employees > Eli Lambert
      5. Open Project main menu -> Traceback
      
      closes odoo/odoo#71970
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      71c3897a
  25. Jun 04, 2021
  26. Jun 10, 2021
  27. Jun 07, 2021
Loading