Skip to content

[14.0] l10n_it_split_payment: avoid duplicating line tax and its account refund counterpart #5216

@patrickt-oforce

Description

@patrickt-oforce

Module

Module affected by this bug is l10n_it_split_payment

Describe the bug

Actually, when an invoice for PA is created from sale order, on save / confirm the tax line and its account refund line are duplicated. The case can be seen on runboat at http://oca-l10n-italy-14-0-f2dde4bc85c0.runboat.odoo-community.org/web?#id=20&action=227&model=account.move&view_type=form&cids=&menu_id=134

To Reproduce

Affected versions:

Steps to reproduce the behavior:

  1. Install l10n_it module if not installed
  2. Configure a tax for split payment,
  • create new tax
  • as invoice and refund line set 100,0% of base amount with account 260100
  • In advanced option tab st Tax payment to split payment
  • As VAT liquidation account the same account set on tax repartition lines
  • Set a label and the tax value
  1. Create fiscal position for split payment
  • Create new fiscal position
  • In tax mapping set 22% for sale mapped to 22% split payment for sales
  • Check the flag for split payment
  1. Select a product, and set 22% sale ad customer tax
  2. Create an SO, adding product previously configured, set Italian fiscal position in other info tab, confirm it
  3. Create an invoice
  4. Edit it, changing fiscal position to split payment fiscal position
  5. check Journal Items tab

Expected behavior
When invoice fiscal position is set to split payment, in journal items tab must be only one tax line for tacx amount and only one account refund tax for the tax line

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions