- In order to test close period wizard I create a period then close it and checked it's state - !record {model: account.period, id: account_period_jan0}: company_id: base.main_company date_start: !eval "'%s-01-01' %(datetime.now().year)" date_stop: !eval "'%s-01-31' %(datetime.now().year)" fiscalyear_id: account.data_fiscalyear name: !eval "'Jan-%s' %(datetime.now().year)" special: 1 - I check that the period state is "Draft" - !assert {model: account.period, id: account_period_jan0, string: Period is in Draft state}: - state == 'draft' - I use "Close a Period" wizard to close period - !record {model: account.period.close, id: account_period_close_0}: sure: 1 - I clicked on Close Period Button to close Period - !python {model: account.period.close}: | self.data_save(cr, uid, [ref("account_period_close_0")], {"lang": 'en_US', "active_model": "account.period", "active_ids": [ref("account_period_jan0")], "tz": False, "active_id": ref("account_period_jan0"), }) - I check that the period state is "Done" - !assert {model: account.period, id: account_period_jan0, string: Period is in Done state}: - state == 'done'