Commit 508b9b22 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

accept checked_permission parameter in explicit definition of...

accept checked_permission parameter in explicit definition of getQuantityUnit() because checked_permissin='View' can be added in ERP5Form.Form.DefaultValue.__call__.
parent dafd3f38
...@@ -729,11 +729,11 @@ class Amount(Base, VariatedMixin): ...@@ -729,11 +729,11 @@ class Amount(Base, VariatedMixin):
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getQuantityUnit') 'getQuantityUnit')
def getQuantityUnit(self): def getQuantityUnit(self, checked_permission=None):
result = self._getDefaultCategoryMembership('quantity_unit') result = self._getDefaultCategoryMembership('quantity_unit', checked_permission=checked_permission)
if result is None: if result is None:
resource = self.getResourceValue() resource = self.getResourceValue()
if resource is not None: if resource is not None:
result = resource.getQuantityUnit() result = resource.getQuantityUnit(checked_permission=checked_permission)
return result return result
...@@ -186,5 +186,5 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement): ...@@ -186,5 +186,5 @@ class DeliveryCell(MappedValue, Movement, ImmobilisationMovement):
security.declareProtected( Permissions.AccessContentsInformation, security.declareProtected( Permissions.AccessContentsInformation,
'getQuantityUnit') 'getQuantityUnit')
def getQuantityUnit(self): def getQuantityUnit(self, checked_permission=None):
return self.getParentValue().getQuantityUnit() return self.getParentValue().getQuantityUnit(checked_permission=checked_permission)
...@@ -221,11 +221,11 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin, ...@@ -221,11 +221,11 @@ class SubscriptionItem(Item, CompositionMixin, MovementGeneratorMixin,
return None return None
return open_order_line.getQuantity() return open_order_line.getQuantity()
def getQuantityUnit(self): def getQuantityUnit(self, checked_permission=None):
open_order_line = self.getAggregateRelatedValue(portal_type='Open Sale Order Line') open_order_line = self.getAggregateRelatedValue(portal_type='Open Sale Order Line')
if open_order_line is None: if open_order_line is None:
return None return None
return open_order_line.getQuantityUnit() return open_order_line.getQuantityUnit(checked_permission=checked_permission)
def getPrice(self): def getPrice(self):
open_order_line = self.getAggregateRelatedValue(portal_type='Open Sale Order Line') open_order_line = self.getAggregateRelatedValue(portal_type='Open Sale Order Line')
......
...@@ -76,5 +76,5 @@ class SupplyCell(Path): ...@@ -76,5 +76,5 @@ class SupplyCell(Path):
security.declareProtected( Permissions.AccessContentsInformation, security.declareProtected( Permissions.AccessContentsInformation,
'getQuantityUnit') 'getQuantityUnit')
def getQuantityUnit(self): def getQuantityUnit(self, checked_permission=None):
return self.getParentValue().getQuantityUnit() return self.getParentValue().getQuantityUnit(checked_permission=checked_permission)
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