Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3472 Widoki

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)

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

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

Powiązane posty Odpowiedzi Widoki Czynność
0
gru 22
3211
1
cze 25
2331
1
kwi 24
5171
2
mar 24
8965
2
lut 24
2908