[IMP] account_payment_order_notification: black, isort, prettier

This commit is contained in:
Víctor Martínez
2022-11-14 08:29:08 +01:00
parent 4d8096355a
commit f197646b7d
4 changed files with 18 additions and 4 deletions

View File

@@ -10,11 +10,15 @@ class AccountPaymentOrderNotification(models.Model):
_inherit = ["mail.thread"]
order_id = fields.Many2one(
comodel_name="account.payment.order", required=True, readonly=True,
comodel_name="account.payment.order",
required=True,
readonly=True,
)
company_id = fields.Many2one(related="order_id.company_id")
partner_id = fields.Many2one(
comodel_name="res.partner", required=True, readonly=True,
comodel_name="res.partner",
required=True,
readonly=True,
)
payment_line_ids = fields.Many2many(
comodel_name="account.payment.line", readonly=True
@@ -39,6 +43,7 @@ class AccountPaymentOrderNotification(models.Model):
subtype_ids=follower.subtype_ids.ids,
)
rec.message_subscribe(
partner_ids=[rec.partner_id.id], subtype_ids=mt_comment.ids,
partner_ids=[rec.partner_id.id],
subtype_ids=mt_comment.ids,
)
return res

View File

@@ -9,7 +9,9 @@ class WizardAccountPaymentOrderNotification(models.TransientModel):
_description = "Wizard Account Payment Order Notification"
order_id = fields.Many2one(
comodel_name="account.payment.order", required=True, readonly=True,
comodel_name="account.payment.order",
required=True,
readonly=True,
)
mail_template_id = fields.Many2one(
comodel_name="mail.template",

View File

@@ -0,0 +1 @@
../../../../account_payment_order_notification

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)