Skip to Content

Contributors

Re: Tax and account mapping depending of the product/category

Thanks Pedro for your feedback, but it's not the same issue.

This great module helps to easily configure the tax mapping (it generates all the fiscal position and tax mapping and save us a lot of time).

Here the case is more complexe sometime depending on the product you can not map a normal tax to a normal tax but sometime for legal reasons the tax in the dest country is a Reduce one or a



Le lun. 11 juil. 2022 à 09:56, Pedro M. Baeza (Tecnativa) <notifications@odoo-community.org> a écrit :

_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe


by Sébastien Beau - 10:40 - 11 Jul 2022

Reference

  • Tax and account mapping depending of the product/category

    Hi all I have created a discussion on github here (maybe easier to discuss and to keep an history)

    https://github.com/OCA/account-fiscal-rule/discussions/298


    I copy/paste the description of the discussion


    Issue

    When selling in Europe (or only in France but with some special dom-tom case), you need to apply local tax when reaching a certain amount. And sometime you need to map the tax (and also the account) depending of the product.

    For example you sell products A and B with the tax 20% in France
    But you need to sell it with a tax 13% for product A and 16% for product B in some fiscal position.

    Right now it's impossible to do it



    Solution

    I would like to introduce a new module account_fiscal_product_rule

    That will have the following data models

    
    class AccountFiscalPositionProductRule():
    
        name = fields.Char()
        fiscal_position_id = fields.Many2one("account.fiscal.position")
        product_tmpl_ids = fields.Many2many("product.template")
        category_ids = fields.Many2many("product.category")
        account_income_id = fields.Many2one("account.account")
        account_expense_id = fields.Many2one("account.account")
        seller_tax_ids = fields.Many2Many("account.tax")
        supplier_tax_ids = fields.Many2Many("account.tax")
    
    
    class ProductCategory():
    
        fiscal_position_product_rule_ids = fields.Many2many("account.fiscal.position.product.rule")
    
    
    class ProductTemplate():
    
        fiscal_position_product_rule_ids = fields.Many2many("account.fiscal.position.product.rule")
    
    
    

    Then we can inherit the mapping logic (tax and account) to apply first this "specific rule" and if not rule match apply native rules

    Describe alternatives you've considered

    I had thinking about adding product_ids and category_ids on "account.fiscal.position.account" and "account.fiscal.position.tax". But the UI not really good for end user (too much configuration), and code will be not so easy to inherit.



    Thanks for your feedback (please put it in github)


    by Sébastien Beau - 09:45 - 11 Jul 2022