In this case I have a tax that can be applied if the total amount before taxes is bigger than a fixed value.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客戶關係
- e-Commerce
- 會計
- 庫存
- PoS
- Project
- MRP
此問題已被標幟
On the tax form, you can select Python Code
as Tax Type
.
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 account_tax
.
Thanks. I really appreciate this If you can tell how. I am not good at python nor in OpenERP structures. What do you mean with extend a method?.
相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
---|---|---|---|---|
|
1
7月 25
|
2228 | ||
|
1
7月 25
|
3965 | ||
|
1
3月 25
|
1493 | ||
|
2
8月 24
|
2255 | ||
|
1
12月 23
|
11254 |