Skip to content
Snippets Groups Projects
  1. Jan 04, 2019
  2. 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
  3. 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
  4. Jan 01, 2019
  5. Dec 21, 2018
  6. 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
  7. Dec 17, 2018
    • Denis Ledoux's avatar
      [IMP] product: product & template name_get performance · a91ffcf1
      Denis Ledoux authored
      By prefetching only the fields required for the `name_get`
      
      `product.product` & `product.template`
      have a huge number of fields,
      and prefetching them just to compute
      the name is overkill.
      
      Especially, as the browse was done using
      sudo, the prefetch was a bit useless as
      it was stored in the sudo user cache,
      which was most-likely not used afterwards
      by the callee of name_get
      
      For a database with 50.000 products,
      this reduce the processing time
      by 15 (from 60 seconds to 4 seconds measured)
      a91ffcf1
  8. Dec 13, 2018
    • Nicolas Martinelli's avatar
      [FIX] account: missing translation · 8373bafb
      Nicolas Martinelli authored
      - Install a second language, e.g. French
      - Set Parter A language to French
      - Create an invoice for A with a date due in the past
      - On the partner form view, print the 'Due Payments'
      
      The body of the letter is not translated in French.
      
      Something quite weird appears:
      - The corresponding string is exported in the `stock` module
      - It is linked to the demo data `stock.res_company_1`, which corresponds
        to 'My Company, Chicago'.
      
      Therefore, the translation cannot be found by the corresponding query
      generated in `_generate_translated_field` and `_read_from_database`:
      ```
      SELECT "res_company"."id" as "id",COALESCE("res_company__overdue_msg"."value", "res_company"."overdue_msg") as "overdue_msg" FROM "res_company" LEFT JOIN
                      (SELECT DISTINCT ON (res_id) res_id, value
                       FROM "ir_translation"
                       WHERE name='res.company,overdue_msg' AND lang='fr_BE' AND value!=''
                       ORDER BY res_id, id DESC)
                   as "res_company__overdue_msg" ON ("res_company"."id" = "res_company__overdue_msg"."res_id")
                              WHERE "res_company".id = 1  ORDER BY "res_company"."sequence" ,"res_company"."name"
      ```
      
      Indeed, `res_company.id` is 1, while `res_company__overdue_msg.res_id`
      is 3.
      
      The root cause has been solved in v11, to we only export the necessary
      term.
      
      opw-1908337
      
      closes odoo/odoo#29525
      8373bafb
  9. Dec 11, 2018
  10. Dec 07, 2018
    • Raphael Collet's avatar
      [FIX] mail: wrong many2many definition · 54238c88
      Raphael Collet authored
      The definition of `attachment_ids` on model `email_template.preview` is wrong,
      because its table/columns refer to the model `mail.template`.  As the field is
      only used to preview a result in a wizard form, it does not need to be stored.
      
      closes odoo/odoo#29349
      54238c88
  11. Dec 10, 2018
  12. Dec 04, 2018
    • Jairo Llopis's avatar
      [FIX] auth_ldap: Avoid sending email for newly created user · 81c26383
      Jairo Llopis authored
      If installed along with `auth_signup`, it sends an email when creating a missing user authenticated through LDAP.
      
      It is a confusing message that makes no sense, because the user is, from his POV, not actually creating a new user, but just authenticating with a new app with his known company-wide credentials.
      
      Besides, that invitation leads the user to change his password in Odoo, although he probably doesn't want to do that and have a password for Odoo and another in the LDAP server.
      
      The best option is to disable that email completely, which is what this commit does.
      
      closes odoo/odoo#29243
      81c26383
  13. Dec 05, 2018
  14. Nov 21, 2018
    • Gert Pellin's avatar
      [FIX] point_of_sale: traceback on printing android · 4629a4fb
      Gert Pellin authored
      Firefox for android gives atraceback when clicking the print receipt
      button. This traceback is caused becaus Firefox for Android does not
      support printing.
      
      This fix replaces the traceback by an explanation why it is not possible
      to print.
      
      Also  backport for safari-fix
      
      closes odoo/odoo#28919
      4629a4fb
  15. Dec 04, 2018
  16. Nov 30, 2018
    • Nicolas Martinelli's avatar
      [FIX] website_sale: price difference · e9bc13fc
      Nicolas Martinelli authored
      - Create a product A with a sales price of 40
      - Create a pricelist where product A costs a fixed price of 100
      - Assign this pricelist to a customer
      - Connect as the customer on the eCommerce
      
      On the eCommerce, the price for A is displayed as: ~~40~~ 100.
      
      We only display a price difference if the pricelist price is smaller
      than the sales price.
      
      opw-1885443
      
      closes odoo/odoo#29141
      e9bc13fc
  17. Dec 01, 2018
  18. Nov 30, 2018
    • Nicolas Martinelli's avatar
      [FIX] report_intrastat: product weight · ae4a4cf0
      Nicolas Martinelli authored
      - Create a product with 2 variants A & B
      - Set a weight on the variants (btw, the weight field is not available
        on the template in this case)
      - Create an invoice for A, validate
      
      On the intrastat report, the weight remains 0.0.
      
      The report clearly takes into account the weight of the template, not of
      the variant. We use the product weight, and fall back on the template
      weight.
      
      opw-1913305
      
      closes odoo/odoo#29178
      ae4a4cf0
  19. Nov 29, 2018
  20. Nov 27, 2018
  21. Nov 03, 2018
  22. Nov 02, 2018
  23. Nov 27, 2018
  24. Nov 26, 2018
  25. Nov 21, 2018
    • Denis Ledoux's avatar
      [FIX] report: support for wkhtmltopdf 0.12.5 · af476c69
      Denis Ledoux authored
      This revision brings the compatibility for our reports
      using wkhtmltopdf 0.12.5.
      
      Up to now,
      the supported wkhtmltopdf version was 0.12.1.
      
      The goal of this revision is to add the compatibility
      to wkhtmltopdf 0.12.5,
      while keeping the same exact rendering than in 0.12.1.
      
      There is a behavior change with the `--dpi` parameter,
      which no longer has a "zoom" level effect as it did with 0.12.1.
      
      To deal with it, we pass the `--zoom` parameter when
      the detected version installed of wkhtmltopdf is after 0.12.2,
      with a ratio 96:dpi. 96 being the default dpi of wkhtmltopdf.
      
      This trick allows to render the reports with the exact same
      zoom level, whatever the dpi value configured in the reports paperformat.
      (at least with dpi values up to 149, after 150, included,
      the dpi parameter with wkhtmltopdf 0.12.1 as a weird behavior,
      it no longer zoom out)
      
      opw-1907346
      
      closes odoo/odoo#28864
      af476c69
    • Nicolas Lempereur's avatar
      [FIX] purchase: es_AR translation typo · 1f8788de
      Nicolas Lempereur authored
      Fixing it directly by commit since there is no es_AR on transifex.
      
      The issue of the ticket has been solved by transifex, this is for
      another similar issue that has been found.
      
      opw-1907924
      closes #28923
      1f8788de
    • Denis Roussel's avatar
      [FIX] mrp: Allow mrp user to delete stock_move_lot links · e81809b8
      Denis Roussel authored
      With an mrp user, add lots lines to mrp production order moves. Then,
      try to delete one line, the dustbin icon does not appear.
      
      opw-1908930
      e81809b8
    • Denis Roussel's avatar
      [FIX] mrp: User with no products write access cannot create production order · 8a6162d0
      Denis Roussel authored
      As the product_tmpl_id field is related one but not readonly, the creation
      of production order triggers a write on product.product model
      8a6162d0
  26. Nov 15, 2018
  27. Nov 14, 2018
Loading