Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I have a problem in checking multiple conditions in my openoffice report for openerp in my report i need to check conditions and prints the results.
my condition is.
[[ (l.invoice_line_tax_id.name =='5 %' )and formatLang(l.price_unit /1.05) or (l.invoice_line_tax_id.name == '14.5 %') and formatLang(l.price_unit/1.44) or formatLang(l.price_unit) ]]
in this first check tax name == '5 %' then print l.price_unit/1.05 then evaluate the or condition if tax name == '14.5 %' prints the value of l.price_unit/1.44, else print l.price_unit.
But there is a problem in my report it works fine when tax name == '5 %' and print its corresponding value, then it evaluate the false condition by printing the else value (l.price_unit) , It does n't evaluate the or condition (
or (l.invoice_line_tax_id.name == '14.5 %') and formatLang(l.price_unit/1.44)) .Any one please help me to find the solutions.
Why will OR condition would work if your 1st condition already statisfied?
(l.invoice_line_tax_id.name =='5 %' )and formatLang(l.price_unit /1.05) is true then or condition wont work.
in case (l.invoice_line_tax_id.name =='5 %' )and formatLang(l.price_unit /1.05)=False
your OR (l.invoice_line_tax_id.name == '14.5 %') and formatLang(l.price_unit/1.44) will work
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 platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 3/25/14, 2:06 AM|
|Seen: 933 times|
|Last updated: 3/16/15, 8:10 AM|