Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1 Antworten
3547 Ansichten

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
Verwerfen
Beste Antwort

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
Verwerfen
Autor

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

Verknüpfte Beiträge Antworten Ansichten Aktivität
0
Dez. 22
3313
1
Juni 25
2418
1
Apr. 24
5287
2
März 24
9183
2
Feb. 24
3002