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 nexedi/erp5!1061
parents ee68c458 e4686fb6
......@@ -90,14 +90,14 @@
<string>date</string>
<string>Date</string>
</tuple>
<tuple>
<string>node_title</string>
<string>Site or Warehouse</string>
</tuple>
<tuple>
<string>source_title</string>
<string>Origin</string>
</tuple>
<tuple>
<string>node_title</string>
<string>Site or Warehouse</string>
</tuple>
<tuple>
<string>section_title</string>
<string>Organisation</string>
......
from Products.ERP5Type.Message import translateString
from DateTime import DateTime
prefix_reference = DateTime().strftime('1%d%m%y')
......
......@@ -2,7 +2,6 @@ from Products.ERP5Type.Message import translateString
item_list = []
request = context.REQUEST
total_quantity = 0.0
item_portal_type = kw.get('type')
......@@ -19,8 +18,6 @@ if dialog.has_field('your_item_extra_property_list'):
item_property_dict[field_id.replace('your_', '', 1)] =\
request.get(field_id)
movement_cell_list = context.getCellValueList()
base_id = 'movement'
for line in kw.get('listbox'):
......
from Products.ERP5Type.Document import newTempBase
from Products.ERP5Type.Utils import cartesianProduct
portal = context.getPortalObject()
......
from Products.ERP5Type.Document import newTempDeliveryLine
portal = context.getPortalObject()
try:
......@@ -9,7 +8,11 @@ except ValueError:
result = []
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)
return result
......@@ -50,7 +50,7 @@
</item>
<item>
<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>
<key> <string>id</string> </key>
......
request = context.REQUEST
portal = context.getPortalObject()
# FIXME: this is a workaround, because if listbox is present in request.form,
# editable fields will be empty when re-displaying the dialog.
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>dialog_id, listbox=[], **kw</string> </value>
<value> <string>dialog_id, listbox=(), **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
object = state_change['object']
object.Base_checkConsistency()
state_change['object'].Base_checkConsistency()
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