Skip to content

Commit

Permalink
[MIG] account_payment_order_return: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
almumu committed Jan 15, 2025
1 parent b8e220d commit 6580f8d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion account_payment_order_return/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "Account Payment Order Return",
"version": "16.0.1.0.1",
"version": "17.0.1.0.1",
"category": "Banking addons",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/bank-payment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down
1 change: 1 addition & 0 deletions account_payment_order_return/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
- Vicent Cubells
- João Marques
- Kitti U. \<[email protected]\>
- Almudena de La Puente <[email protected]>
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,31 @@
# Copyright 2021 Tecnativa - João Marques
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

from odoo import fields, models
from odoo import api, fields, models


class AccountPaymentLineCreate(models.TransientModel):
_inherit = "account.payment.line.create"

include_returned = fields.Boolean(string="Include move lines from returns")

def _prepare_move_line_domain(self):
domain = super()._prepare_move_line_domain()
@api.depends(
"date_type",
"move_date",
"due_date",
"journal_ids",
"invoice",
"target_move",
"allow_blocked",
"payment_mode",
"partner_ids",
)
def _compute_move_line_domain(self):
res = super()._compute_move_line_domain()
domain = self.move_line_domain
if not self.include_returned:
domain += [
("move_id.returned_payment", "=", False),
]
return domain
self.move_line_domain = domain
return res

0 comments on commit 6580f8d

Please sign in to comment.