Skip to content

Commit

Permalink
[FIX] website_sale_sepa_dd_payment: move features in other modules
Browse files Browse the repository at this point in the history
  • Loading branch information
remytms committed Nov 28, 2024
1 parent bd6635f commit a8bded3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 27 deletions.
1 change: 0 additions & 1 deletion website_sale_sepa_dd_payment/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
],
"excludes": [],
"data": [
"views/product_views.xml",
"views/templates.xml",
"data/payment_provider_data.xml",
],
Expand Down
12 changes: 1 addition & 11 deletions website_sale_sepa_dd_payment/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,12 @@
# SPDX-License-Identifier: AGPL-3.0-or-later


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


class SaleOrder(models.Model):
_inherit = "sale.order"

allow_sepa_dd_payment = fields.Boolean(compute="_compute_allow_sepa_dd_payment")

@api.depends("order_line", "payment_mode_id")
def _compute_allow_sepa_dd_payment(self):
for order in self:
only_allowed = all(
order.order_line.mapped("product_id").mapped("allow_sepa_dd_payment")
)
order.allow_sepa_dd_payment = only_allowed

def get_sepa_dd_payment_mode(self):
return self.env["account.payment.mode"].search(
[("payment_method_id.code", "=", "sepa_direct_debit")],
Expand Down
15 changes: 0 additions & 15 deletions website_sale_sepa_dd_payment/views/product_views.xml

This file was deleted.

0 comments on commit a8bded3

Please sign in to comment.