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
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
0
Mar 15
|
5144 | ||
|
3
Mar 25
|
18155 | ||
|
0
Jun 24
|
1482 | ||
How to show a menuitem if user is in two groups?
Diselesaikan
|
|
2
Feb 21
|
6059 | |
|
0
Jan 24
|
8653 |