1. 04 May, 2022 1 commit
    • Arnaud Fontaine's avatar
      py2/py3: Make Products code compatible with both python2 and python3. · a17bb910
      Arnaud Fontaine authored
      Done through various 2to3 fixers (zope.fixers, modernize, future) and manual
      changes. This is a single commit so that we have a clearer picture of how code
      converted with my2to3 should look like.
      
      Except straightforward @implementer decorator 2to3 fixer, only product/ folder
      was considered as the goal was to be able to create an ERP5Site.
      
      * Use @implementer decorator introduced in zope.interface 3.6.0 (2010):
      
        The implements syntax used under Python 2.X does not work under 3.X, since it
        depends on how metaclasses are implemented and this has changed. Instead it
        now supports a decorator syntax (also under Python 2.X).
      
        Applied thanks to 2to3 `zope.fixers` package.
      
      * Use `six.moves` rather than `future` install_aliases() feature because the
        latter use unicode_literals and "wraps" module aliases so that unicode() are
        returned for text rather than str() (Python2 standard library). This notably
        breaks BusinessTemplate code which uses urllib quote() for filesystem paths...
      
      * No more unbound methods in python3 so use six.get_unbound_function().
      
      * dict.(iteritems,iterkeys,itervalues)() => six.\1(dict) thanks to `dict_six`
        2to3 fixer from `modernize`:
        $ python-modernize -w -f dict_six product/
      
      * Manually make sure that dict.{items,values,keys}() returns a real list when it
        is latter modified rather than a dict_{items,values,keys} (ensure_list()). By
        default, 2to3 blindly does list(dict.{items,values,keys}()) which is not
        acceptable from performances point of view. With my2to3, this will be possible
        to handle such case automatically.
      
      * Replace cStringIO.StringIO() by six.moves.cStringIO() (a module alias for
        cStringIO.StringIO() on py2 and io.StringIO() on py3).
      
      * Use six.text_type which maps to unicode() on py2 and str() on py3. This also
        makes a clearer difference between text and binary strings.
      
      * Replace map()/filter() with lambda function by list comprehension (this has
        the benefit to avoid casting to list for py3 as it returns iterators).
      a17bb910
  2. 11 Dec, 2020 1 commit
  3. 07 Apr, 2020 1 commit
  4. 19 Dec, 2019 1 commit
  5. 12 Jan, 2016 1 commit
  6. 04 Sep, 2014 1 commit
  7. 11 Aug, 2010 1 commit
  8. 15 Jul, 2010 1 commit
    • Sebastien Robin's avatar
      sync with trunk@37114 · c1ae57b0
      Sebastien Robin authored
      Conflicts:
      	bt5/erp5_base/bt/revision
      	bt5/erp5_simulation/DocumentTemplateItem/InvoiceSimulationRule.py
      	bt5/erp5_simulation/bt/revision
      	bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_viewTradeFieldLibrary.xml
      	bt5/erp5_trade/bt/change_log
      	bt5/erp5_trade/bt/revision
      	products/ERP5/Document/BusinessPath.py
      	products/ERP5/Document/SimulationMovement.py
      	products/ERP5/Document/TradeCondition.py
      	products/ERP5/Document/TradeModelLine.py
      	products/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision
      	products/ERP5Type/ERP5Type.py
      
      git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@37129 20353a03-c40f-0410-a6d1-a30d3c3de9de
      c1ae57b0
  9. 05 Jul, 2010 1 commit
  10. 28 Jun, 2010 1 commit
  11. 25 Jun, 2010 1 commit
  12. 22 Jun, 2010 1 commit
  13. 21 Jun, 2010 1 commit
  14. 20 Jun, 2010 1 commit
    • Jean-Paul Smets's avatar
      Business Path has beed splitted in 2 parts. A first part which is only used to... · 21f40032
      Jean-Paul Smets authored
      Business Path has beed splitted in 2 parts. A first part which is only used to control completation of trade phases and build process. A second part which is only used to define arrows, quantity shares and dates on amounts generated by amount generators. The first part is a predicate but no longer a Path (no arrow, no quantity, no delay, etc.). It is thus renamed to Business Link. The second part is a Path since it defines an Arrow, a quantity, a lead time, etc. It is thus renamed to Trade Model Path. 
      It is now time to review in detail all interfaces. In particular those interfaces on Business Link related to time management many no longer be needed since it is simpler to lookup simulation. However, time management must be handled at Business Process level as a helper method for rules which need to calculate dates based on Business Links and/or Trade Model Path.
      
      git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@36465 20353a03-c40f-0410-a6d1-a30d3c3de9de
      21f40032
  15. 10 May, 2010 1 commit
  16. 10 Mar, 2010 2 commits
  17. 15 Jan, 2010 1 commit
  18. 14 Jan, 2010 1 commit
  19. 29 Dec, 2009 1 commit
  20. 28 Dec, 2009 1 commit
  21. 18 Dec, 2009 1 commit
  22. 17 Dec, 2009 1 commit
  23. 16 Dec, 2009 2 commits
  24. 15 Dec, 2009 1 commit
  25. 15 Nov, 2009 1 commit
  26. 09 Nov, 2009 6 commits
  27. 08 Nov, 2009 1 commit
  28. 07 Nov, 2009 1 commit
  29. 04 Nov, 2009 1 commit
  30. 07 Oct, 2009 1 commit
  31. 12 Mar, 2007 1 commit
  32. 03 Jan, 2007 1 commit
  33. 11 Sep, 2006 1 commit