跳至内容
菜单
此问题已终结
1 回复
3371 查看

Hi, 

I m trying to get the default Sales Tax From settings --> Invoicing --> Taxes  (field name  is

"sale_tax_id" )in odoo 14


I try this :

Defualt_sale_tax = self.env['res.config.settings'].sale_tax_id

print(" Defualt_sale_tax = ", Defualt_sale_tax  )


Result :

Defualt_sale_tax = account.tax()


& i add record on it but still getting no result (i try  it  in  other  field  in  settings  but get nothing)

形象
丢弃
最佳答案

Hi,

You can get it from the company record as follows:  self.env.company.account_sale_tax_id


sale_tax_id in the res.config.settings is  a  related  field  of  account_sale_tax_id  in  the  company  model.

 

Thanks

形象
丢弃
编写者

So this mean that res.config.settings doesn't store the data , right ?
& Thanks this work !

相关帖文 回复 查看 活动
0
12月 22
3097
1
6月 25
2193
1
4月 24
4978
2
3月 24
8718
2
2月 24
2660