Skip to content

Conversation

@pedrobaeza
Copy link
Member

Previous approach was too much aggressive, calling a very generic method that does a lot of stuff apart from recomputing payment_state, launching a rewrite of the lines with debit=0 and credit=0, which totally wrecks the accounting.

Now we have extracted the code for computing the payment state inside the migration script and manually written for each of the expenses moves.

@Tecnativa

Previous approach was too much aggressive, calling a very generic method
that does a lot of stuff apart from recomputing payment_state, launching
a rewrite of the lines with debit=0 and credit=0, which totally wrecks
the accounting.

Now we have extracted the code for computing the payment state inside
the migration script and manually written for each of the expenses
moves.
@pedrobaeza pedrobaeza added this to the 15.0 milestone Jun 3, 2024
@pedrobaeza
Copy link
Member Author

Tested on real migration.

@pedrobaeza pedrobaeza merged commit b04b27c into OCA:15.0 Jun 3, 2024
@pedrobaeza pedrobaeza deleted the 15.0-ou_fix-hr_expense-compute_payment_state branch June 3, 2024 11:03
@huguesdk
Copy link
Member

huguesdk commented Oct 4, 2024

this only sets the value of the payment_state field, but other fields must be updated too: always_tax_exigible, amount_residual, amount_residual_signed, amount_untaxed and amount_untaxed_signed. created #4577 to address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants