Skip to content
Snippets Groups Projects
  1. Jun 28, 2017
    • Martin Trigaux's avatar
      [I18N] export base source terms · 81ff060f
      Martin Trigaux authored
      Unverified
      81ff060f
    • Darshan Kalola's avatar
      [FIX] web_editor: make html widget translatable · 7ada921e
      Darshan Kalola authored
      The translate feature of widgets html and html_frame had been
      broken by the new views refactoring. This commit restores it for
      the html widget, and removes it completely for html_frame as it
      wasn't working correctly before the new views anyway (moreover,
      it had already been disabled for mass_mailing: de403dc1).
      
      This commit also ensures that the changes are correctly saved for
      the html_frame widget. Note that this widget still needs to be
      converted to our new coding guidelines.
      7ada921e
    • Adrien Dieudonne's avatar
      [FIX] web: test wrongly adapted in ceff4d46 · 9f4922a8
      Adrien Dieudonne authored
      A test has been adapted in ceff4d46 whereas it shoudn't.
      Indeed this commit doesn't change anything in the case of 'Discard'
      button clicked.
      9f4922a8
    • Adrien Dieudonne's avatar
      [FIX] web: basic_controller: wait for the mutex before discard changes · ceff4d46
      Adrien Dieudonne authored
      Before this commit, the discard confirm dialog was directly shown
      without waiting for the write RPC. For instance, it the user clicked on 'Save'
      after editing a record, and then directly clicked on another menu or on the
      breadcrumb before the write RPC returned, the record was still considered
      as dirty and thus the confirm dialog was displayed. We now wait for the RPC
      to return before checking if the record is dirty, so that the confirm dialog
      is only displayed when the record is actually dirty.
      ceff4d46
  2. Jun 27, 2017
    • Aaron Bohy's avatar
      [FIX] mail: discuss: correctly bind handler · df45cf65
      Aaron Bohy authored
      df45cf65
    • Aaron Bohy's avatar
      [FIX] web: apps: correctly use this._rpc · 964b7c37
      Aaron Bohy authored
      session.rpc should not be used anymore. The function '_rpc'
      available on widgets should be used instead (with the correct
      params).
      
      Also, 'session' is no longer a widget attribute.
      964b7c37
    • Aaron Bohy's avatar
      [FIX] web: FieldSelection on m2o: unset value · 9fbed634
      Aaron Bohy authored
      When the value of a many2one field with widget selection was unset,
      it's value wasn't actually set to false in the BasicModel. It was
      set to a virtual id like 'virtual_294' instead. This caused a
      traceback when this value was sent to the server, obviously.
      
      This was for example the case of the Register Payment form view
      (accessible from a customer invoice), when the user selected a
      payment journal, and then unselected it (the virtual id was then
      sent to the onchange RPC).
      9fbed634
    • Aaron Bohy's avatar
      [FIX] web: MonetaryField: rerender with currency · 7ea6f653
      Aaron Bohy authored
      The MonetaryField can be rendered with or without a currency. The
      currency can change during the lifecyle of the widget (e.g.
      currency field in the view, whose value is set by an onchange).
      More precisely, the widget can be instantiated without currency,
      then a change on another field can trigger an onchange which sets
      the currency, and our monetary widget is re-rendered with a
      currency.
      
      Before this rev., this wasn't supported in edit mode because the
      $el's root node was different if there were a currency or not
      (it was an input if there were no currency, and a div containing
      an input and a span otherwise). This root node being rendered only
      once (at the creation of the widget), the widget wasn't re-rendered
      correctly if the currency was suddenly set or unset.
      
      This fix makes the widget behave uniformly whether or not there is
      a currency, so now it is always a div containing an input (and
      optionally a span if there is a currency).
      7ea6f653
    • Aaron Bohy's avatar
      [FIX] web: ViewManager: filter out some keys from context · 816a3cd2
      Aaron Bohy authored
      A traceback occured when trying to create a BOM by going to
      Inventory > Master Data > Products, on a product form view clicking
      on the BOM stat button, and then on 'Create'.
      
      This was a context problem: the context of the 'Products' action
      was passed to the 'BOM' action without removing action specific
      keys like 'default_*' or 'search_default_*'. For instance, it
      contained a 'default_type' key, and as type is also a field of the
      mrp.bom model, the python tried to interpret it, except that the
      given value wasn't a correct value for mrp.bom.
      
      When a button is clicked, we mix contexts coming from different
      places to execute the new action. For some of them, we already
      filtered out those action specific keys. This fix is simply to
      make the piece of context adding the problematic keys pass though
      the filter as well.
      816a3cd2
    • Aaron Bohy's avatar
      [FIX] web: BasicModel: correctly eval x2manys in domains · 4881f942
      Aaron Bohy authored
      When x2many fields have to be evaluated in domains (e.g. ['id',
      'in', some_x2many_field]), they must be evaluated as the list of
      ids in the relation (whereas in contexts, they are evaluated as a
      list of commands). Before this rev., they were always evaluated as
      a list of commands.
      
      Note that this didn't work neither before the new views.
      4881f942
    • Aaron Bohy's avatar
      [FIX] web: BasicModel: store changes in x2many as operations · 17e19815
      Aaron Bohy authored
      Datapoints of the BasicModel store the data fetched from the
      server and changes done (not saved yet) by the user. For x2many
      fields, datapoints are of type 'list' and have a 'res_ids' key
      containing the ids of all records in the relation. They also have a
      'data' key containing datapoints of type 'record', representing the
      records in the relation that have been fetched (with a limit set to
      40 or 80 depending on the subview used). So basically, the length
      of res_ids may be different than the length of data.
      
      Before this rev., the changes in x2manys were saved under the key
      '_changes' as a duplication of the content of 'data', i.e. same
      list of datapoints of type 'record', modulo the changes done (it
      contained the new records added and didn't contained the removed
      records, whereas the 'data' remained unchanged). This didn't worked
      at all when there were more records than the limit in the relation.
      Indeed, when this happened, the commands to send to the server
      couldn't be generated correctly.
      
      This rev. modifies the way changes are stored in those datapoints.
      Now, each change is stored as an operation. An operation could be
      of type 'ADD', 'REMOVE', 'REMOVE_ALL' or 'UPDATE'. As before,
      'data' remains unchanged and always keeps the datapoints of records
      that have been fetched (the ones that are currently displayed in
      the list or kanban subview). This way, commands can now be properly
      computed.
      
      This had a nice side-effect of fixing two other bugs linked to
      x2manys.
      First, when used in a context (e.g. {some_key: some_x2many_field}),
      the value of some_x2many_field (i.e. a list of commands) was always
      [] if the field was invisible="1" in the view, because it's
      subrecords weren't fetched, and the generated commands were based
      on them. Now, they are generated from the list of res_ids in the
      relation, so it works fine.
      Second, the x2many records are supposed to be sorted client-side,
      after being read, and after each edition. This was working in the
      first case, but not in the second. Now it's working even after
      a record edition.
      
      This rev. also correctly sets the 'parentID' and 'static' keys in
      datapoints.
      
      Finally, we also fixed the pager in x2manys as it was badly
      displayed (small less tweaks).
      17e19815
    • Christophe Simonis's avatar
    • Christophe Simonis's avatar
    • Quentin De Paoli's avatar
      [FIX] account: max_date field of partial reconciliation is a date, not a datetime. · d3ff2665
      Quentin De Paoli authored
      This field it is computing the max of 2 date fields, so it has to be a date too. This was messing in the aged receivable/payable reports.
      d3ff2665
    • Christophe Simonis's avatar
      b1f738d1
    • Adrien Dieudonne's avatar
      [FIX] *: reports: check required values for 'render_html' · 1e4f4299
      Adrien Dieudonne authored
      Some reports require additional information to render. When
      accessed in Odoo, the user has to fill a wizard to provide those
      information. However, when these reports were opened in Studio,
      it crashed as those information were missing (we don't pass
      through the configuration wizard in this case).
      
      This fix checks if all the required information are given before
      trying to render those reports, and it displays a warning in
      the logs in they are missing, which is better than a traceback.
      1e4f4299
    • Xavier Morel's avatar
      89a99407
    • Aaron Bohy's avatar
      [FIX] web: pyeval_tests: typo · 05282fd4
      Aaron Bohy authored
      Introduced by forwardport 34b432d5
      05282fd4
  3. Jun 26, 2017
Loading