Skip to content
Snippets Groups Projects
  1. Feb 11, 2020
    • Bhavita Bhatt's avatar
      [IMP] website, website_link: improve frontend config screens · 4e162a4e
      Bhavita Bhatt authored
      
      Following things are done in this commit:
      1. changed some labeling and string for more readable and helpful to the user
      2. added extra width to the text box
      3. added publish/unpublish option for mobile view.
      4. track page option auto-activated for any new page,event,job offer,course,
         blog.
      
      task-2088546
      closes #40085
      
      Co-authored-by: default avatarjpr-odoo <jpr@openerp.com>
      4e162a4e
    • mcm-odoo's avatar
      [REF] mail, various: remove user_signature field from mail.template · de1743ab
      mcm-odoo authored
      
      RATIONALE
      
      Mail template model holds a field telling odoo mail engine to automatically
      add the current user's signature to the body. Its use depends on the use
      case
      
        * using the template in the composer on a single record: it is displayed
          in the rendered template in the composer, meaning people could change it.
          This behavior is interesting as it allows to see the email content;
        * using the template in the composer in mass mail mode: it is not displayed
          as only the raw jinja is displayed. It is therefore not obvious that it
          will be appended to the body of the mail. People could add it manually and
          have 2 signatures as a result;
      
      A mechanism automatically adding a signature to sent emails when posting a
      message is already implemented and is based on template existence. If a
      template has been used when posting, no signature is added in sent emails.
      Otherwise it is automatically added. This behavior should not change.
      
      Behavior will therefore be
      
        * use a template -> specify signature usage in it manually through jinja;
        * do not use a template -> signature added in sent emails;
      
      SPECIFICATIONS
      
      Remove user_signature.
      
      Update template body accordingly. In customer oriented templates that are using
      it and do not already contain it, manually add a call to user.signature within
      the jinja code. When set to False, just remove its declaration.
      
      Quickly clean some signature integration.
      
      LINKS
      
      Task ID 2089252
      Community PR odoo/odoo#39482
      Enterprise PR odoo/enterprise#6459
      Upgrade PR odoo/upgrate#761
      
      Related: odoo/enterprise#6459
      Related: odoo/upgrade#761
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      Co-authored-by: default avatarMichaël Mattiello <mcm@odoo.com>
      Co-authored-by: default avatarThibault Delavallée <tde@odoo.com>
      de1743ab
    • Victor Feyens's avatar
      [IMP] *: use `ref=` instead of `eval="ref('` in xml field tags. · d4e0fe01
      Victor Feyens authored
      
      * Code cleanup
      * Avoid a safe evaluation of the field value when loading those records.
      
      closes odoo/odoo#44883
      
      Related: odoo/enterprise#8283
      Signed-off-by: default avatarVictor Feyens (vfe) <vfe@odoo.com>
      d4e0fe01
  2. Jan 27, 2020
  3. Feb 04, 2020
    • Martin Trigaux's avatar
      [ADD] *: add ir.model.access on all transient models · 65530dfd
      Martin Trigaux authored
      Following changes needing ir.model.access on transient models too.
      Remove groups declaration on the action to move it to ir.model.access
      when possible.
      Rules are strict by default with no unlink access by default and high
      priviledge asked. Adaptations may be needed later.
      Write access is given as a wizard may need to be modified in case the
      action triggers an error and the user has to correct a value
      
      account*: use account.group_account_user for all transient by default
      	  remove account.print.journal relic
      stock*: use stock.group_stock_user by default
      survey: survey user can send invitations
      mail: allow any employee to execute wizards
            additional verifications are made to ensure they are executed
            only on the documents the user has access to you
            give portal access to mail.compose.message as portal still does
            some actions like posting messages on the forum
            add ir.rule to avoid reading somebody else messages
            increase the query count because of undeterminist count
      crm: saleman for lead2opp, manager for massmailing
           partner manager for actions linked to partners
           avoid a write in test_lead_lost
      sms: any employee can send sms
      mrp: mrp user can execute wizards
           give unlink access as making write during do_produce operation
      base_import: employees can import files
      delivery: stock user can deliver
      event_sale: sale user can configure the wizards
      	    event user inherit from  sale rights
      gamification: employee can give badge
      google_service: resolve FIXME
      hr: add specific rights
          manager can set a plan according to group on button
          anyone who can write on an employee can register a departure
      hr_expense: set rights based on buttons
      hr_holidays: an approver can make a summary report
      hr_recruitment: recruiter can refuse a candidate
      hr_timesheet: can use the wizard if can create a timesheet
      l10n_eu_service: managers can create fiscal positions
      mass_mailing: same group as on mass.mailing.list
      membership: accountant can create invoice from membership
      payment: accountant can create a link
      	 as the source is an account.move
      	 keep the payment.acquirer.onboarding.wizard to system user
      	 only as it is called during company configuration
      point_of_sale: PoS manager only can use wizards
      	       never create closing_balance_confirm_wizard records
      product_expiry: stock user has rights on stock.picking
      product_margin: access from accounting menus
      repair: same rules as for above models
      sale: set ir.rule for self wizard only
            add rule from model introduced in payment to add salesman group
      sale_crm: saleman can create a quotation from a lead
      sale_coupon: any saleman can generate coupon
      	     add self ir.rule
      sale_product_configurator: salesman can select product variants
      snailmail: employee can send letters
      website: designers can write on website
      website_crm_partner_assign: same rule as group on action
      website_sale: sale ACL as for payment.acquirer.onboarding.wizard
      website_slides: anyone can send invitation
      
      base: base.language.*: allow employee (cf lang_install)
            change.password.user: can not read change password wizard of
            other users
            test.*: no access is needed
      
      Courtesy of Damien Bouvy, William Andre and Antoine Prieëls for review
      of acl
      65530dfd
  4. Feb 03, 2020
  5. Jan 24, 2020
  6. Jan 23, 2020
  7. Jan 21, 2020
    • Romain Derie's avatar
      [FIX] *: fix translations inconsistency in 't-set' · 98678199
      Romain Derie authored
      This commit fix most `t-set` errors that either led to:
        1. unwanted text to be considered as translatable.
           eg: `<t t-set="classes">text-left bg-100 p4</t>` would create an
           `ir.translation`.
        2. text that should be translatable were not.
           eg: `<t t-set="text" t-value="'Both'"/>` would not create an
           `ir.translation` while it should.
      
      If a text should be translatable, it should never be inside a `t-value`:
        - `<t t-set="text">Both</t>`
      If a text should not be translatable, it sould either be inside `t-value`,
      `t-valuef` or the `<t>` tag should have `t-translation="off"`:
        - `<t t-set="classes" t-translation="off">text-left bg-100 p4</t>`
        - `<t t-set="classes" t-valuef="text-left bg-100 p4"/>`
        - `<t t-set="classes" t-value="'text-left bg-100 p4'"/>`
      
      https://github.com/odoo/odoo/pull/43660
      https://github.com/odoo/enterprise/pull/7839
      https://github.com/odoo/design-themes/pull/203
      
      
      
      closes odoo/odoo#43660
      
      Related: odoo/enterprise#7839
      Signed-off-by: default avatarRomain Derie (rde) <rde@odoo.com>
      98678199
    • Xavier Bol (xbo)'s avatar
      [IMP] base: add default image for users + placeholder if unassigned · 51b36c3d
      Xavier Bol (xbo) authored
      
      1/ When the new database is created without demo data, the admin has a
         'silhouette' as a default picture. When a new user is created without
         picture given by the current user, the new user will have a 'silhouette'
         as a default profile picture.
      
      2/ web: image for fa-user-slash. This image will be used when a record is
         unassigned.
      
      3/ web, *: Change placeholder by default when record is unassigned.
         We want to have a fa-user-slash icon when a record is unassigned instead
         of 'placeholder.png'. A method is created in the BaseModel to have a
         generic method to change easily the placeholder for other models.
      
      4/ Adapt kanban test to keep the same behaviour. Attention the behaviour is
         a bit different. Because, now the default image is given by the server to
         change easily the default image when a record doesn't have an image.
         Thus, we don't say if it's the default placeholder, but we can say it's
         not the same image of the record (in this test, the record, it's the
         partner).
      
      5/ misc: display 'Unassigned' in the hover on kanban cards if record is unassigned
      
      closes odoo/odoo#41356
      
      Taskid: 2060206
      Related: odoo/enterprise#7758
      Signed-off-by: default avatarYannick Tivisse (yti) <yti@odoo.com>
      Co-authored-by: default avatarjdoutreloux <jud@odoo.com>
      Co-authored-by: default avatarYannick Tivisse <yti@odoo.com>
      51b36c3d
  8. Jan 16, 2020
  9. Jan 07, 2020
  10. Jan 02, 2020
  11. Dec 31, 2019
  12. Dec 24, 2019
    • Thibault Delavallée's avatar
      [FIX] website_slides: do not display links to unviewable slides · 9a0267ee
      Thibault Delavallée authored
      
      Channel allow to browse slides and a list of available slide is displayed
      as a left panel in the eLearning frontend. Even slides current user
      cannot see are displayed in order to give some information about course
      content. Accessible slides are clickable, other slides should be
      displayed as strings. However due to some sudo when computing slide
      informations all links are set as clickable.
      
      There is no security issue as when being redirected to a slide the
      user cannot access there is an acl error. However he should not have
      the links displayed, just strings. This commit fixes that behavior.
      
      closes odoo/odoo#42338
      
      X-original-commit: 04a957bb
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      9a0267ee
    • Patrick Hoste's avatar
      [IMP] website_slides: allow to download slide content and additional resources · 1894dc54
      Patrick Hoste authored
      
      PURPOSE
      
      Currently eLearning lacks feature of having downloadable resources on
      lessons. Indeed for example teachers would like to attach zip files or
      other resources linked to a given lesson.
      
      SPECIFICATIONS
      
      You can now allow the user to download the slide content for pdf and image
      slides. A new icon will be visible next to the fullscreen button on the pdf
      viewer.
      
      Course maintainers can also add additional resources to a slide which will be
      available to download for the user.
      
      Task ID 2066741
      PR #39890
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      1894dc54
    • Patrick Hoste's avatar
      [IMP] website_slides: add comments on answers showed after answering a quiz · e42ee496
      Patrick Hoste authored
      
      PURPOSE :
      
      A quiz after a course content is a good way to check if the user gets the previous lesson.
      Despite, the user/student may not understand why his answer was wrong/correct.
      In this task we'll allow the teacher to add a comment next to the asnwer of a quiz.
      
      SPECIFICATION :
      
      The quiz creator will now be able to comment the answers to inform the frontend user why
      his answer is wrong/correct. He will be able to add the comments both in backend and frontend.
      
      Task ID : 2072566
      PR : #41188
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      e42ee496
  13. Dec 20, 2019
  14. Dec 18, 2019
  15. Dec 20, 2019
    • Thibault Delavallée's avatar
      [FIX] website_slides: fix wrong comodel name in many2many · 4ef326de
      Thibault Delavallée authored
      
      Channels uses tags allowing to categorize and filter content. For that
      purpose a m2m exists between channels (slide.channel) and tags (slide.channel
      .tag). The 2many relationship from tags to channels holds however a wrong
      comodel name. It has no impact on code since relationship table is
      correctly defined and current code does not use the channel_ids fields
      from tags.
      
      closes odoo/odoo#42244
      
      X-original-commit: 46c3ac94485292c59fdfe4b21a8e32eef9d1f998
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      4ef326de
  16. Dec 18, 2019
  17. Dec 12, 2019
  18. Dec 16, 2019
  19. Dec 13, 2019
    • Florent Lejoly's avatar
      [FIX] website_slides: fix cancel of uploaded file · 39979b75
      Florent Lejoly authored
      
      Steps to reproduce
      
        * connect as any user with right to edit website;
        * go to website and chose a course;
        * add content -> chose any of the possibilities;
        * click on choose file, select a file and open it;
        * click on choose file again, and then cancel
      
      You get a traceback. This is due to the right panel that displays a preview
      of the selected file. IN this commit we fix that issue by removing the
      preview panel.
      
      Task id 2146217
      PR#40895
      
      closes odoo/odoo#41837
      
      X-original-commit: e59b86e6
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      39979b75
  20. Dec 12, 2019
    • mcm-odoo's avatar
      [REF] website_slides: define specific eLearning user groups · 90bf317c
      mcm-odoo authored
      
      PURPOSE
      
      Have user groups specific to eLearning to separate them from generic website
      editors. Indeed this is a specific work area and require more than pure design
      skills.
      
      SPECIFICATIONS
      
      Two user groups are added in this commit
      
        * group_website_slides_officer
      
          + can read any course/slide
          + can create a course (will be responsible)
          + can write on its courses
          + can upload slides to the courses he is responsible
          + can publish slides to the courses he is responsible
          - cannot unlink courses/slides (you should archive them)
      
          * implies group_website_publisher in order to see the top navbar in
            frontend with the publish toggle button and the new content button;
      
        * group_website_slides_manager: has full rights
      
          + can read any course/slide;
          + can create a course;
          + can add slide to any courses;
          + can publish any courses/slides;
          + can unlink any courses/slides;
          + has access to reporting menu entries;
      
      Rights for other groups are untouched for courses / slides. As a reminder
      we still support responsibles being outside of eLearning groups, for example
      if an employee is a teacher that handles a course:
      
        * people in upload_group_ids of a channel can upload slides, even if they
          don't belong to any eLearning group;
        * people responsible of a course can upload and publish slides even if they
          don't belong to any eLearning group (done through controller as they
          don't have real rights on underlying models);
      
      We choose to keep the survey rights separated from eLearning ones. Indeed
      it is easy in odoo to update the imply_ids field of groups if necessary
      to link survey / eLearning groups; default user template can also be updated
      easily. Standard Odoo should therefore correctly separate those groups. The
      only specific rights is that eLearning officers can read all surveys, allowing
      to choose them for certification-based courses.
      
      LINKS
      
      Task ID 2062462
      PR #39485
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      90bf317c
  21. Dec 04, 2019
  22. Dec 10, 2019
  23. Dec 09, 2019
  24. Dec 02, 2019
    • Thibault Delavallée's avatar
      [MOV] website_rating: move to portal_rating · 9e067788
      Thibault Delavallée authored
      PURPOSE
      
      Clean posting process and improve mail.message definition and comprehension.
      Move as much possible content from website_* modules to portal_* modules
      to ease their use in customer portal
      
      SPECIFICATIONS
      
      Now that publish feature is replaced by internal directly in mail and portal
      rating portal inclusion can be done safely in a portal_ratign module instead
      of website_rating. It allows to remove the dependency and give the rating
      feature of customer chatter directly in portal applications.
      
      LINKS
      
      Task ID 2071556
      PR #38692
      9e067788
    • Thibault Delavallée's avatar
      [REF] {website_}mail: move and replace published field of mail.message to is_internal · 5649fc88
      Thibault Delavallée authored
      PURPOSE
      
      Clean posting process and improve mail.message definition and comprehension.
      
      SPECIFICATIONS
      
      Website mail defines a website_published field allowing to publish / unpublish
      comments on the frontend of some modules. This field has several drawbacks :
      
        * it is used only for front-end people (portal, public) and has no real
          effect in chatter / classic discussions;
        * it is used only in some advanced front-end module and is not available
          in portal by default;
        * its naming is not really correct as it is not linked to fields coming
          from the website_published mixin and its behavior is not really
          the same;
        * its use is a bit duplicated with internal flag coming from subtype
          allowing to hide messages related to an internal subtype;
        * there are overrides of standard mail.message methods just to handle
          this flag;
      
      In this commit we change that field by an is_internal flag directly on
      mail.message model itself. It tells if share people (customers, share users)
      are allowed to read the message. This field can be given through posting
      API or set manually using widgets. It is also used in access rights custom
      methods and managed like the internal flag of subtypes.
      
      Mailgateway was already using an internal flag for internal note replies. It
      is renamed to is_internal and propagated as it is now a standard field. It
      also eases code understanding.
      
      Portal is updated to allow managing the flag directly. It means customer portal
      now natively allows to moderate customer comments without any need of website
      modules.
      
      Rating is updated accordingly. An is_internal field is added, replacing the
      related on website published.
      
      LINKS
      
      Task ID 2071556
      PR #38692
      5649fc88
    • Thibault Delavallée's avatar
      [REF] mail, various: rename subtype parameter of message_post to subtype_xmlid · e2b33f46
      Thibault Delavallée authored
      PURPOSE
      
      Clean posting process and improve mail.message definition and comprehension.
      
      SPECIFICATIONS
      
      In order to be more explicit subtype parameter is renamed to subtype_xmlid.
      It therefore clearly indicates it should be a valid subtype Xml ID. Support
      of ill formatted Xml IDs is removed because there is no reason to try to
      add some random prefix. Give something that exists or go to hell, punk !
      
      LINKS
      
      Task ID 2071556
      PR #38692
      e2b33f46
    • Julien Castiaux's avatar
      [FIX] website_slides: external tour used old code · 98374bb0
      Julien Castiaux authored
      
      Fine tunning of 07f70e3c
      
      closes odoo/odoo#41194
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      98374bb0
    • Florimond Husquinet (fhu)'s avatar
      [IMP] website_slide: improve the ways to search through courses · 0a46e086
      Florimond Husquinet (fhu) authored
      
      PURPOSE
      
      Purpose of this commit is to improve search capabilities of eLearning
      frontend application. Searching tags and content should be easier to
      do, update and notice.
      
      SPECIFICATIONS
      
      Before this commit
      - There is no visual indication to what are the selected filters.
      - The user can only select one tag in each dropdown box.
      - When the user selects a tag on one course card, this tag replaces all other
      filters.
      - When the user enters custom search terms, it replaces all other filters.
      - When searching a documentation, a stacktrace appears.
      
      After this commit
      - Selected tags appear as little tag boxes under the search bar.
      - The custom search terms appear as one tag box.
      - It's possible to remove a search tag by clicking on the cross present in each
      little box.
      - It's possible to select multiple tags in each dropdown box.
      - Tags in course cards work the same as tags in dropdown boxes, and add
      themselves to the list of filters.
      - To generate the list of courses to display, a logical OR is operated between
      tags of the same group, and a logical AND is operated between groups of tags.
      - A logical AND is operated between the custom search terms and other filters.
      - A logical AND is operated between the "My courses" options and other filters.
      - Bug when searching a documentation is fixed.
      
      LINKS
      
      Task ID: 2080617
      PR #39259
      
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      0a46e086
  25. Nov 29, 2019
    • qmo-odoo's avatar
      [FIX] website_slides: Fix traceback when creating content in mobile · a82fd088
      qmo-odoo authored
      
      This commit fixes the traceback that happens when we try to create
      a question from the survey form in mobile mode.
      
      The problem was due to the context not being propagated
      to the "add record" button that appears in mobile mode.
      Therefore, as we use that context in our widget, it crashes.
      
      The solution to this is to just use the normal tree view behavior
      instead of our override when we are in a mobile environment.
      
      LINKS
      
      closes odoo/odoo#41143
      
      Taskid: 2071342
      Pr: #40694
      X-original-commit: 0dc7d956
      Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
      a82fd088
    • Thibault Delavallée's avatar
      [REF] mail, various: improve mail creation calls, notably author and email from default computation · 1838191e
      Thibault Delavallée authored
      Purpose of this commit is to correctly compute author_id and email_from
      in mail_message and mail_mail as they depends from each other. Moreover it
      is a good idea in various flows to specify email and author when giving
      creation values to avoid default computation that is not always guaranteed to
      be accurate notably when involving super user.
      
      Mail message creation could lead to desynchronized values between author
      and email_from. This is improved with this commit by correctly inheriting
      from default_get and computing both of them at the same time instead of having
      two default values. Indeed they depend on each other.
      
      Same thing is done for mail composer. Mail Thread offers a tool method to
      find email_from / author_id based on having one of those values or current
      user and it is called whenever necessary.
      
      Some calls to mail template send_mail are also cleaned.
      
      Task ID 1853147
      PR #32243
      1838191e
Loading