Skip to content
Snippets Groups Projects
  1. Jun 07, 2016
  2. Jun 06, 2016
  3. Jun 05, 2016
  4. Jun 03, 2016
  5. Jun 02, 2016
    • Olivier Dony's avatar
      [FIX] res.partner: performance of name_get() · af1a8758
      Olivier Dony authored
      Rev. 93e9a4dc tried to speed up
      the 9.0 name_get() of res.partner by only calling fields_get()
      once for the whole name_get, instead of calling it lazily.
      
      This may have worked for name_get calls on multiple unnamed
      addresses (name is NULL), but this is a rare occurrence
      in practice - while now every single name_get() call would
      incur the full cost of the fields_get() call.
      
      That fields_get() call is O(n) in the number of fields,
      and there can be quite a few for res.partner.
      Calling it only for the specific 'type' field can easily be
      about 40x faster than without it.
      
      And since name_get() is called for each Many2One field
      of each record being read (due to convert_to_read()), reading
      a batch of records with partner fields had become quite
      a bit slower!
      
      Avoiding this cost entirely with lazy fields_get() calls
      saves quite a lot of time for the common cases. And now
      that fields_get() specifies a single field, it is cheap
      enough to be called within the loop.
      
      Non-scientific benchmark: account.invoice.search_read() in
      the list view of invoices took 500ms for 25 invoices
      _before_ this fix, and 90ms after!
      af1a8758
    • Xudong Yang's avatar
      [FIX] base_import: t-if does not work with t-jquery · f558c049
      Xudong Yang authored
      Not evaluated, move the condition to the button
      Closes #12230
      f558c049
    • Jairo Llopis's avatar
      [FIX] doc: declaration of computed fields · f94f570b
      Jairo Llopis authored
      Cannot link a method before declaring it.
      
      Closes #12057
      f94f570b
    • Laurent Bélorgey's avatar
      [CLA] signature for lbelorgey · 149b8fe2
      Laurent Bélorgey authored
      Closes #11226
      149b8fe2
    • Adrien Peiffer (ACSONE)'s avatar
    • Martin Trigaux's avatar
      [FIX] website_forum: convert content of posted comment to plaintext · 30f06fd3
      Martin Trigaux authored
      HTML content should be escaped before being sanitized. Any content (link, image,
      code,...) that is acceptable in usual mail.message but should not be interprated
      when posted on a comment of the forum.
      
      Fixes #3737
      30f06fd3
    • Denis Ledoux's avatar
      [FIX] website_sale: `State` select readonly in shipping info · c751c129
      Denis Ledoux authored
      If we take the below facts:
       - The country select is set as disabled
         when Shipping is set to "Ship to the same address"
       - The disable property of select inputs is
         removed when shipping is set to
         `create a new address`:
         In `website_sale.js`:
         ```
         $selects.attr("disabled", value <= 0 ? null : "disabled" ).prop("disabled", value <= 0 ? null : "disabled" );
         ```
      
      We can safely assume that the select input "State / Province" was supposed
      to be set as `disabled` in the first place, not as `readonly`
      
      Before this revision, State / Provice was greyed when choosing
      "Create a new address" for shipping, and selecting the United States
      (but the select input was still usable, though, it was just greyed)
      
      opw-675739
      c751c129
    • Nicolas Martinelli's avatar
      [FIX] product_extended: traceback on `bom_count` · 543f75f4
      Nicolas Martinelli authored
      The field `bom_count` is added in the view for group `group_mrp_user`.
      Therefore when extending the view, we should make sure to restrict the
      access as well.
      
      opw-679172
      543f75f4
    • Christophe Simonis's avatar
    • Quentin De Paoli's avatar
      [FIX] account: invoice analysis report fixed. · 649b289f
      Quentin De Paoli authored
      * price_average is now always positive regardless of the invoice type, because it's an average and there's no point in summing those values
      * price_total is now computed by using ABS() because of a migration bug of price_subtotal_signed introduced in saas-6, where in_invoice and in_refund invoices were set with a negative value while on the help tooltip it was saying that in/out refunds are negative and in/out invoices are positive. That bug was only revealed in v9 -since saas-6 wasn't using that field at all-, with the effect of having wrong values in report for migrated databases. This workaround using ABS() will be removed in a further version with a migration script to fix people's databases.
      * residual field is now negative for in_invoices and out_refunds.
      * These 2 points ensure that we can group by invoice type and sum the price_total or the residual fields to get the gross income of a month for example.
      649b289f
    • Christophe Simonis's avatar
    • Denis Ledoux's avatar
      [FIX] mrp: inventory value of produced items · 473d2ab9
      Denis Ledoux authored
      Since the revision bc23c92c,
      the inventory value of the produced items could
      be doubled, because the list
      `total_consume_moves` could contain several time
      the same move ids, e.g. when it was added by
      `total_consume_moves.append(raw_material_line.id)`
      and
      `total_consume_moves += already_consumed_lines.ids`
      
      The list is replaced by a set to ensure a same move
      cannot be counted twice.
      
      opw-678727
      473d2ab9
    • Martin Trigaux's avatar
      [FIX] subscription: avoid trying to access to subscriptions without cron · 440c5d6e
      Martin Trigaux authored
      The cron may no longer be present (e.g. deleted) and the subscribtion would be
      blocked in running state.
      
      Fixes #12207
      440c5d6e
    • Christophe Simonis's avatar
    • Jairo Llopis's avatar
      [FIX] mass_mailing: filter emails to avoid duplicates · 57e5d703
      Jairo Llopis authored
      When subscribing a user to a mailing list, the `mail.mass_mailing.contact`
      created is processed to identify it's name and email from the address (method
      `get_name_email` called in `add_to_list` and `name_create`).
      For a better consistency, the search of existing contacts should also be done
      using the method `get_name_email`.
      
      This avoids that subscribing twice `Example <example@example.com>` fails to
      detect duplicates and creates two subscriptions.
      
      Closes #12265
      57e5d703
    • Raphael Collet's avatar
    • Joren Van Onder's avatar
      50eb591b
    • Goffin Simon's avatar
      [FIX] account : _prepare_reconciliation_move_line · a0b91864
      Goffin Simon authored
      When computing the amount_currency, the ratio is 1.0 if the difference
      between amount(computed like this -sum([x.balance for x in move.line_ids]))
      and the amount set in the statement is not greater than the currency rounding.
      opw:678588
      a0b91864
Loading