Skip to content
Snippets Groups Projects
  1. Mar 04, 2019
  2. Feb 28, 2019
  3. Feb 27, 2019
    • Jorge Pinna Puissant's avatar
      [FIX] event_sale: on change of events product in SO · 4613d0a8
      Jorge Pinna Puissant authored
      Have a product that is an event, with the price of 1500.
      Create a ticket for this product in an event, with the price of 600.
      In a SO, add a line with this ticket.
      
      Before this commit, when you change the product, to another product that
      is also an event, the event, the ticket and the price stayed the ones of
      the first product.
      
      Now, the event, the ticket and the price are updated when the product is
      modified.
      
      opw-1940368
      4613d0a8
    • Xavier Morel's avatar
      [FIX] base: properly check werkzeug version · 925385fd
      Xavier Morel authored
      
      Werkzeug version was being checked to avoid passing quote=True to
      werkzeug.utils.escape (as that parameter was changed to `True` *and
      deprecated* in 0.9).
      
      However because DeprecationWarning was made silent by default in
      Python 3.2 and the way the check is implemented worked for 0.9 it
      looks like nobody really noticed it's broken in the usual manner of
      half-assed version checks: works for 0.9.0, doesn't work for
      0.12.3 (because lexically 0.12.3 < 0.9.0).
      
      Fix by using proper version parsing and comparing the result of that.
      
      See also: odoo/odoo#28116
      
      closes odoo/odoo#31553
      
      Signed-off-by: default avatar"Xavier Morel (xmo)" <xmo@openerp.com>
      925385fd
  4. Mar 01, 2019
  5. Feb 28, 2019
    • Nicolas Lempereur's avatar
      [FIX] stock: show product qty on searched location · 15ea753a
      Nicolas Lempereur authored
      The location_id and warehouse_id fields on product.template are just
      dummy field intended to add something in the context that will be used
      to compute the data being rendered (eg. for location, the quantity
      displayed is the quantity of the product in the searched location).
      
      But the feature was broken at a point, and has been solved in 11.0 with
      7c7b0992.
      
      This solution was not implemented in 10.0 up to saas-15 since this is
      not acceptable for a stable version.
      
      This changeset is only for 10.0 up to saas-15 to implement the fix
      differently.
      
      opw-1945417
      closes #31475
      15ea753a
  6. Feb 27, 2019
    • Jorge Pinna Puissant's avatar
      [FIX] event_sale: unit price changes with the qty · ee184bcf
      Jorge Pinna Puissant authored
      Have a product that is an event, with the price of 1500.
      Create a ticket for this product in an event, with the price of 600.
      In a SO, add a line with this ticket.
      
      Before this commit, when you change the tickets qty in the SO the price
      change from 600 to 1500.
      
      Now, the unit price stays the one of the ticket.
      
      opw-1940368
      ee184bcf
  7. Mar 03, 2019
  8. Mar 01, 2019
  9. Feb 28, 2019
  10. Feb 27, 2019
  11. Feb 26, 2019
    • Nicolas Lempereur's avatar
      [FIX] web: keep col group by on 2nd reload · f8b38f64
      Nicolas Lempereur authored
      In 187c32c2 some improvements were made for conserving/restoring group
      bys on the pivot view.
      
      This introduced an issue on the column group by:
      
      - before reload, if we set manually a column group by (+ icon in the
        header) it would be saved and not lost (unless a context or filter
        in the search view override it)
      
      - after reload, the following manually set column group by are not saved
        anymore on subsequent reload (the column group by at the first reload
        are set back)
      
      This behavior is not normal since the behavior (conserving or losing
      column group bys) should be the same at first reload or second reload.
      
      The issue was caused by the duplication of group bys that were not
      synchronized (one on the column root header, one on the pivot model
      instance).
      
      Without the change, the added test failed with: "Column groupby not lost
      after second reload" and product_id is hidding from the object
      pivot_column_groupby dictionary (having only "customer").
      
      Using _.clone on initialRowGroupBys was necessary change because without
      duplication of "groupbys", the initialRowGroupBys would be changed on
      expandHeader which is unexpected.
      
      opw-1941095
      closes #31407
      f8b38f64
  12. Feb 27, 2019
  13. Feb 28, 2019
    • Martin Trigaux's avatar
      [FIX] orm: backport of 06d73eab to 11.0 · d855e391
      Martin Trigaux authored
      [FIX] models: do not erase master version
      
      For a translated field with a callable method (e.g. xml_translate), when
      modifying the value of this field in another language than en_US, the master
      version was lost.
      
      Before this patch:
      
      >>> record.arch = "<h1>Title</h1>"
      >>> record.with_context(lang='fr_FR').arch = "<h1>Titre</h1>"
      >>> record.with_context(lang='fr_FR').arch
      "<h1>Titre</h1>"
      >>> record.arch
      "<h1>Titre</h1>"  # lost English version
      
      After this patch:
      
      >>> record.arch = "<h1>Title</h1>"
      >>> record.with_context(lang='fr_FR').arch = "<h1>Titre</h1>"
      >>> record.with_context(lang='fr_FR').arch
      "<h1>Title</h1>"  # write had no effect
      >>> record.arch
      "<h1>Title</h1>"
      
      When modifying a translated HTML field in English, a matching to detect the
      difference and avoid losing the translations is done.
      This is not supported for update in another language.
      The main reason is the difficulty to detect changes in the architecture.
      
      To update translations, the supported way is to go to the list of translations
      and update them there.
      
      Before this patch, the given value in another language was given to the SQL
      query and made an update in database:
      if single_lang or not (has_translation and field.translate is True)
      -> True or not (True and False) -> True
      
      If a field is callable, it should also be ignored, the same way than
      translate=True fields
      
      opw-1887162
      
      closes odoo/odoo#31451
      d855e391
  14. Feb 27, 2019
  15. Feb 26, 2019
    • Martin Trigaux's avatar
      [CLA] add Dimitar Apostolov to Savoir-faire Linux CCLA · 2f139632
      Martin Trigaux authored
      As signed at opw-1944366
      
      closes odoo/odoo#31413
      2f139632
    • Adrian Torres's avatar
      [FIX] ir_model_fields: register selection options · 5f5bb5e2
      Adrian Torres authored
      Before this commit:
              -> Debug mode
              -> Settings
              -> Database structure
              -> Fields
              -> Any selection field
      => The field `selection` of the ir.model.fields form view does not
      display the selection options of the field being viewed, this is because
      the selection field is not registered at `_reflect_field_params` of
      `ir.model.fields`.
      
      After this commit:
      
      The field is properly registered; for Selection fields with static
      options, these are shown as-is, for fields with a lambda function as
      options, the string 'function' is displayed, and for fields using a
      function name as a string, the same string will be displayed.
      
      Fixes #28360
      
      closes odoo/odoo#31207
      5f5bb5e2
    • Laurent Mignon's avatar
      [IMP] stock: performance on _compute_product_availability · 28f33dc1
      Laurent Mignon authored
      Improve performance (*3) on _compute_product_availability
      `mapped` makes use of orm prefetch, which is inefficient in this use
      case when facing high volume.
      
      closes odoo/odoo#30545
      28f33dc1
  16. Feb 28, 2019
    • Nicolas Lempereur's avatar
      [FIX] point_of_sale: no black bottomed receipt · 1c5c762f
      Nicolas Lempereur authored
      
      On some devices and chromium with printing option "Background graphics",
      a printed receipt on the point of sale could have a black bottom below
      the receipt content.
      
      This is caused by the point of sale black background and happen rarely
      because most frequently browser printing remove backgrounds.
      
      opw-1940434
      Co-authored-by: default avatarRomeo Fragomeli <rfr@odoo.com>
      closes #31472
      1c5c762f
  17. Feb 20, 2019
    • Adrian Torres's avatar
      [FIX] expression: properly handle {TRUE,FALSE}_LEAF · 934c0016
      Adrian Torres authored
      Before this commit, doing expression.OR() with only FALSE_LEAF would
      yield [] which is equivalent to TRUE_LEAF and is therefore not correct.
      
      The same happened (to a lesser extent) with expression.AND() within an
      expression.OR(), since the former would return a [] which would be
      ignored by expression.OR().
      
      See tests for a clearer view of the use cases.
      
      Fixes #30113, #26540
      
      closes odoo/odoo#31202
      934c0016
  18. Feb 26, 2019
  19. Feb 22, 2019
    • Nicolas Martinelli's avatar
      [FIX] account: default account · f886bdff
      Nicolas Martinelli authored
      When importing an invoice without specifying the type, the invoice type
      is set to `out_invoice`, but the account set is the supplier account.
      
      At this point, the invoice type is simply undefined (`False`). It will
      be set by default at creation to `out_invoice`. Therefore, we reach the
      `else` condition which uses the supplier info.
      
      We simply inverse the condition, so it creates a consistent object.
      However, it raises a bigger question about how the action context should
      be kept at invoice. We won't address it :-)
      
      opw-1925547
      
      closes odoo/odoo#30154
      
      closes odoo/odoo#31373
      f886bdff
    • Nicolas Martinelli's avatar
      [FIX] barcodes, web: float scannable · b431f8ea
      Nicolas Martinelli authored
      - Switch to French language
      - Go to Inventory > Inventory Adjustment
      - Launch an adjustment
      
      The field 'Real Quantity' doesn't follow the float formatting.
      
      This is because the widget is set as `field_float_scannable`, which is
      not recognized by the formatting function.
      
      Since the widget descriptor has priority over the type descriptor, we
      must explicitly take this widget into account, on top of adding the
      `format_value` method.
      
      opw-1940884
      
      closes odoo/odoo#31366
      b431f8ea
  20. Feb 21, 2019
  21. Feb 19, 2019
  22. Feb 14, 2019
  23. Feb 13, 2019
    • Raphael Collet's avatar
      [FIX] models: check groups on inverse fields · cd3790c4
      Raphael Collet authored
      Before this, groups on non-stored inverse fields were not checked upon write.
      The impact on existing fields is pretty small, since the inverse methods of
      those fields are subject to access rights on the records they use.
      
      closes odoo/odoo#30356
      cd3790c4
Loading