Commit db0e6131 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Preparation of erp5_base migration from FS: Fix pylint...

ZODB Components: Preparation of erp5_base migration from FS: Fix pylint no-name-in-module on newTempXXX (04b49859).
parent 8c1669e6
...@@ -169,7 +169,6 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -169,7 +169,6 @@ class BuilderMixin(XMLObject, Amount, Predicate):
getattr(delivery_module, delivery_module_before_building_script_id)() getattr(delivery_module, delivery_module_before_building_script_id)()
def generateMovementListForStockOptimisation(self, group_by_node=1, **kw): def generateMovementListForStockOptimisation(self, group_by_node=1, **kw):
from Products.ERP5Type.Document import newTempMovement
now = DateTime() now = DateTime()
movement_list = [] movement_list = []
for attribute, method in [('node_uid', 'getDestinationUid'), for attribute, method in [('node_uid', 'getDestinationUid'),
...@@ -203,7 +202,9 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -203,7 +202,9 @@ class BuilderMixin(XMLObject, Amount, Predicate):
resource_portal_type_list = self.getResourcePortalTypeList() resource_portal_type_list = self.getResourcePortalTypeList()
def newMovement(inventory_item, resource): def newMovement(inventory_item, resource):
# Create temporary movement # Create temporary movement
movement = newTempMovement(self.getPortalObject(), "temp") movement = self.getPortalObject().portal_trash.newContent(
portal_type="Movement",
temp_object=True)
resource_portal_type = resource.getPortalType() resource_portal_type = resource.getPortalType()
assert resource_portal_type in resource_portal_type_list, \ assert resource_portal_type in resource_portal_type_list, \
"Builder %r does not support resource of type : %r" % ( "Builder %r does not support resource of type : %r" % (
......
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