Skip to Content
Menu
This question has been flagged
2942 Views

I set sales and purchase tax in `Accounting -> Settings`.

I need to fetch these records in python function. I write a function in `account.config.settings` model. But it returns None.

*.py

    @api.model

    def get_sale_tax(self):

           ir_values = self.env['ir.values']

           taxes_id = ir_values.get_default('product.template', 'taxes_id', company_id = self.company_id.id)

           print'sales tax',taxes_id //Print None

           return taxes_id

And

@api.model

    def get_sale_tax(self):

           return [self.default_sale_tax_id.amount]


How can i do it? Any solution?


Avatar
Discard
Related Posts Replies Views Activity
1
Nov 24
70
1
Apr 24
571
0
Feb 24
669
1
Dec 23
340
0
Jan 24
260