- 11 Jul, 2024 40 commits
-
-
Jérome Perrin authored
-
Jérome Perrin authored
This list was to cast the tuple, it can cause an AttributeError("'tuple' object has no attribute 'append'",) error when this branch is used. This is really an error code path, so that was unnoticed.
-
Jérome Perrin authored
introduce number:date-style for each of the "input_order" supported by DateTimeField, so that when exported to ODS we have the same input order as in html.
-
Jérome Perrin authored
so that we can test date time fields in listbox columns and listbox stat method easily.
-
Jérome Perrin authored
-
Jérome Perrin authored
With libreoffice5, float fields with input style 12.3% were correctly rendered as percentages without the need of an explicit number:percentage-style style, but with libreoffice7 it seems required, without this, a value of 2.05 is rendered as "2" instead of the expected "205%"
-
Jérome Perrin authored
Instead of duplicating the code for the case where a field value is rendered from a group (left, right etc) of the form and when the field value is rendered from a listbox editable field, reuse the macro also for fields from the form groups. Because fields from the form groups have top and bottom border, we introduce a new style prefix for these fields: "with_border_". Implementation note: We don't declare this new field in Base_getODSSupportedStylePrefixList, because we need to define the cell properties each time, so defining this dynamically is not really interesting.
-
Jérome Perrin authored
remove useless `field python: editable_fields.get(column_id, None)` tal:defines, the macro always documented `field` as required and all callers pass it. document that `style_prefix` is required
-
Jérome Perrin authored
This was set to 1.234,5 but erp5_ods_style does not support this style for now, so set it to a supported value for now so that we can progress with the testing of erp5_ods_style.
-
Jérome Perrin authored
Add a listbox with a figure editable field and a percentage editable field. These fields all have TALES to set precision from "precision" request key.
-
Jérome Perrin authored
Instead of using UnrestrictedMethod for the whole duration of discoverMetadata, revert to the original user permissions for the last part where we merge revision or change state, because we want this to fail when user is not allowed. This adjusts also the high level Base_contribute script to catch these errors and report them nicely to the user and while doing this some other problems were discovered and are also fixed. Some problems in ContributionTool.newContent were fixed, this was already trying to detect that a document is going to be merged and synchronously checked that this existing document can be replaced, to display an error to the user, but this part has two issues: - first it was using getMatchedFilenamePatternDict to find the document coordinates, but this method only supports preferred_document_filename_regular_expression capturing reference, but not the combination of node_reference and local_reference, so this was changed to use getPropertyDictFromFilename, which is what is actually used to compute the reference. - The second problem here was that this check was done with a standard restricted catalog search, but later mergeRevision uses an unrestricted search, so this was changed to use unrestricted catalog search to match mergeRevision The testing also revealed that the PDFDocument._setFile hack to clear the _content_information was only for _setFile, but not for _setData, so this was extended to _setData as well, so that a case where the PDF content is updated by setData also update content information.
-
Jérome Perrin authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
py2/py3: import InstanceDict from DocumentTemplate._DocumentTemplate instead of deprecated DocumentTemplate.DT_Util.
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
use urlsplit instead, prepending '//' like discussed in https://bugs.python.org/issue27485#msg270215
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Jérome Perrin authored
fixes errors on python3, File needs bytes
-
Kazuhiko Shiozaki authored
-
Jérome Perrin authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Kazuhiko Shiozaki authored
-
Aurel authored
This not closed comment tag was probably a problem for Chameleon, this is from a commit from Aurélien in 2021, adjusted by Jérome in 2023 (to actually remove the code that were commented out, not just removing the comment and leaving the code)
-
Xiaowu Zhang authored
-
Roque authored
- landing page - dispatch uses opml-sync parameters - keeps backward compatibility
-
Jérome Perrin authored
DownloadableMixin uses mimetypes_registry to guess an extension from the mimetype, but this was wrong when the entry in mimetype only defines globs, an error like this was raised: Module erp5.component.mixin.erp5_version.DownloadableMixin, line 143, in index_html output_format = mimetype_object.globs.strip('*.') AttributeError: 'list' object has no attribute 'strip' Also blindly apply the same fix in OOoTemplate, as it used the same problematic pattern.
-
Jérome Perrin authored
we use to have two entries for csv: - text/comma-separated-values - mimes: ["text/comma-separated-values"] - extensions: ["csv"] - globs: [] - CSV document - mimes: ["text/csv", "text/x-comma-separated-values", "text/x-csv"] - extensions: [] - globs: ["*.csv"] but text/comma-separated-values does not really exist, rfc4180 recommends text/csv. The problem with this configuration is that when ERP5 picks a mime type for csv extension, it uses text/comma-separated-values, as this one has extensions set. Change the configuration to delete "text/comma-separated-values" and keep everything in "CSV document": - CSV document - mimes: ["text/csv", "text/x-comma-separated-values", "text/x-csv", "text/comma-separated-values"] - extensions: ["csv"] - globs: ["*.csv"]
-
Rafael Monnerat authored
in addition to None, id can be an empty list on this case
-
Rafael Monnerat authored
-
Rafael Monnerat authored
The JSONEditor relies on call async load for load promises. The current code waits for the promises to finish and throw errors explicitly. This allows the renderjs properly handle the error on the same chain of promises.
-
Jérome Perrin authored
The previous pattern of using click and then pause is fragile and seems to be the cause for test failures.
-
Jérome Perrin authored
Instead of disabling in javascript, which cause the button to be visible for a few milliseconds, disable directly in the HTML file. Do not hide "document properties", because it can be useful and it does not hurt and "edit images" because we don't hide the buttons to edit annotations either, so this is consistent.
-
Vincent Pelletier authored
The setter does this already so no change is expected, but these are API misuses and they just look wrong.
-
Vincent Pelletier authored
Also, modernise syntax a bit.
-