Commit cfd072ba authored by Romain Courteaud's avatar Romain Courteaud

Modify price reference.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2664 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6db77822
......@@ -89,8 +89,8 @@ class SupplyLineMixin(ExtensionClass.Base):
return XMLMatrix.newCell(self, *kw, **kwd)
security.declareProtected(Permissions.AccessContentsInformation, 'getUnitBasePrice')
def getUnitBasePrice(self, context=None, REQUEST=None, **kw):
security.declareProtected(Permissions.AccessContentsInformation, 'getPrice')
def getPrice(self, context=None, REQUEST=None, **kw):
"""
"""
tmp_context = self.asContext(context=context, REQUEST=REQUEST, **kw)
......@@ -105,8 +105,8 @@ class SupplyLineMixin(ExtensionClass.Base):
if self.hasCell(base_id=base_id, *key):
mapped_value = self.getCell(base_id=base_id, *key)
if mapped_value.test(tmp_context):
if 'price' in mapped_value.getMappedValuePropertyList():
base_price = mapped_value.getProperty('price')
if 'base_price' in mapped_value.getMappedValuePropertyList():
base_price = mapped_value.getProperty('base_price')
if base_price in [None,'']:
base_price = self.getBasePrice()
......
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