コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3572 ビュー

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
3326
1
6月 25
2427
1
4月 24
5299
2
3月 24
9230
2
2月 24
3025