summaryrefslogtreecommitdiff
path: root/addons/account_debit_note/tests
diff options
context:
space:
mode:
authorwilliam <wan@odoo.com>2020-03-30 11:46:27 +0000
committerwilliam <wan@odoo.com>2020-08-05 11:57:10 +0000
commit82dc0cb7b91ae59beae7e1c865b670afc5958b31 (patch)
tree949b949b249cdac265310798d5abb82675a1741b /addons/account_debit_note/tests
parent276ba8e90c87f8294286f915508766761a58d1e2 (diff)
[IMP] account: soft post entries in the future
Add an easy way to not post the entries in the future when calling post() on it, but rather set it to be auto-posted at accounting date. This is useful when we are creating a lot of entries in batch and some might be in the future, some in the past, and we don't want to separate that in two batch every time. (asset, accrual, transfer,... )
Diffstat (limited to 'addons/account_debit_note/tests')
-rw-r--r--addons/account_debit_note/tests/test_out_debit_note.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/account_debit_note/tests/test_out_debit_note.py b/addons/account_debit_note/tests/test_out_debit_note.py
index f712c5dfe0d..dd024fa23b0 100644
--- a/addons/account_debit_note/tests/test_out_debit_note.py
+++ b/addons/account_debit_note/tests/test_out_debit_note.py
@@ -10,7 +10,7 @@ class TestAccountDebitNote(AccountTestInvoicingCommon):
def test_00_debit_note_out_invoice(self):
""" Debit Note of a regular Customer Invoice"""
invoice = self.init_invoice('out_invoice')
- invoice.post()
+ invoice.action_post()
move_debit_note_wiz = self.env['account.debit.note'].with_context(active_model="account.move",
active_ids=invoice.ids).create({
'date': fields.Date.from_string('2019-02-01'),
@@ -29,7 +29,7 @@ class TestAccountDebitNote(AccountTestInvoicingCommon):
def test_10_debit_note_in_refund(self):
""" Debit Note of a vendor refund (is a regular vendor bill) """
invoice = self.init_invoice('in_refund')
- invoice.post()
+ invoice.action_post()
move_debit_note_wiz = self.env['account.debit.note'].with_context(active_model="account.move",
active_ids=invoice.ids).create({
'date': fields.Date.from_string('2019-02-01'),