Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
3
account_maturity_date_default/tests/__init__.py
Executable file
3
account_maturity_date_default/tests/__init__.py
Executable file
@@ -0,0 +1,3 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
|
||||
|
||||
from . import test_account_move
|
||||
18
account_maturity_date_default/tests/test_account_move.py
Executable file
18
account_maturity_date_default/tests/test_account_move.py
Executable file
@@ -0,0 +1,18 @@
|
||||
from odoo import fields
|
||||
from odoo.tests import tagged
|
||||
|
||||
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
|
||||
|
||||
|
||||
@tagged("post_install", "-at_install")
|
||||
class TestAccountMove(AccountTestInvoicingCommon):
|
||||
def test_invoice_move_update(self):
|
||||
invoice = self.init_invoice("out_invoice", products=[self.product])
|
||||
invoice.line_ids.write({"date_maturity": False})
|
||||
invoice.write({"date": "1999-12-31"})
|
||||
invoice_line = invoice.line_ids.filtered(
|
||||
lambda x: x.account_id.account_type == "asset_receivable"
|
||||
)
|
||||
self.assertEqual(
|
||||
invoice_line.date_maturity, fields.Date.from_string("1999-12-31")
|
||||
)
|
||||
Reference in New Issue
Block a user