1. 21 Jan, 2019 3 commits
    • Xiaowu Zhang's avatar
      add inventory report module for current inventory state · 3bc38a27
      Xiaowu Zhang authored
      1. a inventory report module is added which user can add inventory report
      
      
      2. in inventory report,  user should put information such as Owner, Warehouse... then call calculate product stock action
      
      
      3. one line per product is then added automatically with current total quantity and total asset price
      
      
      ![Screenshot_2018-12-12_at_17.42.24](/uploads/98f8a4af66faadfdfd1d99b4400ff687/Screenshot_2018-12-12_at_17.42.24.png)
      
      
      /reviewed-on nexedi/erp5!806
      3bc38a27
    • Xiaowu Zhang's avatar
      erp5_ods_style: fix the way to get form id · 96347a03
      Xiaowu Zhang authored
      if i have a url like:
      https://erp5xxx/form_idxxx?relative_item_relative_url=item_module/7817
      
      with the old way, form id will be 7817
      
      /reviewed-on nexedi/erp5!824
      96347a03
    • Jérome Perrin's avatar
      administration: fix BT's "Check Python Code" with coding flag · e180de30
      Jérome Perrin authored
      According to pep-0263, python scripts can define encoding magic on
      first or second line.
      If we use for example such a script:
      
      ```python
        # coding: utf-8
        return "héhé"
      ```
      
      then using .read() was wrong, because it return the script with headers,
      ie:
      
      ```python
        ## Script (Python) "test_coding"
        ##bind container=container
        ##bind context=context
        ##bind namespace=
        ##bind script=script
        ##bind subpath=traverse_subpath
        ##parameters=
        ##title=
        ##
        # coding: utf-8
        return "héhé"
      ```
      
      so the coding magic is no longer in first line and pylint complains
      with error like:
      
      Cannot decode using encoding "ascii", unexpected byte at position 11 (invalid-encoded-data)]
      
      /reviewed-on !825
      e180de30
  2. 18 Jan, 2019 15 commits
  3. 17 Jan, 2019 2 commits
    • Jérome Perrin's avatar
      discussion: remove temporary hidden input added for click · 7aa5fb76
      Jérome Perrin authored
      When clicking "Reply" on a discussion post, this script adds a hidden input to mark which post we are replying to.
      This cause problem  when ctrl+clicking reply to reply in a new tab, because it leaves the page with the extra hidden input, which cause problems, like clicking reply again cause `Error Value: You are not allowed to access '['1', '1']`' in this context , or clicking change page will reply.
      
      This is a minimal effort fix, just remove the added element after click.
      
      /reviewed-on nexedi/erp5!823
      7aa5fb76
    • Jérome Perrin's avatar
      Revert "Show Id of template." · b3c56f2b
      Jérome Perrin authored
      This reverts commit b7d9590c.
      
      Users are not supposed to edit templates because documents are not in
      their "normal" context, if user edit templates some unexpected things
      might happen. We don't want user to change state or do some actions that
      may cause interactions on other documents from a template. This was
      never strongly enforced, but there was not supposed to be an easy way
      for users to access the template document.
      
      With old versions of ERP5 (before the rework of isIndexable /
      isSubTreeIndexable ), users could also add lines inside the template
      document and these lines where indexable.
      
      Note that the way of editing templates is:
       * make a "real" document from the template
       * modify this document
       * use "Make Template" again - this will replace the document with the
      same title.
      
      /reviewed-on nexedi/erp5!822
      b3c56f2b
  4. 16 Jan, 2019 6 commits
  5. 13 Jan, 2019 1 commit
    • Julien Muchembled's avatar
      Fix reindexing with custom grouping using 'group_id' · 707058d7
      Julien Muchembled authored
      This fixes:
      
        Traceback (innermost last):
          Module Products.CMFActivity.ActivityTool, line 1373, in invokeGroup
            traverse(method_id)(expanded_object_list)
          Module Products.ERP5Catalog.CatalogTool, line 946, in catalogObjectList
            super(CatalogTool, self).catalogObjectList(tmp_object_list, **m.kw)
          Module Products.ZSQLCatalog.ZSQLCatalog, line 813, in catalogObjectList
            **kw
        TypeError: catalogObjectList() got an unexpected keyword argument 'group_id'
      707058d7
  6. 08 Jan, 2019 3 commits
  7. 07 Jan, 2019 2 commits
    • Sebastien Robin's avatar
    • Julien Muchembled's avatar
      CMFActivity: better date ordering by using micro-precision · b82f3ba1
      Julien Muchembled authored
      Originally, uids somehow sorted messages by date of insertion, in particular
      for those that were created within the same second. But since random uids,
      such messages became validated or processed in random order.
      
      Note however that by default, messages created in the same transaction all have
      exactly the same date, so commit a42da4de
      ("CMFActivity: Do not use offset for scanning messages to validate.")
      forces us to keep the ordering on uids (in addition to priority/date).
      
      Existing instances will upgrade automatically, using the already existing code
      to upgrade tables in a generic way. You should see the following logs:
      
          INFO CMFActivity 'message_queue' table upgraded
          ALTER TABLE message_queue
            MODIFY COLUMN date datetime(6) NOT NULL AFTER uid,
            MODIFY COLUMN processing_date datetime(6) DEFAULT NULL AFTER processing
          INFO CMFActivity 'message_job' table upgraded
          ALTER TABLE message_job
            MODIFY COLUMN date datetime(6) NOT NULL AFTER uid,
            MODIFY COLUMN processing_date datetime(6) DEFAULT NULL AFTER processing
          INFO CMFActivity 'message' table upgraded
          ALTER TABLE message
            MODIFY COLUMN date datetime(6) NOT NULL AFTER uid,
            MODIFY COLUMN processing_date datetime(6) DEFAULT NULL AFTER processing
      
      
      /reviewed-on nexedi/erp5!820
      b82f3ba1
  8. 02 Jan, 2019 1 commit
  9. 31 Dec, 2018 1 commit
  10. 21 Dec, 2018 2 commits
  11. 20 Dec, 2018 2 commits
  12. 17 Dec, 2018 2 commits