Commit adcc7746 authored by Jérome Perrin's avatar Jérome Perrin

Merge remote-tracking branch 'upstream/master' into zope4py3

parents 9eb33e91 5acfdeff
Pipeline #39880 running with stage
in 0 seconds
Changes
=======
0.4.77 (2025-02-18)
-------------------
* testnode:
- fix handling of shebang like '#!/bin/sh -e'
* remove totally webchecker
0.4.76 (2024-05-07)
-------------------
......
......@@ -14,6 +14,8 @@
<string>columns</string>
<string>count_method</string>
<string>default_params</string>
<string>domain_root_list</string>
<string>domain_tree</string>
<string>editable_columns</string>
<string>list_method</string>
<string>portal_types</string>
......@@ -282,6 +284,21 @@
<list/>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
<list>
<tuple>
<string>ledger</string>
<string>Ledger</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>domain_tree</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<value>
......
"""This script is used to know if quantity can be edited by user.
* If this is not a movement (line containing lines or cell), user
cannot edit this line which is just a container, but no actual movement.
* If items are used, quantity is set by the item quantity.
"""
if not context.isMovement():
return False
return not (context.getResource() and context.getResourceValue().getAggregatedPortalTypeList())
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="_reconstructor" module="copy_reg"/>
</klass>
<tuple>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
<global name="object" module="__builtin__"/>
<none/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Movement_isQuantityEditable</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -135,11 +135,11 @@
<string>Sender or Provider</string>
</tuple>
<tuple>
<string>start_date_range_min</string>
<string>predicate.start_date_range_min</string>
<string>Valid from</string>
</tuple>
<tuple>
<string>start_date_range_max</string>
<string>predicate.start_date_range_max</string>
<string>Valid until</string>
</tuple>
<tuple>
......@@ -238,6 +238,14 @@
<string>modification_date</string>
<string>Modification Date</string>
</tuple>
<tuple>
<string>predicate.start_date_range_min</string>
<string>Valid from</string>
</tuple>
<tuple>
<string>predicate.start_date_range_max</string>
<string>Valid until</string>
</tuple>
</list>
</value>
</item>
......@@ -300,6 +308,14 @@
<string>modification_date</string>
<string>Modification Date</string>
</tuple>
<tuple>
<string>predicate.start_date_range_min</string>
<string>Valid from</string>
</tuple>
<tuple>
<string>predicate.start_date_range_max</string>
<string>Valid until</string>
</tuple>
</list>
</value>
</item>
......
......@@ -109,11 +109,11 @@
<string>Recipient or Beneficiary</string>
</tuple>
<tuple>
<string>start_date_range_min</string>
<string>predicate.start_date_range_min</string>
<string>Valid from</string>
</tuple>
<tuple>
<string>start_date_range_max</string>
<string>predicate.start_date_range_max</string>
<string>Valid until</string>
</tuple>
<tuple>
......
......@@ -84,8 +84,8 @@
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_start_date_range_max</string>
<string>listbox_start_date_range_min</string>
<string>listbox_predicate_start_date_range_max</string>
<string>listbox_predicate_start_date_range_min</string>
</list>
</value>
</item>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_start_date_range_max</string> </value>
<value> <string>listbox_predicate_start_date_range_max</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_start_date_range_min</string> </value>
<value> <string>listbox_predicate_start_date_range_min</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -74,8 +74,8 @@
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_start_date_range_max</string>
<string>listbox_start_date_range_min</string>
<string>listbox_predicate_start_date_range_max</string>
<string>listbox_predicate_start_date_range_min</string>
</list>
</value>
</item>
......
......@@ -10,7 +10,7 @@
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>editable_columns</string>
<string>sort</string>
</list>
</value>
</item>
......@@ -77,21 +77,6 @@
<list/>
</value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<value>
<list>
<tuple>
<string>start_date_range_min</string>
<string>Valid from</string>
</tuple>
<tuple>
<string>start_date_range_max</string>
<string>Valid until</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_purchase_supplies_listbox</string> </value>
......@@ -100,6 +85,12 @@
<key> <string>form_id</string> </key>
<value> <string>Base_viewPDMFieldLibrary</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
......
......@@ -6,9 +6,15 @@
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_start_date_range_max</string> </value>
<value> <string>listbox_predicate_start_date_range_max</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_start_date_range_min</string> </value>
<value> <string>listbox_predicate_start_date_range_min</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -74,8 +74,8 @@
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_start_date_range_max</string>
<string>listbox_start_date_range_min</string>
<string>listbox_predicate_start_date_range_max</string>
<string>listbox_predicate_start_date_range_min</string>
</list>
</value>
</item>
......
......@@ -8,7 +8,7 @@
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_start_date_range_max</string> </value>
<value> <string>listbox_predicate_start_date_range_max</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
......@@ -14,7 +14,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_start_date_range_min</string> </value>
<value> <string>listbox_predicate_start_date_range_min</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......
"""This script is used to know if quantity can be edited by user.
* If this is not a movement (line containing lines or cell), user
cannot edit this line which is just a container, but no actual movement.
"""
This script is used to know if quantity can be edited by user.
* If this line has variation category list, then it means it's a line that
will contain cell, so it's already not possible to set quantity, user have
to create cells and set quantities on cells.
* If quantity is not enabled on the movement, quantity cannot be set.
* If items are used, quantity is set by the item quantity.
* If items are required, quantity is set by the item quantity.
"""
if not context.isMovement():
return False
if context.getVariationCategoryList(omit_optional_variation=1) and not 'Cell' in context.getPortalType():
if not context.Movement_isQuantityEnabled():
return False
return not (context.getResource() and context.getResourceValue().getAggregatedPortalTypeList())
return not (context.getResource() and context.getResourceValue().getRequiredAggregatedPortalTypeList())
return context.isMovement() and not context.getVariationCategoryList()
"""
This script is used to know if quantity should be shown to the user. Usually, not showing quantity happens when a total quantity is shown instead, meaning the line uses cells.
* If this is not a movement (line containing lines or cell), user cannot see quantity for this line which is just a container, but no actual movement.
* If this line has required variation category list, then it means it's a line that will contain cell, so total quantity will be used instead.
* If this line has optional variation category list, and already contain cells, total quantity should also be used.
"""
if not context.isMovement():
return False
if not 'Cell' in context.getPortalType() and \
(context.getVariationCategoryList(omit_optional_variation=1) or \
context.hasCellContent(base_id='movement')):
return False
return True
......@@ -37,16 +37,15 @@
hour = minute * 60,
day = hour * 24,
week = day * 7,
year = day * 365,
time_format = new Intl.RelativeTimeFormat(language);
diff = date.getFullYear() - current_date.getFullYear();
if (diff !== 0) {
return time_format.format(diff, 'year');
}
diff = date - current_date;
abs = Math.abs(diff);
// "year", "quarter", "month", "week", "day", "hour", "minute", "second"
if (abs > year) {
return time_format.format(Math.floor(diff / year), 'year');
}
if (abs > (week * 2)) {
return time_format.format(Math.floor(diff / week), 'week');
}
......
......@@ -238,7 +238,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>1017.21412.29767.13277</string> </value>
<value> <string>1017.42673.18426.35652</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -258,7 +258,7 @@
</tuple>
<state>
<tuple>
<float>1718640624.19</float>
<float>1735815864.25</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -38,7 +38,7 @@ from slapos.grid.utils import md5digest
def dealShebang(run_test_suite_path):
with open(run_test_suite_path) as f:
if f.read(2) == '#!':
return f.readline().split(None, 1)
return f.readline().rstrip().split(None, 1)
return []
class UnitTestRunner(object):
......
......@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import glob
import os
version = '0.4.76'
version = '0.4.77'
name = 'erp5.util'
long_description = open("README.erp5.util.txt").read() + "\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment