Commit 5040c9e7 authored by Aurel's avatar Aurel

patch InventoryLine class to have getBaobabMethod fallback


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17539 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cb5446c4
......@@ -29,6 +29,7 @@ from AccessControl import ClassSecurityInfo
from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions, PropertySheet, Constraint, Interface
from Products.ERP5.Document.Delivery import Delivery
from Products.ERP5.Document.InventoryLine import InventoryLine
from Products.ERP5Type.Document.DeliveryCell import DeliveryCell
from Products.ERP5.Document.Movement import Movement
from Products.ERP5.Document.Container import Container
......@@ -214,3 +215,35 @@ Container.getBaobabSourceProjectUid__roles__ = PermissionRole(Permissions.View)
Container.getBaobabDestinationProjectUid = lambda x: x.getDestinationProjectUid()
Container.getBaobabDestinationProjectUid__roles__ = PermissionRole(Permissions.View)
### Dynamic patch
InventoryLine.getBaobabSourceUid = lambda x: x.getSourceUid()
InventoryLine.getBaobabSourceUid__roles__ = PermissionRole(Permissions.View)
InventoryLine.getBaobabDestinationUid = lambda x: x.getDestinationUid()
InventoryLine.getBaobabDestinationUid__roles__ = PermissionRole(Permissions.View)
InventoryLine.getBaobabSourceSectionUid = lambda x: x.getSourceSectionUid()
InventoryLine.getBaobabSourceSectionUid__roles__ = PermissionRole(Permissions.View)
InventoryLine.getBaobabDestinationSectionUid = lambda x: x.getDestinationSectionUid()
InventoryLine.getBaobabDestinationSectionUid__roles__ = PermissionRole(Permissions.View)
InventoryLine.getBaobabSourcePaymentUid = lambda x: x.getSourcePaymentUid()
InventoryLine.getBaobabSourcePaymentUid__roles__ = PermissionRole(Permissions.View)
InventoryLine.getBaobabDestinationPaymentUid = lambda x: x.getDestinationPaymentUid()
InventoryLine.getBaobabDestinationPaymentUid__roles__ = PermissionRole(Permissions.View)
InventoryLine.getBaobabSourceFunctionUid = lambda x: x.getSourceFunctionUid()
InventoryLine.getBaobabSourceFunctionUid__roles__ = PermissionRole(Permissions.View)
InventoryLine.getBaobabDestinationFunctionUid = lambda x: x.getDestinationFunctionUid()
InventoryLine.getBaobabDestinationFunctionUid__roles__ = PermissionRole(Permissions.View)
InventoryLine.getBaobabSourceProjectUid = lambda x: x.getSourceProjectUid()
InventoryLine.getBaobabSourceProjectUid__roles__ = PermissionRole(Permissions.View)
InventoryLine.getBaobabDestinationProjectUid = lambda x: x.getDestinationProjectUid()
InventoryLine.getBaobabDestinationProjectUid__roles__ = PermissionRole(Permissions.View)
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