Discussion:
[Erp5-dev] problem with resource price
Łukasz Nowak
2006-07-12 07:57:54 UTC
Permalink
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
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 392 10 60 int 37 fax: +48 32 392 10 61
https://ssl.ventis.com.pl/keys/lukasz.nowak.pub.asc
Sebastien Robin
2006-07-16 19:05:32 UTC
Permalink
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.
Post by Łukasz Nowak
Hello,
In r8409 I've got problem while accessing
2006-07-12T09:48:45 INFO(0) ERP5Form.get_value
( Resource_viewDefaultSupplyLine/my_supply_line_quantity_step_list
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
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
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
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
Loading...