Skip to Content
Menu
This question has been flagged
6 Replies
3075 Views

Hi guys,


Does someones knows how to see the "state" of the invoices on the sale.order tree view?

With the field invoice_ids, I can see only the number on he sale.order tree view. I would like to have number + state.


Is it possible?


Many thanks,


Selverine   

Avatar
Discard

Yes, you'll need to customize view for that.

What have you already tried?

Author

Hi Temur. Thank you for your answer. I tried to add the field invoice_ids but I have only the number. Or, this field is the only field that connect invoice and sale.order. Is it possible to print a field like invoice_ids.state inside the view ( OpenERP 7?). I got some error everytime I try something like this. Many thanks, Selverine

Best Answer

Hello,

You can add a new functional field of type char, to sale.order, this field contains the invoices number + state. something like

value = ''
for inv in order.inovice_ids:
     value += inv.number + '/' + inv.state + '\n'

check this question with similar concept.


Hope this could help

Avatar
Discard
Author

Hi Ahmed, Thank you for your help. I was thinking to do something like this. However, If I change my state inside the account module. How my field can be updated? How can this field read on "real time" the state of my invoice? I block on this point :-(. Many thanks, Selverine

Hi, The functional field is always trigger the function whenever the field will appear in the screen so it is always updated. Unless you used the keyword 'store' to enhance the performance.

Best Answer

Hi Selverine,

In developer mode, navigate to the sale.order tree view and in the developer menu click View > Edit Tree View. Change 

<field name="state" invisible="1"/> to

<field name="state"/>

then reload the page.

Avatar
Discard
Author

Hi Clark, Thank you for your answer. However, with this I will have the state of the sale order. Or, I would like to have the state of the invoice inside my sale order view. Do you have any idea? Many thanks, Selverine