Skip to content

Commit

Permalink
[FIX] sale: remove wire transfer confirmation from action_lock
Browse files Browse the repository at this point in the history
Versions
--------
- 16.0+

Steps
-----
1. Enable lock SO on confirmation;
2. enable wire transfer as payment provider'
3. go to website;
4. buy a product using wire transfer;
5. confirm the generated SO in the back-end;
6. front-end says payment has been confirmed.

Issue
-----
The confirmation status of the SO doesn't reflect the confirmation
status of the payment.

Cause
-----
The `action_lock` method looks at any relevant wire transfers that are
pending, and confirms them.

Solution
--------
Decouple wire transfer confirmation from the locking of sale orders.

opw-3751481

closes odoo#169505

X-original-commit: f8c5d27
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Levi Siuzdak <sile@odoo.com>
  • Loading branch information
lvsz committed Jun 18, 2024
1 parent 2844cd1 commit 704b568
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions addons/sale/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -1026,11 +1026,6 @@ def _send_order_notification_mail(self, mail_template):
)

def action_lock(self):
for order in self:
tx = order.sudo().transaction_ids._get_last()
if tx and tx.state == 'pending' and tx.provider_id.code == 'custom' and tx.provider_id.custom_mode == 'wire_transfer':
tx._set_done()
tx.write({'is_post_processed': True})
self.locked = True

def action_unlock(self):
Expand Down

0 comments on commit 704b568

Please sign in to comment.