From f0c024a6f751e9f369e82d022b4ba32bc76c8ec6 Mon Sep 17 00:00:00 2001 From: Tymoteusz Motylewski Date: Tue, 18 Nov 2014 10:45:25 +0100 Subject: [PATCH] [FIX] doc: incorrect class access in new api guide When creating a class with the new API, we should use models.Model instead of just Model. closes #3713 --- doc/reference/orm.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/reference/orm.rst b/doc/reference/orm.rst index cfc465078b1..474f0eee895 100644 --- a/doc/reference/orm.rst +++ b/doc/reference/orm.rst @@ -18,7 +18,7 @@ set of records of the same model. Methods defined on a model are executed on a recordset, and their ``self`` is a recordset:: - class AModel(Model): + class AModel(models.Model): _name = 'a.model' def a_method(self): # self can be anywhere between 0 records and all records in the @@ -279,7 +279,7 @@ Creating Models Model fields are defined as attributes on the model itself:: from openerp import models, fields - class AModel(Model): + class AModel(models.Model): _name = 'a.model.name' field1 = fields.Char()