Skip to content

Commit

Permalink
[MIG] mail_attach_existing_attachment_account from 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Nov 22, 2024
1 parent a9c9e80 commit 6f0d14e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion mail_attach_existing_attachment_account/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"author": "Thore Baden, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/social",
"category": "Social Network",
"version": "14.0.1.0.1",
"version": "16.0.1.0.1",
"license": "AGPL-3",
"depends": ["account", "mail_attach_existing_attachment"],
"data": ["wizard/account_invoice_send_view.xml"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from odoo.tests import Form, common


class TestMailAttachExistingAttachmentAccount(common.SavepointCase):
class TestMailAttachExistingAttachmentAccount(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
Expand All @@ -12,21 +12,12 @@ def setUpClass(cls):
cls.journal = cls.env["account.journal"].create(
{"name": "Test sale journal", "code": "TSALE", "type": "sale"}
)
account_type = cls.env.ref("account.data_account_type_other_income")
cls.income_account = cls.env["account.account"].search(
[
("user_type_id", "=", account_type.id),
("company_id", "=", cls.env.company.id),
],
limit=1,
)
invoice_form = Form(
cls.env["account.move"].with_context(default_move_type="out_invoice")
)
invoice_form.partner_id = cls.partner
with invoice_form.invoice_line_ids.new() as line_form:
line_form.product_id = cls.product
line_form.account_id = cls.income_account
cls.invoice = invoice_form.save()
cls.invoice.action_post()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,4 @@ def default_get(self, fields_list):
res["can_attach_attachment"] = True # pragma: no cover
return res

can_attach_attachment = fields.Boolean(
string="Can Attach Attachment",
)
can_attach_attachment = fields.Boolean()

0 comments on commit 6f0d14e

Please sign in to comment.