Skip to content
Snippets Groups Projects
  1. Feb 11, 2020
  2. Feb 06, 2020
    • qsm-odoo's avatar
      [IMP] website, *: make theme custo options act as simple snippet options · 6fb4ed44
      qsm-odoo authored
      * web_editor, theme_bootswatch
      
      Instead of having an entirely dedicated system for theme options in a
      third tab of the left panel, those theme options are now simple snippet
      options. See the customizeWebsite generic method.
      
      This allows to make any option available in the third tab or on any
      meaningful element like the header or the footer. This also allows to
      take advantage of all the features of the left panel: dependencies,
      visibility update, etc.
      
      Note: same as before, those changes do apply the color/size/layout
      immediately on the website, even if not saved. Changing that behavior
      is complex and might be the job of another task.
      
      Part of https://github.com/odoo/odoo/pull/41166
      task-2088298
      6fb4ed44
  3. Feb 03, 2020
  4. Jan 30, 2020
  5. Jan 07, 2020
  6. Dec 09, 2019
  7. Nov 28, 2019
  8. Nov 18, 2019
  9. Oct 02, 2019
    • Romain Derie's avatar
      [REM] account, project, sale, *: remove dead code 'return_label' · ae6db1a5
      Romain Derie authored
      
      Since Odoo 9.0, the `return_label` in url was not working anymore.
      What it did before 9.0 is add an item in the breadcrumb which once clicked
      would redirect to the frontend.
      This was handled in the `do_load_state` of the action manager in JS.
      
      We don't need to reimplement that behavior as now we have the 'Go to website'
      stat button. Thus we remove the code.
      
      Closes #36325
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      ae6db1a5
    • Romain Derie's avatar
      [IMP] website, website_*: improve edit in backend feature · 9b38bcec
      Romain Derie authored
      *base, website_blog, website_event, website_forum, website_slides
      
      With this commit:
      1. It is now possible to add the 'Edit in backend' entry in the frontend navbar
         for any desired model, not only the ones which have the published mixin.
         It will simply redirect to the main_object form view.
         This commit add it to Forum and Blog.
      2. When clicking on 'Edit in backend', it is now possible to land on another
         module than Website.
         That's especially useful for events and slides which are not directly
         related to the website module as they have their own module.
      3. Remove the custom Edit in backend from the forum homepage (fa-cog).
         Opportunity was also taken to remove the 'edit welcome message'.
         It will now be editable through the editor (welcome message will appear in
         edit mode). Thus we got rid of the custom edit welcome message controller
         and views.
      
      Closes #36325
      9b38bcec
  10. Jun 05, 2019
  11. Jul 29, 2019
  12. May 13, 2019
    • Yannick Tivisse's avatar
      [IMP] base: Contextualize the multi company · a5b6f31c
      Yannick Tivisse authored
      Purpose
      =======
      
      Allow the user to select the allowed companies for which he wants to see records
      on top of selecting his current company.
      
      It is confusing for users to see the records from the company he is connected to
      and the records of the children companies.
      
      Instead of using the hierarchy of companies to access records across companies,
      the user can now select (from his set of allowed companies) the companies for
      which he wants to access records.
      
      /!\ This means that the user will interact with records from company A when in
      company B.
      Example: a SO has been created and confirmed in A. When in B, I create the
      invoice from it.
      
      Specifications
      ==============
      
      1/ Deprecate the parent/children hierarchy on the res.company model. The fields are
      kept on the res.company model to ensure the retro-compatibility, but won't be used
      accross the standard code anymore. The only functional usage for this mechanism
      was to allow to see records from several companies by creating a virtual parent
      company, which will be possible with the new mechanism.
      
      2/ By default, a user will only see the records of the company he is connected
      to (or records without a company). (It is still editable by the user if needed).
      For that, put this information in the user context, to allow having different
      configurations on different browser tabs. Instead of having domains like
      ['|',
      ('company_id', '=', False),
      ('company_id', 'child_of', user.company_id.id)]
      you'll have something like
      ['|',
      ('company_id', '=', False),
      ('company_id', 'in', company_ids)]
      Note that the 'company_ids' is a value that is passed in the evaluation
      context on the record rule, as we already have user, or time.
      company_ids is a list of the ids of all the enabled companies in the
      user's context.
      
      3/ Out of the generic improvements brought by this task, this will illustrate
      issues that could exist since several versions. For example, it should not be
      possible to create a scrap order for the company A with a package of the company
      B, or it should not be possible to create an invoice on the company A with
      payment terms from the company B. Before the version 12.0, it was easy to
      encounter this kind of issues as the admin was the SUPERUSER_ID. A positive side
      effect of the fact that the SUPERUSER_ID has become an inactive user was to
      make it more difficult to introduce mismatch on the records, but haven't solved
      the issue, as it was still possible to do it with parent companies
      configuration. Some of these issues have been fixed in this commit, but all the
      business flows should be re-tested to check if an ir.rule should be introduced
      (eg: a multi company rule for stock.quand.package), if the company of a record
      is correctly transfered to another record created from the first record (eg:
      From a SO, create an invoice and a payment, the company of the sales order
      should be transfered on the invoice and the payment, even if the company of the
      sales order is A and I'm logged into the company B with the company A enabled.
      
      4/ Currently, if I click on a button on a notification email (example 'View
      Task'), I face a traceback if I'm not logged into the company of the record.
      Now, if you click on a button and if you have access to the record, the correct
      company will be automatically set.
      
      5/ If I display a kanban view with several records from several companies (and
      an image), all the images should be displayed.
      
      6/ Currently if you copy paste an url, this will crash if you're not in the
      correct company. This won't be fixed because it's quite impossible to do it in
      a clean way. This task brings a workaround. Copy/Paste -> Traceback -> Log into
      the correct company, re-copy/paste -> Ok.
      
      7/ 2 property methods have been added on the environment to retrieve the company
      on which the user is logged in and the companies the user enabled, on a specific
      tab.
      That way, when creating a record, instead of doing
      default=lambda self: self.env.user.company_id
      do
      default=lambda self: self.env.company_id
      On the other hand, to retrieve the enabled companies, do
      companies = self.env.company_ids
      
      8/ Modify the Company Switcher widget to allow to log into another company
      WITHOUT writing on the res.users (and thus bringing cache invalidation issues
      and so on). Also allow to enable several companies and see records from several
      companies, and independantly of the other browser's tabs.
      
      9/ When focusing on a tab, save the current company configuration on the local
      storage. That way, when doing 'CTRL+T' or a middle click, the context is
      propagated to the new tab.
      
      10/ Improve the error message in case of multi company access errors. Now, when
      the user is in debug mode, display the related names of the records and the name
      of the user who brings the issue.
      
      11/ Remove the context erasing when writing on a res.users
      This is probably coming from the migration to new API of the base module.
      The context was not propagated at this moment, which was a common mistake at
      that time. When migrating the module, probably by using the 'black box' method,
      as the context was not propagated, it was erased on the new version. This is
      now an issue because the context (i.e. the enabled companies) was erased when
      writing on a res.users, leading to tracebacks.
      See: https://github.com/odoo/odoo/commit/7eab8e26d3d46c53f4be924d6a34e80a66e74960#diff-4c2e738ee8f64f11806c889ea097b5e7R624
      
      
      
      12/ Fix the crash manager on redirect warnings. The issue is the following
      - Create an invoice on a company without a configured CoA.
      - Set a partner
      - On the onchange_partner_id, a redirect warning is raised to propose you
      to configure a CoA
      - Click on 'Go to the configuration panel'
      - A generic warning says something like 'Do you want to discard your changes?'
      - Click on yes, the page refreshes, but not on the redirect action.
      Now, set correctly the action on the hash, and reload instead. The breadcrumb is
      lost for example, but you reach the correct action at least.
      
      13/ Introduce a res.group to enable/disable the multi company per tab
      feature.
      
      14/ To help the users to know which tab is in which company, add the
      possibility to have a favicon per company. When creating a company,
      the classical 'O' icon is colored by default in a random color.
      
      15/ Remove the company switcher on the frontend. This was mainly there
      to allow a user to swicth to the company linked to the website.
      This behavior is now transparent to the user. If the website A is
      activated, then the company set on the context is the company of the
      website.
      
      16/ Deprecated the _company_default_get method on the res.company
      model. Remove the method _get_company on the res.users model.
      
      17/ Add 'allowed_company_ids' and 'current_company_id' on the pyeval
      context. You can now use those variables on domains in the views to
      access directly to the activated company.ies on the current tab.
      
      TaskID: 1960971
      
      closes odoo/odoo#32341
      
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      a5b6f31c
  13. Apr 23, 2019
  14. Feb 19, 2019
    • qmo-odoo's avatar
      [IMP] website_slides: Add elearning feature to slides · c564ae6c
      qmo-odoo authored
      Purpose of this commit is to introduce a new way of displaying and managing
      slides in eLearning module. Its purpose is to give a better experience to
      users when going through a course. Notably a fullscreen mode allows to take
      lessons one by one without going out of the elearning display. Integration
      of all slide types eases taking the course step by step.
      
      Quiz are introduced in this commit. Those are an addition to slides with
      some question / answers (multiple choice). It allows customer to gain karma
      and improves gamification. Certifications are still done using the survey
      application. Quiz targets only small tests at the end of a given slide.
      
      A new widget is added to display and control slide display in fullscreen
      mode. Old display is still available for documentation channels or when
      going out of fullscreen mode, to see details on comments / review / statistics
      and have access to share options.
      
      This commit is linked to task ID 1902304 and PR #29876. It closes the main
      work on refactoring website slides into eLearning, with other tasks already
      merged in current community [1][2][3][4][5].
      
      [1] Task ID 1940360 landed at b2149bc7: certification inclusion
      [2] Task ID 1936153 landed at 6c6179e5: homepage inclusion
      [3] Task ID 1937160 landed at 8b7605c9: selling courses
      [4] Task ID 1922159 and 1940516 landed at 5fa651cb and 6a64c3ce:
          new user profile and gamification of slides / forum
      [5] Task ID 1938643 landed at 77b5673a: upload channel/slide
      c564ae6c
    • Aurélien Warnon's avatar
      [IMP] website: add a field to handle publish rights for publish mixin · 91696805
      Aurélien Warnon authored
      Purpose
      =======
      
      The "publish/unpublish" widget is always shown on the frontend as long as the user
      is a website_publisher and the object has a "website_published" field.
      
      In some modules (namely website_slides) we need to handle a more refined level of access.
      
      This commit adds a "can_publish" computed field that can be overridden to add some additional
      access rules to the object and hide the widget if the user doesn't have the rights to
      publish/unpublish.
      91696805
  15. Feb 12, 2019
    • qmo-odoo's avatar
      [IMP] website_slides: create channel in frontend · c2a38e46
      qmo-odoo authored
      This commit provides the abilty to create channel from the website
      instead of creating a slide. To do so, the user still have the "upload"
      button on the channel home page.
      The new modal allow user to set title, description, type and channel
      tags. We prevent channel tag and group tag creation on the fly, as it
      can impact the UI (coming in a future commits).
      
      Task-1938643
      c2a38e46
  16. Feb 08, 2019
  17. Feb 05, 2019
    • Andrea Ulliana's avatar
      [IMP] website, *: improve CSS edition usability + add JS edition · 515e7bc5
      Andrea Ulliana authored
      * web_editor
      
      Currently, when an user wants to edit the css of its website, he has
      access to lots of files and, in debug mode, to even more files. While
      the feature is nice for people who know what they are doing, a lambda
      person can easily break its website by changing the wrong files. Also,
      nothing warns the user that the files that are edited will never receive
      updates anymore (unless if they are reset). The goal is to prevent
      those behavior while still allowing the add custom css. Another goal
      is to be able to *add* custom javascript.
      
      Custom files created for the user:
      SCSS: user_custom_rules.scss, user_custom_bootstrap_overridden.scss
      JS: user_custom_javascript.js
      
      See https://github.com/odoo/odoo/pull/29999
      task-1919350
      515e7bc5
  18. Jan 29, 2019
    • Jeremy Kersten's avatar
      [FIX] website: make "Edit in backend" always go to website backend · d609dbdd
      Jeremy Kersten authored
      Before this commit, clicking "Edit in backend" from the website could randomly
      lead to the backend under another menu or without module, depending on the
      other modules that are installed or version com/ent used.
      
      After this commit, it will always open the backend under the specifiec menu
      or website menu if not defined.
      
      + uses existing website dedicated action for product.template in 'Edit backend'
      
      task-1919436
      closes #30555
      
      Co-authored by seb@odoo.com
      
      closes odoo/odoo#30657
      d609dbdd
  19. Dec 03, 2018
    • Sébastien Theys's avatar
      [FIX] website,website_hr_recruitment: fix crawler (job url) · 1d451846
      Sébastien Theys authored
      Commit 2ab6ce80 introduced an issue where the
      URL for new job offer was added in the DOM even when website_hr_recruitment is
      not installed.
      
      This is a problem because the crawler tries to navigate that URL and returns an
      error because the route does not exist without website_hr_recruitment.
      
      closes odoo/odoo#29217
      1d451846
  20. Dec 12, 2018
    • Jeremy Kersten's avatar
      [FIX] website: don't show switcher website if only 1 website · dc30b955
      Jeremy Kersten authored
      In some case, you can have multi website enabel with only 1 website:
          - If you create a second and deleted it.
          - Or after a migration to check common view and specific view e.g.
      
      In this case, before this commit, you have switcher of country that is just
      an empty dropdown.
      
      closes odoo/odoo#29481
      dc30b955
  21. Apr 10, 2019
    • Sapan Zaveri's avatar
      [IMP] website: properly show navbar on iPad · 98d4b214
      Sapan Zaveri authored
      
      Currently, when we open the website on iPad, the navbar is not displayed
      properly (systray items are overlapping on the website menu). This
      commit fixes the issue by using '+' icon on the navbar top menus if
      there is not ample space. This commit also converts multi company
      selector with 'fa-building' and multi website selector with 'fa-globe'
      icons on smaller screens.
      
      task-1945020
      
      closes odoo/odoo#32321
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      98d4b214
  22. Sep 25, 2018
  23. Sep 19, 2018
    • Sébastien Theys's avatar
      [IMP] account,sale,website: improve buttons text and class · a7f32c26
      Sébastien Theys authored
      Website generic: change "edit to backend" class to match other menu dropdown items.
      
      Invoice: add "back to edit mode" banner.
      
      Sales Order:
      - "Reject" in red, we really don't want the user to click it.
      - "Accept & Sign" renamed to better convey the meaning and match the button on the popup.
      
      PR: #26801
      task-1876864
      a7f32c26
  24. Sep 13, 2018
  25. Aug 31, 2018
  26. Aug 13, 2018
    • Jeremy Kersten's avatar
      [FIX] website: improve/fix menu, copy on unlink, clone page, unique_path, sale_report, ... · 602807ac
      Jeremy Kersten authored
      
      Fix bug from the initial poc of JOV
      
      Fix menu creation
         - creating a menu would create a 'container' menu in the DB (.create is call without website_id)
         then writing on it would copy (if condition to cow) the menu with a website_id leaving the first
         one as a menu container unused.
         - website_menu should always have a website_id
           we dont want to support the multiwebsite system that allow to have generic/specific menu
           unlink/write is useless now since we always have a website_id
      
      Make unique_path website dependent, 2 distinct website can have a page with same name
      
      Make Sale report multiwebsite compliant
      
      Make website_id on sale_order / account.invoice as a related stored from partner_id.
      
      Co-authored-by: default avatarDerie Romain <rde@odoo.com>
      Co-authored-by: default avatarKersten Jérémy <jke@odoo.com>
      602807ac
    • Joren Van Onder's avatar
      [IMP] website,*: support multiple websites · 4f6ec1cd
      Joren Van Onder authored
      This implements support to administer multiple websites. Although the
      core functionality already existed, managing multiple websites was
      fairly technical.
      
      In the interest of database updates and migration this attempts to
      keep duplicated data to a minimum. To do this the usual generic
      records are rendered unless some website-specific record exists that
      replaces it. Copy-on-write (COW) is used to create these
      website-specific records. Through this mechanism creating a
      website-specific record is delayed until necessary. A COW mechanism
      has been implemented on 4 models: ir.ui.view, website.page,
      website.menu and ir.attachment. These COW mechanisms are activated
      when editing data through the website (aka frontend). These frontend
      edits (e.g. with web_editor) will be website-specific, possibly
      creating a website-specific record when necessary. When editing data
      in the backend nothing special will happen, even when editing a
      generic record. Note that because of this mechanism also facilitates
      the ability to create new, uncustomized websites because the generic
      data is kept.
      
      Support is provided for a website to have any theme. Themes are fairly
      complex to handle. Standalone themes can depend on other standalone
      themes (e.g. theme_beauty depends on theme_loftspace) and themes
      usually modify some data of the themes they depend on. Because a theme
      can be installed on multiple websites, using website_id m2o fields
      does not work well. It would require duplicate data, making updates
      and migration harder. Because of this, data for themes (ir.ui.view and
      ir.attachment specifically) have a theme_id m2o. website has a
      theme_ids m2m that identifies all theme modules currently installed on
      it. Through these fields we figure out what to render. A theme is only
      fully uninstalled when it's no longer active on any website. The
      advantage of this approach is that upgrading or migrating theme data
      is no different from the single-website case.
      
      The website.published.mixin class was modified to handle multiple
      websites. A wizard was added in the backend to easily manage this for
      multiple website.
      
      Although not used anywhere in this commit, a 'website_id' variable has
      been added in the evaluation context of ir.rule. It allows to easily
      make any model multi-website aware, all that's needed is a custom
      website_id m2o field on a model and a custom record rule.
      4f6ec1cd
  27. Aug 09, 2018
    • sed-odoo's avatar
      [IMP] website_*: Improve menus and configuration · d81e1b73
      sed-odoo authored
      Purpose
      =======
      
      Clean menus structure in website frontend and backend, for an easier navigation.
      
      Specification
      =============
      
      Website
      -------
      
      - Restructure menu
      - Enterprise: Keep google analytics view in a dedicated menu item when ecommerce is
        installed:
          - Sales Dashboard(ecommerce dashboard)
          - Analytics (google analytics)
      - Community: Keep both sales orders and google analytic dashboard on the same
        dashboard view
      - Restore google analytics api option in website settings when ecommerce
        is installed
      
      E-Commerce
      ----------
      
      - Website > orders > orders: add default filter "from website" and remove it in
        the action. That way if you create an order manually there is still a way
        to find it from the menu (the salesteam is different)
      - Default filter for abandoned cart menu
      - Improve setting text and tooltip. It's not obvious that recovery emails must
        be sent manually. Replace with:
          - Title: Abandoned Carts
          - Subtitle: Send a recovery email when a cart is abandoned
          - Tooltip: Abandoned carts are all carts for which no transaction has
                     been confirmed while the customer has filled in their address.
                     You can find them in *Website > Orders > Abandoned Carts*.
                     From there you can send a recovery email to stimulate the
                     customers to resume their order.
          - Tooltip email template: This email template is suggested by default
                                    when you send a recovery email.
          - Tooltip hours: Carts are flagged as abandoned after this delay.
          - Hour label: Cart is abandoned after .... hour(s).
      
      Task ID: 1859170
      d81e1b73
  28. Jul 27, 2018
    • qsm-odoo's avatar
      [REF] *: BS4, replace 'btn-xs' by 'btn-sm' · 582933ac
      qsm-odoo authored
      In a previous commit, we removed the use of the 'btn-sm' classes as we
      used it everywhere for default-size buttons instead of customizing the
      size of those default-size buttons directly.
      
      This commit proves it was even more necessary as the 'btn-xs' class does
      not exist anymore in BS4 and we so can use the 'btn-sm' class instead.
      582933ac
    • qsm-odoo's avatar
      d48b8593
    • qsm-odoo's avatar
      [REF] *: BS4, adapt dropdowns and carets · 1c1c0897
      qsm-odoo authored
      - The dropdown structure was simplified, allowing to get rid of the
        3-levels structure induced by <ul/> elements and dropdowns can now
        contain anything. The class 'dropdown-item' is now mandatory for
        each dropdown clickable element. The class 'dropdown-item-text' can
        be used to add same padding and style but without making the element
        have a clickable look.
      
      - Dividers now use the class 'dropdown-divider'
      
      - The way dropdowns are opened and hidden also changed (before the
        'open' class was added on the `.dropdown-menu` parent, now the
        'show' class is added on both the `.dropdown-menu` parent and the
        `.dropdown-menu` itself).
      
      - JS-wise, no click event handlers can be put on `.dropdown-toggle`
        elements anymore (instead, use handlers for dropdown events).
      
      - Carets are automatically put on `.dropdown-toggle` elements, so this
        commit replaces the `.caret` elements with this. This feature was
        possible to disable but would prevent us from adding a caret with
        scss. Also, this simplifies the DOM. The 'o-no-caret' class was also
        introduced to allow using the 'dropdown-toggle' class on non-caret
        elements.
      
      - Also adapt the scss to use $caret-width instead of $caret-width-base
      1c1c0897
    • qsm-odoo's avatar
      [REF] *: BS4, adapt display classes · 7f10b55a
      qsm-odoo authored
      The system completely changed. I also had to adapt classes to new
      screen breakpoints.
      
      hidden/hide -> d-none
      show -> d-block
      hidden-xs -> d-none d-md-(block/inline/...)
      hidden-sm -> d-md-none d-lg-(block/inline/...)
      hidden-md -> d-lg-none d-xl-(block/inline/...)
      hidden-lg -> d-xl-none
      visible-xs-* -> d-* d-md-none
      visible-sm-* -> d-none d-md-* d-lg-none
      visible-md-* -> d-none d-lg-* d-xl-none
      visible-lg-* -> d-none d-xl-*
      hidden-print -> d-print-none
      visible-print-* -> d-none d-print-*
      ...
      and all possible combination of those had to be handled too.
      7f10b55a
  29. Jul 12, 2018
  30. Jul 04, 2018
    • kujiu's avatar
      [FIX] Syntax of icons (#25577) · f90cf060
      kujiu authored
      Description of the issue/feature this PR addresses:
      
      Accessibility improvements forbids the use of the syntax
      `<i class="fa fa-check"/> Some text`
      to create a labelled icon. But, by this, some fonts are changed.
      
      Desired behavior after PR is merged:
      The old syntax can be used.
      f90cf060
  31. Jun 28, 2018
  32. Jun 22, 2018
    • kujiu's avatar
      [IMP] Improve compatibility with screen readers (accessibility) (#24574) · 9de1bc0e
      kujiu authored
      Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable.
      
      This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader.
      
      
      * [IMP] Labels must have a for attribute. Improve accessibility.
      * [IMP] Better error message when trying to read a missing cached value
      * [FIX] Add some aria-label and title attributes for screen readers.
      * [FIX] Template name is not included in the error message in case of SyntaxError in QWeb
      * [FIX] Improve the Tour failed at step error message to be more explicit.
      * [IMP] Add aria-labels
      * [FIX] Add missing aria-label on failing test
      * [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all.
      * [IMP] Color names on kanban views and many2many tags
      * [IMP] Add some checks on views for accessibility.
      * [IMP] Add `alt` attribute on `img` tags.
      * [IMP] Add aria-label and title on non-described icons
      * [IMP] Add button role to widgets with btn class
      * [IMP] Translate aria and formatted attributes.
      * [IMP] Remove wrong aria-labelledby
      * [IMP] Add menu role on dropdowns
      * [IMP] Buttons must be focusable
      * [IMP] Add aria attributes on progress bars
      * [IMP] Improve accessibility of basic widgets
      * [IMP] Change main layout to more semantic tags
      * [IMP] Add menuitem role when missing
      * [IMP] Remove wrong role='presentation'
      * [IMP] Improve accessibility of tab panels
      * [IMP] Add aria-invalid on invalid fields
      * [IMP] Add aria-sort on ordered columns
      * [IMP] Add role on alerts
      * [IMP] Use dialog role, header, main and footer tags for modals
      * [IMP] Add labels on o_status
      * [IMP] Improve accessibility of kanban view with feeds and articles
      * [IMP] Add alerts in case of new messages
      * [IMP] Add widget, navigation or img role to aria-labelled items
      9de1bc0e
Loading