Community mailing list archives

community@mail.odoo.com

Re: New API in YAML tests

by
Torvald Baade Bringsvor, Torvald B. Bringsvor
- 09/24/2014 16:39:25
Sorry to answer my own question, but to me it seems this is the way:

self = self.browse(cr, uid, [self.create(cr, uid, {})])


-Torvald


2014-09-24 21:58 GMT+02:00 Torvald Baade Bringsvor <torvald@bringsvor.com>:
Hi

Have any of you had success using the new API in YAML tests?

I tried to do something like this:

!python {model: mymodel}: |
     self # this is what the documentation said you should do to get new api
     self.store_data(context)

The store_data accesses self.env, which fails since you don't have the attribute.

So, have any of you done this?

-Torvald


--
Torvald Baade Bringsvor
Bringsvor Consulting AS - Odoo (formerly OpenERP) implementation partner



--
Torvald Baade Bringsvor
Bringsvor Consulting AS - Odoo (formerly OpenERP) implementation partner