Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Is there a way to filter one2many fields based from its state, domain doesn't work

By
Abegail Sanchez
on 6/19/14, 2:07 AM 336 views

I have 2 page in my notebook invoiced and refund that use the same model hospital.account.lines with many2one ref to hospital.billing , Now I want only invoice page to see those item that were invoiced and the same with refund page only those refunded items.

0

Ludo - Neobis

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

Ludo - Neobis
On 6/19/14, 5:53 AM

Why does domain not work?

A possibility would be to seperate them into 2 fields. You can then have the 2 fields with 2 different domains. The field definition should be something like:

'billing_refunded_id' : fields.many2one('hospital.billing', 'Refunded item', domain='[('state','=','refund')]',

'billing_invoiced_id' : fields.many2one('hospital.billing', 'Invoiced item', domain='[('state','=','invoiced')]'

Just from the top of my head, so mind any typo's. 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/19/14, 2:07 AM
Seen: 336 times
Last updated: 3/16/15, 8:10 AM