Skip to content
Snippets Groups Projects
  1. Dec 17, 2015
    • Denis Ledoux's avatar
      [FIX] ir_qweb: translatable fields · 2f4382f4
      Denis Ledoux authored
      This revision is related to 5257721b
      
      `record._columns` doesn't contain all record fields,
      computed non-stored fields are not included in `_columns`,
      
      Therefore, when a computed non-stored field was used in the QWeb xml,
      this crashed with a Keyerror exception.
      
      Using `_fields` solves this issue. Nevertheless, translate
      is not always set, but is set when the fields is indeed translatable,
      so the use of `getattr` was required.
      
      opw-660072
      2f4382f4
  2. Dec 16, 2015
  3. Dec 15, 2015
  4. Dec 14, 2015
    • Olivier Dony's avatar
      [FIX] res.lang: do not leak `load_language` global · dde3432f
      Olivier Dony authored
      During database creation via the database manager,
      or when using the startup option `--load-language`,
      the selected language(s) will be installed as soon
      as either:
       - the base module is installed/updated (because
      base_data.xml includes a call to res.lang.install_lang()
       - the registry is loaded (after loading `base`,
      the system installs the requested languages, even
      if the server is not in update/install mode)
      
      This is implemented by passing a global config
      option `load_lang
      
      This behavior was modified as of saas-7 by PR
      for the command-line and for the database manager.
      
      In both cases, we don't want the installation
      to be repeated the next time either of these
      event occur. Essentially the `load_language`
      dde3432f
    • Olivier Dony's avatar
      [FIX] registry: explicitly log registry loading errors · e62b9e7c
      Olivier Dony authored
      In case the caller happens to silently catch
      the exception, leading to hard-to-diagnose
      registry/routing problems.
      e62b9e7c
  5. Dec 13, 2015
  6. Dec 11, 2015
    • Denis Ledoux's avatar
      [FIX] web, website: overrideable images controller · 5cf29dcf
      Denis Ledoux authored
      The `binay_image` and `content_disposition` are moved
      from the web controller to the `ir.http` model,
      to be able to override these methods.
      
      This makes possible to browse the records images as sudo
      when the record is published on the website.
      e.g. to see the partner images on the website `/partners` page
      from the `website_crm_partner_assign` module.
      
      opw-659244
      5cf29dcf
    • Jeremy Kersten's avatar
      [FIX] base: fix SignedIntConverter weight · b5fafb5a
      Jeremy Kersten authored
      This allow to keep route with an SignedIntConverter with more
      priority than a StringConverter.
      
      The default wight is 100, so force the weight to 50 (default intConverter)
      was also a fix. But we decide to rewrite the SignedIntConverter based on the
      intConverter of WerkZeug.
      
      So now, a controller '/module/<string:xmlid>', will be matched after
      '/module/<int:id>". (Same behaviour that before the commit 800ae137)
      b5fafb5a
    • Yannick Vaucher's avatar
      [FIX] base: Remove wrong comment · 08e988f9
      Yannick Vaucher authored
      comment stating date of currency rates
      As all rates where moved in demo data
      
      Closes #10017
      08e988f9
    • Goffin Simon's avatar
      [FIX] base: guess_mimetype · f720e365
      Goffin Simon authored
      When receiving an email containing two attachments(.docx, .odt) with the chatter
      the icons displayed for the two attachments were the icon of a zip file instead
      of the icon of a document file.
      
      ps: the dictionnary "mapping" with the mimetypes and the signatures has been
      changed in a tuple of tuples to keep the order of the mimetypes because
      all the document files (.docx, .dot) begin by 'PK\x03\x04' and all the
      zip files by 'PK'.
      
      opw:658706
      f720e365
  7. Dec 10, 2015
  8. Dec 09, 2015
  9. Dec 07, 2015
  10. Dec 06, 2015
  11. Dec 04, 2015
  12. Dec 03, 2015
  13. Dec 02, 2015
  14. Dec 01, 2015
  15. Nov 30, 2015
    • Martin Trigaux's avatar
      [FIX] base: update translations should not duplicate the terms · 1f07b942
      Martin Trigaux authored
      When a translated term is modified (e.g. content of an email.template),
      reloading the translations of the module (e.g. when updating the module) used to
      recreate a new, duplicare translation for the modified term (instead of ignoring
      the existing one).
      
      This was due to the fact the matching expression (find_expr), when loading
      translations, used the field 'src' (source term) as criteria for (almost) all
      ir.translation records.
      
      While this is true for type 'code' or 'selection', this is not true for 'model'
      where the source content may have been changed.
      In case of translation of type 'model', matching on the name and res_id should be
      enough for the matching expression and then, avoid creating duplicated
      translations.
      
      Note: this patch must NOT be present in 9.0 due to the xml_translate
      attribute that splits an xml content into small parts.
      
      opw 654031
      1f07b942
    • Martin Trigaux's avatar
      [FIX] base: set module when creating translation · a70287d4
      Martin Trigaux authored
      When creating missing translations on an object (e.g. using blue flag icon on a
      field), the value of the module was not set.
      This was problematic as could create a duplicated translation when the module
      was updated or the translation reloaded (as the module is used in find_expr).
      
      opw 654036
      a70287d4
    • Denis Ledoux's avatar
      [FIX] mail: better signature detection · 31e8bb8e
      Denis Ledoux authored
      This revision back-ports revisions
      983d5eb9
      &
      ccbb8e09
      regarding this signature regex.
      
      Besides, it adds the fact the dashes have to
      be at the beginning of the line
      to make them detected as a signature.
      
      opw-655834
      31e8bb8e
    • Martin Trigaux's avatar
      [FIX] base,share: error in_group_xx on user form · 44248a07
      Martin Trigaux authored
      res.users form contains virtual fields in_group_ID to be added in res.groups.
      Groups with boolean share=True (added by share module) must not be displayed in
      the form and should not be modifiable through the user interface.
      However, if a module adding/modifying a res.group is earlier in the dependency
      graph than 'share' (e.g. only depends from 'base'), the update of the user view
      is done before share is loaded and the overrride of 'get_application_groups' is
      never executed.
      
      As we can not guarantee that the module is share loaded, put the logic of
      hidding the module in base instead of share.
      
      This workaround is quite hacky but is necessary in stable version.
      Better fix in 9.0 at cf63d4d2
      
      Fixes #6324
      Fixes #5820
      44248a07
  16. Nov 29, 2015
  17. Nov 27, 2015
    • Denis Ledoux's avatar
      [FIX] models: custom models must add the table/column in database · 03ec39d3
      Denis Ledoux authored
      This revision is related to 1b8c9aed
      
      As `manual` is now the default value of the `state`,
      if `state` is not given in the values when passed to
      `create` or `write` of `ir.model` and `ir.model.fields`,
      we must assume the value is `manual`, so the columns and tables
      are instanciated in database
      
      opw-657750
      03ec39d3
    • Aaron Bohy's avatar
      [FIX] base,hr,mail: prefetch mention suggestions · db8203c2
      Aaron Bohy authored
      The purpose of this commit is to improve the overall performance of the mention
      mechanism of the client action and chatter composer, by pre-fetching some data.
      
      First, the employees are fetched at chat initialization (basically, at web
      client initialization), if hr is installed.
      
      Second, when focusing on the composer of a channel, the members of this channel
      are fetched. In the case of a chatter, the members are already known as they
      are the followers of the document.
      
      When the user types a mention, we first display suggestions from the pre-fetched
      partners, and we only perform an RPC when there are no more result matching the
      search string. This RPC searches among user, and then partners if there aren't
      enough matches.
      
      A few side changes occurred:
        - auto_join set to True on user_ids field of res.partner to boost the query
          that searches partners that are users
        - the '/mail/read_followers' route now returns follower's email as well, as
          we need it for the mention;
        - a partner can now be mentionned several times in the same message;
        - mentionned partner previsualization has been removed, mainly because of
          the previous point, but also because it simplifies the code;
      db8203c2
  18. Nov 26, 2015
    • Nicolas Lempereur's avatar
      [FIX] http: clear environment on checked called rollback · 8423a0df
      Nicolas Lempereur authored
      If the current cursor transaction was not empty when using the check
      called endpoint, at the first call the cursor would be rollbacked but
      the environment could still have outdated values.
      
      This was an issue for example when selecting the route would trigger
      database insert, for instance when a model was used in the route and
      this model had also translatable prefetchable fields with tokens not
      already present in ir.translation
      
      opw-652045
      8423a0df
    • Nicolas Lempereur's avatar
      9d012d21
    • Denis Ledoux's avatar
      [FIX] models: custom fields seen as base fields · 1b8c9aed
      Denis Ledoux authored
      This was possible to create custom fields `x_*`
      but seen as base fields.
      
      For instance,
       - Go to Settings > Technical > Database Structure > Fields
       - Select a field (any)
       - Click on the model link, to be redirected to the model form
       - Edit & add a custom field from there.
       - Save
       - Notice that the field you just added is saved as a base field.
      
      We solve this issue by assuming that all created fields and models
      are customs, except the ones created by the ORM, by the database
      initialization, the fields coming from the modules in python.
      
      We therefore remove the mechanism on which a field was set
      as custom according to the fact `manual` was set to True within
      the context: This is now the case by default.
      
      No change was required for the base fields: The `state` `base`
      was already forced for those fields, that are created using
      direct SQL requests `INSERT INTO`.
      
      opw-657312
      1b8c9aed
Loading