Question: Recently odoo (formerly OpenERP) V8 has been released. In new API method decorators are introduced. in `models.py` methods needs to be decorated with `@api.one` or `@api.multi`.

Referring [odoo documentation](https://www.odoo.com/documentation/8.0/) i can not determine the exact use. Can anybody explain in detail.

Thanks.

Answer: 
**@api.one**:

This decorator loops automatically on Records of RecordSet for you. Self is redefined as current record:

```
@api.one
def func(self):
    self.name = 'xyz'

```

**@api.multi**:

Self will be the current RecordSet without iteration. It is the default behavior:

```
@api.multi
def func(self):
    len(self)

```

For the detailed description of all API you can refer this [Link](http://odoo-new-api-guide-line.readthedocs.org/en/latest/decorator.html)
```
@api.model #When the record data/self is not as relevant. Sometimes also used with old API calls.
def model_text(self):
    return "this text does not rely on self"

@api.multi #Normally followed by a loop on self because self may contain multiple records
def set_field(self):
    for r in self:
        r.abc = r.a + r.b

@api.one #The api will do a loop and call the method for each record. Not preferred because of potential problems with returns to web clients
def set_field(self):
    self.abc = self.a + self.b

```