Skip to content
Snippets Groups Projects
  1. Dec 12, 2014
  2. Dec 11, 2014
  3. Dec 10, 2014
  4. Dec 09, 2014
    • Denis Ledoux's avatar
      [FIX] web: user lang has the priority on partner lang · 9f9e7ef0
      Denis Ledoux authored
      Potentialy, the timezone too.
      
      On item action click (such as menus in More.. and Print..), the data in form view had the priority on user context (through the sidebar_eval_context)
      
      Therefore, if a field "lang" was present in the form view (like in partner form), the web/action/load xmlrpc call was using the partner language instead of the user language.
      
      Example of wrong use case before the fix:
       - Set the user language in French, then go to a partner form of a partner with English set as language
        - Click on any button of the partner form, such as the "Invoices" button, notice that the last item of the breadcrumb is in English, instead of Frenh (the user language)
        - Click on any menu opening a wizard in the More.. dropdown menu, notice that the wizard title is in English instead of French
        - Print any report from the Print dropdown menu, notice that the report file name is in English. If you print the same report for the same partner but from the list view, the report file name is in French.
      9f9e7ef0
  5. Dec 08, 2014
    • Denis Ledoux's avatar
      [FIX] web: ensure one2many field destruction on button cancel · eba1c56f
      Denis Ledoux authored
      The destruction of one2many fields is forced with the event change:effective_readonly
      This revision add the forced destruction for cancel(discard) button as well
      
      Otherwise, one2many fields are not properly destroyed when hitting the button "discard" (from save or discard).
      This can be problematic for one2many editable list views (such as invoice lines) if you discard while having a mandatory field not filled in the invoice line: You can't recreate an invoice, the one2many editable list is messed up
      
      Use case: Create an invoice, create a line, leave the description, required field, empty. Then, discard. Then, click on create.
      
      opw-616946
      eba1c56f
    • Denis Ledoux's avatar
  6. Dec 04, 2014
  7. Dec 03, 2014
  8. Dec 02, 2014
  9. Dec 01, 2014
  10. Nov 28, 2014
  11. Nov 27, 2014
    • Olivier Dony's avatar
      [FIX] product: remove unnecessary UoM rounding step, add missing test · fc85a7ee
      Olivier Dony authored
      Remove the intermediate rounding inside _compute_qty(), as it
      is not necessary after rev. fa2f7b86 and has undesired side-effects.
      
      An extra float_round() operation inside _compute_qty()
      had been added at rev. 311c77bb to avoid a float representation
      error in UoM factors that could bias the ceiling() operation
      done as the last conversion step.
      
      Example 1:
      Dozen has a factor of 1/12, which was previously stored in the
      database with a decimal accuracy of 12 significant decimal digits.
      This meant the factor was exactly stored as 0.08333333333333.
      When reading this back into a Python float, the precision was not
      sufficient, and the UoM conversion of 1 Dozen to Units gave a
      result of 12.00000000000047961...
      After the final ceiling() operation to Unit's rounding, the
      converted value ended up as 13.
      
      This problem was initially solved using an extra rounding.
      
      However at revision fa2f7b86 the decimal precision used to store
      UoM factors was increased to preserve all significant digits.
      This added the extra precision necessary to read the Dozen factor
      back into an accurate float value of 1/12, and the conversion of
      1 Dozen now gives 12.0 Units, even without the intermediate
      rounding operation. (Works for other factor values too)
      
      At the same time that extra rounding operation has undesired
      side-effects, as it requires a fixed precision derived from
      the rounding precisions of the UoMs. But there is no given precision
      that would work in all cases for this intermediate value. It is
      always possible to find a valid combination of UoM roundings
      that breaks that intermediate step, e.g. by forcing integer
      roundings.
      
      Example 2:
      Let Grams have a rounding precision set to 1 because no smaller
      quantities are allowed, and Kilograms a rounding of 0.001 to allow
      representing 1 Gram. (gram factor = 1000 and kilogram rounding = .001
      by default)
      If we try to convert 1234 Grams into Kilograms, the extra rounding
      introduced in 311c77bb will cause a rounding of 1234.0/1000.0 at
      the precision of Grams (1), which gives 1.0 as a result.
      The net result of this conversion gives 1234.0 Gram = 1.0 Kilogram,
      while the correct result (1.234 Kilogram) is perfectly compatible
      with the UoM settings.
      
      Similar errors could be triggered with various rounding settings, as
      long as the intermediate rounding needs a finite precision.
      
      Two extra tests have been added to cover Example 1 and Example 2.
      
      --
      Related to #2072, #1125, #1126, #2672
      Closes #2495, #2498
      fc85a7ee
    • Denis Ledoux's avatar
    • Sandy Carter's avatar
      [FIX] base: avoid having 'False' in name of a bank · 043f7b84
      Sandy Carter authored
      The name_get of res.partner.bank uses the format_layout to generate the name
      of the bank. As every field is not required, we may get 'False' in the name.
      Replace these missing values by an empty string.
      
      Fixes #3590
      043f7b84
    • Mohammad Alhashash's avatar
      [FIX] stock: prevent serial number deletion on stock.move · 2461baa0
      Mohammad Alhashash authored
      prodlot_id field may be required due to constraint `_check_tracking`.
      When a stock.production.lot is deleted, the constraint on linked stock.move is
      not checked. To avoid inconsistency, restrict the suppression.
      To allow the modification of existing stock.move, remove the states attribute on
      the field definition.
      
      As removal of serial may impact the traceability, it makes sense on buisness
      point of view to force the modification of previous stock.move, even if the
      constraint would not have been violated.
      The list of linked stock.move is present on the serial form view making
      the operation easier.
      
      Fixes #3560, lp:1176912
      2461baa0
  12. Nov 26, 2014
  13. Nov 25, 2014
  14. Nov 24, 2014
    • Martin Trigaux's avatar
      [FIX] product: creation of reference uom · 4ce7af35
      Martin Trigaux authored
      Set a default value for factor when creating a new uom.
      Could not create a new UoM with type reference (if creates a reference uom, no need to pass a factor).
      
      Change the readonly filter to (type = bigger) to make the field writable for reference uom.
      This is needed to force the reset of the factor when switching of type (onchange_type).
      As the field was readonly, kept the old value for factor.
      4ce7af35
  15. Nov 19, 2014
    • Denis Ledoux's avatar
      [FIX] mrp: perform location chaining for kit exploded moves · 529e920b
      Denis Ledoux authored
      This rev. 73072272 ensured to not (re-)set the state 'confirmed' to exploded moves with a more advanced state (for instance, 'assigned')
      Nevertheless, the location chaining is performed on the move confirmation, through the action_confirm method of the stock.move model. Besides, the resulting moves of the _action_explode method had the state 'confirmed' on creation, the 'confirmed' state wasn't set by the method 'action_confirm', meaning that the moves were confirmed without having the location chaining done. Allowing moves to go through the action_confirm method even if the state was 'confirmed' or further triggered the location chaining.
      
      Preventing already confirmed moves to go through the action_confirm method prevented the location chaining, thus.
      
      We now create the resulting moves with the 'draft' state, and then confirm them through the procurement workflow signal 'button_confirm'. Thus, the resulting moves are confirmed by going through the action_confirm method, writing the confirmed state and triggering the location chaining at the same time. We then write the 'assigned' state if necessary.
      
      opw-617235
      529e920b
  16. Nov 18, 2014
  17. Nov 14, 2014
    • Denis Ledoux's avatar
      [FIX] web: date autocompletion should not harcode 'date' · 922a52dc
      Denis Ledoux authored
      But should use date or datetime according to the widget type
      
      This fix is related to 69d60465
      922a52dc
    • Martin Trigaux's avatar
      [FIX] purchase: keep PO currency on picking · 0a7633c1
      Martin Trigaux authored
      The delivery of a purchase order was not keeping the currency and cost price
      from the purchase order for the reception. This was problematic for orders where
      the invoice was generated from the picking (Invoicing Control: Based on incoming
      shipments). The currency of the purchase order was kept while the cost was the
      one in the company's currency.
      It's better to keep the currency of the purchase order to make the invoice as
      it's usually the one expected (and not convert everything to the currency of the
      company). opw 615555
      0a7633c1
    • Denis Ledoux's avatar
      [FIX] web: do not set the one2many dirty on field validation · da15c9d2
      Denis Ledoux authored
      This rev. 06104ba5
      
      Added the dirty flag on the o2m field when the editor of the editable list was enabled (meaning that the editable list has been altered)) because the dirty flag was not set correctly by the one2many during the edition, at the time.
      
      It looks like this is now the case
      
      Besides, as now, we valid all the editable list of the form, wether or not the editable list was altered, we must not set the o2m as dirty anymore.
      da15c9d2
    • Denis Ledoux's avatar
      3613b74d
    • Denis Ledoux's avatar
      [FIX] product: more accurate name_search · 5b2f13ab
      Denis Ledoux authored
      First, name_search searches on default_code, then, if the limit is not reached, it searches on the product name
      The results found from the default code search must be removed from the search domain when doing the search on the product name, to avoid having results already found by the search on the default_code
      
      opw-618015
      5b2f13ab
Loading