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

item: fix pylnt messages and enable coding style test

parent 12c3e24c
Pipeline #8278 failed with stage
in 0 seconds
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