On the tax form, you can select
Python Code as
this way you can decide if apply the tax or not depending on your conditions.
BUT the amount before taxes isn't available as local variable during the computation. neither is the quantity, so you can't just do price_unit*qty (price_unit is available as local variable).
BUT you can extend the
_unit_compute method of
account_tax to include what you need.
Then, you can also decide if that tax must not appear at all. To do this you can use the
applicability field you find under the
Special Computation tab on the tax form.
This field works only if you selected Python Code earlier as Tax Type.
To extend this to include other variables you'll have to inherit the
_applicable method of
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
|Asked: 3/27/13, 2:50 PM|
|Seen: 2231 times|
|Last updated: 3/16/15, 8:10 AM|