Skip to content
Snippets Groups Projects
  1. Jul 09, 2020
  2. Jul 08, 2020
  3. Jul 09, 2020
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] account: fix composition mode change on template change · 04250d80
      Andrea Grazioso (agr-odoo) authored
      
      Go to invoice list view.
      Select several invoices, click on 'Send and print', switch template to a
      different one (possibly a duplicate of the default).
      Send
      
      On each selected record there will be a pair of attachment:
      - one belonging the the record (ok)
      - one duplicate from the first record selected (not ok)
      This occur because when switching template the default composition
      mode for the wizard is 'comment' (single send), which causes the wizard
      to compute and store the attachment of the first record it found.
      Later, this get assigned to the list of attachment to send so it
      duplicated (and sent) in all other records
      
      opw-2291274
      
      closes odoo/odoo#54255
      
      X-original-commit: 0028a602
      Signed-off-by: default avatarJorge Pinna Puissant (jpp) <jpp@odoo.com>
      04250d80
  4. Jul 08, 2020
  5. Jul 09, 2020
  6. Jul 03, 2020
  7. Jul 08, 2020
  8. Jul 01, 2020
    • snd's avatar
      [FIX] project - send rating mail by project · cb26f1aa
      snd authored
      opws: 2269230, 2248760
      When a database has a lot of projects with many tasks, and needs
      to send a lot of feedback mails, the cron tries to send mails to
      all tasks at the same time, thus it times out.
      
      This fix will allow to treat projects one at a time so that when
      the cron times out, it will not restart from the beginning.
      
      closes odoo/odoo#53922
      
      X-original-commit: 07c828b4
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      cb26f1aa
  9. Jul 07, 2020
    • jvm-odoo's avatar
      [FIX] website_slides: fix video not loaded in fullscreen web content · 5e3d73bd
      jvm-odoo authored
      
      Issue
      
      	- Create a content in a course with type "web page"
      	- Access it frontend and add a "text - image" block, edit the image as a video - save
      	- The video is displayed correctly
      	- Go into full-screen
      
      	The video is not displayed at all.
      
      Cause
      
      	The content is added after the page and page widgets are started
      
      Solution
      
      	Trigger the widgets start method
      
      OPW-2290233
      
      closes odoo/odoo#54190
      
      X-original-commit: 0f93240e
      Signed-off-by: default avatarJason Van Malder (jvm) <jvm@odoo.com>
      5e3d73bd
    • Loan (lse)'s avatar
      [FIX] website_sale: Improve shop item search performances · c13c020d
      Loan (lse) authored
      
      The idea is to avoid useless SQL request as the searching process is heavy (have to look the word in several field and can be in translation tables).
      As we at some point fetch all the searched product we do it at the beginning and use its information to gain performance on other queries.
      
      Execution time in e-shop for "test" on client database (160 000 product with 4500 published):
       - Before: ~ 7 sec
       - After:  ~ 2 sec
      
      OPW-2256662
      
      closes odoo/odoo#54202
      
      X-original-commit: ec743deb
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      c13c020d
    • Xavier Dubuc's avatar
      [FIX] mail: save scroll position of chat window when folded · 7091ad53
      Xavier Dubuc authored
      
      - Remove no more used ThreadViewer prop : messageListInitialScrollTop
      - Remove no more used ChatWindow prop : threadInitialScrollTop
      - Rename ThreadViewer field threadCacheInitialPosition to
        threadCacheInitialScrollPosition
      - Use the scroll position to set message list scroll on mounted
      - Fix old test which was not simulating correctly home menu show
      - Add tests to check that scroll position is correctly saved even if
        ChatWindow is folded
      - Fix traceback when showing/hiding home menu with a folded chat window
      
      task-2285691
      
      closes odoo/odoo#54198
      
      X-original-commit: 31123a94c156424b3962fe4aebc3cc60a7a89223
      Signed-off-by: default avatarAlexandre Kühn (aku) <aku@odoo.com>
      Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
      7091ad53
    • qsm-odoo's avatar
      [IMP] web_editor, *: add visibility check for editor sub-widgets · ecefd51b
      qsm-odoo authored
      
      *: website
      
      Update the visibility (from dependencies and _computeWidgetVisibility
      function) for all widgets, including the ones which are children of main
      widgets (e.g. new ability to hide some choices from a select depending
      on other options).
      
      closes odoo/odoo#54162
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      ecefd51b
    • Aaron Bohy's avatar
      [FIX] web: kanban: drag column with sample data · e55ee0bb
      Aaron Bohy authored
      
      Before this commit, in a grouped kanban view with sample data (e.g.
      crm.lead), one could toggle the 'settings' dropdown menu of a
      group, and then drag&drop the group by clicking on the muted "Fold"
      item in the dropdown.
      
      After this commit, dragging a column is only possible by clicking
      on the column title (but not on the 'config' or '+' icons, nor the
      config dropdown).
      
      Task 2290197
      
      closes odoo/odoo#54179
      
      X-original-commit: 58c38a024c96eba3469c142a8422b7bd0ab54ea4
      Signed-off-by: default avatarMathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      e55ee0bb
    • jvm-odoo's avatar
      [FIX] base_import: fix re-importing same file · 5a60dbcc
      jvm-odoo authored
      
      Issue
      
      	Chrome
      
      	- Sales > Product
      	- Select a file
      	- Change something in the file
      	- Re-select it
      
      	Nothing changed
      
      Cause
      
      	Chrome doesn't trigger change on
      	input if the file is the same
      
      Solution
      
      	Clear the input value after the
      	parse_preview so we can load a new
      	file even if the preview failed.
      
      OPW-2288191
      
      closes odoo/odoo#54175
      
      X-original-commit: f7d2bdf6
      Signed-off-by: default avatarJason Van Malder (jvm) <jvm@odoo.com>
      5a60dbcc
    • qsm-odoo's avatar
      [FIX] website: hide strange checkbox in shadow option · 7a74119d
      qsm-odoo authored
      
      The 'inset' checkbox of the shadow option was still displayed for no
      reason. A "display: none" inline style was added on it but as inline
      style is not considered for editor widgets I don't know how it could
      have ever worked.
      
      closes odoo/odoo#54168
      
      X-original-commit: b0de225c721e54b76dcbe49f9769ac371db39c05
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      7a74119d
    • Julien Mougenot's avatar
      [FIX] web: Make sample server tests deterministic · cd1d3397
      Julien Mougenot authored
      
      Before this commit, there were a few tests in the "sample server" suite
      that asserted that every group resulting of a "read_group" would contain
      at least one record, while there was actually a slight chance of it not
      happening.
      
      Now, the sample server used in the tests has been rendered deterministic
      and these kind of issues are completely avoided.
      
      closes odoo/odoo#54164
      
      X-original-commit: a6d32ff46558b68ce3f19458f29c311ee5c658fd
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      Signed-off-by: default avatarJulien Mougenot (jum) <jum@odoo.com>
      cd1d3397
  10. Jul 06, 2020
    • Olivier Dony's avatar
      [FIX] website: restore CDN for lazy assets · e93b9aa2
      Olivier Dony authored
      
      The CDN implementation for resources works by matching well-know attributes
      (`href`, `src`, `action`) that hold URLs matching the CDN filters and injects
      the CDN prefix. However 13.0 introduced lazy loading for assets in #32181,
      so the attributes are now prefixed with `data-` and replaced at runtime.
      
      This PR updates the tag matching in order to cover both variants of
      attribute names.
      
      closes odoo/odoo#54156
      
      X-original-commit: 6d4b5fcd
      Signed-off-by: default avatarToufik Benjaa (tbe) <tbe@odoo.com>
      e93b9aa2
  11. Jul 07, 2020
  12. Jul 06, 2020
  13. Jul 07, 2020
    • Hardik Prajapati's avatar
      [FIX] web: properly display boolean fields in kanban · 8e91b0ad
      Hardik Prajapati authored
      
      Before this commit, boolean fields (without widget="boolean") in
      kanban views were displayed as [Object object], because when no
      widget is specified, we display the (textual) formatted value of
      the field. However, the boolean formatter returns by default a
      string encoding an html checkbox.
      
      This commit passes the correct option to force a string formatting,
      so it now displays "True" or "False". Moreover, this commit
      uniformizes formatter options for that purpose, as another option
      had been recently introduced for monetary field.
      
      Note that those options should not be necessary, as formatters
      should always return text values (no html). But this is a larger
      change, that we might do in the future.
      
      Task 2280394
      
      closes odoo/odoo#53937
      
      Signed-off-by: default avatarAaron Bohy (aab) <aab@odoo.com>
      8e91b0ad
    • Denis Ledoux's avatar
      [FIX] models: prevent fields inherited from `delegate=True` to be deleted · d5d79805
      Denis Ledoux authored
      Use case:
       - `./odoo-bin -d mydb -i website`
       - `./odoo-bin -d mydb -i base_automation`
       - `./odoo-bin -d mydb -u website,base_automation`
       ```
       odoo.addons.base.models.ir_model: Deleting 2652@ir.model.fields (base_automation.field_base_automation__website_published)
       odoo.addons.base.models.ir_model: Deleting 2651@ir.model.fields (base_automation.field_base_automation__website_url)
       odoo.addons.base.models.ir_model: Deleting 2650@ir.model.fields (base_automation.field_base_automation__website_path)
       ```
      
      The issue comes from the fact:
      - `website` adds multiple website related fields on `ir.actions.server`
        https://github.com/odoo/odoo/blob/30e94d305f9cffa816ddc213e0b9329c0263c145/addons/website/models/ir_actions.py#L16-L18
      - `base.automation` inherits by delegation of the `ir.actions.server` fields
        thanks to `delegate=True` on its field `action_server_id`
        https://github.com/odoo/odoo/blob/30e94d305f9cffa816ddc213e0b9329c0263c145/addons/base_automation/models/base_automation.py#L37
      - when `base_automation` is installed after `website`
        when `_reflect_model` is called,
        the website related fields on `ir.actions.server` are well in the `_fields` of the `base.automation` model,
        and there an xmlid for these fields is created
        e.g. `field_base_automation__website_published`
        https://github.com/odoo/odoo/blob/30e94d305f9cffa816ddc213e0b9329c0263c145/odoo/addons/base/models/ir_model.py#L881-L882
      
      
      - during the `-u website,base_automation`, `_reflect_model` on `base.automation` is called before
        the website related fields coming from its inherits on `ir.actions.server` are added in its `_fields`,
        and is not recalled after they are added, when the `website` module is loaded and these website related fields
        are added on `ir.actions.server`.
      
      Because of this, at the end of the upgrade, in the `ir.model.data` `_process_end`,
      as the xmlids of these fields have not been loaded,
      they are being deleted, because the ORM considers these fields were dropped
      from the source code because their xmlids have not been loaded during the upgrade.
      
      Adding the model `base.automation` in the `inherits_children` of `ir.actions.server`
      when the delegate field `action_server_id` is added make sure
      `_reflect_model` is called on `base.automation`
      after the website related field are loaded on the model `ir.actions.server`,
      and therefore ensure the xmlids are properly loaded,
      therefore preventing the fields deletion.
      
      Additionaly, `delegate` and `inherits` are supposed to be equivalent,
      it's just two ways to do the same thing.
      
      Before this revision,
      when using `delegate`, `base.automation` is not in the `inherits_children` of `ir.actions.server`:
      ```
      In [1]: env['ir.actions.server']._inherits_children
      Out[1]: set()
      ```
      
      while, by converting the `delegate` to an `inherits`:
      ```diff
      diff --git a/addons/base_automation/models/base_automation.py b/addons/base_automation/models/base_automation.py
      index 196ebe9965f..c073150386a 100644
      --- a/addons/base_automation/models/base_automation.py
      +++ b/addons/base_automation/models/base_automation.py
      @@ -30,11 +30,12 @@ class BaseAutomation(models.Model):
           _name = 'base.automation'
           _description = 'Automated Action'
           _order = 'sequence'
      +    _inherits = {'ir.actions.server': 'action_server_id'}
      
           action_server_id = fields.Many2one(
               'ir.actions.server', 'Server Actions',
               domain="[('model_id', '=', model_id)]",
      -        delegate=True, required=True, ondelete='restrict')
      +        required=True, ondelete='restrict')
           active = fields.Boolean(default=True, help="When unchecked, the rule is hidden and will not be executed.")
           trigger = fields.Selection([
               ('on_create', 'On Creation'),
      ```
      it is:
      ```
      In [1]: env['ir.actions.server']._inherits_children
      Out[1]: {'base.automation'}
      ```
      
      closes odoo/odoo#54171
      
      X-original-commit: 3fd162db
      Signed-off-by: default avatarDenis Ledoux (dle) <dle@odoo.com>
      d5d79805
  14. Jul 06, 2020
Loading