[Erp5-dev] problem with resource price
Sebastien Robin
seb at nexedi.com
Sun Jul 16 21:05:32 CEST 2006
Le Mercredi 12 Juillet 2006 09:57, Łukasz Nowak a écrit :
Hello,
It is possible to set many supply lines on ressource, but for some particular
customers and for some modules, we can add an init script to the resource
portal type, for example in the apparel industry with the portal type Apparel
Model :
ApparelModel_init
In this script, we do something like this:
context.newContent(portal_type='Supply Line',id='default_supply_line')
Then we use the form Resource_viewDefaultSupplyLine in order to modify the
default price.
But if you want to define many different prices (for example a supply line for
each supplier), you may not use the form Resource_viewDefaultSupplyLine.
Seb.
> Hello,
>
> In r8409 I've got problem while accessing
> Resource_viewDefaultSupplyLine:
>
> 2006-07-12T09:48:45 INFO(0) ERP5Form.get_value
> ( Resource_viewDefaultSupplyLine/my_supply_line_quantity_step_list
> [default]), exception on tales_expr:
> Traceback (most recent call last):
> File "/var/lib/zope/Products/ERP5Form/Form.py", line 94, in get_value
> value = tales_expr.__of__(self)(**kw)
> File "/usr/lib/zope/lib/python/Products/Formulator/TALESField.py",
> line 44, in __call__
> return getEngine().getContext(kw).evaluate(expr)
> File "/usr/lib/zope/lib/python/Products/PageTemplates/TALES.py", line
> 221, in evaluate
> return expression(self)
> File
> "/usr/lib/zope/lib/python/Products/PageTemplates/ZRPythonExpr.py", line
> 47, in __call__
> return eval(code, g, {})
> File "Python expression "[str(int(x)) for x in
> here.default_supply_line.getQuantityStepList()]"", line 1, in
> <expression>
> AttributeError: default_supply_line
> 2006-07-12T09:48:45 INFO(0) ERP5Form.get_value
> ( Resource_viewDefaultSupplyLine/matrixbox [lines]), exception on
> tales_expr:
> Traceback (most recent call last):
> File "/var/lib/zope/Products/ERP5Form/Form.py", line 94, in get_value
> value = tales_expr.__of__(self)(**kw)
> File "/usr/lib/zope/lib/python/Products/Formulator/TALESField.py",
> line 44, in __call__
> return getEngine().getContext(kw).evaluate(expr)
> File "/usr/lib/zope/lib/python/Products/PageTemplates/TALES.py", line
> 221, in evaluate
> return expression(self)
> File
> "/usr/lib/zope/lib/python/Products/PageTemplates/ZRPythonExpr.py", line
> 47, in __call__
> return eval(code, g, {})
> File "Python expression
> "here.default_supply_line.SupplyLine_asCellRange('path', matrixbox=1,
> display_base_category=0)[0]"", line 1, in <expression>
> AttributeError: default_supply_line
> 2006-07-12T09:48:45 INFO(0) ERP5Form.get_value
> ( Resource_viewDefaultSupplyLine/matrixbox [columns]), exception on
> tales_expr:
> Traceback (most recent call last):
> File "/var/lib/zope/Products/ERP5Form/Form.py", line 94, in get_value
> value = tales_expr.__of__(self)(**kw)
> File "/usr/lib/zope/lib/python/Products/Formulator/TALESField.py",
> line 44, in __call__
> return getEngine().getContext(kw).evaluate(expr)
> File "/usr/lib/zope/lib/python/Products/PageTemplates/TALES.py", line
> 221, in evaluate
> return expression(self)
> File
> "/usr/lib/zope/lib/python/Products/PageTemplates/ZRPythonExpr.py", line
> 47, in __call__
> return eval(code, g, {})
> File "Python expression
> "here.default_supply_line.SupplyLine_asCellRange('path', matrixbox=1,
> display_base_category=0)[1]"", line 1, in <expression>
> AttributeError: default_supply_line
> 2006-07-12T09:48:45 INFO(0) ERP5Form.get_value
> ( Resource_viewDefaultSupplyLine/matrixbox [tabs]), exception on
> tales_expr:
> Traceback (most recent call last):
> File "/var/lib/zope/Products/ERP5Form/Form.py", line 94, in get_value
> value = tales_expr.__of__(self)(**kw)
> File "/usr/lib/zope/lib/python/Products/Formulator/TALESField.py",
> line 44, in __call__
> return getEngine().getContext(kw).evaluate(expr)
> File "/usr/lib/zope/lib/python/Products/PageTemplates/TALES.py", line
> 221, in evaluate
> return expression(self)
> File
> "/usr/lib/zope/lib/python/Products/PageTemplates/ZRPythonExpr.py", line
> 47, in __call__
> return eval(code, g, {})
> File "Python expression
> "here.default_supply_line.SupplyLine_asCellRange('path', matrixbox=1,
> display_base_category=0)[2]"", line 1, in <expression>
> AttributeError: default_supply_line
>
> I've used older Resource_viewDefaultSupplyLine (r7500) but problem
> persist. I cannot find any reference to default_supply_line changed
> since in SVN report. What could be the problem? With TALES or
> incosistency in objects?
>
> Bye,
> Luke
--
Sebastien Robin, Nexedi Project Manager
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
More information about the Erp5-dev
mailing list