Hello all,
I don't understand how works this python line because of the in, the and and the or. Can you explain please?
default_amount = invoice.type in ('out_refund', 'in_refund') and -invoice.residual or invoice.residual
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello all,
I don't understand how works this python line because of the in, the and and the or. Can you explain please?
default_amount = invoice.type in ('out_refund', 'in_refund') and -invoice.residual or invoice.residual
Thanks
Ok, I have found it there :
http://python.developpez.com/cours/DiveIntoPython/php/frdiveintopython/power_of_introspection/and_or.php
At the point 4.6.1
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
0
thg 3 15
|
5141 | ||
|
3
thg 3 25
|
18155 | ||
|
0
thg 6 24
|
1480 | ||
|
2
thg 2 21
|
6059 | ||
|
0
thg 1 24
|
8652 |