Commit 4ee585d8 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ERP5/Document: Fix pylint warnings.

parent d672defe
......@@ -35,7 +35,6 @@ from AccessControl.PermissionRole import PermissionRole
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5.Document.OrderLine import OrderLine
from Products.ERP5.Document.Movement import Movement
from Products.ERP5.Document.MappedValue import MappedValue
from Products.ERP5.Document.ImmobilisationMovement import ImmobilisationMovement
......@@ -45,7 +44,6 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
A DeliveryCell allows to define specific quantities
for each variation of a resource in a delivery line.
"""
meta_type = 'ERP5 Delivery Cell'
portal_type = 'Delivery Cell'
isCell = 1
......@@ -117,16 +115,14 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
security.declareProtected( Permissions.ModifyPortalContent,
'notifyAfterUpdateRelatedContent' )
def notifyAfterUpdateRelatedContent(self, previous_category_url,
new_category_url):
def notifyAfterUpdateRelatedContent(self, previous_category_url, new_category_url):
"""
Membership Crirerions and Category List are same in DeliveryCell
Must update it (or change implementation to remove data duplication)
"""
update_method = self.portal_categories.updateRelatedCategory
predicate_value = self.getPredicateValueList()
new_predicate_value = map(lambda c: update_method(c,
previous_category_url, new_category_url), predicate_value)
new_predicate_value = [update_method(c, previous_category_url, new_category_url)
for c in self.getPredicateValueList()]
self._setPredicateValueList(new_predicate_value)
# No reindex needed since uid stable
......
......@@ -48,7 +48,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
It may include a price (for insurance, for customs, for invoices,
for orders)
"""
meta_type = 'ERP5 Delivery Line'
portal_type = 'Delivery Line'
......@@ -152,7 +151,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
else: return quantity
if fast argument is true, inventory API will be used.
"""
if fast:
kw = {}
kw['section_uid'] = self.getDestinationSectionUid()
......@@ -404,8 +402,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
raise ValueError('No builder found')
self.edit(quantity=0) # adoption have to 'rebuild' delivery line
movement_type_list = (delivery_builder.getDeliveryLinePortalType(),
delivery_builder.getDeliveryCellPortalType())
# Collect
root_group_node = delivery_builder.collectMovement(
simulation_movement_list)
......@@ -476,7 +472,6 @@ class DeliveryLine(Movement, XMLMatrix, ImmobilisationMovement):
"""
simulation_tool = self.getPortalObject().portal_simulation
solveMovement = simulation_tool.solveMovement
solve_result_list = []
# accept + split
for decision in [q for q in decision_list if q.decision != 'adopt']:
if decision.decision == 'accept':
......
......@@ -34,13 +34,11 @@ from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5.Document.DeliveryCell import DeliveryCell
class InventoryCell(DeliveryCell):
"""
An InventoryCell allows to define specific inventory
for each variation of a resource in an inventory line.
"""
meta_type = 'ERP5 Inventory Cell'
portal_type = 'Inventory Cell'
add_permission = Permissions.AddPortalContent
......
......@@ -39,7 +39,6 @@ class InventoryLine(DeliveryLine):
"""
An Inventory Line describe the inventory of a resource, by variations.
"""
meta_type = 'ERP5 Inventory Line'
portal_type = 'Inventory Line'
add_permission = Permissions.AddPortalContent
......@@ -62,7 +61,6 @@ class InventoryLine(DeliveryLine):
, PropertySheet.ItemAggregation
)
security.declareProtected(Permissions.AccessContentsInformation, 'getTotalInventory')
def getTotalInventory(self):
"""
......
......@@ -37,7 +37,6 @@ class OrderCell(DeliveryCell):
A OrderCell allows to define specific quantities
for each variation of a resource in a delivery line.
"""
meta_type = 'ERP5 Order Cell'
portal_type = 'Order Cell'
isCell = 1
......@@ -88,4 +87,3 @@ class OrderCell(DeliveryCell):
if not self.isMovement():
return default
return DeliveryCell.getTotalQuantity(self, default=default, *args, **kw)
\ No newline at end of file
......@@ -35,7 +35,6 @@ class OrderLine(DeliveryLine):
"""
A order line defines quantity and price
"""
meta_type = 'ERP5 Order Line'
portal_type = 'Order Line'
......
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