File tree 1 file changed +4
-0
lines changed
1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 5
5
6
6
from dateutil .relativedelta import relativedelta
7
7
8
+ from odoo import fields
8
9
from odoo .exceptions import ValidationError
9
10
from odoo .tests .common import SavepointCase
10
11
@@ -94,6 +95,7 @@ def create_invoice(
94
95
"partner_id" : partner or self .partner_agrolait .id ,
95
96
"currency_id" : currency_id or self .currency_eur_id ,
96
97
"move_type" : invoice_type ,
98
+ "invoice_date" : fields .Date .today (),
97
99
"invoice_payment_term_id" : self .payment_term .id ,
98
100
"invoice_line_ids" : [
99
101
[
@@ -217,6 +219,8 @@ def test_6_check_billing_from_bills(self):
217
219
if inv_1 .state != "posted" :
218
220
inv_1 .action_post ()
219
221
inv_2 = inv_1 .copy ()
222
+ # Need to explicitly assign invoice date, not kept on copy
223
+ inv_2 .invoice_date = fields .Date .today ()
220
224
if inv_2 .state != "posted" :
221
225
inv_2 .action_post ()
222
226
ctx = {
You can’t perform that action at this time.
0 commit comments