diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2020-07-29 10:22:48 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2020-07-29 15:20:02 +0000 |
| commit | 5eea4c014a2a04b0e84af196bead8a2070fe7170 (patch) | |
| tree | cbe2728fe2b2e02d67e7d06795221ab63e31b83d /addons/account | |
| parent | 7d010ee8a54e3e60324bedeba2098303b17c97ed (diff) | |
[FIX] account, stock_account: clean anglo-saxon lines
- Configure a Product Category Automated + FIFO
- Create a product in this category
- Create a PO for 10 units, receive the units, bill the PO and pay
- Sell 1 unit of the product and deliver it
- Create an invoice for the order
- Without paying the invoice, create a credit note with the option
'Full refund and draft invoice'
- Post new invoice
The anglo-saxon lines are counted twice.
This happens because the lines already exist in the newly created draft
invoice.
For the sake of simplicity of the fix, we clean-up the invoice after
creation.
opw-2300536
closes odoo/odoo#55158
X-original-commit: 02d857b8aa75962f535ab4cd69ff8e2a6ef3fb48
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/account')
| -rw-r--r-- | addons/account/wizard/account_move_reversal.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/account/wizard/account_move_reversal.py b/addons/account/wizard/account_move_reversal.py index b53d50fd513..aa9b0779950 100644 --- a/addons/account/wizard/account_move_reversal.py +++ b/addons/account/wizard/account_move_reversal.py @@ -71,6 +71,9 @@ class AccountMoveReversal(models.TransientModel): 'auto_post': True if reverse_date > fields.Date.context_today(self) else False, } + def _reverse_moves_post_hook(self, moves): + return + def reverse_moves(self): self.ensure_one() moves = self.move_ids @@ -100,6 +103,8 @@ class AccountMoveReversal(models.TransientModel): return self.new_move_ids = new_moves + if new_moves: + self._reverse_moves_post_hook(new_moves) # Create action. action = { |
