Skip to Content
Menú
This question has been flagged
1 Respondre
3493 Vistes

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)

Avatar
Descartar
Best Answer

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

Avatar
Descartar
Autor

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

Related Posts Respostes Vistes Activitat
0
de des. 22
3254
1
de juny 25
2385
1
d’abr. 24
5245
2
de març 24
9067
2
de febr. 24
2966