Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

Tax Calculations in Quotation Rounding problem

Subscribe

Get notified when there's activity on this post

This question has been flagged
1 Reply
9083 Views
Avatar
Merlin TecSol Pvt. Ltd.

I am trying to setup so that when a Quote or Sales Order is created OpenERP should calculate the Tax as follows: 1. Excise (@ 10.3%) on Total Amount 2. VAT (@ 5%) on the Excise amount calculated.

Looking at above scenario if the bill amount is 10000.00 then Excise should be 1030.00 (@ 10.3% of 10000.00 ) and VAT should 551.50 (@ 5% of (10000.00 + 1030.00 = 11030.00)).

Totaling above should give us 11581.5 (which is 10000.00 + 1030.00 + 551.50).

But what we get in OpenERP is 11580.00 which is wrong. Here is the screen shot: image description

Please help solve this problem.

TIA

2
Avatar
Discard
Avatar
le_dilem
Best Answer

you can create a new inherit Module "J'ai mis un champ libre pour saisir l'accise 10.3%" car il faut d'autres contrôles pour l'exécuter automatiquement. Tu dois faire pareil pour la facture.

NB: Faut laisser la Taxe a ZERO. car le calcul TVA est sur les lignes pas sur le Total.

xml :

<?xml version="1.0" encoding="UTF-8"?>

<openerp>
    <data>

        <record id="view_order_accise" model="ir.ui.view">
            <field name="name">sale.order.form</field>
            <field name="model">sale.order</field>
            <field name="type">form</field>
            <field name="inherit_id" ref="sale.view_order_form"/>
            <field name="arch" type="xml">
        <group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total" position ="replace">
        <group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">   
                <field name="add_accise" widget='monetary' options="{'currency_field': 'currency_id'}"/>
                                <field name="accise" widget='monetary' options="{'currency_field': 'currency_id'}"/>
                                <field name="amount_untaxed" widget='monetary' options="{'currency_field': 'currency_id'}"/>
                                <field name="amount_tax" widget='monetary' options="{'currency_field': 'currency_id'}"/>
                                <div class="oe_subtotal_footer_separator oe_inline">
                                    <label for="amount_total" />
                                    <button name="button_dummy"
                                        states="draft,sent" string="(update)" type="object" class="oe_edit_only oe_link"/>
                                </div>
                                <field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"/>
                            </group>    
    </group>


            </field>
       </record>                  

    </data>
</openerp>

Python :

from osv import fields, osv
from tools.translate import _
import decimal_precision as dp
import netsvc

class Sale_order(osv.osv):

    _name = 'sale.order'
    _inherit = 'sale.order'



    def _amount_all(self, cr, uid, ids, field_name, arg, context=None):
        cur_obj = self.pool.get('res.currency')
        res = {}
        for order in self.browse(cr, uid, ids, context=context):
            res[order.id] = {
                'amount_untaxed': 0.0,
                'amount_tax': 0.0,
                'amount_total': 0.0,
                'accise': 0.0,
                'amount_net': 0.0,
                }
            val = val1 = val2 = tva = 0.0
            cur = order.pricelist_id.currency_id
            for line in order.order_line:
                val1 += line.price_subtotal
                val += self._amount_line_tax(cr, uid, line, context=context)
            val2 = val1 * order.add_accise/100
        tva = (val1 + val2)* 0.05   
            if val2 :
               if val == 0.0: 
                  val = tva
               else:  
                  val = val
          val2= 0.0     
            res[order.id]['accise'] = cur_obj.round(cr, uid, cur, val2)
            res[order.id]['amount_tax'] = cur_obj.round(cr, uid, cur, val)
            res[order.id]['amount_untaxed'] = cur_obj.round(cr, uid, cur, val1)
            res[order.id]['amount_net'] = res[order.id]['amount_untaxed']
            res[order.id]['amount_total'] = res[order.id]['amount_net'] + res[order.id]['amount_tax'] + res[order.id]['accise']
        return res


    _columns = {

            'add_accise':fields.float('Accise(%)',digits=(4,2), readonly=True, states={'draft': [('readonly', False)]}),
            'accise': fields.function(_amount_all, method=True, digits_compute= dp.get_precision('Sale Price'), string='Montant accise',
                                            store =True,multi='sums', help="The additional discount on untaxed amount."),
            'amount_untaxed': fields.function(_amount_all, method=True, digits_compute= dp.get_precision('Sale Price'), string='Untaxed Amount',
                                              store = True,multi='sums', help="The amount without tax."),
            'amount_net': fields.function(_amount_all, method=True, digits_compute= dp.get_precision('Sale Price'), string='Net Amount',
                                              store = True,multi='sums', help="The amount after additional discount."),                                              
            'amount_tax': fields.function(_amount_all, method=True, digits_compute= dp.get_precision('Sale Price'), string='Taxes',
                                          store = True,multi='sums', help="The tax amount."),
            'amount_total': fields.function(_amount_all, method=True, digits_compute= dp.get_precision('Sale Price'), string='Total',
                                            store = True,multi='sums', help="The total amount."),
        }

    _defaults={
               'add_accise': 0.0,               
               }
1
Avatar
Discard
Merlin TecSol Pvt. Ltd.
Author

You mean to say that this is the only way out. Can't we solve this by setting up the TAX part in some way? I think bug is a serious show stopper!

le_dilem

to my knowledge, this is the only way

Robert Rübner

I know this is an old question but we have a similar problem. I tried to describe it in https://github.com/odoo/odoo/issues/9417. Maybe there was some update in the meantime so we don't need an additional module.

Adamz

Its a joke, I cant work it out.. dont want to look stupid on quotes..

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now