Commit 56516cd8 authored by Jérome Perrin's avatar Jérome Perrin

Raise an explicit error if a model line has no resource


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21015 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 529fc1a2
...@@ -348,6 +348,9 @@ class PaySheetTransaction(Invoice): ...@@ -348,6 +348,9 @@ class PaySheetTransaction(Invoice):
continue continue
service = model_line.getResourceValue() service = model_line.getResourceValue()
if service is None:
raise ValueError, 'Model Line %s has no resource' % (
model_line.getRelativeUrl())
title = model_line.getTitleOrId() title = model_line.getTitleOrId()
int_index = model_line.getFloatIndex() int_index = model_line.getFloatIndex()
base_amount_list = model_line.getBaseAmountList() base_amount_list = model_line.getBaseAmountList()
......
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