我正在使用的自定义模块需要将一些文件写入odoo map(pit_sch,~map_df(tail(income), tax_calc, data = .)) %>% bind_rows(., .id = "id")
# A tibble: 204 x 3
# id income tax
# <chr> <dbl> <dbl>
# 1 Resident tax rates for 2016-17 199401 62962.
# 2 Resident tax rates for 2016-17 199501 63007.
# 3 Resident tax rates for 2016-17 199601 63052.
# 4 Resident tax rates for 2016-17 199701 63097.
# 5 Resident tax rates for 2016-17 199801 63142.
# 6 Resident tax rates for 2016-17 199901 63187.
# 7 Resident tax rates for 2015-16 199401 63277.
# 8 Resident tax rates for 2015-16 199501 63322.
# 9 Resident tax rates for 2015-16 199601 63367.
#10 Resident tax rates for 2015-16 199701 63412.
# … with 194 more rows
路径。有人可以告诉我如何通过代码获取addons
路径吗?
答案 0 :(得分:2)
您可以从这样的代码中获取插件路径,
import odoo.tools as tools
path = tools.config.get('addons_path')