Skip to content
Snippets Groups Projects
  1. 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
    • 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
    • Olivier Dony's avatar
      [FIX] ir.translation: avoid duplicating translations · 011ce1e8
      Olivier Dony authored
      Rev. 253437f8 meant to
      avoid the creation of duplicate entries during translation
      import, caused by existing translations created with an
      empty `module` field.
      
      But the fix was over-zealous and caused an extra side-effect:
      the creation of missing translations (the blue flag icon)
      now creates duplicate translations if other translations
      exist with different `module` values.
      (This could happen because translations are provided by
      several modules, or due to manual translation entries with
      no module value, etc.)
      011ce1e8
    • Lorenzo Battistini's avatar
      [FIX] account: avoid deleting taxes when they are linked to move lines · 58cb0bcb
      Lorenzo Battistini authored
      Equivalent of 8c337f97
      but for account.move.line as well.
      
      Closes #11883
      58cb0bcb
  2. Jun 01, 2016
  3. May 31, 2016
  4. May 30, 2016
    • Joren Van Onder's avatar
      [FIX] account_asset: don't recompute depreciation board on state change · fe511f18
      Joren Van Onder authored
      When a user goes through the trouble of manually modifying the
      depreciation lines he will lose all his work when clicking on 'reset to
      draft'. Furthermore, if he then goes through the trouble of repairing
      the problem by once again manually changing the depreciation lines he
      will again lose his work when pressing confirm.
      
      opw-678678
      fe511f18
    • Goffin Simon's avatar
      [FIX] sale: Warning when Create invoice from SO · d5e478d4
      Goffin Simon authored
      Used case:
      Create a SO with invoicing policy based on delivery. Don't deliver
      anything and Create invoice for all invoiceable lines.
      Result:
      There was no invoice created and no warning message.
      After the fix:
      A warning message is raised when after clicking "Create
      invoice",for any reason it doesn't create an invoice.
      
      opw:678567
      d5e478d4
    • Ronald Portier's avatar
      [FIX] crm,gamification: flexible reference to field · d73648fe
      Ronald Portier authored
      The field generation is most of the time following the pattern
      `field_<table name>_<field name>`
      but in case of name clash (e.g. res.partner.category - id and res.partner -
      category_id), the id of ir.model.field is added at the end of the external id
      during the field creation.
      
      The more flexible way to link to an ir.model.field is to use the syntax
      `search=[('model', '=', <model>), ('name', '=', <field name>)]`
      to avoid errors as in #12192 when the "first" external id no longer exists.
      
      Fixes #12192
      Closes #12198
      d73648fe
    • Goffin Simon's avatar
      [FIX] account: correct message for lock dates · 89c35b8c
      Goffin Simon authored
      The sentence concerning the adviser should not be raised if the user is an adviser role.
      
      opw:678458
      89c35b8c
Loading