1. 29 Jan, 2021 6 commits
    • Jérome Perrin's avatar
      ERP5Form: implement a basic checkConsistency for ProxyField · 459093f3
      Jérome Perrin authored
      For now this only checks that every entries in .tales are also in .values
      so that .has_value works as expected. This also supports repairing the
      structures with fixit argument.
      
      We could check more, because there are other problems with proxy fields
      internal structures:
       - sometimes some keys are in .values / .tales but not in .delegated_list
         this seem to happen after changing the target to a field of a different
         type, with different keys.
       - .delegated_list are not always sorted
      459093f3
    • Jérome Perrin's avatar
      ERP5Form: fix Form.proxifyField when field only has TALES · 4068924a
      Jérome Perrin authored
      The internal data structures are made of two dicts: .values for values and
      .tales for TALES. Formulator expect that these two dicts have keys for all
      properties, because of the implementation of Field.has_value which checks
      for the presence of the key in .values
      
      When making a field with only TALES, this method was setting the value only
      in .tales but the same key needs to be present also in .values, otherwise
      get_value would return False for this key.
      4068924a
    • Jérome Perrin's avatar
      ERP5Form: keep delegated_list sorted in Form.proxifyField · 974f4347
      Jérome Perrin authored
      For same reasons as 5b1c03c8 (sort delegated lists to make proxy field
      representations more stable., 2009-05-18)
      974f4347
    • Jérome Perrin's avatar
      testFields: test for ProxyField.has_value · e4275bbe
      Jérome Perrin authored
      This was not much tested
      e4275bbe
    • Jérome Perrin's avatar
      trade: support "Asset Price" valuation method in stock report · fe941384
      Jérome Perrin authored
      This shows the asset price from `stock.total_price` which can be just the
      movement prices or the evaluated prices if getDestinationAssetPrice and/or
      getSourceAssetPrice type based methods are defined.
      fe941384
    • Jérome Perrin's avatar
      item: fix a conflict in field libraries · 196975c0
      Jérome Perrin authored
      erp5_trade contains Base_viewTradeFieldLibrary which contain
      my_dialog_mode_portal_type, which is a multi list field where user can
      select multiple lines portal types. It is used in
      DeliveryModule_viewDeliveryLineReportDialog/your_portal_type
      
      erp5_item also contains Base_viewTradeFieldLibrary , for cases where
      erp5_item extend trade module to select items. It also contains a
      my_dialog_mode_portal_type field, where user can select item portal type.
      That field is not a multi-list field, but a list-field. It is used in
      DeliveryLine_viewSelectItemListDialog
      
      So when erp5_item is installed, it overrides
      Base_viewTradeFieldLibrary/my_dialog_mode_portal_type with a list field
      instead of a multi-list field and breaks
      DeliveryModule_viewDeliveryLineReportDialog, because user can no longer
      select more than one portal type.
      
      This renames the field in erp5_item, now we have:
       * Base_viewTradeFieldLibrary/my_dialog_mode_portal_type for movement
      portal types
       * Base_viewTradeFieldLibrary/my_dialog_mode_item_portal_type for item
      portal type
      196975c0
  2. 28 Jan, 2021 4 commits
  3. 27 Jan, 2021 3 commits
  4. 26 Jan, 2021 7 commits
  5. 25 Jan, 2021 9 commits
  6. 22 Jan, 2021 1 commit
  7. 20 Jan, 2021 5 commits
  8. 19 Jan, 2021 5 commits