1. 02 Jul, 2020 6 commits
    • Jérome Perrin's avatar
      pdm: make stock browser dialog an "update only dialog" · 348d0572
      Jérome Perrin authored
      This is not a dialog where user can do an action, it's just a dialog where user
      can change the parameters and update the to see the stock levels, so this
      should be using only an update action (now that this is supported).
      348d0572
    • Jérome Perrin's avatar
      pdm: remove action on Resource_viewMovementHistoryDialog · d4e7c55d
      Jérome Perrin authored
      This is the view when using drill down on stock browser, there's no action
      here, this is not a dialog where user can "Do something" so a button to "Do something" is meaningless.
      
      One reason for this button was to be able to go back to stock browser, but:
       - in ERP5JS, user can go back to stock browser by clicking again on "Stock"
         action from Views actions.
       - In erp5_xhtml_style, user can click the list header or breadcrumb.
      d4e7c55d
    • Jérome Perrin's avatar
      pdm: use different actions categories for ERP5JS and xhtml · 65c75376
      Jérome Perrin authored
      In ERP5JS we want the "interactive reports" to be available like other view
      actions, directly in the left side panel. Also "Report" are named "Export" in
      this interface (which might actually be a mistake, but it's like this now).
      Rendering a form_dialog in a view action works perfectly in ERP5JS, so we can
      take advantage of this.
      
      In xhtml_style, this can not be a object_view action, because object_view
      actions can not use form_dialog, this breaks the navigation.
      
      So split in two actions, to have the best of both worlds
      65c75376
    • Jérome Perrin's avatar
      xhtml_style: support form_dialog without action · d4743f20
      Jérome Perrin authored
      In that case the action button is not displayed.
      If there's an update action defined on the form settings, update button is
      displayed.
      Cancel button is displayed using the same rule as any dialogs (ie. everytime
      there's a cancel_url in request)
      d4743f20
    • Jérome Perrin's avatar
      web_renderjs_ui: support dialogs without action, but with update · 1a3efb85
      Jérome Perrin authored
      update should still be usable in this case
      1a3efb85
    • Jérome Perrin's avatar
  2. 30 Jun, 2020 4 commits
    • Jérome Perrin's avatar
      SecurityTestCase: generate assertUserCanNot... methods · 1266c706
      Jérome Perrin authored
      the "failIf..." naming scheme is deprecated in unittest, we should at
      least have new-style named methods
      1266c706
    • Jérome Perrin's avatar
      trade: Display tax lines in order printout · b7b5f217
      Jérome Perrin authored
      So far, simulated tax is not included in printed Orders. This allow to include expected tax in vat_list for printout.
      
      This is done using `getPreferredTaxUseList` which is probably wrong and will hopefully be rewritten using more modern technologies (html not odt) and to use base amount, but this allows to make order printout show tax lines again.
      
      See merge request !1168
      b7b5f217
    • Jérome Perrin's avatar
      renderjs: update translation data in post-upgrade · a39b74c2
      Jérome Perrin authored
      Firstly, rework a bit the action to create translation data, the action no longer allow choosing the translation data script to update, but uses the one referenced in the translation gadget html.
      
      In post upgrade, compare the actual content of the translation data script with the expected content, calculated from web site languages, data-i18n attributes from referenced pages and Localizer messages.
      
      This makes the requirement that web sites with different configurations for translations need to use different translation gadget stronger, when it's not met post upgrade will always report consistency issues. To address this, modify existing web sites so that they all use different translation gadgets - or at least don't use translation gadget explicitly. 
      
      This was made by:
       - all web sites by default do not have a translation gadget
       - smart_assistant use a dedicated translation gadget, to confirm that using a different translation gadget is possible with an officejs web site, where the translation gadget is defined in the "app" web section.
       - officejs_support_request_ui uses a dedicated translation gadget, because we need this for a customer project and for ourselves.
       - other web sites do not support translation by default, but enabling would be easy: 
          - set the allowed languages on web site
          - create an empty web script ( `{website}_translation_data.js` )
          - create a translation gadget web page ( `{website}_translation.html` ) using same content as `gadget_translation.html`, except that the translation data script should be the one created above ( `{website}_translation_data.js` )
          - configure the web site to use translation gadget in layout properties. In the case of an OfficeJS web site, this should not be set on the web site but on the main web section
          - use "Update Translation Data" action on web site or run post-upgrade step of upgrader.
      
      This revealed problems (page does not load with javascript error) when using different translation gadgets, that were addressed by not pre-loading the default translation gadget.
      
      See merge request nexedi/erp5!1151
      a39b74c2
    • Jérome Perrin's avatar
      Make ERP5JS login pages look like ERP5JS Dialogs · 1833f952
      Jérome Perrin authored
      ![login](/uploads/d270b602f784466dcc8d0806ec0ab9e1/image.png)
      
      ![recover](/uploads/da5bca427e6053a4724a4f7171db71db/image.png)
      
      ![reset password](/uploads/27e3519dfaf96cd66ce3adf9d6184ba8/image.png)
      
      
      See merge request nexedi/erp5!1165
      1833f952
  3. 29 Jun, 2020 9 commits
  4. 26 Jun, 2020 2 commits
  5. 25 Jun, 2020 2 commits
    • Arnaud Fontaine's avatar
      ZODB Components: Fix pylint warning. · c8e12a94
      Arnaud Fontaine authored
      W: Dangerous default value _MARKER (__builtin__.list) as argument (dangerous-default-value)
      c8e12a94
    • Nicolas Wavrant's avatar
      erp5_trade: move the composition cache in BusinessProcess.py · e5587493
      Nicolas Wavrant authored
      Since BusinessProcess.py was moved to portal_components, the cache in mixin/composition.py,
      which was kept at the level of the zope process, was causing issue when portal_components
      was reset : the classes kept in __class_cache would not get resetted, and later calls
      to asComposedDocument would reuse them. In consequence, these classes would kept pointers
      to objects in the old class BusinessProcess, causing bugs as these objects would have
      been cleaned by the reset.
      
      The first intuition was to remove this cache, unfortunately the reason of this introduction
      (fixing a memory leak) is still valid nowadays, so I've decided to move this cache within
      BusinessProcess, as it has the advantage of emptying it whenever portal_components is resetted.
      
      For more information of the bug mentionned above, and the trials about removing the cache can
      be found in the discussion of this MR :
      nexedi/erp5!1032
      e5587493
  6. 24 Jun, 2020 10 commits
  7. 23 Jun, 2020 7 commits