- 17 Apr, 2018 5 commits
-
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
Display relation field select list if focus is activated Fixup click handling
-
Ayush Tiwari authored
(fix: e46ade7a)
-
Nicolas Wavrant authored
(fix erp5.git/eb5f1fb1)
-
- 16 Apr, 2018 1 commit
-
-
Nicolas Wavrant authored
As it is a common pattern to set validators on hidden fields to display custom errors to users.
-
- 15 Apr, 2018 12 commits
-
-
Jérome Perrin authored
By using `os.path.normpath` we also support paths with a trailing slash.
-
Ayush Tiwari authored
-
Ayush Tiwari authored
-
Ayush Tiwari authored
-
Ayush Tiwari authored
-
Ayush Tiwari authored
-
Ayush Tiwari authored
-
Ayush Tiwari authored
-
Ayush Tiwari authored
-
Ayush Tiwari authored
-
Ayush Tiwari authored
-
Ayush Tiwari authored
Also, change the JSON format and update tests according to these changes
-
- 12 Apr, 2018 3 commits
-
-
Tomáš Peterka authored
-
Tomáš Peterka authored
-
Tomáš Peterka authored
-
- 10 Apr, 2018 3 commits
-
-
Romain Courteaud authored
-
Sebastien Robin authored
The script though that user was scrolling the test output while in reality we just add a tiny difference of 0.5 pixel.
-
Mukul authored
/reviewed-on nexedi/erp5!632
-
- 09 Apr, 2018 1 commit
-
-
Mukul authored
Fixes dropbox app key in officejs media player. /reviewed-on nexedi/erp5!628
-
- 06 Apr, 2018 8 commits
- 05 Apr, 2018 1 commit
-
-
Julien Muchembled authored
This first reverts the following 2 commits: 566c0c5f 3a08c758 to at least fix the issue that the context method takes 2 arguments that aren't available from FormBoxEditor.edit() without slowing things even more. About deferred style, widget editor objects can be ignored for the moment. If we ever need to restore fully functional objects, the regression in commit a5a2f1cd could be solved with the following patch: --- a/product/ERP5Form/FormBox.py +++ b/product/ERP5Form/FormBox.py @@ -131,22 +131,32 @@ def render(self, field, key, value, REQUEST, render_prefix=None): class FormBoxEditor: """An editor returned from FormBox validation able to `edit` document.""" + path = None + def __init__(self, result, context): """Initialize with all necessary information for editing. Keep a reference to the correct context and don't expect the caller to provide it during the edit phase because they don't have access to the widget anymore. """ self.attr_dict, self.editor_list = result + self.context = context self.edit = lambda _: self._edit(context) def __getstate__(self): - pass + return (self.attr_dict, self.editor_list, + self.path or self.context.getPhysicalPath()) + + def __setstate__(self, state): + self.attr_dict, self.editor_list, self.path = state def __call__(self, REQUEST): # Called by Base_edit in case of FormValidationError pass + def edit(self, context): + return self._edit(context.unrestrictedTraverse(self.path)) + def _edit(self, context): """Edit inside correct context.""" context.edit(**self.attr_dict) This commit also removes the unused view() method on editors. /reviewed-on nexedi/erp5!622
-
- 04 Apr, 2018 6 commits
-
-
Vincent Bechu authored
/reviewed-on nexedi/erp5!626
-
Vincent Bechu authored
/reviewed-on nexedi/erp5!625
-
Jérome Perrin authored
erp5_l10n_fa is needed to test the RTL direction. same as b6eec549
-
Jérome Perrin authored
Since 76cc938e we have diffs each time we edit ZSQL Methods. This is a "big commit" to change all remaining ZSQL methods. I checked diffs one by one, but I would appreciate others check this as well and confirm that it's OK to do so. From the root of repository, I did : ``` grep -rl Products.ZSQLMethods.SQL . | grep '\.xml$' | xargs ~/bin/zsql_backslash_n.py ``` With a script containing ```python from lxml import etree import sys for filename in sys.argv[1:]: with open(filename) as f: tree = etree.parse(f) root = tree.getroot() for el in tree.xpath('//item/key/string[text() = "arguments_src"]/../../value/string'): if el.text: el.text = el.text.replace(r'\r\n', r'\n') # force <string> element to have a text, so that they export as <string></string> and not <string/> for el in tree.xpath('//string[not(text())]'): el.text = '' with open(filename, 'w') as f: f.write( '<?xml version="1.0"?>\n' + etree.tostring(root, pretty_print=True, encoding="utf-8")) print filename ``` ( script snippet: nexedi/erp5$277 ) /cc @jm @georgios.dagkakis @Nicolas /reviewed-on nexedi/erp5!496 Conflicts: product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_getitem_by_path.xml product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_getitem_by_uid.xml product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_produce_reserved_uid_list.xml
-
Jérome Perrin authored
When document has pending activities, we refuse changing ID ( because there might be pending `updateRelatedContent` activities if I remember correctly ), but it's done in a way that breaks the "atomic" aspect of the transaction a bit, because we As a result, this happens sometimes that not all properties user changed are modified. In the example below, the change to *Include Documents in Site Map* is not saved (and also change to *ID*): ![erp5-sorryPendingActivitiesSavePartially](/uploads/ff4bfd6ad0e8a42ba3684cccdc450e21/erp5-sorryPendingActivitiesSavePartially.gif) ( screencast of editing a document to change ids and several other properties - after clicking save, we can see that changing id is refused because there is pending activities. Other properties that where changes at the same times are not all modified, which breaks the transactionality we can usally expect when editing documents in ERP5 ) The changed here is to use a field validator that refused editing when there are pending activities, so that user gets a: ![erp5-pending-activiities](/uploads/bfe825560bdee34f0443e8e36884f21c/erp5-pending-activiities.png) ( screenshot of the change: now edition is rejected ) and the result is either all changes are applied or no change is applied at all. This is done by: * introducing a new `my_view_mode_id` field in `erp5_core`'s `Base_viewFieldLibrary` * using this field as proxy field of all editable `my_id` fields. Maybe I forgot some business templates, I changed only the most common ones. I intentionally did not change all fields of `erp5_ui_test` because I think they are used to compare speed of proxy fields vs traditional fields. 0352f50fd543fda2712bb8ca93d8a8814f975a26 introduces a Zelenium test exercising this new behavior. /reviewed-on !504 Conflicts: product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_viewFieldLibrary.xml
-
Jérome Perrin authored
This is a fix for this issue: Create a payment transaction group, a source reference will be generated (something like `PTG0123`. The field is read only on the form, so it's clearly not something we expect user to edit, but a kind of unique generated reference. Clone that payment transaction group, on the cloned payment transaction group, source reference is empty. The fix here is to generate a new source reference. A side effect of these changes is that destination reference is no longer reset after clone, because before this `Delivery_afterClone` was used and this script reset both source and destination reference. /reviewed-on nexedi/erp5!535
-