تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
6433 أدوات العرض

What is the correct way to remove a single cell from a 4 cellesingle row table based on a condition? (I want to remove the third cell).

I have the following formula that is supposed to print "Great Client" if the word "Great" is located within the client name:

(so.partner_id.name.find('Great') > 0) and "Great Client" or removeParentNode('td')

It works fine when the condition is met, but I get an error message when it isn't, i.e. when it hits the removeParentNode('td'):

(<type 'exceptions.AssertionError'>, AssertionError(), <traceback object at 0x7fdae4b7e248>)

How is it possible to remove a single cell from a single row table?

الصورة الرمزية
إهمال

you need to post all the code in the module to get a good answer.

الكاتب

The trml2pdf.py file is over 1000 lines long, do you really want me to post it? Please understand that my formula rests within a dynamic report developed in OpenOffice writer.

أفضل إجابة

Maybe you declared the with of every row in the <blocktable> tag? Than the node needs to be there.

Why don't let it free if condition doesn't met?

(so.partner_id.name.find('Great') > 0) and "Great Client"

الصورة الرمزية
إهمال
الكاتب

From OpenOffice Writer I can't control where the width is stored. The reason why I don't leave it empty is that I simply want to remove the third cell out of 4 and therefore reduce the overall width of the table.

Oh sorry, my answer doesn't apply to Reportcreation with OpenOffice. I use a texteditor to alter the .rml files by hand.

المنشورات ذات الصلة الردود أدوات العرض النشاط
5
مارس 15
20427
2
مارس 15
8305
1
مارس 15
4039
1
مارس 15
4794
1
مارس 15
6033