Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3506 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Auteur

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

Gerelateerde posts Antwoorden Weergaven Activiteit
0
dec. 22
3269
1
jun. 25
2388
1
apr. 24
5256
2
mrt. 24
9080
2
feb. 24
2977