Skip to content
Snippets Groups Projects
  1. Feb 14, 2018
  2. Feb 12, 2018
    • Christophe Simonis's avatar
    • Christophe Simonis's avatar
    • Alexandre Kühn's avatar
      [MERGE] mail,web,*: JS mail and services tracebacks · 83354c2b
      Alexandre Kühn authored
      * account,bus, web_editor, website, website_slides, web_tour
      
      This merge fixes most issues where the webclient crashed with
      discuss installed in mobile.
      
      These issues occur due to the fact that the chat_manager, now
      a service, was loaded after the webclient is instantiated.
      The main idea of the fix is to let the webclient register services
      that are loaded after its instantiation.
      
      Despite appearances, the desktop mode had also this issue, but
      most of the bugs were hidden thanks to the availability of tours
      that are loaded after the module mail.
      83354c2b
    • Alexandre Kühn's avatar
      [FIX] mail,web,*: Cleaning some JS code · 7339ae97
      Alexandre Kühn authored
      - Whitespace trailing
      - Split long lines
      - Replace some 'self' to 'this'
      - Improved some JS docs
      - DRY in tests using services
      7339ae97
    • Alexandre Kühn's avatar
      [FIX] mail,web: JS mail and services tracebacks · 066eaaea
      Alexandre Kühn authored
      Fix over this commit: https://github.com/odoo/odoo/commit/02ec09cb1c3e2d7bc7968f40c18f2208d7f3f498
      
      In mobile, when discuss is installed, there is a traceback.
      
      This is a consequence on an issue with JS services, where some of them
      are not registered in the service provider.
      For instance, the webclient (the service provider) was instantiated before
      chat_manager (a service), so it was not aware of this service.
      
      To solve this issue, service providers now listen on newly registered services.
      
      Also improving deployment of JS services by not relying on topological sort.
      066eaaea
    • Alexandre Kühn's avatar
      [FIX] web{_site,_editor}: transparent root instance 'root widget' · 0de5c1f0
      Alexandre Kühn authored
      With this commit, any component that needs an instance of the
      root widget can simply require the module 'root.widget'. Based on
      the context (backend, frontend, iframe), the real root.widget
      will resolve to either the webclient, the website root instance, or
      the iframe root instance.
      
      This is desirable in order for the tour_manager to become a child
      of the root widget, as tours are enabled in any of the above contexts.
      
      This commit is a requirement in order to solve an issue with JS services,
      in which there should be only one service provider at any given time.
      0de5c1f0
    • William Henrotin's avatar
      [FIX] purchase_requisition delete requisition. · dd610140
      William Henrotin authored
      The PurchaseRequisition unlink method call the wrong variable
      dd610140
    • William Henrotin's avatar
      [FIX] purchase_requisition remove api.multi in action_in_progress · 7ad9f288
      William Henrotin authored
      The action_in_progress method was tagged as api.multi but badly. so we
      remove it and add an ensure_one() check.
      7ad9f288
    • William Henrotin's avatar
      [FIX] purchase_requisition sequence handling · ab4b03ef
      William Henrotin authored
      As the sequence name depends on the requisition type. The name must be
      set not when the requisition is in draft but confirmed. In the confirm
      state, the type in readonly. The name is also reset when the requisition
      is put in draft.
      ab4b03ef
    • William Henrotin's avatar
      [FIX] purchase_requisition edit product price to 0 · 69890545
      William Henrotin authored
      When editing a blanket order, if the price change, the price also change
      in the supplier info. The issue is we can set 0 in the price.
      69890545
    • Jaykishan Solanki's avatar
      [IMP] product: Allow to search on variants barcode/ref from template · 317f5f11
      Jaykishan Solanki authored
      Purpose
      =======
      
      Be able to search on the internal reference & Barcodes of the product variants from the search on product.template
      https://drive.google.com/a/odoo.com/file/d/0B0ITmdw6h3ZrZmw3Ym1LUzcwYU0/view?usp=drivesdk
      317f5f11
    • Jaykishan Solanki's avatar
      [IMP] sale,purchase,...: Hide Variants menuitems in debug mode · 62900064
      Jaykishan Solanki authored
      Purpose
      =======
      
      Avoid confusion between product template and product variant. People don't understand that editing some stuff on the product variants may impact the other variants
      
      Specification
      =============
      
      Hide the menu Product Variants/Product Template in the debug mode
      
      List of product menuitems
      -------------------------
      
      sales > catalog > products  (product.template)
      sales > catalog > product variants  (product.product) => Add in technical
      website > catalog > products (product.template)
      website > catalog > product variants (product.product) => Add in technical
      point of sale > catalog > products (product.template)
      point of sale > catalog > product variants (product.product) => Add in technical group
      purchases > purchase >products (product.template)
      purchases > purchase >product variants (product.product) => Add technical group
      inventory > inventory control > products (product.template)
      inventory > inventory control > product variants  (product.product) --> Add technical group
      manufacturing > master data > products (product.template) => Add technical group
      accounting > configuration  > products (product.product)
      PLM > master data > products (product.template)
      lunch > configuration > products (lunch.product)
      62900064
    • Christophe Simonis's avatar
      c69d0015
    • Christophe Simonis's avatar
    • Thibault Delavallée's avatar
      [MERGE][FIX] mail: fix notification emails not containing global links for URLs and images · a65b0b23
      Thibault Delavallée authored
      See sub commits for more details. Was task 55210. #Closes #22940 .
      a65b0b23
    • Thibault Delavallée's avatar
      [DOC] test_mail: increment activity counter · 29955b21
      Thibault Delavallée authored
      Sometimes runbot adds one query. Not sure why, let us avoid having
      red runbots.
      29955b21
    • Thibault Delavallée's avatar
      [IMP] mass_mailing: use mail thread link replacer · 2ef1394e
      Thibault Delavallée authored
      Mail thread now holds a method to replace local links by global links.
      Let us therefore use it in mass mailing as it does basically the same
      job. Adding base tag is not necessary anymore since there are not
      local links or images anymore.
      2ef1394e
    • Thibault Delavallée's avatar
      [FIX] mail: replace local links in notification emails · b1b9896c
      Thibault Delavallée authored
      Since notification emails are not mail templates anymore they do not go
      through the mail_template.render_post_process() method that converts
      local links to absolute links. This means that buttons and images were
      not correctly displayed in notification emails. Indeed those still had
      local links.
      
      This commit fixes that by moving the method directly in mail.thread and
      calling it accordingly when rendering the notification email. Note that
      the method has been changed in order to use regex instead of html
      parser. It is done based on work already done in mass mailing application.
      Indeed using parsers is complex and time consuming and may create
      changes in the html structure that are not intended.
      
      Next step in master is to go through various link modifications in
      mass mailing module to see how to handle them properly. Maybe.
      b1b9896c
    • Thibault Delavallée's avatar
      [FIX] mail: fix wrongly QWeb-converted bits of notification emails · 94f2f624
      Thibault Delavallée authored
      Notification emails now use QWeb to be rendered instead of jinja-based
      mail.template since 2f759376. Part of the notification emails was not working
      anymore since its syntax was still using jinja. This commit fixes that.
      
      This commit also removes strange ';' that should not be part of python code
      as well as an unnecessary variable propagation.
      94f2f624
    • Nicolas Lempereur's avatar
      [FIX] web_editor: regression less editor 5af12238 · 1c5bb856
      Nicolas Lempereur authored
      In 5af12238 a change was made to have the correct hierarchy levels, but
      this can cause an issue when editing less files.
      
      This is because we now had "undefined + 1" which gives NaN which breaks
      Array constructor.
      
      opw-814579
      opw-815397
      opw-814322
      opw-815265
      opw-814021
      closes #23006
      1c5bb856
    • Christophe Simonis's avatar
    • Christophe Simonis's avatar
    • Martin Geubelle's avatar
      [MOV] web, mrp: move `pdf_viewer` widget · a7b521fe
      Martin Geubelle authored
      This widget is generic enough to be used in other modules than mrp so
      we move it in the web module.
      
      Closes #22569
      a7b521fe
    • Aaron Bohy's avatar
      [FIX] web,*: tests: remove src attr from img nodes · c265e47a
      Aaron Bohy authored
      In the tests environmnent, we don't want img and iframe nodes to
      perform RPCs when they are inserted into the DOM. For img nodes,
      we prefixed the src attribute by '#test: ' as soon as they were
      inserted into the DOM. Unfortunately, this didn't work as expected:
      an RPC was done to fetch route '/web/tests?' (i.e. the tests page),
      because everything after '#' in the url isn't sent to the server.
      
      This rev. completely removes the src attribute of img nodes, and
      set a 'data-src' attribute with the original src attribute's value,
      so that it can still be checked in the tests.
      
      Tests using this attribute have been adapted accordingly.
      c265e47a
    • Aaron Bohy's avatar
      [REF] web: tests: move calls to removeSrcAttribute · 5c67abd0
      Aaron Bohy authored
      In the tests environment, we listen to the 'DOMNodeInserted' event
      to remove the src attribute of img and iframe nodes as soon as they
      are inserted into the DOM, so that they don't perform RPCs.
      
      However, this listener was bound in the create(Async)View, and
      createActionManager helpers only. This rev. moves it to the
      addMockEnvironment helper which is more global, and basically used
      by all tests.
      
      Moreover, we now listen to the 'DOMNodeInserted' event on the body,
      instead of on the widget, as it may happen that some content is
      inserted into the DOM outside the widget itself (e.g. dialogs are
      appended to the body).
      5c67abd0
    • Aaron Bohy's avatar
      [FIX] web: ListView: format footer values · 11dff2b0
      Aaron Bohy authored
      Before this rev., the aggregates values displayed in the footer of
      list views were formatted according to the field type, and the
      field's widget was ignored, whereas it should be used by default.
      For instance, if the 'float_time' widget is set on a float field,
      the sum should be formatted as FloatTime as well.
      
      Closes #22724.
      11dff2b0
    • Aaron Bohy's avatar
      [FIX] web: ListView: reset selection when reloading · 0982ceaa
      Aaron Bohy authored
      Before this rev., the list of selected records wasn't correctly
      reset when the list was reloaded (e.g. when coming back using the
      breadcrumbs). In the UI, the records weren't selected anymore, but
      in javascript, the list of selected records wasn't empty. As a
      consequence, the aggregates were wrongly computed, and always
      displayed 0.
      
      Closes #22725.
      0982ceaa
    • Lucas Perais (lpe)'s avatar
      [FIX] web_planner: take 'view_type' of action into account · b6d156ad
      Lucas Perais (lpe) authored
      Before this commit, when a planner made a link from an action, the view_type was always 'list'
      This prevented the view from being properly loaded, as an action of view_type form wouldn't be recognized
      
      After this commit, such links are well formed, and form view_type actions are correctly loaded
      
      OPW 806758
      b6d156ad
    • Christophe Simonis's avatar
      851c29ce
    • Géry Debongnie's avatar
      [FIX] web: update form widgets when state has changed · e0cb522b
      Géry Debongnie authored
      Since the <widget> tag is not used anymore in any of our views, it was
      not really properly supported. In particular, the form widget was not
      notified when the state of the form view has changed, which makes it
      very difficult to actually do any useful work.
      
      With this commit, we make sure that the widget method 'updateState' (if
      it exists) is called with the new state whenever it changed.
      
      This should allow developers to do useful work without having to work
      around the issue. Note that this is not really a perfect solution, since
      the updateState methot may or may not have been implemented.
      
      I think that we need some kind of ViewWidget abstraction, which could be
      used to have a better and more complete API for widgets in a basic view.
      And AbstractField could inherit from ViewWidget.
      e0cb522b
    • Raphael Collet's avatar
      [IMP] clean up use of cursors in tests · 107b82f6
      Raphael Collet authored
      107b82f6
    • Raphael Collet's avatar
      [REF] tests: `TestCursor` is now a proxy to a real `Cursor` · 7ea4f13f
      Raphael Collet authored
      This allows rpc requests in `HttpCase` to use the cursor `self.cr`, which is
      now shared between the Python test and the rpc requests.  This simplifies code
      to prepare a JS test, and code to check the result of a JS tour.
      
      Fixes #12237
      7ea4f13f
    • Raphael Collet's avatar
      9e6bc391
    • Rémi Rahir's avatar
      [FIX] crm_phone_validation: fix lead phone validation · 8b9bcf1b
      Rémi Rahir authored
      Fixes country_id and company_id mismatch in 65832dc.
      
      Removes the view added by said commit as it was not a true stable
      fix since it required users to update the module.
      
      This commit uses a workaround to get the missing company_id field
      which is monkey-patching the fields_view_get of the model, as
      suggested by rco.
      
      This commit also removes the exception catches that were rendered
      useless by the False value given to the raise_exception parameter
      of phone_format, introduced in 65832dc as well.
      
      This commits fixes the behaviour in the website form as the phone
      numbers were sanitized but never saved as such on their record.
      
      This commit also renames the Phone Validation config setting to
      suit its true functionality.
      8b9bcf1b
    • Mahendra Barad's avatar
      [IMP] crm: Remove 'To Close Today' and 'To Close This Week' filters · 459a53dd
      Mahendra Barad authored
      Purpose
      =======
      
      They make no sense, expected closing is just a guess.
      459a53dd
Loading