Skip to content
Snippets Groups Projects
  1. Jan 28, 2019
    • Lucas Perais (lpe)'s avatar
      [FIX] account: tax in right refund account · 7ab26999
      Lucas Perais (lpe) authored
      Have a tax that has a different account for refunds
      make an invoice and its refund
      
      Before this commit, the refund's tax is still in the old account
      
      After this commit, the refund's tax is in the account for refund defined on the tax
      
      OPW 1907950
      
      closes odoo/odoo#30325
      7ab26999
    • Nicolas Martinelli's avatar
      [FIX] pos_discount: error if misconfigured product · 93a767a6
      Nicolas Martinelli authored
      In case the discount product is misconfigured and therefore not loaded
      by the POS, a traceback appears when applying a discount.
      
      Add a comprehensive error message instead.
      
      Closes #30574
      opw-817527
      
      closes odoo/odoo#30582
      93a767a6
  2. Jan 21, 2019
  3. Jan 23, 2019
  4. Jan 24, 2019
  5. Jan 14, 2019
    • Adrian Torres's avatar
      [FIX] ir_model: add constraint on domain field · f3de712d
      Adrian Torres authored
      Previous to this commit, if one were to create an ir.model.field with a
      poorly constructed domain (read: SyntaxError), the server would properly
      send an error message stating that an Error occurred, however this would
      be too late as the registry with the bad code would have already been
      reloaded, this meant that the registry would be left in an unstable
      state (read: crashed).
      
      With this commit, a constraint on the domain is added so that we confirm
      that the code in the domain field is properly constructed, thus no need
      to reload the registry and therefore no crash.
      
      closes odoo/odoo#30157
      f3de712d
  6. Jan 23, 2019
  7. Jan 15, 2019
    • Denis Ledoux's avatar
      [FIX] ir_ui_view: do not change view mode when just changing the inherit · a4096276
      Denis Ledoux authored
      Some views have the primary mode while having an inherit_id view
      In such views, if the user wants to change the inherit_id,
      the mode must remain primary.
      
      The use case behind this is a user who want to change
      the inherit_id view of the view
      product.product.form (product.product_normal_form_view)
      to another view.
      This view is in primary mode while having an inherit_id
      (product.product_template_form_view).
      In such a case, the primary mode must remain,
      otherwise the view will no longer be opened by default
      when opening a product.
      Indeed, when searching the default form view of a model,
      it only searches for primary mode views for this model.
      
      The `all` is there because this is an `api.multi` method.
      We could consider adding a `self.ensure_one`,
      but it breaks the API if someones calls this method with multiple records.
      This is likely to happen, as this method is used
      in `write` which is likely to be called with multiple records.
      
      In my opinion, in master, this should be replaced by an
      onchange so the user can see the change of mode
      when he adds or remove an inherit_id for a view.
      
      opw-1916324
      
      closes odoo/odoo#30241
      a4096276
  8. Jan 22, 2019
  9. Jan 18, 2019
  10. Jan 14, 2019
  11. Jan 17, 2019
    • wan's avatar
      [FIX] account: journal dashboard graph wrong value · 50bae1c0
      wan authored
      OPW 1918926
      
      Current behavior:
        The sql query groups by date,id in a intermediary table instead of the result. This allows to get data in the wrong order if the statements were not produced sequentially. The fill values are computed in the wrong order and may override correct values.
      
      Desired behavior:
        There is no override of the values correctly computed.
      
      closes odoo/odoo#29936
      50bae1c0
    • Lucas Perais (lpe)'s avatar
      [FIX] base: merge contacts linked to by an o2m field with caps · ba39efdf
      Lucas Perais (lpe) authored
      Define a field on a model as:
      - o2m to res.partner
      - the field's column, hence its name, has capital letters in it
      (studio does that)
      
      create two objects of that class, each one linked to a different partner with the new o2m
      
      merge the partners
      
      Before this commit, the object linked to the second partner, was deleted
      This was because merge partner sql requests did not quote the column name
      
      After this commit, the second object still exists
      
      This commit is tested in v12.0 with PR #30300 only. In v10.0 it is not testable as
      the model concerned is in CRM, and that no new fields in business modules can be added in stable
      
      OPW 1925060
      
      closes odoo/odoo#30301
      ba39efdf
  12. Jan 15, 2019
    • Julien (juc) Castiaux's avatar
      [FIX] mail: URL with semi-colon · 357b374a
      Julien (juc) Castiaux authored
      When posting a URL containing a semicolon, odoo stops the link
      before the semicolon instead of continuing the link to the end
      although it is a valid characters in URL (see RFC-3986)
      
      e.g. the url "example.com&foo;bar" matches "example.com&foo"
           instead of the whole link
      
      opw-1918367
      
      closes odoo/odoo#30198
      357b374a
  13. Jan 16, 2019
    • Nicolas Martinelli's avatar
      [FIX] product: unwanted attribute values in name · 180ace7b
      Nicolas Martinelli authored
      - Create the following attributes with values:
        Size: S, M, L, XL
        Color: Black, White
      - Create a product template with the following attribute values:
        Size: S, M, L, XL
        Color: Black
      
      The `name_get` of `product.product` returns `Name (SIZE, Black)` while
      it should only return `Name (SIZE)`.
      
      When using `attribute_id.value_ids`, the list of values contains all
      possible values of the attribute, not only the values which apply to the
      given product. In this case, it contains 'Black' and 'White', therefore
      the condition `> 1` is verified and the attribute is kept for display.
      
      We go back to the original filtering, and add `attribute_line_ids` in
      the list fields read in order to avoid prefetching.
      
      opw-1922140
      opw-1922447
      
      closes odoo/odoo#30273
      180ace7b
    • Joren Van Onder's avatar
      [FIX] point_of_sale: allow refunds on non-cash journals · 302d8a52
      Joren Van Onder authored
      Cherry pick of 5b769650 in version 11.0
      
      A customer can pay an order with a non-cash journal (e.g. a credit
      card through a stand-alone terminal).
      
      When this order has to be refunded later it should be possible to do
      so on that same journal.
      
      Some code prevented this from happening, notably a check in
      order_is_valid which explicitly prevented this for an unknown
      reason. There is no explanation in the
      commit (4647f896) introducing that.
      
      This commit allows the following:
      
      1. input what you want to refund with a negative qty
      2. click 'Payment'
      3. click the Credit Card (type Bank) journal
      4. (amount is auto-populated)
      5. click 'Validate'
      
      opw-805302
      opw-1913731
      
      closes odoo/odoo#30218
      302d8a52
    • Nicolas Martinelli's avatar
      [FIX] account: bank statement with many AML · 614babd1
      Nicolas Martinelli authored
      - Create a bank statement with more than 80 lines (therefore more than
        80 AML)
      - Reconcile the lines
      - Go back to the bank statement, and try to add a new line
      
      An error arise:
      "You cannot do this modification on a posted journal entry, you can just
      change some non legal fields"
      
      The error arise on the `move_line_ids` field on which the web client
      tries to write.
      
      Actually, this field is hidden since it is only used in the domain of a
      stat button. We can make it read-only.
      
      opw-1921138
      
      closes odoo/odoo#30266
      614babd1
    • Iryna Vyshnevska's avatar
      [CLA] signature for ivyshnevska · 92e4c4c3
      Iryna Vyshnevska authored
      Backport to 10.0 of 3b14a7da
      
      closes odoo/odoo#30090
      92e4c4c3
    • Manuel Vázquez Acosta's avatar
      [FIX] survey: don't disclose the survey via print · 6ac32c65
      Manuel Vázquez Acosta authored
      To avoid bigger changes, only verify if the login is required.
      A proper refactoring has been implemented in master at 9771fdfe
      
      Closes odoo/odoo#30166
      6ac32c65
  14. Jan 14, 2019
  15. Jan 02, 2019
    • Denis Vermylen's avatar
      [FIX] purchase: loading time on partners with many children · e1767490
      Denis Vermylen authored
      When loading a partner form view, the ORM prefetches the computed fields
      purchase_order_count and supplier_invoice_count for all the related
      partners as well (parent, children, ..).
      
      Instead of reading the orders and invoices once per partner, we group
      them all together.
      
      opw 1919933
      
      closes odoo/odoo#29788
      e1767490
  16. Jan 11, 2019
    • Raphael Collet's avatar
      [FIX] models: make prefetching more specific in read() · 1b434ed8
      Raphael Collet authored
      Commit a07a076c restricts the prefetching to
      `self` when accessing the fields to return.  This is too restrictive, as it
      cancels prefetching of secondary records in computed fields.  In this commit we
      limit the scope of the restriction to `self`'s model only; this fixes the
      original issue without impacting other models.
      
      closes odoo/odoo#30133
      1b434ed8
  17. Jan 10, 2019
  18. Jan 08, 2019
    • Jorge Pinna Puissant's avatar
      [FIX] account: error in Base amount tax · b1316589
      Jorge Pinna Puissant authored
      opw-1917605
      
      Before this commit, when accounting is set to global rounding, the base
      amount per tax is not correctly calculated.
      
      Now, the Base amount per tax is calculated adding the rounded lines.
      
      To test this issue, you need to set to global rounding and create a
      customer invoice with the following lines :
      line 1 = Qty:40; unit price:2.27; tax:15%; discount: 10%
      line 2 = Qty:21; unit price:2.77; tax:15%; discount: 10%
      line 3 = Qty:21; unit price:2.77; tax:15%; discount: 10%
      
      When the invoce is printed, you would notice that the amount is 186.43
      and it should be 186.42.
      
      closes odoo/odoo#30021
      b1316589
  19. Jan 07, 2019
  20. Jan 04, 2019
  21. Jan 03, 2019
    • Raphael Collet's avatar
      [FIX] models: avoid prefetch hell when reading fields · a07a076c
      Raphael Collet authored
      The method `read()` may be very slow when reading relational fields and
      computed fields, because the computed fields can be computed on a recordset
      that is larger than expected.
      
      The issue occurs on model 'res.partner' when reading fields 'child_ids' and
      'purchase_order_count', for instance.  Suppose we read those two fields on a
      partner with 1000 contacts.  First, the one2many field is read from the
      database and stored to the cache; the latter adds the value ids to the
      prefetching of 'res.partner'.  Then, the fields are fetched from the cache.
      When 'purchase_order_count' is accessed on the partner, the field is computed
      on all its children as well...
      
      closes odoo/odoo#29867
      a07a076c
  22. Dec 18, 2018
    • wan's avatar
      [ADD] l10n_nl: tax codes for 9% · 9ef78025
      wan authored
      closes issue #29352
      The Dutch taxes will change the low tax 6% to 9% on 01/01/2019. Please add these tax code in the system and also change the affected fiscal positions. Both 6% and 9% needs to exist during the transition period.
      
      closes odoo/odoo#29374
      9ef78025
  23. Jan 01, 2019
  24. Dec 21, 2018
  25. Dec 19, 2018
    • David Tran's avatar
      [IMP] base: Vietnam Dong should have 1.00 as rounding. · 6bf8b25b
      David Tran authored
      No decimal part in Vietnam Dong (đ - Việt Nam Đồng)
      
      closes odoo/odoo#29650
      6bf8b25b
    • Denis Ledoux's avatar
      [IMP] product: name_get, use mapped to gain some memory · 5856dab3
      Denis Ledoux authored
      This revision is related to
      12df3c6a
      
      The above revision serve its purpose as well,
      but by avoiding to store the result in a variable,
      and using the records cache instead,
      we gain some memory, which is noticeable
      when there are hundred of thousands products.
      
      The sudo() is important, as it must be the
      same environment then the above call to read
      to use the same cache.
      Otherwise the values won't be in the cache
      of self (without sudo),
      and it will go get it and prefetch other fields
      in the database.
      5856dab3
    • Denis Ledoux's avatar
      [FIX] product: name_get, products can share the same template · 12df3c6a
      Denis Ledoux authored
      Oversight in revision
      a91ffcf1
      
      Multiple products can have the same template.
      
      Passing multiple times the same template id
      to the search domain to get the sellers
      works, but better avoid the repetition
      for the performances.
      12df3c6a
Loading