Skip to content
Snippets Groups Projects
  1. Jun 08, 2020
    • Patrick Hoste's avatar
      [IMP] website_slides: add possibility to request access to private course · 78637439
      Patrick Hoste authored
      PURPOSE
      
      Before this commit, a user could not contact a course responsible to ask him
      to join. With this commit he is be able to do it.
      
      SPECIFICATIONS
      
      Change the message 'Contact website administrator' to 'Contact Responsible'.
      
      Add the name of the course responsible in the course description panel. When
      clicking on its name it opens a modal to request access to the course. It
      creates an activity linked to the customer and assigned to the responsible.
      
      When hovering the 'You're enrolled' button the fa-check icon changes to a
      fa-times icon to show that you can unsubscribe when clicking.
      
      LINKS
      
      Task ID : 2127364
      PR : #40708
      78637439
    • Patrick Hoste's avatar
      [FIX] website_slides: changes enroll_msg default value · ad8c53ac
      Patrick Hoste authored
      SPECIFICATION
      
      Changes enroll_msg default value to 'Contact Responsible' instead
      of testing if it was empty or not. Since the FieldHtml widget sets
      the default value to '<p><br></p>' it was never empty.
      
      LINKS
      
      Task ID : 2127364
      PR : #40708
      ad8c53ac
  2. May 15, 2020
    • Yannick Tivisse's avatar
      [IMP] various: Update list views with new widgets · 7b714a3b
      Yannick Tivisse authored
      Purpose
      =======
      
      The following task implemented new widgets/features in the listview for better UI.
      https://www.odoo.com/web#id=2195254&action=327&model=project.task&view_type=form&cids=1&menu_id=4720
      
      
      
      The goal of the current task is to use those to upgrade our listviews
      
      Specification
      =============
      
      Below are change requests on various listviews.
      
      Remove decoration-bf="message_needaction==True" from every listview in every module.
      
      PRODUCT - stock.view_stock_product_template_tree (product template)
      
      remove all decorations from <tree>
      set the following decorations on 'virtual_available' and 'qty_available'
      decoration-danger="virtual_available&lt;0"
      decoration-warning="virtual_available==0"
      also set decoration-bf on 'virtual_available'
      apply the same modifications on stock.view_stock_product_tree for product variants
      
      SUBSCRIPTION - sale_subscription.sale_subscription_view_list
      
      remove all decorations from <tree>
      'stage_id' field
      set <field name="stage_id" widget="badge" decoration-info="stage_category == 'draft'" decoration-success="stage_category == 'progress'"/>
      'recurring_next_date' field
      set <field name="recurring_next_date" string="Next Invoice" widget="remaining_days" attrs="{'invisible': [('stage_category', '!=', 'progress')]}"/>
      set decoration-bf on 'code' and 'recurring_total_incl'
      move 'percentage_satisfaction' before 'recurring_total_incl'
      set widget="many2one_avatar_user" on 'user_id'
      add <field name="activity_ids" widget="list_activity"/> after 'user_id'
      
      ELEARNING - website_slides.slide_channel_view_tree
      
      set widget="many2one_avatar_user" on 'user_id'
      'enroll' field
      set <field name="enroll" widget="badge" decoration-success="enroll == 'public'" decoration-info="enroll == 'invite'" decoration-warning="enroll == 'payment'"/>
      
      POS - point_of_sale.view_pos_order_tree
      
      remove all decorations from <tree>
      'state' field
      make visible and move it at the end of the view
      set <field name="state" widget="badge" decoration-info="state == 'draft'" decoration-success="state not in ('draft','cancel')"/>
      set decoration-bf on 'name'
      
      APPRAISAL - hr_appraisal.view_hr_appraisal_tree
      
      'state' field
      set <field name="state" widget="badge" decoration-info="state in ('new','pending')" decoration-success="state == 'done'"/>
      'date_close' field
      set <field name="date_close" widget="remaining_days" attrs="{'invisible': ['|',('state','=','done'),('state','=','cancel')]}"/>
      
      PAYMENT - account.view_account_payment_tree
      
      remove all decorations from <tree>
      'state' field
      set <field name="state" widget="badge" decoration-info="state == 'draft'" decoration-success="state == 'posted'"/>
      move 'company_id' before 'amount'
      
      CONTRACT - hr_contract.hr_contract_view_tree
      
      remove all decorations from <tree>
      'state' field
      set <field name="state" widget="badge" decoration-info="state == 'draft'" decoration-warning="state == 'close'" decoration-success="state == 'open'"/>
      set widget="many2one_avatar_employee" on 'employee_id'
      
      PAYSLIPS - hr_payroll.view_hr_payslip_tree
      
      remove all decorations from <tree>
      'state' field
      set <field name="state" widget="badge" decoration-info="state == 'draft'" decoration-warning="state == 'verify'" decoration-success="state in ('done','paid')"/>
      set decoration-bf on 'number' and 'net_wage'
      move 'company_id' before 'basic_wage'
      set widget="many2one_avatar_employee" on 'employee_id'
      
      SURVEY - survey.survey_tree
      
      'state' field
      set <field name="state" widget="badge" decoration-info="state == 'draft'" decoration-success="state == 'open'"/>
      
      APPLICATION - hr_recruitment.crm_case_tree_view_job
      
      set widget="date' on 'create_date'
      set widget="priority' on 'priority'
      set widget="many2one_avatar_user" on 'user_id'
      
      TIME OFF - hr_holidays.hr_leave_view_tree
      
      remove all decorations from <tree>
      'state' field
      set <field name="state" widget="badge" decoration-info="state == 'draft'" decoration-warning="state in ('confirm','validate1')" decoration-success="state == 'validate'"/>
      apply the same changes in hr_holidays.hr_leave_allocation_view_tree
      
      closes odoo/odoo#51305
      
      Taskid: 2256589
      Related: odoo/enterprise#10614
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      7b714a3b
  3. May 18, 2020
    • Patrick Hoste's avatar
      [REF] website_slides: move from onchange / default to stored editable computed field · 59265847
      Patrick Hoste authored
      
      PURPOSE
      
      Try to move from onchange / default_get to stored editable computed fields.
      Behavior should be the same (computed or set by user), with support of
      create / write / onchange field update without additional code.
      
      SPECIFICATIONS
      
      Update classic fields updated in some cases by onchange and/or default methods
      by fields with store=True, readonly=False. It means their value comes either
      from manual user input, either from trigger based computation.
      
      Remove onchange and default_get when possible, leading to an unique computation
      method and clearing fields definition.
      
      Also clean some fields definition inconsistencies, notably required fields
      that should instead be correctly computed or default that have no real meaning.
      
      SPECIFICATIONS: WIZARD CLEANING
      
      Remove email_from and author_id fieles defined on invite wizard. Those are
      not used in this wizard (not available in view) and default value is to use
      current user. We can simplify this wizard model by removing them.
      
      LINKS
      
      Task ID : 2229048
      PR : #49040
      
      Related: odoo/upgrade#1198
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      59265847
  4. May 14, 2020
    • Martin Trigaux's avatar
      [IMP] *: convert to private methods · d9287caf
      Martin Trigaux authored
      render, render_template, load, activity_schedule_with_view,
      get_website_pages should all be private:
      It should not be possible to render an aribtrary template only with
      its name or id
      
      Still need to render some qweb views from js so the method
      render_template is kept public.
      This explains why the website editor still need read access on
      ir.ui.view as we want to allow any snippet to be rendered.
      d9287caf
  5. May 13, 2020
    • Vishnu Thuletiya's avatar
      [IMP] various: Use the new avatar widget in kanban view · 9a830432
      Vishnu Thuletiya authored
      The purpose of task is to update the 'user/employee avatar' to the new
      widget in all the kanban view across all modules.
      The below new widget are introduced for avatar:
       - many2one_avatar_user (for user_id fields)
       - many2one_avatar_employee (for employee_id fields)
      which displays the avatar (i.e. picture) of a user/employee in front
      of his name and clicking on the avatar will open a chatbox to message
      that specific user/employee.
      
      So in this commit, For each kanban view with a user or employee avatar,
      replaced it by the field with the new 'many2one_avatar' widget.
      
      TaskID: 2244928
      Related Enterprise PR: https://github.com/odoo/enterprise/pull/10420
      
      
      
      closes odoo/odoo#50789
      
      Closes: #50789
      Related: odoo/enterprise#10420
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      9a830432
  6. May 08, 2020
    • Benjamin Frantzen (bfr)'s avatar
      [IMP] customer ratings flow improvements · e4a4ffb9
      Benjamin Frantzen (bfr) authored
      - Rename the 'Use Rating on Project' feature into 'Customer Ratings'
      - Rename the 'Set Email Template to Stages' link to 'Set a Rating Email Template on Stages'
      - Add an optional list view for the Stages menu
      - display warning if the rating_template_id field is set and if one of the selected project_ids doesn't have the rating_status field set to true
      - Project form view revamp
      - rename the '% on tasks' stat button into 'Customer Satisfaction'
      - Remove the 'no option' for the rating frequency field because it is required
      - project form : Add a 'Go to Website' stat button
      - Project dashboard: remove the 'Customer Ratings' menu item in more
      - Ratings page: the 'Last 30 days' filter include ratings from today
      - remove the Appointment / Helpdesk Customer Satisfaction / Live Support menu items
      
      TASK ID : 1251
      e4a4ffb9
  7. May 07, 2020
  8. May 05, 2020
    • Aaron Bohy's avatar
      [IMP] *: update list views · 900d1628
      Aaron Bohy authored
      This commit adapts several views to make them use newly defined
      widgets, the new decoration-xxx mechanism on fields, and to adapt
      them to the new design of buttons.
      
      Part of task 2195254
      900d1628
  9. May 01, 2020
    • DramixDw's avatar
      [IMP] website: simplify website menu · 9b982941
      DramixDw authored
      
      Some apps, once installed, automatically create a menuitem in website.
      What complexify the UI and create useless menu withtout plusvalue.
      
      It is not because you install livechat to make support online, that you want
      a link in your menu to show stats e.g.
      
      Now we remove the default menu created, and help user to find it when he create
      a link. The autocomplete suggest most of the main App's controllers
      
      task-2189613
      
      closes odoo/odoo#49081
      
      Related: odoo/enterprise#9733
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      9b982941
    • DramixDw's avatar
      [REM] website,*: remove About us page and references · 52c23e01
      DramixDw authored
      Remove the default about us page because it could be easily recreated and
      doesn't add a lot of value to the website.
      
      task-2189613
      52c23e01
  10. Apr 29, 2020
  11. Apr 28, 2020
  12. Apr 27, 2020
    • fja-odoo's avatar
      [IMP] website, *: warn user about outdated blocks · 11c60739
      fja-odoo authored
      * = mass_mailing, web_editor, website_crm, website_event, website_form,
      website_forum, website_hr_recruitment, website_mail_channel,
      website_mass_mailing, website_sale, website_slides
      
      When an outdated snippet's option are activated we display a warning
      in the left panel that inform the user about the potential
      malfunctions.
      
      To do so the snippet's template key is added to the snippet as
      data-snippet.
      If a snippet is "t-call" inside another snippet, it will need to use
      t-snippet-call instead of t-call to have the key on himself.
      
      Those unique keys are used on snippet selection to retrieve the
      snippet's version in the left panel and compare it with the currently
      selected snippet's version. Versions are describe with data-vcss,
      data-vjs and data-vxml. If a snippet's key is not in the left panel we
      consider that snippet as outdated.
      
      Added some tests to ensure that t-snippet and t-snippet-call really have
      their template key as data-snippet
      
      Adapted the views to the data-snippet changes adding
      data-snippet="tmpl_key".
      
      Part of: https://github.com/odoo/odoo/pull/44569
      
      
      task-2189669
      
      closes odoo/odoo#50254
      
      X-original-commit: 28a6cd49b6e87b75c2e70771e241c41778bf9e87
      Related: odoo/enterprise#10236
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      11c60739
  13. Apr 22, 2020
  14. Apr 24, 2020
  15. Apr 23, 2020
  16. Apr 16, 2020
  17. Apr 10, 2020
    • Nasreddin (bon)'s avatar
      [FIX] website_slides: Fix course publisher tour test · 4fd97c25
      Nasreddin (bon) authored
      
      There was 2 problems that caused the Publisher tour to fail:
      
      1. The pointer on the main menu was pointing to a link
      containg "New Course" as text instead of "Course".
      
      2. After selecting a picture (by clicking on it), the picture is
      automatically added and so no need to click on add button; had to
      remove this extra step.
      
      Task ID 2228922
      
      closes odoo/odoo#49390
      
      X-original-commit: b2f2c5e4ecfd6bf39ce0b2b724827202629231f1
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      4fd97c25
  18. Apr 08, 2020
    • Andrea Grazioso (agr-odoo)'s avatar
      [FIX] website_slides: correctly upload PDF in course · 30988c93
      Andrea Grazioso (agr-odoo) authored
      
      With website_slides installed go to website, select a course in which
      the user is enrolled, try to upload a pdf
      
      Traceback will occur because the category recordset is needed but the id
      is passed to _resequence_slides
      
      opw-2229756
      
      closes odoo/odoo#49198
      
      X-original-commit: 6d9b367a
      Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
      30988c93
    • Julien Castiaux's avatar
      [REF] base: Remove deprecated exceptions and osv · ab4000fb
      Julien Castiaux authored
      
      TL;DR: remember `osv` and `except_orm` ? You can forget about them.
      
      * Deprecated `except_orm` dropped.
      * `UserError` elevated as super type of all user-related
        errors.
      * Unused `DeferredException` dropped.
      * Unused `QWebException` dropped (real one is in `qweb.py`).
      * `MailDeliveryException` made a python exception.
      * `name` legacy exception attribute made an alias of the python standard
        `args[0]` attribute and deprecated.
      * `value` legacy exception attribute dropped.
      * `exception_type` RPC error response key dropped.
      * Deprecated `osv` module dropped.
      * `--osv-memory-age-limit` cli option made an alias of
        `--transient-age-limit` and deprecated.
      
      The `odoo.exceptions.Warning` have long been a deprecated alias to
      `UserError`. It is going to be removed in a future version but first we
      explicitly deprecate it with a warning.
      
      The `odoo.exceptions.DeferredException` was a very old internal
      exception, it has been removed without deprecation notice as it is never
      raised.
      
      The `odoo.exceptions.except_orm` has been a deprecated exception type
      with deprecation warning for 5 years, it has been removed in favor of
      UserError which becomes the super class of all user-related errors.
      
      The `odoo.base.models.ir_mail_server.MailDeliveryException` was
      inheriting `except_orm`. As it is not related to a user error but is
      more of a problem an admin much take care of, the exception has been
      made a Python error.
      
      The `exception_type` JSON key in RPC error responses was holding an
      hardcoded value derived from the exception type. Its usage has been
      dropped in favor of the `name` JSON key that holds the precise exception
      name. Again as it was hardly used in the source code (beside the crash
      manager) it has been dropped without deprecation warning.
      
      Since we are here trying to clean odoo custom exceptions, we are also
      deprecating the `name` exception attribute in favor of the more standard
      `args[0]` attribute.
      
      The `name` (along with `value`) were two attributes used to raise
      `except_orm` exceptions before the introduction of `UserError`,
      `AccessError` and related exceptions. The `name` attribute, at the time,
      was holding the exception type/title. Nowadays it contains the error
      message. The `value` attribute, at the time, was holding the error
      message. Nowadays it is no more used.
      
      The `osv` module contains very old deprecated aliases. There is no
      simple way to log a deprecation warning for osv, osv_memory and
      osv_abstract but as they have not been in use for ages, they have been
      removed too. To be consistent, the `--osv-memory-age-limit` cli option
      has been made a deprecated alias to the `--transient-age-limit`.
      
      closes odoo/odoo#45723
      
      Task: 2187728
      Related: odoo/enterprise#9162
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      ab4000fb
  19. Apr 07, 2020
  20. Apr 03, 2020
    • Thibault Delavallée's avatar
      [IMP] website_slides: implement archive cascade behavior in toggle_active · d73a9250
      Thibault Delavallée authored
      Purpose of this commit is to make use of toggle_active to implement business
      behavior linked to active field being changed. In this commit we move the
      business specific code from write to toggle_active. When archiving a channel
      its slides are archived.
      
      In this commit we also track active field for courses and slides, allowing
      to see flag changes in chatter.
      
      Task ID 2170708
      Community PR odoo/odoo#46563
      d73a9250
  21. Mar 31, 2020
    • fja-odoo's avatar
      [IMP] base, *: allow html fields not to sanitize forms · 388c222c
      fja-odoo authored
      
      * = event, website_event_track, website_sale, website_hr_recruitment,
      website_livechat, website_sale, website_slides
      
      The option to sanitize or not the forms was not available, this will
      allow better flexibility on whether forms should be sanitized or not on
      an HTML field.
      Also we use this new param to allow forms to be added on some already
      existing html fields where forms where sanitized out.
      
      task-2209554
      
      closes odoo/odoo#47318
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      388c222c
  22. Mar 30, 2020
    • Adrian Torres's avatar
      [FIX] *: set ondelete policy of required Selection fields · 1daf8eb1
      Adrian Torres authored
      
      With this commit, Selection fields with `required=True` which are
      extended via `selection_add` are given proper ondelete policies to
      ensure the cleanup of records containing these extended options during
      uninstall of the extending module.
      
      This commit also cleans up leftover uninstall hooks that were being used
      to handle the same set of problems prior to the ondelete mechanism being
      implemented for Selection fields.
      
      closes odoo/odoo#46325
      
      Related: odoo/enterprise#9117
      Signed-off-by: default avatarRaphael Collet (rco) <rco@openerp.com>
      1daf8eb1
  23. Mar 27, 2020
  24. Mar 26, 2020
    • Quentin Mourier's avatar
      [FIX] website_slides: fix empty section flag display in frontend · 1a8c0694
      Quentin Mourier authored
      Before this commit, empty sections were not flagged correctly whenever a slide
      got archived or dragged to another section. This is due to the empty flag is
      not updated accordingly.
      
      Taskid: 2090927
      X-original-commit: 43f05c0b92cf24812187490fb326fb6cfd9ca021
      1a8c0694
    • qmo-odoo's avatar
      [FIX] website_slides: fix slide reordering in frontend · 12c6d77e
      qmo-odoo authored
      This commit fixes the reordering of slides on upload or drag and drop
      in frontend. This issue was due to the fact that in a previous commit
      (c4eba6f5) uncategorized slides were moved to the bottom of the list,
      which broke the reordering after drag and drop.
      
      Indeed we use the dom order itself to reorder the slides with a simple rpc
      call to dataset/resequence. Instead we revert part of the previous fix
      to display uncategorized slides at the top. It allows to be coherent with
      resequence and with backend behavior that displays uncategorized at the
      top of the list.
      
      Another issue was that, on slide upload, in the controller, we used
      the category_id on the slide (which seems to not always be correct at
      this stage) instead of the one given by the javascript. This caused the slide
      to not be uploaded in the right section.
      
      This commit also adds some margin to the categories in frontend for training
      courses. Otherwise uncategorized slides are too close to the first category.
      
      Task ID 2090927
      
      X-original-commit: 7bd042d6e20c44558b90641409a6e3f8fa8000ed
      12c6d77e
    • Quentin Mourier's avatar
      [FIX] website_slides: fix resequencing based on category · 843caa27
      Quentin Mourier authored
      When new slides are added through frontend a resequencing of slides and
      categories sequence is done by calling _resequence_slides on the channel.
      However this method is not working as expected, and resequencing should
      take a category in order to better know where to start its resequencing.
      Otherwise it simply reorder slides in the same order as before, or in an
      unpredicted or prodicted but fasly order if new slide category has just been
      created.
      
      Task ID 2090927
      
      X-original-commit: f038946ae2e3f174bee086281a541c6bc770e354
      843caa27
  25. Mar 25, 2020
  26. Mar 24, 2020
    • Thibault Delavallée's avatar
      [MOV] mail, various: move replace_local_links to render mixin · 3d86a29a
      Thibault Delavallée authored
      PURPOSE
      
      Move links shortening tools on mail.render.mixin to have rendering and
      post procesing tools available on that mixin.
      
      LINKS
      
      Task ID 1963529
      Community PR odoo/odoo#32397
      3d86a29a
    • Thibault Delavallée's avatar
      [MOV] mail: move rendering code to mail render mixin · 822f4680
      Thibault Delavallée authored
      We also have to update code calling directly the rendering itself. Indeed
      some code bits does some rendering directly on jinja-enabled input and not
      through templates. Those calls have to be updated accordingly.
      
      LINKS
      
      Task ID 1963529
      Community PR odoo/odoo#32397
      822f4680
    • Thibault Delavallée's avatar
      [REF] mail: clean code about rendering in mail_template · a03f6483
      Thibault Delavallée authored
      PURPOSE
      
      Clean and rename code about language management and template rendering in mail
      template model.
      
      SPECIFICATIONS
      
      Clean method naming and try to make code easier to understand and call. Also
      add and/or clean docstrings of rendering methods.
      
      Notably
      
        * ``_classify_per_lang``: for each lang-contextualized template, give the list
          of record ids;
        * ``_render_template``: now working only on a valid list of IDs instead of
          allowing both int / list and having a return type depending on the input
          type. It allows to simplify code and delegate some processing to callers;
      
      Introduce new API method
      
        * ``_render_lang``: for each record id return the lang matching it;
        * ``_render_field``: render a field of mail.template, on given set of record
          ids. Usage: template._render_field('body_html', records.ids). Language
          computation is available for this method;
      
      Remove the "multi mode" support of rendering that either returned a rendered
      value, either a dict based on given ids. Now all methods always work in batch
      and caller have to fetch the correct result if necessary.
      
      LINKS
      
      Task ID 1963529
      Community PR odoo/odoo#32397
      a03f6483
    • Martin Trigaux's avatar
      [FIX] *: correct English terms · 81a5cc2e
      Martin Trigaux authored
      
      Some bad phrasing
      Courtesy of Cecile Collart
      
      closes odoo/odoo#48233
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      81a5cc2e
  27. Mar 23, 2020
Loading