Skip to content
Snippets Groups Projects
  1. Sep 11, 2019
    • mcm-odoo's avatar
      [IMP] website_slides: improve slides backend views · 3e4b0f32
      mcm-odoo authored
      This commit improves a bit the existing backend views of the elearning
      app (notably propagating content and course labeling instead of slide and
      channel) and adds a pivot view for model slide.slide.
      
      FP feedback
      
      Task 2066646
      3e4b0f32
    • Denis Ledoux's avatar
      [IMP] fields: avoid __set__ multiple loops on record, and new browse records · 5cac9c54
      Denis Ledoux authored
      
      This patch avoids to create new browse records for nothing,
      (as creating new browse (__new__) is costly),
      and to avoid to loop multiple times on the records
      (with multiple different filtered, etc.)
      
      This brings performance gain to __set__,
      which is used when setting the value of a compute field
      
      e.g. This improves the performances of
      `env['product.product'].search_read([])`
      
      closes odoo/odoo#36006
      
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      5cac9c54
    • Denis Ledoux's avatar
      [FIX] fields.py: improve computation time of records having a different value in cache · 3d1c924c
      Denis Ledoux authored
      Instead of using a filtered with `cache.get`,
      use a dedicated method in the Cache class to get
      the records having a different value in cache then asked.
      
      This is mainly to avoid the creation of intermediate
      `browse` of 1 record, when doing `for rec in self`
      in `filtered`.
      
      Creating browses is costly, and avoiding it leads
      to performance gains.
      
      The dedicated method `get_records_different_from`
      loops on the record ids, instead of on browse records
      3d1c924c
    • Denis Ledoux's avatar
      [IMP] api: lazy_property for user, company, companies · 0e028de7
      Denis Ledoux authored
      These variable are not supposed to change within a same
      environment.
      
      The lazy property will compute these variables only
      once, then store the result,
      while the property were computing these variables
      each time they were called.
      
      e.g. for a 1000 iteration loop,
      with `env.company`,
      the company was computed 1000 times.
      With a lazy property, the company will be computed one time only.
      0e028de7
    • Antoine Prieels's avatar
      [FIX] hw_drivers: Display slowed IoT Box down · 0bf6fb05
      Antoine Prieels authored
      
      In DisplayDriver, we setup a loop to refresh the display every minute
      if the url shown is not the customer display. If the customer display
      was used, the loop didn't wait a minute and looped indefinitely,
      without sleeping. This slowed down the whole box and explains why
      receipts took a long time to print with older versions of Odoo and why
      the framerate of the curomer display was so low.
      
      closes odoo/odoo#36670
      
      Signed-off-by: default avatarQuentin Lejeune (qle) <qle@odoo.com>
      0bf6fb05
    • Pierre Rousseau's avatar
      [FIX] crm_iap_lead: handle empty company name · 570566b6
      Pierre Rousseau authored
      
      Before this commit if the name of a company retrieved from lead generation is empty, there was a traceback.
      
      Part of Task-ID: 2069155
      
      closes odoo/odoo#36663
      
      Signed-off-by: default avatarRémi Rahir (rar) <rar@odoo.com>
      570566b6
    • Pierre Rousseau's avatar
      [FIX] crm_iap_lead_website: correcly check for GeoIP · 8de0f723
      Pierre Rousseau authored
      Before this commit, every time the user tried to save a rule the system displayed a message to inform that GeoIP is missing, even if GeoIP is installed.
      
      Part of Task-ID: 2069155
      8de0f723
    • Odoo's Mergebot's avatar
      [FIX] hw_drivers: Add possibility to choose a wifi network on IoT Box · e3456e50
      Odoo's Mergebot authored
      
      Previously if you are wired connected we don't scan wifi network.
      
      Now we scan the wifi network and add possibiliyt to select a network and use them.
      
      Description of the issue/feature this PR addresses:
      
      Current behavior before PR:
      
      Desired behavior after PR is merged:
      
      --
      I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
      
      closes odoo/odoo#36634
      
      Signed-off-by: default avatarQuentin Lejeune (qle) <qle@odoo.com>
      e3456e50
  2. Sep 10, 2019
  3. Sep 04, 2019
  4. Sep 11, 2019
    • RomainLibert's avatar
      [IMP] lunch: Improve the product dashboard · c0febb02
      RomainLibert authored
      
      The default image for the lunch product should be the one from the
      category (added an image on the categories).
      
      In case there is no image either on the product either on the category,
      in the kanban view there should be a specific image (fork and knife
      image)
      
      Added some data in order to always have something displayed in the
      kanban view
      
      Fixed the layout of the dashboard
      
      Bug fix, in `_check_wallet` there was a flush missing
      
      Bug fix, `product_id` should be a many2one, not an integer field and the
      orm should be used in order to avoid problems when favoriting products
      
      This is a back2basics task
      
      Task 2048246
      
      closes odoo/odoo#35632
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      c0febb02
  5. Sep 10, 2019
  6. Aug 30, 2019
  7. Aug 29, 2019
    • Hiral Bhavsar's avatar
      [IMP] sale_expense, web: hide 'search more..' from m2o dropdown · 1d2559ce
      Hiral Bhavsar authored
      
      Purpose
      ========
      In expense, we now allow any simple employee (no sales access rights) to
      select sales order. Technically, the name_search is done in sudo mode,
      to allow simply fetching the name_get of record.
      
      The problem is that the m2o field widget displays the "search more"
      option and click on that will open a modal executing a "search_read"
      which is causing access error as the user doesn't have read access on
      SO.
      As we want to restrict the visible information from the SO(only name_get)
      to all user, we can't hack the search_read too.
      
      Specification
      =============
      To prevent user frustration, we need to remove the "search more" option.
      Thus, make a private function which one have 'search more..' option
      related stuff and create a new widget for sale_expense, override that
      function which one is returing values as it is without any modification.
      
      task-2057714
      
      closes odoo/odoo#36152
      
      Signed-off-by: default avatarJérome Maes (jem) <jem@openerp.com>
      1d2559ce
  8. Sep 10, 2019
    • Pierre Rousseau's avatar
      [FIX] crm_iap_lead_enrich: correctly get payload · 4242ddd7
      Pierre Rousseau authored
      
      Before this commit, int was compared to a string when trying to retrieves company data in the payload.
      
      Part of 2069155
      
      closes odoo/odoo#36601
      
      Signed-off-by: default avatarRémi Rahir (rar) <rar@odoo.com>
      4242ddd7
    • Martin Trigaux's avatar
      [FIX] mail: add missing sports · 6c7c97a6
      Martin Trigaux authored
      
      If you accept soccer, accept running and biking
      
      closes odoo/odoo#36627
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      6c7c97a6
    • fja-odoo's avatar
      [FIX] website: fix nested menu creation · 0caf14a9
      fja-odoo authored
      If the menu's parent is a newly created menu it will have a temp string
      id which was failing to be parsed as an int and thus falling back on the
      root menu as its parent.
      
      This was broken by the new mega menu feature introduced with
      https://github.com/odoo/odoo/commit/1345702258adbfbee0d780dc22e552395e6d1df7
      
      
      
      task-2069365
      
      closes odoo/odoo#36606
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      0caf14a9
    • qsm-odoo's avatar
      [IMP] web_editor, *: introduce wysiwyg frontend loader · 8025205b
      qsm-odoo authored
      * website_forum, website_profile
      
      - Share some code between website_forum and website_profile by exposing
        a function in web_editor to instantiate a wysiwyg instance on a
        textarea
      
      - Use no-lazy loaded JS to add a visual loading effect while the
        wysiwyg is not yet available.
      
      This is made in preparation of task-2024197
      (see https://github.com/odoo/odoo/pull/35749
      
      )
      
      Thanks to @stefanorigano
      
      closes odoo/odoo#36581
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      8025205b
    • Lucas Lefèvre's avatar
      [FIX] web: Display archive action if active in view · 50d2f188
      Lucas Lefèvre authored
      
      Since ee5e9725, "Achive" and "Unarchive" actions are
      automatically displayed in the actions dropdown
      if the record has an `active` field.
      The "Archive" action is shown if `active=True`, and
      "Unarchive" otherwise.
      
      However, if the record has the `active` field but
      it's not in the view, the form controller think
      `active=False` because `undefined` is falsy.
      Therefore, the "Unarchive" action is always shown.
      
      If `active` is not in the view, neither "Archive" nor
      "Unarchive" should be shown.
      
      closes odoo/odoo#36551
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      50d2f188
    • Lucas Lefèvre's avatar
      [FIX] hr: Redirect to company employee profile · 55a4910b
      Lucas Lefèvre authored
      Only one employee per company and per user is allowed.
      Based on the company the user is logged in, "My profile"
      should redirect to the employee profile of the current
      company.
      If the user has no employee in the current company,
      "My Profile" redirects to the simple "Preferences" screen.
      
      Currently, it always redirects to the employee in the user's
      main company (`user.company_id`)
      
      This issue is a consequence of a5b6f31c which uses the context
      to know the current company instead of `user.company_id`.
      
      Specification
      =============
      
      Un-store the employee_id field on the res.users model.
      
      To achieve this, we need to implement a _search method for this field.
      
      That way, each time we try to access to the employee_id value, the
      returned employee depends on the context.
      55a4910b
    • Lucas Lefèvre's avatar
      [FIX] hr_holidays: Restrict employee with leave deletion · c55c3e73
      Lucas Lefèvre authored
      It's currently not possible to delete an employee who has leaves
      => traceback.
      
      The employee_id field is set to NULL in the leave table which
      breaks the `type_value` constraint (same for allocation).
      
      It should not be allowed to delete an employee with leaves:
      for legal puposes in some countries, a record of employee
      leaves must be kept.
      
      Instead of deleting the employee, it should be archived.
      c55c3e73
    • Julien Castiaux's avatar
      [FIX] snailmail_account: external pingen test · d930a78f
      Julien Castiaux authored
      
      Commit 4d64e553 introduced an 'mt-3' in the address layout of the
      external background layout to fix a problem related to the display of
      phone numbers.
      
      That fix introduced an error with the pingen external post service. It
      requires the area where the destination address is printed to be blank,
      due to the mt-3, the background image was visible instead of that blank
      area.
      
      As removing solely the mt-3 doesn't break the first problem and solve
      the second, it is safe to remove it.
      
      Before this commit, no message was logged to help finding out why the
      test was failing.
      
      The `requests.raise_for_status` method raises an error on both 400 and
      500 status code. We don't want the test to break in case pingen screw
      up their side so 500 errors are just logged. 400 errors still raise an
      exception.
      
      closes odoo/odoo#36504
      
      Signed-off-by: default avatarChristophe Monniez (moc) <moc@odoo.com>
      d930a78f
  9. Sep 06, 2019
  10. Sep 10, 2019
Loading