Skip to content
Snippets Groups Projects
  1. Aug 05, 2019
    • Stéphane Bidoul's avatar
      [IMP] core: improve python external dependencies check · 795c7b0a
      Stéphane Bidoul authored
      
      Use pkg_resources.get_distribution() to check if python external
      dependencies are installed, instead of trying an import.
      The import test is preserved as a backwards compatibility measure.
      
      This better expresses which python distribution needs to be installed
      from PyPI and allows declaring a minimum supported version using PEP 440
      version specifiers.
      
      Closes #25541
      
      closes odoo/odoo#25549
      
      Signed-off-by: default avatarChristophe Simonis <chs@odoo.com>
      795c7b0a
    • Xavier-Do's avatar
      [IMP] mail: gc more notification. · 4f44ad4f
      Xavier-Do authored
      
      This gc option should delete more notifications: we only keep notification
      not send, and set inbox notification as sent.
      
      closes odoo/odoo#30067
      
      Signed-off-by: default avatarXavier Dollé (xdo) <xdo@odoo.com>
      
      
      Co-authored-by: default avatarThibault Delavallée <tde@odoo.com>
      4f44ad4f
    • Xavier-Do's avatar
      [REF] mail: remove notified_partner_ids from mark_all_as_read · a55c7883
      Xavier-Do authored
      mark_all_as_read is using notified_partner_ids to filter
      the messages to use. But anyway, the notification will
      be filtered on partner right after that.
      
      Since if we have a domain, the message set will be quite small,
      (scope of a thread) we search all those messages.
      
      If not, we actually avoid to search on message and go right
      to the notifications.
      
      Reading the message_ids will garantee to have the minimal
      set of message that where actually passed from unread to read.
      Since data should not be in cache at this time and mark_all_as_read
      is usually called alone, we prefer to use cache and perform a read
      immediatly.
      
      Task-ID 402597
      a55c7883
    • Xavier-Do's avatar
      [REF] mail: remove notified_partner_ids from _message_read_dict_postprocess · 42b3a56a
      Xavier-Do authored
      notified_partner_ids, (previously notified_partner_ids) is used to
      populate a list of partner to prefetch + return a list of partner_ids.
      
      1. the list of partner_ids is doesn't look to be used, and thus
      can be removed. Was introduced in 1d4dbc34
      
      2. Prefetched list of partners is used to generate customer_email_data.
      Since this list is limited to partner email notifications , we can use
      a custom search instead.
      
      The proposed implementation is far from perfect but proposes the minimal
      changes to remove notified_partner_ids, without (hopefully) negatively
      impacting performances.
      
      Task-ID 402597
      42b3a56a
    • Xavier-Do's avatar
      [REF] mail, test_mail, *: rename needaction_partner_ids to notified_partner_ids · bb37ab21
      Xavier-Do authored
      ,*:crm, website_blog
      
      The mail.message needaction_partner_ids meaning changed over time,
      and doesn't actually reflect the list of partner in needaction.
      More than that the message_format needaction_partner_ids used by js
      began to diverged from mail.message field since 19fb6508
      
      To avoid any confusion, renaming it to notified_partner_ids will help
      to avoid confusion between python and js meaning, and reflect the actual
      content of this field : a list of partner that where notified once on
      this message. This field is mainly usefull for testing.
      
      Task-ID 402597
      bb37ab21
    • Nikunj Ladava's avatar
      [IMP] mail, test_mail: new 'History' mailbox in Discuss · 0c37b9fb
      Nikunj Ladava authored
      This commit adds a new mailbox in the Discuss app called 'History'.
      Messages that have been marked as read are moved to 'History'.
      
      Notifications are required to link history messages to users. So
      notifications are now deleted after they are more tha 6 months old.
      This means History mailbox keeps less than 6 months old messages.
      
      Note that this feature only works when user notifications are handled
      in Odoo. This can be set in the user preferences, under the
      "Notification Management" section.
      
      Task-ID 402597
      0c37b9fb
    • William Henrotin's avatar
      [FIX] mrp: blocks default product on bom line · 634bdbfa
      William Henrotin authored
      
      The action called from the product's bom stat button (mrp.product_open_bom)
      fill the key 'default_product_id'. This allows, creating a bom from the list view,
      to prefilled the product.
      
      This context key will also fill each new bom line as the technical field is
      called product_id too.
      
      This commit overrides default_product_id to False for the bom line One2many
      in the bom form view in order to only prefill the finished product and not
      the components.
      
      Task : 2045485
      
      closes odoo/odoo#35444
      
      Signed-off-by: default avatarSimon Lejeune (sle) <sle@openerp.com>
      634bdbfa
    • Florian Gilbert's avatar
      [IMP] account: add widget for tax groups in account.move · ca2aacfd
      Florian Gilbert authored
      
      Widget allowing the modification of tax groups to round up the total.
      
      closes odoo/odoo#34716
      
      Signed-off-by: default avatarCedric Snauwaert (csn) <csn@openerp.com>
      ca2aacfd
    • Florent de Labarre's avatar
      [IMP] base: add more information for incorrect dependencies · c8fca2d0
      Florent de Labarre authored
      
      If a dependency was wrong in the triggers, it was hard to debug
      
      Co-Authored-By: default avatarOlivier Dony <odo@odoo.com>
      
      closes odoo/odoo#31958
      
      Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
      c8fca2d0
    • Thanh Dodeur's avatar
      [IMP] base: removes storing of res_name from ir.attachment · 8a812612
      Thanh Dodeur authored
      
      This commit removes the store property of `res_name` from `ir.attachment`
      as it doesn't need to be stored and could contain outdated information
      if the record name was changed after the computation.
      
      Task: #1943295
      
      closes odoo/odoo#34930
      
      Signed-off-by: default avatarMartin Geubelle (mge) <mge@openerp.com>
      8a812612
    • fja-odoo's avatar
      [REF] website, *: remove hardcoded image urls · 5dac8f8f
      fja-odoo authored
      * = website_forum, website_profile, website_sale,
      website_sale_comparison, website_slides, website_slides_survey
      
      Some image links were hard coded in the xml views of website, now they
      are replaced with website.image_url(model, field).
      
      Part of https://github.com/odoo/odoo/pull/34149
      
      
      task-2007400
      
      closes odoo/odoo#34149
      
      Signed-off-by: default avatarQuentin Smetz (qsm) <qsm@odoo.com>
      5dac8f8f
    • fja-odoo's avatar
      [REF] website_sale, *: use website_url on product href · b6a28a55
      fja-odoo authored
      * = website_event_sale, website_sale_comparison, website_sale_wishlist
      
      Some product links were not using website_url, now that we have an url
      for product.product we should use that one to reach the right product.
      
      Part of https://github.com/odoo/odoo/pull/34149
      task-2007400
      b6a28a55
  2. Jul 22, 2019
  3. Aug 05, 2019
    • Kevin Baptiste's avatar
      [FIX] base_setup: remove mobile apps icon during search · c5ab50cc
      Kevin Baptiste authored
      
      The mobile apps icons were always showing even during a search in the
      settings.
      
      closes odoo/odoo#35325
      
      Signed-off-by: default avatarRomain Libert (rli) <rli@odoo.com>
      c5ab50cc
    • Robot Odoo's avatar
      [MERGE][REF] website_slides: make eLearning an application with its own backend · fb2522ac
      Robot Odoo authored
      PURPOSE
      
      eLearning should have its own application in manager. Indeed this is becoming
      a big application and having it embedded inside Website application is not
      enough anymore. It should also hold updated and easy-to-use menus,
      navigation, actions and views in backend.
      
      SPECIFICATIONS
      
      Update manifest and make website_slides an application separated from
      website embedded menus.
      
      Implement new menu structure
      
      * Courses
      * Courses
      List view: Course Name, # Views, # Attendees, # Ratings, Revenues,
      Reviews
      * Contents
      * Reviews: kanban view of channel reviews
      * Certifications: kanban view of surveys of type certificate
      
      * Forum
      * Forums: add columns to list view: Posts (questions count), Views
      (sum of views of each post), Answers (sum of child_count on each post),
      Favorites (sum of favourite_count on each post)
      * Posts: add columns to list view: Views / Answers / Favourites
      
      * Reporting
      * Courses: list view on slide.channel model, ordered by # views.
      List view: Course Name, # Views, # Attendees, # Ratings, Revenues;
      * Contents: graph view on slide.slide model
      Area Graph: X month
      Y measure: # Views (others measures: Attendees, ...)
      Group by: course (color)
      * Revenues: graph view on sale.report model showing revenues of eLearning
      courses.
      Area chart, X: monthn Y: €, Color: course
      * Certifications: list view on surveys of type certificate
      Columns: Title, Survey Stage, Registered People, Certified People, Attempts
      Success Rate (certified/attempts), Average Results
      * Reviews: see kanban of latest reviews;
      * Quiz: list view on slide.question model.
      List view: Add # Quizz Trials, # Quizz Passed, Avg Attempts
      * Forum: graph view on forum.post model
      Area chart: # Posts created by months, color=forum
      
      * Configuration
      * Settings
      * Allow Forum on Courses (installs website_slides_forum)
      * Allow Certifications (installs website_slides_survey)
      * Allow Selling Courses (installs website_sale_slides)
      * Course Tags
      * See channel.tags.group with label Course Tags, form view allow to
      configure group tags
      * https://drive.google.com/a/odoo.com/file/d/1G0g2UnG5cZG55EXQ5icbgwe7T2eSZskT/view?usp=drivesdk
      * On click: open :https://drive.google.com/a/odoo.com/file/d/1I_PW3aZAbrslXadiYqmVF-_6dGXx8knd/view?usp=drivesdk
      * Content Tags
      
      Add course (slide.channel) kanban view. Each tile should contain
      
      * Title of the course
      * Tags below the title
      * Primary button "New Lesson"
      * Statistics :
      * Attendees
      * Running (progress != 100%)
      * (if one content is certificate) Certified or Finished
      * See : https://drive.google.com/a/odoo.com/file/d/13K8FmkbwmBG4JQ5gH3Q5T8OlWPs3blcu/view?usp=drivesdk
      * With FP remarks https://drive.google.com/a/odoo.com/file/d/1mb7LUT0VUNs5fMcKB9c0Bfaqk2-XFFuu/view?usp=drivesdk
      * Add "Sales       150.00$" below "Watch Time" if type "on payment". Same
      info than the smart/stat button on the course itself. Click on the amount
      sends to Reporting Revenues (same than on the stat btn)
      
      Add review (rating.rating) kanban view. Each tile should contain
      
      * Kanban view, full width, no default group by
      * Order by date (most recent on top)
      * See: https://drive.google.com/a/odoo.com/file/d/1IYE1QBIJa26BLugRiafyBop-srkYwndC/view?usp=drivesdk
      * add a tag for unpublished comments
      * Add the pic of the user above the stars
      * Click on card, send to front-end and able to (un)publish the comment
      * Kind of what's on the front-end:  https://drive.g
      
      
      
      Improve course form view: add a revenue stat button displaying the total
      of sale order linked to the course's product.
      
      Integrate a button on slide.channel form view allowing to perform a mass
      mailing on course attendees. Do a flow similar to event.
      
      Remove "Our Documentation" dummy default existing data. It makes no sense
      to have void data. Instead just add a small explanation text in eLearning
      front-end telling the user to create its first course if he has rights to
      do so.
      
      In order to better show the new backend add some demo data for missing
      numbers, notably
      
      * sales: add confirmed sale orders in order to have revenues value;
      * forum: add some posts and answers;
      * quiz: update slide.slide.partner demo data to hold quiz attempts count
      
      LINKS
      
      Task 1978729
      PR #35061
      
      Co-Authored-By: default avatarThibault Delavallée <tde@odoo.com>
      Co-Authored-By: default avatarJérémy Hennecart <jeh@odoo.com>
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      Unverified
      fb2522ac
    • Thibault Delavallée's avatar
      [REV] website_sale: set Cart recovery back in form view · 3d737bb3
      Thibault Delavallée authored
      Partially reverts d781d6f6ea504dcc89f412b94774df6bd08c78aa
      
      Indeed modified tour has to go through various list view actions and is
      likely to crash because of some complicated triggers to write. Let us have
      the recovery action back to form view. Anyway it makes no harm to have it
      available in action menu.
      
      LINKS
      
      Task 1978729
      PR #35061
      3d737bb3
    • Jérémy Hennecart's avatar
      [IMP] website_slides(_*): improve demo data and remove dummy data · aeb23b21
      Jérémy Hennecart authored
      
      PURPOSE
      
      eLearning should have its own application in manager. Indeed this is becoming
      a big application and having it embedded inside Website application is not
      enough anymore. It should also hold updated and easy-to-use menus,
      navigation, actions and views in backend.
      
      SPECIFICATIONS
      
      Remove "Our Documentation" dummy default existing data. It makes no sense
      to have void data. Instead just add a small explanation text in eLearning
      front-end telling the user to create its first course if he has rights to
      do so.
      
      In order to better show the new backend add some demo data for missing
      numbers, notably
      
        * sales: add confirmed sale orders in order to have revenues value;
        * forum: add some posts and answers;
        * quiz: update slide.slide.partner demo data to hold quiz attempts count;
      
      LINKS
      
      Task 1978729
      PR #35061
      
      Co-Authored-By: default avatarThibault Delavallée <tde@odoo.com>
      Co-Authored-By: default avatarJérémy Hennecart <jeh@odoo.com>
      aeb23b21
    • Jérémy Hennecart's avatar
      [REF] website_slide_survey: improve integration into eLeaning application · ee29641b
      Jérémy Hennecart authored
      
      PURPOSE
      
      eLearning should have its own application in manager. Indeed this is becoming
      a big application and having it embedded inside Website application is not
      enough anymore. It should also hold updated and easy-to-use menus,
      navigation, actions and views in backend.
      
      SPECIFICATIONS
      
      Add menu entry inside Courses
        * Certifications: kanban view of surveys of type certificate
      
      Add menu entry inside Reporting
        * Certifications: list view on surveys of type certificate
          Columns: Title, Survey Stage, Registered People, Certified People, Attempts
          Success Rate (certified/attempts), Average Results
      
      LINKS
      
      Task 1978729
      PR #35061
      
      Co-Authored-By: default avatarThibault Delavallée <tde@odoo.com>
      Co-Authored-By: default avatarJérémy Hennecart <jeh@odoo.com>
      ee29641b
    • Jérémy Hennecart's avatar
      [REF] website_sale_slides: improve integration into eLeaning application · ee10b19f
      Jérémy Hennecart authored
      
      PURPOSE
      
      eLearning should have its own application in manager. Indeed this is becoming
      a big application and having it embedded inside Website application is not
      enough anymore. It should also hold updated and easy-to-use menus,
      navigation, actions and views in backend.
      
      SPECIFICATIONS
      
      Improve course form view: add a revenue stat button displaying the total
      of sale order linked to the course's product.
      
      Add in slide.channel kanban card
        * Add "Sales       150.00$" below "Watch Time" if type "on payment". Same
          info than the smart/stat button on the course itself. Click on the amount
          sends to Reporting Revenues (same than on the stat btn)
      
      Add menu entry inside Reporting
          * Revenues: graph view on sale.report model showing revenues of eLearning
            courses.
              Area chart, X: month Y: €, Color: course
      
      LINKS
      
      Task 1978729
      PR #35061
      
      Co-Authored-By: default avatarThibault Delavallée <tde@odoo.com>
      Co-Authored-By: default avatarJérémy Hennecart <jeh@odoo.com>
      ee10b19f
    • Jérémy Hennecart's avatar
      [REF] website_slides_forum: improve integration into eLeaning application · 2e707935
      Jérémy Hennecart authored
      
      PURPOSE
      
      eLearning should have its own application in manager. Indeed this is becoming
      a big application and having it embedded inside Website application is not
      enough anymore. It should also hold updated and easy-to-use menus,
      navigation, actions and views in backend.
      
      SPECIFICATIONS
      
      Add menu after Courses
      
        * Forum
          * Forums: add columns to list view: Posts (questions count), Views
            (sum of views of each post), Answers (sum of child_count on each post),
            Favorites (sum of favourite_count on each post)
          * Posts: add columns to list view: Views / Answers / Favourites
      
      Add menu entry inside Reporting
        * Forum: graph view on forum.post model
            Area chart: # Posts created by months, color=forum
      
      LINKS
      
      Task 1978729
      PR #35061
      
      Co-Authored-By: default avatarThibault Delavallée <tde@odoo.com>
      Co-Authored-By: default avatarJérémy Hennecart <jeh@odoo.com>
      2e707935
    • Jérémy Hennecart's avatar
      [ADD] mass_mailing_slides: allow to mass mail course attendees · 313a7d9e
      Jérémy Hennecart authored
      
      PURPOSE
      
      eLearning should have its own application in manager. Indeed this is becoming
      a big application and having it embedded inside Website application is not
      enough anymore. It should also hold updated and easy-to-use menus,
      navigation, actions and views in backend.
      
      SPECIFICATIONS
      
      Integrate a button on slide.channel form view allowing to perform a mass
      mailing on course attendees. Do a flow similar to event.
      
      Add menu entry in menu of slide.channel kanban card after invite
        * Mail Attendees (same as on the course card and depend of the setting)
      
      Add menu entry inside Settings
        * Settings: add an option to install module mass_mailing_slide
      
      LINKS
      
      Task 1978729
      PR #35061
      
      Co-Authored-By: default avatarThibault Delavallée <tde@odoo.com>
      Co-Authored-By: default avatarJérémy Hennecart <jeh@odoo.com>
      313a7d9e
    • Thibault Delavallée's avatar
      [FIX] mass_mailing: correctly check mailing domain · fd9962cd
      Thibault Delavallée authored
      Currently each change in mailing model resets the mailing domain. Idea behind
      that behavior is that domain for a given model will probably not be valid for
      another model because of fields being model specific.
      
      However this breaks when creating mailing with default values for mailing
      model. Indeed even valid domains are reset to a default void / opt-out-ed
      value due to current onchange implementation.
      
      This commit fixes that behavior by resetting only invalid domain i.e.
      that crashes when performing a search on target model.
      
      LINKS
      
      Task 1978729
      PR #35061
      fd9962cd
    • Thibault Delavallée's avatar
      [IMP] website_slides: add an overview (kanban view) on course model · 98bdb241
      Thibault Delavallée authored
      PURPOSE
      
      eLearning should have its own application in manager. Indeed this is becoming
      a big application and having it embedded inside Website application is not
      enough anymore. It should also hold updated and easy-to-use menus,
      navigation, actions and views in backend.
      
      SPECIFICATIONS
      
      Add course (slide.channel) kanban view. Each tile should contain
      
        * Title of the course (make it big, o_primary)
        * Tags below the title
        * Primary button "New Lesson"
        * Statistics :
          * Attendees
          * Running (progress != 100%)
          * (if one content is certificate) Certified or Finished
        * See
          * v1: https://drive.google.com/a/odoo.com/file/d/13K8FmkbwmBG4JQ5gH3Q5T8OlWPs3blcu/view?usp=drivesdk
      
      With FP remarks https://drive.google.com/a/odoo.com/file/d/1mb7LUT0VUNs5fMcKB9c0Bfaqk2-XFFuu/view?usp=drivesdk
      
      
        * remove globe, type and visibility of course, lessen padding between rating
          views and watch time;
        * for rating, instead of 8.00 => 5 reviews (4.5/5);
        * replace "View Lesson" / "Invite" by "View Course" => Send to the front-end
        * In the menu of the card, add:
          * Invite (same behavior than before, when it was a primary btn)
        * click on x Contents:  land on the contents, group by category with sequence
        * re-order of the 3 infos/Stats at the bottom of the card: 1. Content,
          2. Attendee, 3. Certified
          * + number: font-weight: 500 + font-size 1.2em
          * + labels: remove text-uppercase, + text-color: #666666
          * + the "whole box" is clickable
      
      LINKS
      
      Task 1978729
      PR #35061
      
      Co-Authored-By: default avatarThibault Delavallée <tde@odoo.com>
      Co-Authored-By: default avatarJérémy Hennecart <jeh@odoo.com>
      98bdb241
    • Thibault Delavallée's avatar
      [IMP] website_slides: add a new kanban view for contents (slide.slide) · 665d0dfa
      Thibault Delavallée authored
      PURPOSE
      
      eLearning should have its own application in manager. Indeed this is becoming
      a big application and having it embedded inside Website application is not
      enough anymore. It should also hold updated and easy-to-use menus,
      navigation, actions and views in backend.
      
      SPECIFICATIONS
      
      Add a kanban view for slide.slide model
      
        * See https://drive.google.com/a/odoo.com/file/d/1WKj13-C_UCOwh4dN-FRmU9Pp6BsZ_HvT/view?usp=drivesdk
      
      LINKS
      
      Task 1978729
      PR #35061
      665d0dfa
    • Thibault Delavallée's avatar
      [IMP] website_slides: add a new kanban view for ratings · 54192e46
      Thibault Delavallée authored
      PURPOSE
      
      eLearning should have its own application in manager. Indeed this is becoming
      a big application and having it embedded inside Website application is not
      enough anymore. It should also hold updated and easy-to-use menus,
      navigation, actions and views in backend.
      
      SPECIFICATIONS
      
      Add in menu Courses, a new entry Reviews
        * Kanban view, full width, no default group by
          * Order by date (most recent on top)
          * See: https://drive.google.com/a/odoo.com/file/d/1IYE1QBIJa26BLugRiafyBop-srkYwndC/view?usp=drivesdk
          * add a tag for unpublished comments
          * Add the pic of the user above the stars
          * Click on card, send to front-end and able to (un)publish the comment
          * Kind of what's on the front-end:  https://drive.google.com/a/odoo.com/file/d/1e9aQSWvUM2QOynRT08XSUzIjFiGnjsv8/view?usp=drivesdk
      
      LINKS
      
      Task 1978729
      PR #35061
      54192e46
    • Jérémy Hennecart's avatar
      [REF] website_slides: make eLearning an application with its own menu structure · 4587e6a3
      Jérémy Hennecart authored
      PURPOSE
      
      eLearning should have its own application in manager. Indeed this is becoming
      a big application and having it embedded inside Website application is not
      enough anymore. It should also hold updated and easy-to-use menus,
      navigation, actions and views in backend.
      
      SPECIFICATIONS
      
      Update manifest and make website_slides an application separated from
      website embedded menus.
      
      Implement new menu structure
      
        * Courses
          * Courses
            List view: Course Name, # Views, # Attendees, # Ratings, Revenues,
            Reviews
          * Contents
      
        * Reporting
          * Courses: list view on slide.channel model, ordered by # views.
              * add a graph view (group by content)
          * Contents: graph view on slide.slide model
              Area Graph: X month
              Y measure: # Views (others measures: Attendees, ...)
              Group by: course (color)
          * Reviews: see kanban of latest reviews;
          * Quiz: list view on slide.question model.
              List view: Add # Quizz Trials, # Quizz Passed, Avg Attempts
      
        * Configuration
          * Settings
            * Allow Forum on Courses (installs website_slides_forum)
            * Allow Certifications (installs website_slides_survey)
            * Allow Selling Courses (installs website_sale_slides)
          * Course Tags
            * See channel.tags.group with label Course Tags, form view allow to
              configure group tags
            * https://drive.google.com/a/odoo.com/file/d/1G0g2UnG5cZG55EXQ5icbgwe7T2eSZskT/view?usp=drivesdk
            * On click: open :https://drive.google.com/a/odoo.com/file/d/1I_PW3aZAbrslXadiYqmVF-_6dGXx8knd/view?usp=drivesdk
      
      
          * Content Tags
      
      This structure will gain new items in sub-modules, notably bridge with
      form and website_sale. Those will be implemented in next commits.
      
      LINKS
      
      Task 1978729
      PR #35061
      
      Co-Authored-By: default avatarThibault Delavallée <tde@odoo.com>
      Co-Authored-By: default avatarJérémy Hennecart <jeh@odoo.com>
      4587e6a3
    • Thibault Delavallée's avatar
      [FIX] website_slides: fix breadcrumb when viewing a slide from a category search · ad9d7c5c
      Thibault Delavallée authored
      Template expects a category record but controller gives the ID of it.
      Oversight of 4ccd859b
      
      LINKS
      
      Task 1978729
      PR #35061
      ad9d7c5c
  4. Aug 02, 2019
  5. Jul 30, 2019
  6. Aug 03, 2019
    • Robot Odoo's avatar
      [IMP] *: correctly read/write website_published · 9885ccfd
      Robot Odoo authored
      
      The `website_published` field from the website's mixins is basically a readonly
      from `is_published` field.
      On read, this field will simply read `is_published` and check if the record's
      website_id is accessible (only for the multi mixin).
      On write, it will always write on `is_published`.
      
      Whenever possible, any access (read/search) on published state should be done on `website_published`.
      Any write should be done on `is_published`.
      
      This PR improves a few things:
      - A lot of code was writting on website_published which was just then writting
      on is_published. Writting directly on is_published makes more sense.
      - Some backend fields would still reference `website_published` instead of
      `is_published` which would just go through the related for no reason.
      Plus, using `is_published` will make the field tooltip more accurate as we
      are not in a website context ('Visible on current website' to 'Is Published')
      - Filter and search on tree view were still using the `website_published`
      related field, which is just a readonly when we are not in a frontend
      context.
      - Some create and write function would have security check on
      `website_published` value but that was wrong as the user could bypass that by
      simply writting on `is_published`. For the write method, check `is_published`
      is more accurate as it will cover both case since `website_published` will
      then call the write method on `is_published`
      - Some models would create their own `website_published` field rather than using the
      `website.published.mixin` mixin which should be used instead.
      That was done to be able to override the default value of the boolean.
      This commit simply adds the possibility to override the default value of the
      mixin field.
      - Fix wrong publish security check that were only checking `website_published` in vals.
      
      closes odoo/odoo#35189
      
      Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
      Unverified
      9885ccfd
    • Romain Derie's avatar
      [FIX] website: correctly check security of publish mixin · 4086f344
      Romain Derie authored
      Commit 91696805 introduced a mechanism to check rights when writing or
      creating on `website_published` field.
      Problem is, `website_published` is just kind of a related to `is_published`
      which really stores the value.
      
      Thus, the checks would not work when writing/creating on `is_published`.
      That would leave a loophole to bypass the expected behavior.
      4086f344
    • Romain Derie's avatar
      [IMP] website*: use published mixin rather than own field · 7a90dedd
      Romain Derie authored
      *website_crm_partner_assign, website_customer
      
      Before this commit, some models would create their own `website_published`
      field rather than using the `website.published.mixin` mixin which should be
      used instead.
      
      That was done to be able to override the default value of the boolean.
      
      This commit simply adds the possibility to override the default value of the
      mixin field.
      
      Also, help and string could simply be added on xml views rather than overriding
      the field.
      7a90dedd
    • Romain Derie's avatar
      [IMP] *: correctly read/write website_published · cc1d78a8
      Romain Derie authored
      The `website_published` field from the website's mixins is basically a readonly
      from `is_published` field.
      On read, this field will simply read `is_published` and check if the record's
      website_id is accessible (only for the multi mixin).
      On write, it will always write on `is_published`.
      
      This commit improves a few things:
      - A lot of code was writting on website_published which was just then writting
        on is_published. Writting directly on is_published makes more sense.
      - Some backend fields would still reference `website_published` instead of
        `is_published` which would just go through the related for no reason.
        Plus, using `is_published` will make the field tooltip more accurate as we
        are not in a website context ('Visible on current website' to 'Is Published')
      - Filter and search on tree view were still using the `website_published`
        related field, which is just a readonly when we are not in a frontend
        context.
      - Some create and write function would have security check on
        `website_published` value but that was wrong as the user could bypass that by
        simply writting on `is_published`. For the write method, check `is_published`
        is more accurate as it will cover both case since `website_published` will
        then call the write method on `is_published`
      cc1d78a8
  7. Aug 02, 2019
  8. Jul 24, 2019
  9. Aug 02, 2019
Loading