diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/cla/corporate/avoinsystems.md | 3 | ||||
| -rw-r--r-- | doc/cla/individual/pashute.md | 11 | ||||
| -rw-r--r-- | doc/reference/orm.rst | 10 |
3 files changed, 22 insertions, 2 deletions
diff --git a/doc/cla/corporate/avoinsystems.md b/doc/cla/corporate/avoinsystems.md index 13209ca53a3..4009dc466e5 100644 --- a/doc/cla/corporate/avoinsystems.md +++ b/doc/cla/corporate/avoinsystems.md @@ -17,3 +17,6 @@ Svante Suominen svante.suominen@avoin.systems https://github.com/svantesuominen Erno Iipponen erno.iipponen@avoin.systems https://github.com/iipponen Tuomo Aura tuomo.aura@avoin.systems https://github.com/tuomoaura Atte Isopuro atte.isopuro@avoin.systems https://github.com/aisopuro +Mikko Närjänen mikko.narjanen@avoin.systems https://github.com/mtnarjan +Toni Pesola toni.pesola@avoin.systems https://github.com/tonipes +Santeri Valjakka santeri.valjakka@avoin.systems https://github.com/hegenator diff --git a/doc/cla/individual/pashute.md b/doc/cla/individual/pashute.md new file mode 100644 index 00000000000..e0dde9fed9a --- /dev/null +++ b/doc/cla/individual/pashute.md @@ -0,0 +1,11 @@ +Israel, 2017-07-06 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Moshe Flam pashute@gmail.com https://github.com/pashute diff --git a/doc/reference/orm.rst b/doc/reference/orm.rst index 876d74f65cc..00b284f9cb2 100644 --- a/doc/reference/orm.rst +++ b/doc/reference/orm.rst @@ -45,14 +45,20 @@ Field access ------------ Recordsets provide an "Active Record" interface: model fields can be read and -written directly from the record, but only on singletons (single-record -recordsets). Setting a field's value triggers an update to the database:: +written directly from the record as attributes, but only on singletons +(single-record recordsets). +Field values can also be accessed like dict items, which is more elegant and +safer than ``getattr()`` for dynamic field names. +Setting a field's value triggers an update to the database:: >>> record.name Example Name >>> record.company_id.name Company Name >>> record.name = "Bob" + >>> field = "name" + >>> record[field] + Bob Trying to read or write a field on multiple records will raise an error. |
