Skip to content
Snippets Groups Projects
  1. Jun 04, 2020
    • Thibault Delavallée's avatar
      [IMP] digest: improve digest by adding daily sending and preferences · 14abd4fd
      Thibault Delavallée authored
      PURPOSE
      
      Make digest email and tips more appealing. The goals of these tips are
      
        * to encourage the adoption of other apps (Did you know ?);
        * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
        * to show social proof and increase trust (emphasis on already existing
          projects / customers to);
      
      SPECIFICATIONS
      
      Add a daily digest option, allowing to send digests on a daily basis. It
      will be the default settings to help users coming back to odoo.
      
      Add a slowdown heuristics. If not any user targeted by a daily digest logs
      himself within 3 days, digest is slowed down to a weekly setting to avoid
      spam.
      
      Add a preference section in template, to hold notably links to some
      configuration steps sent mainly for admin / CEOs.
      
      Improve access on models.
      
      LINKS
      
      Task ID 2197417
      PR odoo/odoo#51619
      14abd4fd
    • Thibault Delavallée's avatar
      [REF] digest: make digest template bioutifoul · add1a04a
      Thibault Delavallée authored
      
      PURPOSE
      
      Make digest email and tips more appealing. The goals of these tips are
      
        * to encourage the adoption of other apps (Did you know ?);
        * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
        * to show social proof and increase trust (emphasis on already existing
          projects / customers to);
      
      SPECIFICATIONS
      
      Improve template according to FP specifications, aka
          Header
          Tip
          KPIs
          Preference text
          Want to customize?
          Mobile Tip
          Footer
      
      LINKS
      
      Task ID 2197417
      PR odoo/odoo#51619
      Upgrade PR odoo/upgrade#1256
      
      Co-Authored-By: default avatarElisabeth Dickinson <edi@odoo.com>
      Co-Authored-By: default avatarThibault Delavallée <tde@odoo.com>
      add1a04a
    • Thibault Delavallée's avatar
      [REF] digest: reorganize code to ease future changes · c329c618
      Thibault Delavallée authored
      PURPOSE
      
      Make digest email and tips more appealing. The goals of these tips are
      
        * to encourage the adoption of other apps (Did you know ?);
        * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
        * to show social proof and increase trust (emphasis on already existing
          projects / customers to);
      
      SPECIFICATIONS
      
      Slightly reorganize code to ease future changes, notably in KPIs computation
      that will be made a bit more generic.
      
      LINKS
      
      Task ID 2197417
      PR #51619
      c329c618
    • Thibault Delavallée's avatar
      [FIX] digest: ensure cron sends all ready digests · 48e94a6e
      Thibault Delavallée authored
      Currently only digest planned "today" are sent. Which means that digest that
      missed a cron tick are not sent anymore. We fix that by making the cron run
      on all digest whose scheduled date is in the past or today.
      
      LINKS
      
      Task ID 2197417
      PR odoo/odoo#51619
      48e94a6e
    • Thibault Delavallée's avatar
      [IMP] mail: add first lightweight support of qweb in rendering mixin · e1432afd
      Thibault Delavallée authored
      PURPOSE
      
      Make digest email and tips more appealing. The goals of these tips are
      
        * to encourage the adoption of other apps (Did you know ?);
        * to make Odoo look more fun (Fun tips and tricks, young and dynamic style);
        * to show social proof and increase trust (emphasis on already existing
          projects / customers to);
      
      SPECIFICATIONS
      
      In this commit we simply add a first support of tools to render qweb templates
      like rendering jinja. Instead of giving the template to render the xml id of
      the view is passed.
      
      This code is meant to be improved in a near future with new use cases that
      will soon arise.
      
      LINKS
      
      Task ID 2197417
      PR odoo/odoo#51619
      e1432afd
  2. May 29, 2020
  3. Jun 04, 2020
  4. Jun 03, 2020
    • Nicolas Martinelli's avatar
      [FIX] crm: default partner lang · 2725e80a
      Nicolas Martinelli authored
      
      - Create a lead and set a language
      - Convert to opportunity and choose 'Create a new customer'
      
      The new customer created doesn't have the language of the lead set.
      
      This is more logical to set the same language to the new customer.
      
      opw-2270321
      
      closes odoo/odoo#52376
      
      X-original-commit: 1999c68ff4eb382019c92064d9285411314a39be
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      2725e80a
  5. Jun 04, 2020
    • Author Name's avatar
      [FIX] website_event: event registration in edit mode · 11907c17
      Author Name authored
      
      The event registration form is made up of a public widget that
      instantiates an internal normal widget. All public widget are
      automatically destroyed when entering in edit mode as well as the widget
      it created. Therefore, it's main element is removed from the DOM when
      the widget is destroyed. Here, we're detaching the main element from the
      internal widget before the widget is destroyed so that we avoid to
      destroy his main element from the DOM when entering in edit mode.
      
      task-2210733
      
      closes odoo/odoo#52426
      
      X-original-commit: d515e423
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      11907c17
  6. May 29, 2020
  7. Jun 04, 2020
  8. Jun 03, 2020
  9. Jun 04, 2020
  10. Jun 03, 2020
  11. May 25, 2020
  12. Jun 03, 2020
    • Nasreddin (bon)'s avatar
      [FIX] mrp: float division by zero · 055f12e5
      Nasreddin (bon) authored
      Cause
      
      	When kit BOM line quantity is equal to zero in a sale order, it raise error
      	because trying to divide bom_line_data['qty'] / bom_line_data['original_qty']
      	when computing kit quantities.
      
      Solution
      
      	As BoMs allow components with 0 qty, a.k.a. optionnal components,
      	we simply skip those to avoid a division by zero.
      
      Cherry-pick of #38890
      
      opw-2262540
      
      closes odoo/odoo#52362
      
      X-original-commit: ab780a9d
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      Signed-off-by: default avatarbon-odoo <nboulif@users.noreply.github.com>
      055f12e5
    • Raphael Collet's avatar
      [FIX] core: prefetching of context-dependent fields · 6d5da2d2
      Raphael Collet authored
      
      Consider a context-dependent field, and successively access it on a
      recordset with different contexts.  On the first context, the field is
      correctly computed in batch.  After that, the field is always computed
      one by one.
      
      The bug is in the method that determines which records in a given set
      have no value in cache.  On the first context, the cache is empty for
      the field, so all records are returned.  After that, the method
      considers that all records have a value in cache: they do, but for
      another context key!  Simply using the context key when looking up the
      cache fixes the issue.
      
      closes odoo/odoo#52360
      
      X-original-commit: 35d69589d9b43afe6c6fc9779458323f7180153e
      Signed-off-by: default avatarXavier Dollé (xdo) <xdo@odoo.com>
      Co-authored-by: default avatarXavier-Do <xdo@odoo.com>
      6d5da2d2
    • Xavier-Do's avatar
      [FIX] test_new_api, test_performance: lower query count · 1d0501d2
      Xavier-Do authored
      X-original-commit: 612b900fb99b26daba22eb25409f512a3a0cb2ea
      1d0501d2
    • Goffin Simon's avatar
      [FIX] sale: smart button "Sales" · 6afb4bb4
      Goffin Simon authored
      
      Steps to reproduce the bug:
      
      - Let's consider a customer company partner P
      - Let's consider, P1, a child partner of P
      - Create a SO for P1
      - Archive P1
      
      Bug:
      
      The SO count in the smart button Sales of P was 0 instead of 1
      
      opw:2267828
      
      closes odoo/odoo#52340
      
      X-original-commit: 31ded31d
      Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
      6afb4bb4
    • Jorge Pinna Puissant's avatar
      [FIX] hr_attendance: multi-company rule · 23b0f382
      Jorge Pinna Puissant authored
      
      Before this commit, a user with attendance administrator rights can see
      the attendances of all users of all companies and not only the companies
      he is allowed.
      
      Now, the administrator will only see the attendances of the users of the
      companies he is allowed.
      
      opw-2263577
      
      closes odoo/odoo#52355
      
      X-original-commit: 0e8f8679
      Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
      Signed-off-by: default avatarJorge Pinna Puissant (jpp) <jpp@odoo.com>
      23b0f382
    • Laurent Smet's avatar
      [FIX] account: Fix take money in/out in cashbox · 5ee61b4a
      Laurent Smet authored
      'account_id' & 'name' are no longer valid fields to create a statement line since:
      https://github.com/odoo/odoo/commit/caeb782841fc5a7ad71a196e2c9ee67644ef9074
      
      
      
      closes odoo/odoo#52343
      
      Signed-off-by: default avataroco-odoo <oco-odoo@users.noreply.github.com>
      5ee61b4a
    • David Beguin's avatar
      [FIX] mail: Reserve mis-referenced trackings to system users · 859537d7
      David Beguin authored
      
      Note : Manual forward port recovering from commit ae1e70eb
      
      Purpose
      =======
      
      Let's say that the field 'foo' is tracked and defined with a res.group.
      
      When the field is modified, a mail.tracking.value is generated, but the
      reference to the field name is a char field.
      
      When displaying the mail.tracking.values on the chatter, a check is done
      according to the field group to decide whether we should display it or not
      to the user. See: c7aa8c5f#diff-ad8b6db158187579d2208f233d993c3cR43
      
      So if I rename the field, and if the mail.tracking.value is not modified,
      the mail.tracking.value magically appears to the users who shouldn't
      access it before.
      
      Note: If the migration is correctly handled, this shouldn't be the case.
      But manual manipulations on the database could lead to this issue.
      
      Specification
      =============
      
      If the field referenced by the mail_tracking_value doesn't seem to exist,
      then display its value to system users only, by security.
      
      closes #39016
      
      closes odoo/odoo#52348
      
      Taskid: 2088634
      X-original-commit: 19bc081e4a71042c3f009e4af641da18fc16bdfe
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      859537d7
    • Victor Feyens's avatar
      [FIX] sale_margin: purchase_price performance. · 8a48aee8
      Victor Feyens authored
      
      When installing sale_margin, the computed fields will be computed on existing
      sale.order and sale.order.line in database.  On huge databases, the computation
      may take a lot of time, depending on the configuration (multi-company, multi-currency, ...)
      
      The current commit improves the computation of the purchase_price
      (recently changed to a computed field), by avoiding unnecessary currency
      conversions when possible (one less query to get the conversion rates).
      
      In a multi-currency database where the products have no cost defined
      (standard_price field), the sale_margin installation takes up to 50% less time.
      
      closes odoo/odoo#52338
      
      X-original-commit: 3c9841d1aa4fc5b10012c8239a31d6e7f8676fc0
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      8a48aee8
    • Thomas Dieuzeide's avatar
      [FIX] sale_margin: compute fields performance at install · 72087777
      Thomas Dieuzeide authored
      Installing sale_margin module on a db with a lot of sale.order was impossible.
      
      This commit significantly improves performances.
      Went from many hours (forecasted) to 15 minutes on a db with 300k orders
      
      For sale.order:
        - Duplicating logic between edit mode and non edit mode
        - Edit mode logic stays the same as before
        - Non edit mode uses read_group to speed up the computation
      
      X-original-commit: 9f1ea7427cdb6984f175f5111e4c9a4c5f013af2
      72087777
    • Swapnesh Shah's avatar
      [FIX] stock: correct company · 4b092557
      Swapnesh Shah authored
      
      Before this commit, `self.env.user.company_id.id` may represents different company from the current company based on context.
      
      In this commit, we use correct company based on contextual company.
      
      Follow up on b39173a8
      
      closes odoo/odoo#52328
      
      X-original-commit: 2314ce8b
      Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
      4b092557
Loading