Skip to content
Snippets Groups Projects
  1. Feb 14, 2016
  2. Feb 09, 2016
    • Joren Van Onder's avatar
      [FIX] point_of_sale: make POSBox print only one ticket when losing wifi · cdf21ebe
      Joren Van Onder authored
      The POSBox attempts to maintain whatever Wi-Fi connection it has as best
      it can. When it loses it's current Wi-Fi connection it will attempt
      to recreate it every 30 seconds. This works well, but a side-effect of
      this is that it'll also print a 'Could not connect to LAN' ticket every
      time it fails. If you where to leave the POSBox with Wi-Fi on for an
      extended period of time you could return to a lot of 'Could not connect
      to LAN' tickets.
      
      This makes it so that the 'Could not connect to LAN' ticket only gets
      printed once upon connection loss. Although it would be simpler to just
      not print this ticket at all when losing connection, it is very useful
      to know when the POSBox has lost connection. Otherwise when it loses
      connection it would stop working and noone would know why.
      cdf21ebe
    • Denis Ledoux's avatar
      [FIX] marketing_campaign: pass context as kwargs in overriden `search` · 3266d433
      Denis Ledoux authored
      When converting a new API call to an old API call,
      the context is expected to be found within the kwargs
      argument. If not, it is seen as a regular argument.
      
      See `get_context_split` in `openerp/api.py`
      
      As it was not the case in the overidden method
      `search` in `marketing_campaign.py`, if a module
      overriden the method `search` of
      `ir.actions.report.xml` using the new API, the
      context wasn't treated as such correctly, and it leaded
      to wrong number of arguments passed.
      
      I take the opportunity to pass all arguments
      that are passed as kwargs in the base `search`
      as kwargs as well, to be clean.
      
      opw-668471
      3266d433
    • Raphael Collet's avatar
      [FIX] addons: fix usage of decorators `api.v7`/`api.v8` · 5763c32a
      Raphael Collet authored
      Specifically, when one API implementation calls the other one, it has to call
      the method *from the same class*.  Otherwise, overriding the method may result
      in an infinite recursion.  Consider:
      
          class A(Model):
              _name = 'stuff'
      
              @api.v8
              def foo(self):
                  return 42
      
              @api.v7
              def foo(self, cr, uid, context=None):
                  return self.browse(cr, uid, [], context).foo()
      
          class B(Model):
              _inherit = 'stuff'
      
              def foo(self, cr, uid, context=None):
                  return super(B, self).foo(cr, uid, context=context) + 1
      
      and now call: `env['stuff'].foo()`.  This invokes `B.foo` (new-API), which
      calls `B.foo` (old-API), which calls `A.foo` (old-API), which calls `B.foo`
      (new-API) instead of `A.foo`!
      
      This issue would not be present if old-API `A.foo` was defined as:
      
              @api.v7
              def foo(self, cr, uid, context=None):
                  return A.foo(self.browse(cr, uid, [], context))
      5763c32a
    • Laurent Mignon's avatar
      [FIX] models: use `column._symbol_c` as placeholder for the column value · d82e489a
      Laurent Mignon authored
      When generating SQL queries, `column._symbol_c` must be used as placeholder as
      for the method 'set' of the column itself.  Otherwise it is not possible to
      define specialized columns.
      d82e489a
  3. Feb 08, 2016
  4. Feb 07, 2016
  5. Feb 05, 2016
  6. Feb 04, 2016
    • Cédric Snauwaert's avatar
      [FIX] expression: fix search for o2m with non existing id · 4de3f4c4
      Cédric Snauwaert authored
      The result of searching on a o2m field for a missing ID was
      the whole set of records which do not have any lines in the
      o2m fields. This is definitely not the desired behavior,
      and could lead to disatrous performance, because the
      returned set could be extremely large.
      
      One example of such behavior is for recomputing fields
      in the env cache in 8.0+. When a o2m line gets deleted,
      it triggers the recompute of any dependent fields.
      
      In order to locate the records to recompute, the ORM
      searches for the 'parent' records in the comodel table.
      When this operation is done by 2 users concurrently
      the o2m line may not exist anymore, and the bug
      is triggered: dependent fields are recomputed on a possibly
      very large set of records that did not need any recompute!
      4de3f4c4
    • Antonio Espinosa's avatar
      [FIX] membership: remove membership line when deleting invoice · d036e3be
      Antonio Espinosa authored
      Apply the same behaviour as the unlink done on account.invoice.line.
      This should properly be implemented with a ondelete=cascade but this is not
      possible in stable version as it requires an update.
      d036e3be
    • Raphael Collet's avatar
    • Raphael Collet's avatar
      [FIX] fields: make `copy_cache` use a todo list instead of recursion · 0f2e7d78
      Raphael Collet authored
      The recursion was based on an incorrect assumption: the cache of the target
      environment is initially empty.  If another computation left some value there,
      the copying is incomplete, and that causes bugs in onchanges.
      0f2e7d78
  7. Feb 03, 2016
  8. Feb 02, 2016
  9. Feb 01, 2016
    • Raphael Collet's avatar
    • Goffin Simon's avatar
      [FIX] models: `MissingError` when writing on recordset with duplicates · 08b28611
      Goffin Simon authored
      When writing on a recordset with duplicates, the ORM raises a `MissingError`
      because the rowcount gives a difference with the injected ids.  The fix simply
      eliminates duplicates from ids.
      08b28611
    • Martin Trigaux's avatar
      [FIX] tools: do not generate translations for exported records · a46f8bb9
      Martin Trigaux authored
      When a record is exported, an external ID, in the form of __export__.<model>_<id>
      is created on this record.
      
      When the translations are generated (e.g. "synchronise terms" wizard), the
      translations may be duplicated for records that have been exported. If a
      translation is submitted before the export (when the record had no external ID
      yet), a new empty translation is created as the module differs in the import.
      
      Creating a new translation may be a problem as the new term (equal to the source
      term) will be used as the translation value.
      
      Fixes 9480
      a46f8bb9
    • Goffin Simon's avatar
      [FIX] sale_margin: Cost price in a SO line · 9481ee5c
      Goffin Simon authored
      The margin in a SO line is the difference between the price unit and
      the cost price of this SO line. In function "_product_margin" in model
      "sale.order.line", the cost price is equal to the purchase_price or
      the standard_price of the product. Then the cost price in the SO line
      must be set with the same value when creating SO line linked to the delivery.
      
      opw:668090
      9481ee5c
    • Denis Ledoux's avatar
      [FIX] account: bank statement lines indeterminist order · 2083c166
      Denis Ledoux authored
      The order of a bank statement lines is entirely done on the sequence:
      `_order = "statement_id desc, sequence"`
      
      The `create` method of `accounT.bank.statement` is overriden
      to handle the sequences of each line.
      
      The `write` method as well, except that the set of the sequences
      lines is done after the call to `super`. So, if you add
      several new lines to a bank statement, the order of the line
      you just added can be different before and after save,
      as the sequence of these new lines are not set before
      actually writting them on the bank statement.
      
      The widget `handle` serves this sequencing purpose. The
      fact it isn't used here is most-likely because
      it did not exist at the time this was designed.
      
      Besides, this gives the possibility to the user
      to add a new line and re-order it where he wants.
      For instance, when manually entering a bank statement,
      a user could skip unintentionally a line. If he would
      like to add it at the right place, before this revision,
      he would have to delete all the lines coming
      after the line he skipped. Now, he can add
      it at the end, and re-order it where he wants.
      
      What is done in the overriden `create` and `write`
      is now useless, but we left it for retro-compatibility
      purposes, for databases updating their sources without
      updating their views.
      
      opw-667541
      2083c166
    • Odoo Translation Bot's avatar
  10. Jan 29, 2016
    • Xavier Morel's avatar
      [FIX] make m2m checkbox labels clickable · 19a1c18f
      Xavier Morel authored
      19a1c18f
    • Goffin Simon's avatar
      [FIX] stock: creation of stock inventory adjustement · bafa1a67
      Goffin Simon authored
      The system cannot create two inventory adjustements in state 'in Progess'
      with the same product, with the same location, same package, same lot and
      same owner.
      Example:if two adjustments(ADJ1, ADJ2) are created with the same product(P)
      and with the same location(L), let's say:
      qty_available for P is 10
      in ADJ1: Theoritical Quantity=10 and Real Quantity=20 => a quant with +10 is created
      in ADJ2: Theoritical Quantity=10 and Real Quantity=30 => a quant with +20 is created
      
      When ADJ1 is validated then qty_available for P is now 20(that 's ok)
      When ADJ2 is validated then qty_available for P is now 40(that's wrong because
      the Real Quantity is expected which is 30)
      
      This is why this fix is required.
      
      opw:660658
      bafa1a67
    • Xavier Morel's avatar
      [FIX] module finder path parameter should be optional · edeb5a8c
      Xavier Morel authored
      According to PEP302, the signature of `Finder.find_module` should be 
      `find_module(fullname, path=None)`.
      
      Ever since it was introduced in 64ec5f36 the addons import hook 
      defines the second parameter as mandatory, which is an issue for
      systems relying on the specified behaviour (and not needing to
      provide a path) like the stdlib's `pkgutil.find_loader`.
      
      fixes #10670
      edeb5a8c
    • Raphael Collet's avatar
    • Raphael Collet's avatar
    • Raphael Collet's avatar
      [IMP] fields: use a "lazy" cursor to compute attribute `digits` · f0646cb5
      Raphael Collet authored
      Borrowing a cursor each time you access `field.digits` may be costly, because
      of the connection reset.  Moreover, in most cases, the cursor is not used at
      all, since the decimal precision are kept in cache.
      
      For the installation of module `product` with its demo data, the number of
      cursor allocations was reduced from ~1500 to about 50!
      f0646cb5
    • Joren Van Onder's avatar
      [IMP] hw_escpos: add the MAC address to the ticket printed at startup · 6f4e7867
      Joren Van Onder authored
      Usually when setting up a POSBox you want it to have a static IP. The
      best way to do that is by configuring whatever DHCP server is
      used (usually just on the router) to always assign the same IP to a
      certain MAC address (naming depends on what is being used, sometimes
      it's called static DHCP but it's also known as DHCP reservations and a
      bunch of other names).
      
      The process of setting this up is complicated for a non-technical user,
      and this attempts to make it a little bit easier to do by immediately
      giving them the correct MAC address they should use. To avoid confusion
      this only prints the MAC addresses for interfaces which have an IP
      address.
      6f4e7867
  11. Jan 28, 2016
    • Nicolas Lempereur's avatar
      [FIX] web: conserve /id for saved export list · 29be9ae8
      Nicolas Lempereur authored
      With 003d85bc instead of getting the name of the relation
      field_relation we get field_relation/id which will get us an xmlid
      instead.
      
      But the data about related fields are not gotten all at once when
      opening the export modal. They are gotten by clicking on the arrow of
      the related record.
      
      It is in this data that the /id will be appended for the field, but when
      getting a saved export list, this data may not be available.
      
      This commit immediately add the `/id` when a field is put in "Fields to
      export" column, so this inconsistency is no more.
      
      closes #10640
      fixes #10327
      opw-665994
      29be9ae8
    • Denis Ledoux's avatar
      [FIX] im_livechat: Strict MIME type. · fd038801
      Denis Ledoux authored
      Backport of revisions
       - 100d604c
       - ddd3e08f
      opw-667814
      fd038801
    • Raphael Collet's avatar
      [FIX] fields: make `related_sudo` work for draft records (2) · 995b257a
      Raphael Collet authored
      Traversing new records in a different cache requires that all new records on
      the path are copied across caches.  Make the copy across caches recursive when
      the first record on the path is a new record.
      995b257a
Loading