diff --git a/account_move_base_import/test/completion_test.yml b/account_move_base_import/test/completion_test.yml index 5df9d89f..12e13a07 100644 --- a/account_move_base_import/test/completion_test.yml +++ b/account_move_base_import/test/completion_test.yml @@ -66,20 +66,16 @@ - !python {model: account.move.line}: | import datetime as dt - context['check_move_validity'] = False - model.write({'name': dt.date.today().strftime('TBNK/%Y/0001'), - 'credit': 210.0}) - model.write({'name': 'T2S12345', - 'debit': 65.0}) - model.write({'name': dt.date.today().strftime('RTEXJ/%Y/0001'), - 'debit': 210.0}) - model.write({'credit': 600.0}) - model.write({'debit': 932.4}) + model.browse(ref('move_line_ci')).with_context(check_move_validity=False).write({'name': dt.date.today().strftime('TBNK/%Y/0001'),'credit': 210.0}) + model.browse(ref('move_line_si')).with_context(check_move_validity=False).write({'name': 'T2S12345','debit': 65.0}) + model.browse(ref('move_line_cr')).with_context(check_move_validity=False).write({'name': dt.date.today().strftime('RTEXJ/%Y/0001'),'debit': 210.0}) + model.browse(ref('move_line_partner_name')).with_context(check_move_validity=False).write({'credit': 600.0}) + model.browse(ref('move_line_partner_label')).with_context(check_move_validity=False).write({'debit': 932.4}) - I run the auto complete - - !python {model: account.move}: | - result = self.button_auto_completion() + !python {model: account.move, ref: move_test1}: | + result = model.browse(ref('move_test1')).button_auto_completion() - Now I can check that all is nice and shiny, line 1. I expect the Customer Invoice Number to be recognised. diff --git a/account_move_base_import/test/refund.yml b/account_move_base_import/test/refund.yml index 3bcec135..ec97bb04 100644 --- a/account_move_base_import/test/refund.yml +++ b/account_move_base_import/test/refund.yml @@ -27,8 +27,8 @@ - I confirm the refund - - !python {model: account.invoice, id: invoice_for_completion_1}: - self.action_invoice_open() + !python {model: account.invoice, ref: invoice_for_completion_1}: | + model.browse(ref('refund_for_completion_1')).action_invoice_open() - I check that the refund state is "Open" - diff --git a/account_move_base_import/test/supplier_invoice.yml b/account_move_base_import/test/supplier_invoice.yml index 2eead88a..e3e90050 100644 --- a/account_move_base_import/test/supplier_invoice.yml +++ b/account_move_base_import/test/supplier_invoice.yml @@ -17,10 +17,8 @@ - I add a reference to an existing supplier invoce - - !python {model: account.invoice}: | - self.write({ - 'reference': 'T2S12345' - }) + !python {model: account.invoice, id: account.demo_invoice_0}: | + self.write({'reference': 'T2S12345'}) - I check a second time that my invoice is still a supplier invoice - @@ -29,7 +27,7 @@ - Now I confirm it - - !python {model: account.invoice, id: account.demo_invoice_0}: + !python {model: account.invoice, ref: account.demo_invoice_0}: | self.action_invoice_open() - I check that the supplier number is there