Skip to content
Snippets Groups Projects
  1. Sep 23, 2019
    • RomainLibert's avatar
      [FIX] web: avoid passing buttons as export field · 57a24dac
      RomainLibert authored
      
      The new export feature forgot to filter out the action buttons that can
      be displayed in the list view. (see odoo/odoo@5c4544f)
      This lead to javascript trying to get fields on the model like
      `action_validate` which obviously doesn't exist.
      
      closes odoo/odoo#37261
      
      Signed-off-by: default avatarRomain Libert (rli) <rli@odoo.com>
      57a24dac
    • Sébastien Theys's avatar
      [FIX] web: introduce format for `many2one_reference` · d0c852f5
      Sébastien Theys authored
      
      The format of `many2one_reference` was not introduced when the new field type
      was created, which leads to errors when the web client is trying to display the
      value of such fields.
      
      Since the value of this field is an ID, it is decided to display it like an
      integer, which is consistent with previous behavior: the fields that are now
      `many2one_reference` are still stored as integer and they were already displayed
      as integer before.
      
      closes odoo/odoo#37216
      
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      d0c852f5
    • Raphael Collet's avatar
      [IMP] base: use `many2one_reference` for `res_id` on `ir.attachment` · 5d97c47e
      Raphael Collet authored
      This helps for updating inverse fields without making queries.
      
      Due to this change, a `flush` has to be added in the portal attachment test to
      actually compute the inverse after the change of `res_id`.
      5d97c47e
    • Raphael Collet's avatar
      [IMP] base: inverse `datas` of `ir.attachment` during `create` · afdfdbfa
      Raphael Collet authored
      Before this commit, the inverse of `datas` would be computed after the `create`,
      which would lead to unnecessary queries, not only for writing the new values,
      but also because of the re-computation of fields that depend on these values.
      afdfdbfa
    • Raphael Collet's avatar
      [IMP] models, fields: initialize cache to None for related fields · f047425b
      Raphael Collet authored
      This makes sense because in `create` the "previous" value of a field is
      obviously non-existent.
      
      This avoids having to fetch pre-existing attachments when they are known to be
      inexistent, which optimizes stored related binary that are computed post-insert.
      f047425b
    • Sébastien Theys's avatar
      [IMP] fields: write only once per Image field · 9112972e
      Sébastien Theys authored
      
      Before this commit, flushing a model that uses the `image.mixin` would generate
      twice as many queries as it should.
      
      This is because `_compute_related` is not meant to be overridden. In the
      override of `Image` we call `super()` then post process the records by
      reassigning each record's relevant image field with `_image_process`.
      
      The `super()` will assign the field of the records once which
      will in turn trigger a `write` (and thus, will generate queries) then
      after the `super()` call we reassign them which will re-trigger the same
      `write` and the same queries.
      
      With this commit, instead of overriding `_compute_related` we extract the
      processing to a method that can be overridden, so that the `write` is called
      simply once.
      
      The result, obviously, is that queries related to the `write` are cut in half.
      
      Related PR: #36683 & #36288
      
      Co-authored-by: default avatarAdrian Torres <adt@odoo.com>
      Co-authored-by: default avatarSébastien Theys <seb@odoo.com>
      9112972e
    • Raphael Collet's avatar
      [FIX] fields: set `model_field` on related `many2one_reference` fields · 50c7941f
      Raphael Collet authored
      This fixes an issue when a Model A with a `many2one_reference` is inherited in
      Model B with `_inherits`, and another Model C defines a `one2many` having as
      inverse the inherited `many2one_reference` in Model B.
      
      Without this commit, the value of `model_field` is `False` by default for the
      field in B, which would lead to incorrect queries when building
      `get_domain_list` for the `one2many`.
      50c7941f
  2. Sep 24, 2019
  3. Sep 20, 2019
    • Joseph Caburnay's avatar
      [FIX] delivery: wrong delivery price for real cost policy · 5a9cb644
      Joseph Caburnay authored
      
      When real cost invoice policy is active in a delivery carrier, the
      delivery price is set after validating the delivery. When there is
      margin, the estimated price is calculated with margin but when the
      delivery is validated, the price set in the delivery line does not
      include the margin. This commit fixes this behavior by setting the price
      of the delivery line with appropriate margin.
      
      closes odoo/odoo#37178
      
      Signed-off-by: default avatarpimodoo <pimodoo@users.noreply.github.com>
      5a9cb644
  4. Sep 24, 2019
  5. Sep 23, 2019
  6. Sep 24, 2019
  7. Sep 23, 2019
  8. Sep 21, 2019
  9. Sep 20, 2019
    • wan's avatar
      [FIX] account: constraint on empty account · d3ddcc61
      wan authored
      If SQL, if you do
      ```display_type IN ('line_section', 'line_note') OR account_id IS NOT NULL```
      and `display_type` is `NULL` then you can only have `'t'` because
      `SELECT NULL OR 'f';` yields `NULL`
      `SELECT NULL OR 't';` yields `'t'`
      The check of NULL is not blocking, hence the constraint doesn't work.
      
      closes odoo/odoo#37075
      
      Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
      d3ddcc61
  10. Sep 22, 2019
  11. Sep 20, 2019
    • Florimond Husquinet (fhu)'s avatar
      [FIX] survey: answers not saved when using breadcrums · 45c6341b
      Florimond Husquinet (fhu) authored
      
      - Create a survey with one page per section.
      - Go to the second section and select an answer.
      - Go back to the first section using the breadcrums.
      
      Before this commit:
      
      if you go back again to the second section, you will see that your answer
      wasn't saved.
      
      After this commit:
      
      answers are saved even when navigating with breadcrums.
      
      closes odoo/odoo#37157
      
      Opw: 2072948
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      45c6341b
    • Antoine Vandevenne (anv)'s avatar
      [IMP] doc: rewrite of the source install page · 06915120
      Antoine Vandevenne (anv) authored
      
      Prior to this commit, the documentation page for the installation of Odoo had lots of inconsistencies, errouneous information and a bad structure.
      
      This commit restructures the page to split the Source Install chapter into three sections for Windows, Linux and Mac OS.
      Each section is entirely rewritten to be accurate, logical, clean, easy to understand and focused on its purpose (removed tutorials of non-Odoo softwares).
      
      task-2072822
      
      closes odoo/odoo#37001
      
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      06915120
Loading