Commit 0882083d authored by Jérome Perrin's avatar Jérome Perrin

Item: Change columns order on tracking for more readability

Display like this:

![image](/uploads/0e182e76a94c56eb450e8ef354a9c5c1/image.png)

Where we can easily read in listbox the history of item movements: 
```
   → A
A  → B
B  → C
```

instead of

![image](/uploads/24bea37097dc22c2eaedf323d049aeb3/image.png)


```
A 🠐 
B 🠐 A
C 🠐 B
```

( as always, this also enable coding style test )

/reviewed-on !1061
parents ee68c458 e4686fb6
Pipeline #8270 failed with stage
...@@ -90,14 +90,14 @@ ...@@ -90,14 +90,14 @@
<string>date</string> <string>date</string>
<string>Date</string> <string>Date</string>
</tuple> </tuple>
<tuple>
<string>node_title</string>
<string>Site or Warehouse</string>
</tuple>
<tuple> <tuple>
<string>source_title</string> <string>source_title</string>
<string>Origin</string> <string>Origin</string>
</tuple> </tuple>
<tuple>
<string>node_title</string>
<string>Site or Warehouse</string>
</tuple>
<tuple> <tuple>
<string>section_title</string> <string>section_title</string>
<string>Organisation</string> <string>Organisation</string>
......
from Products.ERP5Type.Message import translateString
from DateTime import DateTime from DateTime import DateTime
prefix_reference = DateTime().strftime('1%d%m%y') prefix_reference = DateTime().strftime('1%d%m%y')
......
...@@ -2,7 +2,6 @@ from Products.ERP5Type.Message import translateString ...@@ -2,7 +2,6 @@ from Products.ERP5Type.Message import translateString
item_list = [] item_list = []
request = context.REQUEST request = context.REQUEST
total_quantity = 0.0
item_portal_type = kw.get('type') item_portal_type = kw.get('type')
...@@ -19,8 +18,6 @@ if dialog.has_field('your_item_extra_property_list'): ...@@ -19,8 +18,6 @@ if dialog.has_field('your_item_extra_property_list'):
item_property_dict[field_id.replace('your_', '', 1)] =\ item_property_dict[field_id.replace('your_', '', 1)] =\
request.get(field_id) request.get(field_id)
movement_cell_list = context.getCellValueList()
base_id = 'movement'
for line in kw.get('listbox'): for line in kw.get('listbox'):
......
from Products.ERP5Type.Document import newTempBase
from Products.ERP5Type.Utils import cartesianProduct from Products.ERP5Type.Utils import cartesianProduct
portal = context.getPortalObject() portal = context.getPortalObject()
......
from Products.ERP5Type.Document import newTempDeliveryLine
portal = context.getPortalObject() portal = context.getPortalObject()
try: try:
...@@ -9,7 +8,11 @@ except ValueError: ...@@ -9,7 +8,11 @@ except ValueError:
result = [] result = []
for i in range(count): for i in range(count):
obj = newTempDeliveryLine(portal, id="tmp_item_%s" % i, uid="new_item_%s" % i) obj = portal.newContent(
portal_type='Movement',
temp_object=True,
id="tmp_item_%s" % i,
uid="new_item_%s" % i)
result.append(obj) result.append(obj)
return result return result
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>form_id=\'view\', list_selection_name=\'\', uids=[], listbox=None, listbox_uid=[], *args, **kw</string> </value> <value> <string>form_id=\'view\', list_selection_name=\'\', uids=(), listbox=None, listbox_uid=(), *args, **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
request = context.REQUEST request = context.REQUEST
portal = context.getPortalObject()
# FIXME: this is a workaround, because if listbox is present in request.form, # FIXME: this is a workaround, because if listbox is present in request.form,
# editable fields will be empty when re-displaying the dialog. # editable fields will be empty when re-displaying the dialog.
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>dialog_id, listbox=[], **kw</string> </value> <value> <string>dialog_id, listbox=(), **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
......
object = state_change['object'] state_change['object'].Base_checkConsistency()
object.Base_checkConsistency()
  • I used a complex unicode character by mistake (🠐 instead of ) ... this might not display correctly...

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