Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to manage each tax group in Point Of sale in OpenERP(Odoo)?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 217
    Comment on it

    In below example, I have written Python script for each tax group. see below python code in .py file :

      (tax_code_pos, base_code_pos, account_pos, tax_id)= (0, 1, 2, 3)
    
                for key, tax_amount in group_tax.items():
                    tax = self.pool.get('account.tax').browse(cr, uid, key[tax_id], context=context)
                    insert_data('tax', {
                        'name': _('Tax') + ' ' + tax.name,
                        'quantity': line.qty,
                        'product_id': line.product_id.id,
                        'account_id': key[account_pos] or income_account,
                        'credit': ((tax_amount>0) and tax_amount) or 0.0,
                        'debit': ((tax_amount<0) and -tax_amount) or 0.0,
                        'tax_code_id': key[tax_code_pos],
                        'tax_amount': tax_amount,
                        'partner_id': order.partner_id and self.pool.get("res.partner")._find_accounting_partner(order.partner_id).id or False
                    })

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: