-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] account_banking_ach_discount: Migration to 16.0
- Loading branch information
1 parent
5775f86
commit ef21873
Showing
10 changed files
with
70 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
account_banking_ach_discount/models/account_payment_line.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright (C) 2019 Open Source Integrators | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
from odoo import models | ||
|
||
|
||
class AccountPaymentOrder(models.Model): | ||
_inherit = "account.payment.line" | ||
|
||
def _prepare_account_payment_vals(self): | ||
values = super()._prepare_account_payment_vals() | ||
note = "" | ||
if self.reason_code: | ||
note = self.reason_code.display_name + ": " | ||
if self.note: | ||
note += self.note | ||
payment_difference = self.payment_difference | ||
if self.payment_type == "outbound": | ||
payment_difference *= -1 | ||
write_off_line_vals = { | ||
"account_id": self.writeoff_account_id.id, | ||
"name": note, | ||
"amount_currency": payment_difference, | ||
"balance": payment_difference, | ||
} | ||
values["write_off_line_vals"] = [write_off_line_vals] | ||
return values |
102 changes: 0 additions & 102 deletions
102
account_banking_ach_discount/models/account_payment_order.py
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
|
||
* Bhavesh Odedra <[email protected]> | ||
* Maxime Chambreuil <[email protected]> | ||
|
||
* ForgeFlow <https://www.forgeflow.com> | ||
* Jasmin Solanki <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters